Sergey Sharybin ae7d84dbc1 Cycles: Use native saturate function for CUDA
This more a workaround for CUDA optimizer which can't optimize clamp(x, 0, 1)
into a single instruction and uses 4 instructions instead.

Original patch by @lockal with own modification:

  Don't make changes outside of the kernel. They don't make any difference
  anyway and term saturate() has a bit different meaning outside of kernel.

This gives around 2% of speedup in Barcelona file, but in more complex shader
setups with lots of math nodes with clamping speedup could be much nicer.

Subscribers: dingto

Projects: #cycles

Differential Revision: https://developer.blender.org/D1224
2015-04-28 00:38:32 +05:00
2015-04-19 22:03:42 +10:00
2015-04-22 16:26:54 +10:00
2013-12-24 22:57:27 +06:00
2014-08-08 06:00:49 +10:00
2015-04-24 19:11:02 +10:00
2010-10-13 14:44:22 +00:00
2015-03-24 07:49:17 +11:00
Description
No description provided
841 MiB
Languages
C++ 78%
Python 14.9%
C 2.9%
GLSL 1.9%
CMake 1.2%
Other 0.9%