diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-10-14 14:51:59 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-10-14 14:53:26 +0300 |
commit | 0ddb8d9b13806c0a47224b9f3ba4dd6911cd7a47 (patch) | |
tree | dbeb5f86b385c604ac4c2b14df08b28e9a7f6bd2 | |
parent | 3055ae509266436e9e5e954b011b94f99c679c51 (diff) |
Cycles: Disable optimization of operator / for float3
This was giving some speedup but made intersection tests to fail
from watertight point of view.
Needs deeper investigation, but need to quickly get it fixed for
the studio.
-rw-r--r-- | intern/cycles/util/util_math.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/intern/cycles/util/util_math.h b/intern/cycles/util/util_math.h index ce2e4e5c30d..b9594f7ec69 100644 --- a/intern/cycles/util/util_math.h +++ b/intern/cycles/util/util_math.h @@ -462,12 +462,13 @@ ccl_device_inline float3 operator*(const float f, const float3& a) ccl_device_inline float3 operator/(const float f, const float3& a) { -#ifdef __KERNEL_SSE__ - __m128 rc = _mm_rcp_ps(a.m128); - return float3(_mm_mul_ps(_mm_set1_ps(f),rc)); -#else + /* TODO(sergey): Currently disabled, gives speedup but makes intersection tets non-watertight. */ +// #ifdef __KERNEL_SSE__ +// __m128 rc = _mm_rcp_ps(a.m128); +// return float3(_mm_mul_ps(_mm_set1_ps(f),rc)); +// #else return make_float3(f / a.x, f / a.y, f / a.z); -#endif +// #endif } ccl_device_inline float3 operator/(const float3& a, const float f) |