OSX/scons: autodetecting sse4.1 capability and set it to used
This commit is contained in:
parent
e164a500c8
commit
d21ef02e8f
@ -324,6 +324,9 @@ if env['OURPLATFORM']=='darwin':
|
|||||||
XCODE_BUNDLE=XCODE_SELECT_PATH[:-19]
|
XCODE_BUNDLE=XCODE_SELECT_PATH[:-19]
|
||||||
else:
|
else:
|
||||||
XCODE_BUNDLE=XCODE_SELECT_PATH
|
XCODE_BUNDLE=XCODE_SELECT_PATH
|
||||||
|
# Checking for sse4.1 capability
|
||||||
|
cmd = 'sysctl hw.optional.sse4_1' # throws 1 if available, else 0
|
||||||
|
env['WITH_CYCLES_OPTIMIZED_KERNEL_SSE41'] = commands.getoutput(cmd)
|
||||||
|
|
||||||
print B.bc.OKGREEN + "Detected Xcode version: -- " + B.bc.ENDC + env['XCODE_CUR_VER'] + " --"
|
print B.bc.OKGREEN + "Detected Xcode version: -- " + B.bc.ENDC + env['XCODE_CUR_VER'] + " --"
|
||||||
print B.bc.OKGREEN + "Available SDK's: \n" + B.bc.ENDC + MACOSX_SDK_CHECK.replace('\t', '')
|
print B.bc.OKGREEN + "Available SDK's: \n" + B.bc.ENDC + MACOSX_SDK_CHECK.replace('\t', '')
|
||||||
@ -431,6 +434,9 @@ if env['OURPLATFORM']=='darwin':
|
|||||||
env['WITH_BF_OPENMP'] = 0
|
env['WITH_BF_OPENMP'] = 0
|
||||||
print B.bc.OKGREEN + "Disabled OpenMP, not supported by compiler"
|
print B.bc.OKGREEN + "Disabled OpenMP, not supported by compiler"
|
||||||
|
|
||||||
|
if env['WITH_BF_CYCLES'] and env['WITH_CYCLES_OPTIMIZED_KERNEL_SSE41']:
|
||||||
|
print B.bc.OKGREEN + 'Using Cycles SSE 4.1 option'
|
||||||
|
|
||||||
if env['WITH_BF_CYCLES_OSL'] == 1:
|
if env['WITH_BF_CYCLES_OSL'] == 1:
|
||||||
OSX_OSL_LIBPATH = Dir(env.subst(env['BF_OSL_LIBPATH'])).abspath
|
OSX_OSL_LIBPATH = Dir(env.subst(env['BF_OSL_LIBPATH'])).abspath
|
||||||
# we need 2 variants of passing the oslexec with the force_load option, string and list type atm
|
# we need 2 variants of passing the oslexec with the force_load option, string and list type atm
|
||||||
|
Loading…
Reference in New Issue
Block a user