blender/intern/cycles/kernel/closure
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
..
bsdf_ashikhmin_shirley.h Cleanup: Code style. 2015-04-26 00:42:26 +02:00
bsdf_ashikhmin_velvet.h Cleanup: Code style. 2015-04-26 00:42:26 +02:00
bsdf_diffuse_ramp.h Fix T43926: Volume scatter: intersecting objects GPU rendering artifacts 2015-03-23 12:48:33 +05:00
bsdf_diffuse.h Fix T44123: Cycles SSS renders black in recent builds 2015-03-25 02:33:49 +05:00
bsdf_hair.h Cleanup for Cycles hair shader ifdefs. 2015-02-18 15:57:39 +01:00
bsdf_microfacet.h Cycles: Use native saturate function for CUDA 2015-04-28 00:38:32 +05:00
bsdf_oren_nayar.h Cycles: Use native saturate function for CUDA 2015-04-28 00:38:32 +05:00
bsdf_phong_ramp.h Fix T43926: Volume scatter: intersecting objects GPU rendering artifacts 2015-03-23 12:48:33 +05:00
bsdf_reflection.h Fix T44123: Cycles SSS renders black in recent builds 2015-03-25 02:33:49 +05:00
bsdf_refraction.h Fix T44123: Cycles SSS renders black in recent builds 2015-03-25 02:33:49 +05:00
bsdf_toon.h Cycles: Use native saturate function for CUDA 2015-04-28 00:38:32 +05:00
bsdf_transparent.h Fix T44123: Cycles SSS renders black in recent builds 2015-03-25 02:33:49 +05:00
bsdf_util.h Comment out SVM fresnel_conductor() function for now, still unused. 2014-09-07 21:13:00 +02:00
bsdf.h Cycles: Remove empty closure blur code and the corresponding entries in the switch. 2015-02-17 13:44:25 +01:00
bssrdf.h Cycles: Use native saturate function for CUDA 2015-04-28 00:38:32 +05:00
emissive.h Cycles: change __device and similar qualifiers to ccl_device in kernel code. 2013-11-18 08:48:15 +01:00
volume.h Fix T44123: Cycles SSS renders black in recent builds 2015-03-25 02:33:49 +05:00