diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-10-06 11:43:23 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-10-06 14:36:46 +0400 |
commit | cd6129d1ff6142c153a99917aa794b668e3b7dd2 (patch) | |
tree | fc3f4f6b6b1d3104334e7fe5c28b93832cb592b9 /intern/cycles/device/device_cpu.cpp | |
parent | 1f1dcdfd76ee70d4c466af0e5917c2e40b39a989 (diff) |
Cycles: Workaround dead-slow expf() on 64bit linux
Single precision exponent on 64bit linux tends to be order of magnitude slower
than double precision version even with single<->double precision conversion.
Some feedback in the mailing lists also suggests that logf() is also slow, but
this i didn't confirm here in the studio yet.
Depending on the shader setup it gives ~3% with the secret agent shot and up to
around 15% with the bmw scene here.
Diffstat (limited to 'intern/cycles/device/device_cpu.cpp')
-rw-r--r-- | intern/cycles/device/device_cpu.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/intern/cycles/device/device_cpu.cpp b/intern/cycles/device/device_cpu.cpp index 4623764d210..c9b8a5b726b 100644 --- a/intern/cycles/device/device_cpu.cpp +++ b/intern/cycles/device/device_cpu.cpp @@ -17,6 +17,11 @@ #include <stdlib.h> #include <string.h> +/* So ImathMath is included before our kernel_cpu_compat. */ +#ifdef WITH_OSL +# include <OSL/oslexec.h> +#endif + #include "device.h" #include "device_intern.h" |