Cycles: SSE optimization for Voronoi cells texture

Gives 5-6% speedup for Caterpillar_PatazStudio.blend.

Reviewed By: brecht, dingto

Differential Revision: https://developer.blender.org/D419
This commit is contained in:
Sv. Lockal
2014-04-03 23:34:53 +04:00
parent c019ae5ea3
commit ab32a1807d
5 changed files with 115 additions and 27 deletions

View File

@@ -163,11 +163,7 @@ ccl_device_inline float clamp(float a, float mn, float mx)
ccl_device_inline int float_to_int(float f)
{
#if defined(__KERNEL_SSE2__) && !defined(_MSC_VER)
return _mm_cvtt_ss2si(_mm_load_ss(&f));
#else
return (int)f;
#endif
}
ccl_device_inline int floor_to_int(float f)