summaryrefslogtreecommitdiffstats
path: root/scons/gallium.py
diff options
context:
space:
mode:
authorAndreas Fänger <[email protected]>2011-08-10 08:07:29 +0000
committerBrian Paul <[email protected]>2011-08-11 08:33:59 -0600
commite411cd7b0a54d2f9b9f4cda4918aa7742ed5c2a6 (patch)
treeb1d4f68c4a49d4ff7cc36fc03680120c57eb934e /scons/gallium.py
parentfa351bd2e0aecccd5ed6ef8744d5ba4a6dbf5d2c (diff)
swrast: initial multi-threaded span rendering
Optional parallel rendering of spans using OpenMP. Initial implementation for aa triangles. A new option for scons is also provided to activate the openmp support (off by default). Signed-off-by: Brian Paul <[email protected]>
Diffstat (limited to 'scons/gallium.py')
-rwxr-xr-xscons/gallium.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/scons/gallium.py b/scons/gallium.py
index 8cd3bc7f6e0..7135251d7a3 100755
--- a/scons/gallium.py
+++ b/scons/gallium.py
@@ -596,6 +596,18 @@ def generate(env):
libs += ['m', 'pthread', 'dl']
env.Append(LIBS = libs)
+ # OpenMP
+ if env['openmp']:
+ if env['msvc']:
+ env.Append(CCFLAGS = ['/openmp'])
+ # When building openmp release VS2008 link.exe crashes with LNK1103 error.
+ # Workaround: overwrite PDB flags with empty value as it isn't required anyways
+ if env['build'] == 'release':
+ env['PDB'] = ''
+ if env['gcc']:
+ env.Append(CCFLAGS = ['-fopenmp'])
+ env.Append(LIBS = ['gomp'])
+
# Load tools
env.Tool('lex')
env.Tool('yacc')