summaryrefslogtreecommitdiff
path: root/src/gallium
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/SConscript98
-rw-r--r--src/gallium/auxiliary/SConscript71
-rw-r--r--src/gallium/drivers/i915/SConscript2
-rw-r--r--src/gallium/drivers/i965/SConscript2
-rw-r--r--src/gallium/drivers/llvmpipe/README65
-rw-r--r--src/gallium/drivers/llvmpipe/SConscript6
-rw-r--r--src/gallium/drivers/rbug/README16
-rw-r--r--src/gallium/drivers/softpipe/SConscript2
-rw-r--r--src/gallium/drivers/sw/SConscript1
-rw-r--r--src/gallium/drivers/trace/README18
-rw-r--r--src/gallium/state_trackers/egl/SConscript53
-rw-r--r--src/gallium/state_trackers/glx/xlib/SConscript38
-rw-r--r--src/gallium/state_trackers/python/SConscript106
-rw-r--r--src/gallium/state_trackers/vega/SConscript81
-rw-r--r--src/gallium/state_trackers/xorg/SConscript63
-rw-r--r--src/gallium/targets/SConscript41
-rw-r--r--src/gallium/targets/SConscript.dri32
-rw-r--r--src/gallium/targets/dri-i915/SConscript8
-rw-r--r--src/gallium/targets/dri-i965/SConscript8
-rw-r--r--src/gallium/targets/dri-r300/SConscript8
-rw-r--r--src/gallium/targets/dri-r600/SConscript8
-rw-r--r--src/gallium/targets/dri-swrast/SConscript5
-rw-r--r--src/gallium/targets/dri-vmwgfx/SConscript8
-rw-r--r--src/gallium/targets/egl-gdi/SConscript92
-rw-r--r--src/gallium/targets/graw-null/SConscript40
-rw-r--r--src/gallium/targets/graw-null/graw_null.c69
-rw-r--r--src/gallium/targets/graw-null/graw_util.c (renamed from src/gallium/targets/graw-xlib/graw_util.c)15
-rw-r--r--src/gallium/targets/graw-xlib/SConscript19
-rw-r--r--src/gallium/targets/libgl-gdi/SConscript85
-rw-r--r--src/gallium/targets/libgl-xlib/SConscript27
-rw-r--r--src/gallium/targets/xorg-vmwgfx/SConscript114
-rw-r--r--src/gallium/tests/graw/SConscript26
-rw-r--r--src/gallium/tests/unit/SConscript4
-rw-r--r--src/gallium/winsys/SConscript67
34 files changed, 561 insertions, 737 deletions
diff --git a/src/gallium/SConscript b/src/gallium/SConscript
index 3c171552be..76f9ffb58a 100644
--- a/src/gallium/SConscript
+++ b/src/gallium/SConscript
@@ -1,30 +1,112 @@
-import os
+Import('env')
-Import('*')
+#
+# Auxiliary modules
+#
SConscript('auxiliary/SConscript')
-for driver in env['drivers']:
- SConscript(os.path.join('drivers', driver, 'SConscript'))
+#
+# Drivers
+#
+
+SConscript([
+ 'drivers/failover/SConscript',
+ 'drivers/galahad/SConscript',
+ 'drivers/i915/SConscript',
+ 'drivers/i965/SConscript',
+ 'drivers/identity/SConscript',
+ 'drivers/llvmpipe/SConscript',
+ 'drivers/rbug/SConscript',
+ 'drivers/r300/SConscript',
+ 'drivers/softpipe/SConscript',
+ 'drivers/svga/SConscript',
+ 'drivers/trace/SConscript',
+])
+
+if env['dri']:
+ # These drivers depend on drm headers
+ SConscript([
+ # XXX: nouveau drivers have a tight dependency on libdrm, so to enable
+ # we need some version logic before we enable them. Also, ATM there is
+ # no nouveau target in scons
+ #'drivers/nouveau/SConscript',
+ #'drivers/nv50/SConscript',
+ #'drivers/nvfx/SConscript',
+ 'drivers/r600/SConscript',
+ ])
+
+#
+# State trackers
+#
# Needed by some state trackers
SConscript('winsys/sw/null/SConscript')
SConscript('state_trackers/python/SConscript')
-if platform != 'embedded':
+if env['platform'] != 'embedded':
SConscript('state_trackers/glx/xlib/SConscript')
SConscript('state_trackers/dri/SConscript')
SConscript('state_trackers/xorg/SConscript')
SConscript('state_trackers/egl/SConscript')
SConscript('state_trackers/vega/SConscript')
-if platform == 'windows':
+if env['platform'] == 'windows':
SConscript('state_trackers/wgl/SConscript')
+#
+# Winsys
+#
+
SConscript('winsys/SConscript')
-SConscript('targets/SConscript')
+#
+# Targets
+#
+
+SConscript([
+ 'targets/graw-null/SConscript',
+])
+
+if env['x11']:
+ SConscript([
+ 'targets/graw-xlib/SConscript',
+ 'targets/libgl-xlib/SConscript',
+ ])
-if platform != 'embedded':
+if env['platform'] == 'windows':
+ SConscript([
+ 'targets/libgl-gdi/SConscript',
+ #'egl-gdi/SConscript',
+ ])
+
+if env['dri']:
+ SConscript([
+ 'targets/SConscript.dri',
+ 'targets/dri-i915/SConscript',
+ 'targets/dri-i965/SConscript',
+ #'targets/dri-nouveau/SConscript',
+ 'targets/dri-r300/SConscript',
+ 'targets/dri-r600/SConscript',
+ 'targets/dri-swrast/SConscript',
+ 'targets/dri-vmwgfx/SConscript',
+ ])
+
+if env['xorg']:
+ SConscript([
+ #'targets/xorg-i915/SConscript',
+ #'targets/xorg-i965/SConscript',
+ #'targets/xorg-nouveau/SConscript',
+ #'targets/xorg-radeon/SConscript',
+ 'targets/xorg-vmwgfx/SConscript',
+ ])
+
+
+#
+# Unit tests & tools
+#
+
+if env['platform'] != 'embedded':
SConscript('tests/unit/SConscript')
SConscript('tests/graw/SConscript')
+
diff --git a/src/gallium/auxiliary/SConscript b/src/gallium/auxiliary/SConscript
index 94cd74424a..0e5da1374f 100644
--- a/src/gallium/auxiliary/SConscript
+++ b/src/gallium/auxiliary/SConscript
@@ -7,8 +7,6 @@ env.Append(CPPPATH = [
'util',
])
-env.Tool('udis86')
-
env.CodeGenerate(
target = 'indices/u_indices_gen.c',
script = 'indices/u_indices_gen.py',
@@ -202,39 +200,42 @@ source = [
]
if env['llvm']:
+ if env['UDIS86']:
+ env.Append(CPPDEFINES = [('HAVE_UDIS86', '1')])
+
source += [
- 'gallivm/lp_bld_arit.c',
- 'gallivm/lp_bld_assert.c',
- 'gallivm/lp_bld_bitarit.c',
- 'gallivm/lp_bld_const.c',
- 'gallivm/lp_bld_conv.c',
- 'gallivm/lp_bld_debug.c',
- 'gallivm/lp_bld_flow.c',
- 'gallivm/lp_bld_format_aos.c',
- 'gallivm/lp_bld_format_soa.c',
- 'gallivm/lp_bld_format_yuv.c',
- 'gallivm/lp_bld_gather.c',
- 'gallivm/lp_bld_init.c',
- 'gallivm/lp_bld_intr.c',
- 'gallivm/lp_bld_logic.c',
- 'gallivm/lp_bld_misc.cpp',
- 'gallivm/lp_bld_pack.c',
- 'gallivm/lp_bld_printf.c',
- 'gallivm/lp_bld_quad.c',
- 'gallivm/lp_bld_sample.c',
- 'gallivm/lp_bld_sample_aos.c',
- 'gallivm/lp_bld_sample_soa.c',
- 'gallivm/lp_bld_struct.c',
- 'gallivm/lp_bld_swizzle.c',
- 'gallivm/lp_bld_tgsi_aos.c',
- 'gallivm/lp_bld_tgsi_info.c',
- 'gallivm/lp_bld_tgsi_soa.c',
- 'gallivm/lp_bld_type.c',
- 'draw/draw_llvm.c',
- 'draw/draw_llvm_sample.c',
- 'draw/draw_llvm_translate.c',
- 'draw/draw_pt_fetch_shade_pipeline_llvm.c',
- 'draw/draw_vs_llvm.c'
+ 'gallivm/lp_bld_arit.c',
+ 'gallivm/lp_bld_assert.c',
+ 'gallivm/lp_bld_bitarit.c',
+ 'gallivm/lp_bld_const.c',
+ 'gallivm/lp_bld_conv.c',
+ 'gallivm/lp_bld_debug.c',
+ 'gallivm/lp_bld_flow.c',
+ 'gallivm/lp_bld_format_aos.c',
+ 'gallivm/lp_bld_format_soa.c',
+ 'gallivm/lp_bld_format_yuv.c',
+ 'gallivm/lp_bld_gather.c',
+ 'gallivm/lp_bld_init.c',
+ 'gallivm/lp_bld_intr.c',
+ 'gallivm/lp_bld_logic.c',
+ 'gallivm/lp_bld_misc.cpp',
+ 'gallivm/lp_bld_pack.c',
+ 'gallivm/lp_bld_printf.c',
+ 'gallivm/lp_bld_quad.c',
+ 'gallivm/lp_bld_sample.c',
+ 'gallivm/lp_bld_sample_aos.c',
+ 'gallivm/lp_bld_sample_soa.c',
+ 'gallivm/lp_bld_struct.c',
+ 'gallivm/lp_bld_swizzle.c',
+ 'gallivm/lp_bld_tgsi_aos.c',
+ 'gallivm/lp_bld_tgsi_info.c',
+ 'gallivm/lp_bld_tgsi_soa.c',
+ 'gallivm/lp_bld_type.c',
+ 'draw/draw_llvm.c',
+ 'draw/draw_llvm_sample.c',
+ 'draw/draw_llvm_translate.c',
+ 'draw/draw_pt_fetch_shade_pipeline_llvm.c',
+ 'draw/draw_vs_llvm.c'
]
gallium = env.ConvenienceLibrary(
@@ -242,4 +243,6 @@ gallium = env.ConvenienceLibrary(
source = source,
)
+env.Alias('gallium', gallium)
+
Export('gallium')
diff --git a/src/gallium/drivers/i915/SConscript b/src/gallium/drivers/i915/SConscript
index d4bf6fef13..1197bbf962 100644
--- a/src/gallium/drivers/i915/SConscript
+++ b/src/gallium/drivers/i915/SConscript
@@ -2,7 +2,7 @@ Import('*')
env = env.Clone()
-if msvc:
+if env['msvc']:
print 'warning: not building i915g'
Return()
diff --git a/src/gallium/drivers/i965/SConscript b/src/gallium/drivers/i965/SConscript
index 119f914a16..198275b655 100644
--- a/src/gallium/drivers/i965/SConscript
+++ b/src/gallium/drivers/i965/SConscript
@@ -2,7 +2,7 @@ Import('*')
env = env.Clone()
-if msvc:
+if env['msvc']:
print 'warning: not building i965g'
Return();
diff --git a/src/gallium/drivers/llvmpipe/README b/src/gallium/drivers/llvmpipe/README
index ec30d4d708..e9374cc6ef 100644
--- a/src/gallium/drivers/llvmpipe/README
+++ b/src/gallium/drivers/llvmpipe/README
@@ -1,53 +1,6 @@
LLVMPIPE -- a fork of softpipe that employs LLVM for code generation.
-Status
-======
-
-Done so far is:
-
- - the whole fragment pipeline is code generated in a single function
-
- - input interpolation
-
- - depth testing
-
- - texture sampling
- - 1D/2D/3D/cube maps supported
- - all texture wrap modes supported
- - all texture filtering modes supported
- - perhaps not all texture formats yet supported
-
- - fragment shader TGSI translation
- - same level of support as the TGSI SSE2 exec machine, with the exception
- we don't fallback to TGSI interpretation when an unsupported opcode is
- found, but just ignore it
- - done in SoA layout
- - input interpolation also code generated
-
- - alpha testing
-
- - blend (including logic ops)
- - both in SoA and AoS layouts, but only the former used for now
-
- - code is generic
- - intermediates can be vectors of floats, ubytes, fixed point, etc, and of
- any width and length
- - not all operations are implemented for these types yet though
-
-Most mesa/progs/demos/* work.
-
-To do (probably by this order):
-
- - code generate stipple and stencil testing
-
- - translate TGSI control flow instructions, and all other remaining opcodes
-
- - integrate with the draw module for VS code generation
-
- - code generate the triangle setup and rasterization
-
-
Requirements
============
@@ -98,7 +51,7 @@ Building
To build everything on Linux invoke scons as:
- scons debug=yes statetrackers=mesa drivers=llvmpipe winsys=xlib dri=false
+ scons build=debug libgl-xlib
Alternatively, you can build it with GNU make, if you prefer, by invoking it as
@@ -108,19 +61,16 @@ but the rest of these instructions assume that scons is used.
For windows is everything the except except the winsys:
- scons debug=yes statetrackers=mesa drivers=llvmpipe winsys=gdi dri=false
+ scons build=debug libgl-gdi
Using
=====
-On Linux, building will create a drop-in alternative for libGL.so. To use it
-set the environment variables:
-
- export LD_LIBRARY_PATH=$PWD/build/linux-x86_64-debug/lib:$LD_LIBRARY_PATH
+On Linux, building will create a drop-in alternative for libGL.so into
-or
+ build/foo/gallium/targets/libgl-xlib/libGL.so
- export LD_LIBRARY_PATH=$PWD/build/linux-x86-debug/lib:$LD_LIBRARY_PATH
+To use it set the LD_LIBRARY_PATH environment variable accordingly.
For performance evaluation pass debug=no to scons, and use the corresponding
lib directory without the "-debug" suffix.
@@ -136,7 +86,7 @@ Profiling
To profile llvmpipe you should pass the options
- scons debug=no profile=yes <same-as-before>
+ scons build=profile <same-as-before>
This will ensure that frame pointers are used both in C and JIT functions, and
that no tail call optimizations are done by gcc.
@@ -200,5 +150,4 @@ Development Notes
interfaces very closely, and appear to be complete enough for code
generation. See
http://npcontemplation.blogspot.com/2008/06/secret-of-llvm-c-bindings.html
- for a stand-alone example.
- See the llvm-c/Core.h file for reference.
+ for a stand-alone example. See the llvm-c/Core.h file for reference.
diff --git a/src/gallium/drivers/llvmpipe/SConscript b/src/gallium/drivers/llvmpipe/SConscript
index 49950153a4..26b258b956 100644
--- a/src/gallium/drivers/llvmpipe/SConscript
+++ b/src/gallium/drivers/llvmpipe/SConscript
@@ -9,8 +9,6 @@ if not env['llvm']:
env = env.Clone()
-env.Tool('udis86')
-
env.Append(CPPPATH = ['.'])
env.CodeGenerate(
@@ -78,6 +76,8 @@ llvmpipe = env.ConvenienceLibrary(
lp_tile_soa_os,
])
+env.Alias('llvmpipe', llvmpipe)
+
if env['platform'] != 'embedded':
env = env.Clone()
@@ -92,7 +92,7 @@ if env['platform'] != 'embedded':
'sincos',
]
- if not msvc:
+ if not env['msvc']:
tests.append('round')
for test in tests:
diff --git a/src/gallium/drivers/rbug/README b/src/gallium/drivers/rbug/README
index b6d3a5cf35..9d7bd4e769 100644
--- a/src/gallium/drivers/rbug/README
+++ b/src/gallium/drivers/rbug/README
@@ -7,24 +7,10 @@ This directory contains a Gallium3D remote debugger pipe driver.
It provides remote debugging functionality.
-= Build Instructions =
-
-To build, invoke scons on the top dir as
-
- scons dri=no statetrackers=mesa winsys=xlib
-
-
= Usage =
-To use do
-
- export LD_LIBRARY_PATH=$PWD/build/linux-x86-debug/lib
-
-ensure the right libGL.so is being picked by doing
-
- ldd progs/trivial/tri
+Do
- export XMESA_TRACE=y
GALLIUM_RBUG=true progs/trivial/tri
which should open gallium remote debugging session. While the program is running
diff --git a/src/gallium/drivers/softpipe/SConscript b/src/gallium/drivers/softpipe/SConscript
index d5f4d28aef..ea10e8a9f9 100644
--- a/src/gallium/drivers/softpipe/SConscript
+++ b/src/gallium/drivers/softpipe/SConscript
@@ -37,4 +37,6 @@ softpipe = env.ConvenienceLibrary(
'sp_tile_cache.c',
])
+env.Alias('softpipe', softpipe)
+
Export('softpipe')
diff --git a/src/gallium/drivers/sw/SConscript b/src/gallium/drivers/sw/SConscript
index e9ebf751dd..40d01db2f6 100644
--- a/src/gallium/drivers/sw/SConscript
+++ b/src/gallium/drivers/sw/SConscript
@@ -20,7 +20,6 @@ if True:
if env['llvm']:
env.Append(CPPDEFINES = 'GALLIUM_LLVMPIPE')
- env.Tool('udis86')
env.Prepend(LIBS = [llvmpipe])
extra.append(llvmpipe)
diff --git a/src/gallium/drivers/trace/README b/src/gallium/drivers/trace/README
index cdcd8d2b4b..c210cba032 100644
--- a/src/gallium/drivers/trace/README
+++ b/src/gallium/drivers/trace/README
@@ -7,23 +7,8 @@ This directory contains a Gallium3D trace debugger pipe driver.
It can traces all incoming calls.
-= Build Instructions =
-
-To build, invoke scons on the top dir as
-
- scons dri=no statetrackers=mesa winsys=xlib
-
-
= Usage =
-To use do
-
- export LD_LIBRARY_PATH=$PWD/build/linux-x86-debug/lib
-
-ensure the right libGL.so is being picked by doing
-
- ldd progs/trivial/tri
-
== Tracing ==
For tracing then do
@@ -40,6 +25,7 @@ For remote debugging see:
src/gallium/drivers/rbug/README
+
= Integrating =
You can integrate the trace pipe driver either inside the state tracker or the
@@ -60,5 +46,5 @@ are automatically wrapped by trace_screen.
--
-Jose Fonseca <jrfonseca@tungstengraphics.com>
+Jose Fonseca <jfonseca@vmware.com>
Jakob Bornecrantz <jakob@vmware.com>
diff --git a/src/gallium/state_trackers/egl/SConscript b/src/gallium/state_trackers/egl/SConscript
index efcce25e31..8d34e47df0 100644
--- a/src/gallium/state_trackers/egl/SConscript
+++ b/src/gallium/state_trackers/egl/SConscript
@@ -3,34 +3,35 @@
Import('*')
-if 'egl' in env['statetrackers']:
+if env['platform'] != 'windows':
+ Return()
- env = env.Clone()
+env = env.Clone()
- env.Append(CPPPATH = [
- '#/src/egl/main',
- '#/src/gallium/winsys/sw',
- '.',
- ])
- env.Append(CPPDEFINES = [
- 'HAVE_GDI_BACKEND',
- ])
+env.Append(CPPPATH = [
+ '#/src/egl/main',
+ '#/src/gallium/winsys/sw',
+ '.',
+])
+env.Append(CPPDEFINES = [
+ 'HAVE_GDI_BACKEND',
+])
- common_sources = [
- 'common/egl_g3d.c',
- 'common/egl_g3d_api.c',
- 'common/egl_g3d_image.c',
- 'common/egl_g3d_st.c',
- 'common/egl_g3d_sync.c',
- 'common/native_helper.c',
- ]
+common_sources = [
+ 'common/egl_g3d.c',
+ 'common/egl_g3d_api.c',
+ 'common/egl_g3d_image.c',
+ 'common/egl_g3d_st.c',
+ 'common/egl_g3d_sync.c',
+ 'common/native_helper.c',
+]
- gdi_sources = common_sources + [
- 'gdi/native_gdi.c',
- ]
+gdi_sources = common_sources + [
+ 'gdi/native_gdi.c',
+]
- st_egl_gdi = env.ConvenienceLibrary(
- target = 'st_egl_gdi',
- source = gdi_sources,
- )
- Export('st_egl_gdi')
+st_egl_gdi = env.ConvenienceLibrary(
+ target = 'st_egl_gdi',
+ source = gdi_sources,
+)
+Export('st_egl_gdi')
diff --git a/src/gallium/state_trackers/glx/xlib/SConscript b/src/gallium/state_trackers/glx/xlib/SConscript
index 9df351a276..775000eacc 100644
--- a/src/gallium/state_trackers/glx/xlib/SConscript
+++ b/src/gallium/state_trackers/glx/xlib/SConscript
@@ -3,25 +3,25 @@
Import('*')
-if env['platform'] == 'linux' \
- and 'mesa' in env['statetrackers']:
+if not env['x11']:
+ Return()
- env = env.Clone()
+env = env.Clone()
- env.Append(CPPPATH = [
- '#/src/mapi',
- '#/src/mesa',
- '#/src/mesa/main',
- ])
+env.Append(CPPPATH = [
+ '#/src/mapi',
+ '#/src/mesa',
+ '#/src/mesa/main',
+])
- st_xlib = env.ConvenienceLibrary(
- target = 'st_xlib',
- source = [
- 'glx_api.c',
- 'glx_getproc.c',
- 'glx_usefont.c',
- 'xm_api.c',
- 'xm_st.c',
- ]
- )
- Export('st_xlib')
+st_xlib = env.ConvenienceLibrary(
+target = 'st_xlib',
+source = [
+ 'glx_api.c',
+ 'glx_getproc.c',
+ 'glx_usefont.c',
+ 'xm_api.c',
+ 'xm_st.c',
+ ]
+)
+Export('st_xlib')
diff --git a/src/gallium/state_trackers/python/SConscript b/src/gallium/state_trackers/python/SConscript
index aadeaa0a35..5cb7960f9b 100644
--- a/src/gallium/state_trackers/python/SConscript
+++ b/src/gallium/state_trackers/python/SConscript
@@ -3,57 +3,61 @@ import os.path
Import('*')
-if 'python' in env['statetrackers']:
-
- env = env.Clone()
-
- env.Tool('python')
-
- env.Tool('swig')
- env.Append(SWIGPATH = ['#src/gallium/include', '#src/gallium/include/pipe'])
- env.Append(SWIGFLAGS = ['-python', '-keyword'])
-
- env.Append(CPPPATH = '.')
-
- if env['platform'] == 'windows':
- env.Append(LIBS = [
- 'opengl32',
- 'gdi32',
- 'user32',
- 'kernel32',
- 'ws2_32',
- ])
- else:
- env.Append(CPPDEFINES = ['GCC_HASCLASSVISIBILITY'])
- env.Append(LIBS = [
- 'GL',
- 'X11',
- ])
-
- sources = [
- 'gallium.i',
- 'st_device.c',
- 'st_sample.c',
- 'st_hardpipe_winsys.c',
- 'st_softpipe_winsys.c',
- ]
-
- env.Prepend(LIBS = [
- ws_null,
- trace,
- gallium,
- ])
+if env['toolchain'] == 'crossmingw':
+ # Cross-compilation not supported
+ Return()
+
+env = env.Clone()
+
+env.Tool('python')
- if env['llvm']:
- env.Append(CPPDEFINES = ['HAVE_LLVMPIPE'])
- env.Prepend(LIBS = [llvmpipe])
- if True:
- env.Append(CPPDEFINES = ['HAVE_SOFTPIPE'])
- env.Prepend(LIBS = [softpipe])
+env.Tool('swig')
+env.Append(SWIGPATH = ['#src/gallium/include', '#src/gallium/include/pipe'])
+env.Append(SWIGFLAGS = ['-python', '-keyword'])
- env['no_import_lib'] = 1
+env.Append(CPPPATH = '.')
+
+if env['platform'] == 'windows':
+ env.Append(LIBS = [
+ 'opengl32',
+ 'gdi32',
+ 'user32',
+ 'kernel32',
+ 'ws2_32',
+ ])
+else:
+ env.Append(CPPDEFINES = ['GCC_HASCLASSVISIBILITY'])
+ env.Append(LIBS = [
+ 'GL',
+ 'X11',
+ ])
- env.SharedLibrary(
- target = '_gallium',
- source = sources,
- )
+sources = [
+ 'gallium.i',
+ 'st_device.c',
+ 'st_sample.c',
+ 'st_hardpipe_winsys.c',
+ 'st_softpipe_winsys.c',
+]
+
+env.Prepend(LIBS = [
+ ws_null,
+ trace,
+ gallium,
+])
+
+if env['llvm']:
+ env.Append(CPPDEFINES = ['HAVE_LLVMPIPE'])
+ env.Prepend(LIBS = [llvmpipe])
+if True:
+ env.Append(CPPDEFINES = ['HAVE_SOFTPIPE'])
+ env.Prepend(LIBS = [softpipe])
+
+env['no_import_lib'] = 1
+
+pyst = env.SharedLibrary(
+ target = '_gallium',
+ source = sources,
+)
+
+env.Alias('python', pyst)
diff --git a/src/gallium/state_trackers/vega/SConscript b/src/gallium/state_trackers/vega/SConscript
index 548053eb64..4c6e18f42b 100644
--- a/src/gallium/state_trackers/vega/SConscript
+++ b/src/gallium/state_trackers/vega/SConscript
@@ -3,49 +3,48 @@
Import('*')
-if 'egl' in env['statetrackers']:
+env = env.Clone()
- env = env.Clone()
+env.Append(CPPPATH = [
+ '#/src/mapi',
+])
- env.Append(CPPPATH = [
- '#/src/mapi',
- ])
+vega_sources = [
+ 'api.c',
+ 'api_context.c',
+ 'api_filters.c',
+ 'api_images.c',
+ 'api_masks.c',
+ 'api_misc.c',
+ 'api_paint.c',
+ 'api_params.c',
+ 'api_path.c',
+ 'api_text.c',
+ 'api_transform.c',
+ 'vgu.c',
+ 'vg_context.c',
+ 'vg_manager.c',
+ 'vg_state.c',
+ 'vg_translate.c',
+ 'polygon.c',
+ 'bezier.c',
+ 'path.c',
+ 'paint.c',
+ 'arc.c',
+ 'image.c',
+ 'renderer.c',
+ 'stroker.c',
+ 'mask.c',
+ 'shader.c',
+ 'shaders_cache.c',
+]
- vega_sources = [
- 'api.c',
- 'api_context.c',
- 'api_filters.c',
- 'api_images.c',
- 'api_masks.c',
- 'api_misc.c',
- 'api_paint.c',
- 'api_params.c',
- 'api_path.c',
- 'api_text.c',
- 'api_transform.c',
- 'vgu.c',
- 'vg_context.c',
- 'vg_manager.c',
- 'vg_state.c',
- 'vg_translate.c',
- 'polygon.c',
- 'bezier.c',
- 'path.c',
- 'paint.c',
- 'arc.c',
- 'image.c',
- 'renderer.c',
- 'stroker.c',
- 'mask.c',
- 'shader.c',
- 'shaders_cache.c',
- ]
+# vgapi_header must be generated first
+env.Depends(vega_sources, vgapi_header)
- # vgapi_header must be generated first
- env.Depends(vega_sources, vgapi_header)
+st_vega = env.ConvenienceLibrary(
+ target = 'st_vega',
+ source = vega_sources,
+)
- st_vega = env.ConvenienceLibrary(
- target = 'st_vega',
- source = vega_sources,
- )
- Export('st_vega')
+Export('st_vega')
diff --git a/src/gallium/state_trackers/xorg/SConscript b/src/gallium/state_trackers/xorg/SConscript
index 0b598dab6e..ffaa1c2684 100644
--- a/src/gallium/state_trackers/xorg/SConscript
+++ b/src/gallium/state_trackers/xorg/SConscript
@@ -3,34 +3,35 @@
Import('*')
-if 'xorg' in env['statetrackers']:
-
- env = env.Clone()
-
- env.Append(CPPPATH = [
- '#/src/mesa',
- ])
-
- env.ParseConfig('pkg-config --cflags --libs libdrm xorg-server')
-
- conf = env.Configure()
-
- if conf.CheckHeader('X11/extensions/dpmsconst.h'):
- env.Append(CPPDEFINES = [('HAVE_XEXTPROTO_71', '1')])
-
- conf.Finish()
-
- st_xorg = env.ConvenienceLibrary(
- target = 'st_xorg',
- source = [ 'xorg_composite.c',
- 'xorg_crtc.c',
- 'xorg_dri2.c',
- 'xorg_driver.c',
- 'xorg_exa.c',
- 'xorg_exa_tgsi.c',
- 'xorg_output.c',
- 'xorg_renderer.c',
- 'xorg_xv.c',
- ]
- )
- Export('st_xorg')
+if not env['x11'] or not env['dri'] or not env['xorg']:
+ Return()
+
+env = env.Clone()
+
+env.Append(CPPPATH = [
+ '#/src/mesa',
+])
+
+env.ParseConfig('pkg-config --cflags --libs libdrm xorg-server')
+
+conf = env.Configure()
+
+if conf.CheckHeader('X11/extensions/dpmsconst.h'):
+ env.Append(CPPDEFINES = [('HAVE_XEXTPROTO_71', '1')])
+
+conf.Finish()
+
+st_xorg = env.ConvenienceLibrary(
+target = 'st_xorg',
+source = [ 'xorg_composite.c',
+ 'xorg_crtc.c',
+ 'xorg_dri2.c',
+ 'xorg_driver.c',
+ 'xorg_exa.c',
+ 'xorg_exa_tgsi.c',
+ 'xorg_output.c',
+ 'xorg_renderer.c',
+ 'xorg_xv.c',
+ ]
+)
+Export('st_xorg')
diff --git a/src/gallium/targets/SConscript b/src/gallium/targets/SConscript
deleted file mode 100644
index e447d09361..0000000000
--- a/src/gallium/targets/SConscript
+++ /dev/null
@@ -1,41 +0,0 @@
-import os
-Import('*')
-
-# Compatibility with old build scripts:
-#
-if 'mesa' in env['statetrackers']:
- if 'xlib' in env['winsys'] and 'libgl-xlib' not in env['targets']:
- env['targets'].append('libgl-xlib')
- if 'gdi' in env['winsys'] and 'libgl-gdi' not in env['targets']:
- env['targets'].append('libgl-gdi')
-
-if not 'graw-xlib' in env['targets'] and not 'graw-null' in env['targets'] and not env['msvc']:
- # XXX: disable until MSVC can link correctly
- SConscript('graw-null/SConscript')
-
-
-if env['dri']:
- SConscript([
- 'SConscript.dri'
- ])
-
-if 'xorg' in env['statetrackers']:
- if 'vmware' in env['winsys']:
- SConscript([
- 'xorg-vmwgfx/SConscript',
- ])
-
-if 'egl' in env['statetrackers']:
- SConscript([
- 'egl-gdi/SConscript',
- ])
-
-# Ideally all non-target directories would produce convenience
-# libraries, and the actual shared libraries and other installables
-# would be finally assembled in the targets subtree:
-#
-for target in env['targets']:
- SConscript(os.path.join(target, 'SConscript'))
-
-
-
diff --git a/src/gallium/targets/SConscript.dri b/src/gallium/targets/SConscript.dri
index bc8d179e3d..092223b369 100644
--- a/src/gallium/targets/SConscript.dri
+++ b/src/gallium/targets/SConscript.dri
@@ -3,6 +3,9 @@
Import('*')
+if not env['dri']:
+ Return()
+
drienv = env.Clone()
drienv.Replace(CPPPATH = [
@@ -77,32 +80,3 @@ Export([
'COMMON_DRI_SW_OBJECTS',
'COMMON_DRI_DRM_OBJECTS',
])
-
-SConscript([
- 'dri-swrast/SConscript',
-])
-
-if 'vmware' in env['winsys']:
- SConscript([
- 'dri-vmwgfx/SConscript',
- ])
-
-if 'i915' in env['winsys']:
- SConscript([
- 'dri-i915/SConscript',
- ])
-
-if 'i965' in env['winsys']:
- SConscript([
- 'dri-i965/SConscript',
- ])
-
-if 'radeon' in env['winsys']:
- SConscript([
- 'dri-radeong/SConscript',
- ])
-
-if 'r600' in env['winsys']:
- SConscript([
- 'dri-r600/SConscript',
- ])
diff --git a/src/gallium/targets/dri-i915/SConscript b/src/gallium/targets/dri-i915/SConscript
index 172f92d6b8..ab60013830 100644
--- a/src/gallium/targets/dri-i915/SConscript
+++ b/src/gallium/targets/dri-i915/SConscript
@@ -1,9 +1,5 @@
Import('*')
-if not 'i915' in env['drivers']:
- print 'warning: i915 pipe driver not built skipping i915_dri.so'
- Return()
-
env = drienv.Clone()
env.ParseConfig('pkg-config --cflags --libs libdrm_intel')
@@ -24,8 +20,10 @@ env.Prepend(LIBS = [
COMMON_DRI_DRM_OBJECTS
])
-env.LoadableModule(
+module = env.LoadableModule(
target = 'i915_dri.so',
source = 'target.c',
SHLIBPREFIX = '',
)
+
+env.Alias('dri-i915', module) \ No newline at end of file
diff --git a/src/gallium/targets/dri-i965/SConscript b/src/gallium/targets/dri-i965/SConscript
index 684e3488f7..669f70d6b8 100644
--- a/src/gallium/targets/dri-i965/SConscript
+++ b/src/gallium/targets/dri-i965/SConscript
@@ -1,9 +1,5 @@
Import('*')
-if not 'i965' in env['drivers']:
- print 'warning: i965 pipe driver not built skipping i965_dri.so'
- Return()
-
env = drienv.Clone()
env.ParseConfig('pkg-config --cflags --libs libdrm_intel')
@@ -27,8 +23,10 @@ env.Prepend(LIBS = [
COMMON_DRI_DRM_OBJECTS
])
-env.LoadableModule(
+module = env.LoadableModule(
target = 'i965_dri.so',
source = 'target.c',
SHLIBPREFIX = '',
)
+
+env.Alias('dri-i965', module) \ No newline at end of file
diff --git a/src/gallium/targets/dri-r300/SConscript b/src/gallium/targets/dri-r300/SConscript
index 33a458f2e6..005b4bbf7f 100644
--- a/src/gallium/targets/dri-r300/SConscript
+++ b/src/gallium/targets/dri-r300/SConscript
@@ -1,9 +1,5 @@
Import('*')
-if not 'r300' in env['drivers']:
- print 'warning: r300 pipe driver not built skipping r300_dri.so'
- Return()
-
env = drienv.Clone()
env.ParseConfig('pkg-config --cflags --libs libdrm_radeon')
@@ -23,8 +19,10 @@ env.Prepend(LIBS = [
COMMON_DRI_DRM_OBJECTS
])
-env.SharedLibrary(
+module = env.SharedLibrary(
target ='r300_dri.so',
source = 'target.c',
SHLIBPREFIX = '',
)
+
+env.Alias('dri-r300', module) \ No newline at end of file
diff --git a/src/gallium/targets/dri-r600/SConscript b/src/gallium/targets/dri-r600/SConscript
index 64d6d2a7f6..aa771db2d1 100644
--- a/src/gallium/targets/dri-r600/SConscript
+++ b/src/gallium/targets/dri-r600/SConscript
@@ -1,9 +1,5 @@
Import('*')
-if not 'r600' in env['drivers']:
- print 'warning: r600 pipe driver not built skipping r600_dri.so'
- Return()
-
env = drienv.Clone()
env.ParseConfig('pkg-config --cflags --libs libdrm_radeon')
@@ -22,8 +18,10 @@ env.Prepend(LIBS = [
COMMON_DRI_DRM_OBJECTS
])
-env.SharedLibrary(
+module = env.SharedLibrary(
target ='r600_dri.so',
source = 'target.c',
SHLIBPREFIX = '',
)
+
+env.Alias('dri-r600', module)
diff --git a/src/gallium/targets/dri-swrast/SConscript b/src/gallium/targets/dri-swrast/SConscript
index d814347119..b67483800e 100644
--- a/src/gallium/targets/dri-swrast/SConscript
+++ b/src/gallium/targets/dri-swrast/SConscript
@@ -27,15 +27,16 @@ if True:
if env['llvm']:
env.Append(CPPDEFINES = 'GALLIUM_LLVMPIPE')
- env.Tool('udis86')
env.Prepend(LIBS = [llvmpipe])
swrastg_sources = [
'swrast_drm_api.c'
]
-env.LoadableModule(
+module = env.LoadableModule(
target ='swrastg_dri.so',
source = swrastg_sources,
SHLIBPREFIX = '',
)
+
+env.Alias('dri-swrast', module)
diff --git a/src/gallium/targets/dri-vmwgfx/SConscript b/src/gallium/targets/dri-vmwgfx/SConscript
index 7afabc7429..7888e4f2c8 100644
--- a/src/gallium/targets/dri-vmwgfx/SConscript
+++ b/src/gallium/targets/dri-vmwgfx/SConscript
@@ -1,9 +1,5 @@
Import('*')
-if not 'svga' in env['drivers']:
- print 'warning: svga pipe driver not built skipping vmwgfx_dri.so'
- Return()
-
env = drienv.Clone()
env.Append(CPPDEFINES = ['GALLIUM_RBUG', 'GALLIUM_TRACE'])
@@ -20,8 +16,10 @@ env.Prepend(LIBS = [
COMMON_DRI_DRM_OBJECTS
])
-env.LoadableModule(
+module = env.LoadableModule(
target = 'vmwgfx_dri.so',
source = 'target.c',
SHLIBPREFIX = '',
)
+
+env.Alias('dri-vmwgfx', module) \ No newline at end of file
diff --git a/src/gallium/targets/egl-gdi/SConscript b/src/gallium/targets/egl-gdi/SConscript
index 8f8b28ef67..d52eeb70fd 100644
--- a/src/gallium/targets/egl-gdi/SConscript
+++ b/src/gallium/targets/egl-gdi/SConscript
@@ -3,45 +3,53 @@
Import('*')
-if env['platform'] == 'windows':
-
- env = env.Clone()
-
- env.Append(CPPPATH = [
- '#/src/gallium/state_trackers/egl',
- '#/src/gallium/state_trackers/vega',
- '#/src/egl/main',
- '#/src/mesa',
- ])
-
- env.Append(CPPDEFINES = [
- 'FEATURE_VG=1',
- 'GALLIUM_SOFTPIPE',
- 'GALLIUM_RBUG',
- 'GALLIUM_TRACE',
- ])
-
- env.Append(LIBS = [
- 'gdi32',
- 'user32',
- 'kernel32',
- 'ws2_32',
- ])
-
- env['no_import_lib'] = 1
-
- drivers = [softpipe]
- if env['llvm']:
- env.Append(CPPDEFINES = 'GALLIUM_LLVMPIPE')
- drivers += [llvmpipe]
- drivers += [identity, trace, rbug]
-
- apis = [vgapi, st_vega]
-
- egl_gallium = env.SharedLibrary(
- target ='egl_gallium',
- source = 'egl-static.c',
- LIBS = st_egl_gdi + ws_gdi + drivers + apis + gallium + egl + env['LIBS'],
- )
-
- env.InstallSharedLibrary(egl_gallium)
+env = env.Clone()
+
+env.Append(CPPPATH = [
+ '#/src/gallium/state_trackers/egl',
+ '#/src/gallium/state_trackers/vega',
+ '#/src/egl/main',
+ '#/src/mesa',
+])
+
+env.Append(CPPDEFINES = [
+ 'FEATURE_VG=1',
+ 'GALLIUM_SOFTPIPE',
+ 'GALLIUM_RBUG',
+ 'GALLIUM_TRACE',
+])
+
+env.Append(LIBS = [
+ 'gdi32',
+ 'user32',
+ 'kernel32',
+ 'ws2_32',
+])
+
+env.Prepend(LIBS = [
+ st_egl_gdi,
+ ws_gdi,
+ identity,
+ trace,
+ rbug,
+ softpipe,
+ vgapi,
+ st_vega,
+ gallium,
+ egl,
+])
+
+if env['llvm']:
+ env.Append(CPPDEFINES = 'GALLIUM_LLVMPIPE')
+ env.Prepend(LIBS = [llvmpipe])
+
+egl_gallium = env.SharedLibrary(
+ target ='egl_gallium',
+ source = 'egl-static.c',
+)
+
+env['no_import_lib'] = 1
+
+egl_gdi = env.InstallSharedLibrary(egl_gallium)
+
+env.Alias('egl-gdi', egl_gdi)
diff --git a/src/gallium/targets/graw-null/SConscript b/src/gallium/targets/graw-null/SConscript
index 3416989d8e..ebac1728f0 100644
--- a/src/gallium/targets/graw-null/SConscript
+++ b/src/gallium/targets/graw-null/SConscript
@@ -5,54 +5,28 @@ Import('*')
env = env.Clone()
-env.Prepend(LIBS = [
- ws_null,
- trace,
- rbug,
- identity,
-# gallium,
-])
-
-env.Append(CPPPATH = [
- '#src/gallium/drivers',
-])
+graw_util = env.SharedObject(
+ source = ['graw_util.c'],
+)
-if env['platform'] == 'windows':
- # For trace
- env.Append(LIBS = [
- 'ws2_32',
- ])
+env = env.Clone()
sources = [
'graw_null.c',
- '../graw-xlib/graw_util.c',
+ graw_util,
]
-if True:
- env.Append(CPPDEFINES = 'GALLIUM_SOFTPIPE')
- env.Prepend(LIBS = [softpipe])
-
-if env['llvm']:
- env.Append(CPPDEFINES = 'GALLIUM_LLVMPIPE')
- env.Tool('udis86')
- env.Prepend(LIBS = [llvmpipe])
-
-# Need this for trace, identity drivers referenced by
-# gallium_wrap_screen().
-#
env.Prepend(LIBS = [gallium])
# TODO: write a wrapper function http://www.scons.org/wiki/WrapperFunctions
graw = env.SharedLibrary(
- target ='graw',
+ target = 'graw',
source = sources,
)
-env.InstallSharedLibrary(graw, version=(1, 0))
-
if env['platform'] == 'windows':
graw = env.FindIxes(graw, 'LIBPREFIX', 'LIBSUFFIX')
else:
graw = env.FindIxes(graw, 'SHLIBPREFIX', 'SHLIBSUFFIX')
-Export('graw')
+Export('graw_util', 'graw')
diff --git a/src/gallium/targets/graw-null/graw_null.c b/src/gallium/targets/graw-null/graw_null.c
index 5939a5acd3..f1fe3872c9 100644
--- a/src/gallium/targets/graw-null/graw_null.c
+++ b/src/gallium/targets/graw-null/graw_null.c
@@ -1,31 +1,5 @@
-#include "pipe/p_compiler.h"
-#include "util/u_debug.h"
-#include "util/u_memory.h"
-#include "target-helpers/wrap_screen.h"
-#include "sw/null/null_sw_winsys.h"
-#include "os/os_time.h"
#include "state_tracker/graw.h"
-#ifdef GALLIUM_SOFTPIPE
-#include "softpipe/sp_public.h"
-#endif
-
-#ifdef GALLIUM_LLVMPIPE
-#include "llvmpipe/lp_public.h"
-#endif
-
-/* Haven't figured out a decent way to build the helper code yet -
- * #include it here temporarily.
- */
-#include "sw/sw_public.h"
-#include "sw/sw.c"
-
-#include <stdio.h>
-
-
-static struct {
- void (*draw)(void);
-} graw;
@@ -37,45 +11,7 @@ graw_create_window_and_screen( int x,
enum pipe_format format,
void **handle)
{
- const char *default_driver;
- const char *driver;
- struct pipe_screen *screen = NULL;
- struct sw_winsys *winsys = NULL;
- static int dummy;
-
-
- /* Create the underlying winsys, which performs presents to Xlib
- * drawables:
- */
- winsys = null_sw_create();
- if (winsys == NULL)
- return NULL;
-
-#if defined(GALLIUM_LLVMPIPE)
- default_driver = "llvmpipe";
-#elif defined(GALLIUM_SOFTPIPE)
- default_driver = "softpipe";
-#else
- default_driver = "";
-#endif
-
- driver = debug_get_option("GALLIUM_DRIVER", default_driver);
-
-#if defined(GALLIUM_LLVMPIPE)
- if (screen == NULL && strcmp(driver, "llvmpipe") == 0)
- screen = llvmpipe_create_screen( winsys );
-#endif
-
-#if defined(GALLIUM_SOFTPIPE)
- if (screen == NULL)
- screen = softpipe_create_screen( winsys );
-#endif
-
- *handle = &dummy;
-
- /* Inject any wrapping layers we want to here:
- */
- return gallium_wrap_screen( screen );
+ return NULL;
}
@@ -83,13 +19,10 @@ graw_create_window_and_screen( int x,
void
graw_set_display_func( void (*draw)( void ) )
{
- graw.draw = draw;
}
void
graw_main_loop( void )
{
- graw.draw();
- os_time_sleep(100000);
}
diff --git a/src/gallium/targets/graw-xlib/graw_util.c b/src/gallium/targets/graw-null/graw_util.c
index fc7c9ae6f9..531757f145 100644
--- a/src/gallium/targets/graw-xlib/graw_util.c
+++ b/src/gallium/targets/graw-null/graw_util.c
@@ -9,8 +9,9 @@
/* Helper functions. These are the same for all graw implementations.
*/
-void *graw_parse_geometry_shader(struct pipe_context *pipe,
- const char *text)
+PUBLIC void *
+graw_parse_geometry_shader(struct pipe_context *pipe,
+ const char *text)
{
struct tgsi_token tokens[1024];
struct pipe_shader_state state;
@@ -22,8 +23,9 @@ void *graw_parse_geometry_shader(struct pipe_context *pipe,
return pipe->create_gs_state(pipe, &state);
}
-void *graw_parse_vertex_shader(struct pipe_context *pipe,
- const char *text)
+PUBLIC void *
+graw_parse_vertex_shader(struct pipe_context *pipe,
+ const char *text)
{
struct tgsi_token tokens[1024];
struct pipe_shader_state state;
@@ -35,8 +37,9 @@ void *graw_parse_vertex_shader(struct pipe_context *pipe,
return pipe->create_vs_state(pipe, &state);
}
-void *graw_parse_fragment_shader(struct pipe_context *pipe,
- const char *text)
+PUBLIC void *
+graw_parse_fragment_shader(struct pipe_context *pipe,
+ const char *text)
{
struct tgsi_token tokens[1024];
struct pipe_shader_state state;
diff --git a/src/gallium/targets/graw-xlib/SConscript b/src/gallium/targets/graw-xlib/SConscript
index 21fce948f4..f795309787 100644
--- a/src/gallium/targets/graw-xlib/SConscript
+++ b/src/gallium/targets/graw-xlib/SConscript
@@ -3,13 +3,8 @@
Import('*')
-if env['platform'] != 'linux':
- Return()
-
env = env.Clone()
-env.Tool('x11')
-
env.Prepend(LIBS = [
ws_xlib,
trace,
@@ -18,26 +13,24 @@ env.Prepend(LIBS = [
# gallium,
])
+env.Prepend(LIBS = env['X11_LIBS'])
+
env.Append(CPPPATH = [
'#src/gallium/drivers',
'#src/gallium/include/state_tracker',
])
-
sources = [
'graw_xlib.c',
- 'graw_util.c',
+ graw_util
]
-env.Tool('x11')
-
if True:
env.Append(CPPDEFINES = 'GALLIUM_SOFTPIPE')
env.Prepend(LIBS = [softpipe])
if env['llvm']:
env.Append(CPPDEFINES = 'GALLIUM_LLVMPIPE')
- env.Tool('udis86')
env.Prepend(LIBS = [llvmpipe])
# Need this for trace, identity drivers referenced by
@@ -51,8 +44,6 @@ graw = env.SharedLibrary(
source = sources,
)
-env.InstallSharedLibrary(graw, version=(1, 0))
-
-graw = env.FindIxes(graw, 'SHLIBPREFIX', 'SHLIBSUFFIX')
+graw = env.InstallSharedLibrary(graw, version=(1, 0))
-Export('graw')
+env.Alias('graw-xlib', graw)
diff --git a/src/gallium/targets/libgl-gdi/SConscript b/src/gallium/targets/libgl-gdi/SConscript
index 12fe403f62..339238756a 100644
--- a/src/gallium/targets/libgl-gdi/SConscript
+++ b/src/gallium/targets/libgl-gdi/SConscript
@@ -3,45 +3,46 @@
Import('*')
-if env['platform'] == 'windows':
-
- env = env.Clone()
-
- env.Append(CPPPATH = [
- '#src/gallium/state_trackers/wgl',
- '#src/gallium/winsys/sw',
- ])
-
- env.Append(LIBS = [
- 'gdi32',
- 'user32',
- 'kernel32',
- 'ws2_32',
- talloc,
- ])
-
- sources = []
- drivers = []
-
- if True:
- sources = ['gdi_softpipe_winsys.c']
- drivers = [softpipe]
-
- if env['llvm']:
- sources = ['gdi_llvmpipe_winsys.c']
- drivers = [llvmpipe]
-
- if env['gcc']:
- sources += ['#src/gallium/state_trackers/wgl/opengl32.mingw.def']
- else:
- sources += ['#src/gallium/state_trackers/wgl/opengl32.def']
-
- drivers += [trace, rbug]
-
- env['no_import_lib'] = 1
-
- env.SharedLibrary(
- target ='opengl32',
- source = sources,
- LIBS = wgl + ws_gdi + glapi + mesa + drivers + gallium + glsl + env['LIBS'],
- )
+env = env.Clone()
+
+env.Append(CPPPATH = [
+ '#src/gallium/state_trackers/wgl',
+ '#src/gallium/winsys/sw',
+])
+
+env.Append(LIBS = [
+ 'gdi32',
+ 'user32',
+ 'kernel32',
+ 'ws2_32',
+ talloc,
+])
+
+sources = []
+drivers = []
+
+if True:
+ sources = ['gdi_softpipe_winsys.c']
+ drivers = [softpipe]
+
+if env['llvm']:
+ sources = ['gdi_llvmpipe_winsys.c']
+ drivers = [llvmpipe]
+
+if env['gcc']:
+ sources += ['#src/gallium/state_trackers/wgl/opengl32.mingw.def']
+else:
+ sources += ['#src/gallium/state_trackers/wgl/opengl32.def']
+
+drivers += [trace, rbug]
+
+env['no_import_lib'] = 1
+
+opengl32 = env.SharedLibrary(
+ target ='opengl32',
+ source = sources,
+ LIBS = wgl + ws_gdi + glapi + mesa + drivers + gallium + glsl + env['LIBS'],
+)
+
+env.Alias('opengl32', opengl32)
+env.Alias('libgl-gdi', opengl32)
diff --git a/src/gallium/targets/libgl-xlib/SConscript b/src/gallium/targets/libgl-xlib/SConscript
index 27b562e1d5..582760eac9 100644
--- a/src/gallium/targets/libgl-xlib/SConscript
+++ b/src/gallium/targets/libgl-xlib/SConscript
@@ -3,17 +3,6 @@
Import('*')
-if env['platform'] != 'linux':
- Return()
-
-if 'mesa' not in env['statetrackers']:
- print 'warning: Mesa state tracker disabled: skipping build of xlib libGL.so'
- Return()
-
-if env['dri']:
- print 'warning: DRI enabled: skipping build of xlib libGL.so'
- Return()
-
env = env.Clone()
env.Append(CPPPATH = [
@@ -25,6 +14,8 @@ env.Append(CPPPATH = [
env.Append(CPPDEFINES = ['USE_XSHM'])
+env.Prepend(LIBS = env['X11_LIBS'])
+
env.Prepend(LIBS = [
st_xlib,
ws_xlib,
@@ -42,8 +33,6 @@ sources = [
'xlib.c',
]
-env.Tool('x11')
-
if True:
env.Append(CPPDEFINES = 'GALLIUM_SOFTPIPE')
env.Prepend(LIBS = [softpipe])
@@ -54,10 +43,10 @@ if True:
if env['llvm']:
env.Append(CPPDEFINES = 'GALLIUM_LLVMPIPE')
- env.Tool('udis86')
env.Prepend(LIBS = [llvmpipe])
-if 'cell' in env['drivers']:
+if False:
+ # TODO: Detect Cell SDK
env.Append(CPPDEFINES = 'GALLIUM_CELL')
env.Prepend(LIBS = [cell])
@@ -67,6 +56,8 @@ libgl = env.SharedLibrary(
source = sources,
)
-if not env['dri']:
- # Only install this libGL.so if DRI not enabled
- env.InstallSharedLibrary(libgl, version=(1, 5))
+if True:
+ # XXX: Only install this libGL.so if DRI not enabled
+ libgl = env.InstallSharedLibrary(libgl, version=(1, 5))
+
+env.Alias('libgl-xlib', libgl)
diff --git a/src/gallium/targets/xorg-vmwgfx/SConscript b/src/gallium/targets/xorg-vmwgfx/SConscript
index 43b2c74f9c..0a81b33651 100644
--- a/src/gallium/targets/xorg-vmwgfx/SConscript
+++ b/src/gallium/targets/xorg-vmwgfx/SConscript
@@ -2,62 +2,58 @@ import os.path
Import('*')
-if not 'svga' in env['drivers']:
- print 'warning: svga pipe driver not built skipping vmwgfx_drv.so'
- Return()
-
-if env['platform'] == 'linux':
-
- env = env.Clone()
-
- env.ParseConfig('pkg-config --cflags --libs libdrm xorg-server')
-
- env.Prepend(CPPPATH = [
- '#/include',
- '#/src/gallium',
- '#/src/mesa',
- '#/src/gallium/drivers/svga',
- '#/src/gallium/drivers/svga/include',
- ])
-
- env.Append(CPPDEFINES = [
- ])
-
- if env['gcc']:
- env.Append(CPPDEFINES = [
- 'HAVE_STDINT_H',
- 'HAVE_SYS_TYPES_H',
- ])
-
- env.Append(CFLAGS = [
- '-std=gnu99',
- '-D_FILE_OFFSET_BITS=64',
- ])
-
- env.Prepend(LIBPATH = [
- ])
-
- env.Prepend(LIBS = [
- trace,
- rbug,
- st_xorg,
- svgadrm,
- svga,
- gallium,
- ])
-
- sources = [
- 'vmw_ioctl.c',
- 'vmw_ctrl.c',
- 'vmw_screen.c',
- 'vmw_video.c',
- 'vmw_xorg.c',
- ]
-
- # TODO: write a wrapper function http://www.scons.org/wiki/WrapperFunctions
- env.LoadableModule(
- target ='vmwgfx_drv.so',
- source = sources,
- LIBS = env['LIBS'],
- SHLIBPREFIX = '',
- )
+env = env.Clone()
+
+env.ParseConfig('pkg-config --cflags --libs libdrm xorg-server')
+
+env.Prepend(CPPPATH = [
+ '#/include',
+ '#/src/gallium',
+ '#/src/mesa',
+ '#/src/gallium/drivers/svga',
+ '#/src/gallium/drivers/svga/include',
+])
+
+env.Append(CPPDEFINES = [
+])
+
+if env['gcc']:
+ env.Append(CPPDEFINES = [
+ 'HAVE_STDINT_H',
+ 'HAVE_SYS_TYPES_H',
+ ])
+
+env.Append(CFLAGS = [
+ '-std=gnu99',
+ '-D_FILE_OFFSET_BITS=64',
+])
+
+env.Prepend(LIBPATH = [
+])
+
+env.Prepend(LIBS = [
+ trace,
+ rbug,
+ st_xorg,
+ svgadrm,
+ svga,
+ gallium,
+])
+
+sources = [
+ 'vmw_ioctl.c',
+ 'vmw_ctrl.c',
+ 'vmw_screen.c',
+ 'vmw_video.c',
+ 'vmw_xorg.c',
+]
+
+# TODO: write a wrapper function http://www.scons.org/wiki/WrapperFunctions
+module = env.LoadableModule(
+ target ='vmwgfx_drv.so',
+ source = sources,
+ LIBS = env['LIBS'],
+ SHLIBPREFIX = '',
+)
+
+env.Alias('xorg-vmwgfx', module)
diff --git a/src/gallium/tests/graw/SConscript b/src/gallium/tests/graw/SConscript
index ffde61965b..3341b88498 100644
--- a/src/gallium/tests/graw/SConscript
+++ b/src/gallium/tests/graw/SConscript
@@ -1,20 +1,17 @@
Import('*')
-try:
- graw
-except NameError:
- print 'warning: graw library not avaiable: skipping build of graw test'
- Return()
-
env = env.Clone()
+env.Prepend(LIBS = [gallium])
+
env.Prepend(LIBPATH = [graw.dir])
-env.Prepend(LIBS = ['graw'] + gallium)
+env.Prepend(LIBS = ['graw'])
+
-if platform in ('freebsd8', 'sunos5'):
+if env['platform'] in ('freebsd8', 'sunos5'):
env.Append(LIBS = ['m'])
-if platform == 'freebsd8':
+if env['platform'] == 'freebsd8':
env.Append(LIBS = ['pthread'])
progs = [
@@ -29,9 +26,10 @@ progs = [
'tri-gs',
]
-for prog in progs:
- env.Program(
- target = prog,
- source = prog + '.c',
+for name in progs:
+ program = env.Program(
+ target = name,
+ source = name + '.c',
)
-
+ #env.Depends(program, graw)
+ env.Alias('graw-progs', program)
diff --git a/src/gallium/tests/unit/SConscript b/src/gallium/tests/unit/SConscript
index 359759e22b..655e8a9b41 100644
--- a/src/gallium/tests/unit/SConscript
+++ b/src/gallium/tests/unit/SConscript
@@ -4,10 +4,10 @@ env = env.Clone()
env.Prepend(LIBS = [gallium])
-if platform in ('freebsd8', 'sunos5'):
+if env['platform'] in ('freebsd8', 'sunos5'):
env.Append(LIBS = ['m'])
-if platform == 'freebsd8':
+if env['platform'] == 'freebsd8':
env.Append(LIBS = ['pthread'])
progs = [
diff --git a/src/gallium/winsys/SConscript b/src/gallium/winsys/SConscript
index 65b12287df..d74f8a2e98 100644
--- a/src/gallium/winsys/SConscript
+++ b/src/gallium/winsys/SConscript
@@ -2,45 +2,38 @@ Import('*')
SConscript([
- 'sw/wrapper/SConscript',
+ 'sw/wrapper/SConscript',
])
-if 'xlib' in env['winsys']:
- SConscript([
- 'sw/xlib/SConscript',
- ])
+SConscript([
+ 'sw/xlib/SConscript',
+])
-if 'gdi' in env['winsys']:
- SConscript([
- 'sw/gdi/SConscript',
- ])
+SConscript([
+ 'sw/gdi/SConscript',
+])
if env['dri']:
- SConscript([
- 'sw/dri/SConscript',
- ])
-
- if 'vmware' in env['winsys']:
- SConscript([
- 'svga/drm/SConscript',
- ])
-
- if 'i915' in env['winsys']:
- SConscript([
- 'i915/drm/SConscript',
- ])
-
- if 'i965' in env['winsys']:
- SConscript([
- 'i965/drm/SConscript',
- ])
-
- if 'radeon' in env['winsys']:
- SConscript([
- 'radeon/drm/SConscript',
- ])
-
- if 'r600' in env['winsys']:
- SConscript([
- 'r600/drm/SConscript',
- ])
+ SConscript([
+ 'sw/dri/SConscript',
+ ])
+
+ SConscript([
+ 'svga/drm/SConscript',
+ ])
+
+ SConscript([
+ 'i915/drm/SConscript',
+ ])
+
+ SConscript([
+ 'i965/drm/SConscript',
+ ])
+
+ SConscript([
+ 'radeon/drm/SConscript',
+ ])
+
+ SConscript([
+ 'r600/drm/SConscript',
+ ])