forked from bartvdbraak/blender
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.
This commit is contained in:
parent
3055ae5092
commit
0ddb8d9b13
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user