diff options
author | Nathan Letwory <nathan@letworyinteractive.com> | 2009-12-10 03:51:13 +0300 |
---|---|---|
committer | Nathan Letwory <nathan@letworyinteractive.com> | 2009-12-10 03:51:13 +0300 |
commit | 11af0ff2702ccd02f5dd7528e3f4c5039c635144 (patch) | |
tree | 103d63cf62f21422944cc22f6b06b33978a523d9 /source/blender/render | |
parent | ee124514636be9c7456cf856bd4772af4a02ca48 (diff) |
* WITH_BF_RAYOPTIMIZATION cleanup and flag separation by matd.
This adds BF_RAYOPTIMIZATION_SSE_FLAGS through which one can manage
what SSE flags are best for the platform built for.
Note that the ray optimizations coded by jaguarandi are SSE-intrinsics only.
Diffstat (limited to 'source/blender/render')
-rw-r--r-- | source/blender/render/SConscript | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/source/blender/render/SConscript b/source/blender/render/SConscript index 2642d31bd35..71c60e046cc 100644 --- a/source/blender/render/SConscript +++ b/source/blender/render/SConscript @@ -4,18 +4,28 @@ Import ('env') cflags = env['CCFLAGS'] cxxflags = env['CXXFLAGS'] +defs = [] + if env['OURPLATFORM'] in ('win32-vc', 'win64-vc'): if env['WITH_BF_RAYOPTIMIZATION']: - cflags = env['CCFLAGS'] + ['/arch:SSE'] + cflags = env['CCFLAGS'] + env['BF_RAYOPTIMIZATION_SSE_FLAGS'] + cxxflags = env['CCFLAGS'] + env['BF_RAYOPTIMIZATION_SSE_FLAGS'] if env['OURPLATFORM'] == 'win32-mingw': if env['WITH_BF_RAYOPTIMIZATION']: - cflags = env['CCFLAGS'] + ['-mfpmath=sse'] + cflags = env['CCFLAGS'] + env['BF_RAYOPTIMIZATION_SSE_FLAGS'] + cxxflags = env['CXXFLAGS'] + env['BF_RAYOPTIMIZATION_SSE_FLAGS'] if env['OURPLATFORM'] == 'darwin': if env['MACOSX_ARCHITECTURE'] in ('i386', 'x86_64') and env['WITH_BF_RAYOPTIMIZATION']: - cflags = env['CFLAGS'] + ['-mfpmath=sse'] - cxxflags = env['CXXFLAGS'] + ['-mfpmath=sse'] + cflags = env['CFLAGS'] + env['BF_RAYOPTIMIZATION_SSE_FLAGS'] + cxxflags = env['CXXFLAGS'] + env['BF_RAYOPTIMIZATION_SSE_FLAGS'] + +if env['OURPLATFORM'] == 'linux2': + if env['WITH_BF_RAYOPTIMIZATION']: + cflags = env['CCFLAGS'] + env['BF_RAYOPTIMIZATION_SSE_FLAGS'] + cxxflags = env['CXXFLAGS'] + env['BF_RAYOPTIMIZATION_SSE_FLAGS'] + incs += ' ../../../extern/binreloc/include' sources = env.Glob('intern/source/*.c') raysources = env.Glob('intern/raytrace/*.cpp') @@ -24,8 +34,6 @@ incs = 'intern/include #/intern/guardedalloc ../blenlib ../makesdna ../makesrna' incs += ' extern/include ../blenkernel ../radiosity/extern/include ../imbuf' incs += ' ../include ../blenloader ../../../intern/smoke/extern' -defs = [] - if env['WITH_BF_QUICKTIME']: defs.append('WITH_QUICKTIME') incs += ' ../quicktime ' + env['BF_QUICKTIME_INC'] @@ -33,15 +41,6 @@ if env['WITH_BF_QUICKTIME']: if env['WITH_BF_OPENEXR']: defs.append('WITH_OPENEXR') -if env['OURPLATFORM'] == 'linux2': -# SSE is NOT safe all the time on linux, plus that ignores users compile flags and therefore no no -# cflags = ['-O2','-msse2','-mfpmath=sse', '-pthread'] -# cxxflags = ['-O2','-msse2','-mfpmath=sse', '-pthread'] - if env['WITH_BF_RAYOPTIMIZATION']: - cflags = env['CCFLAGS'] + ['-O2','-msse2','-mfpmath=sse', '-pthread'] - cxxflags = env['CXXFLAGS'] + ['-O2','-msse2','-mfpmath=sse', '-pthread'] - incs += ' ../../../extern/binreloc/include' - if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc'): incs += ' ' + env['BF_PTHREADS_INC'] |