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
2014-08-08 06:00:49 +10:00
2015-04-24 19:11:02 +10:00
2015-03-24 07:49:17 +11:00
S
Description
No description provided
925 MiB
Languages
C++ 78%
Python 11%
C 6.3%
GLSL 2.2%
CMake 1.3%
Other 1.1%