Blender Git Loki

Git Commits -> Revision ae7d84d

Revision ae7d84d by Sergey Sharybin (master)
April 27, 2015, 19:38 (GMT)
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

Commit Details:

Full Hash: ae7d84dbc1936ef7ddd00f9c22d074389f97f04f
Parent Commit: 278ff15
Lines Changed: +52, -43

19 Modified Paths:

/intern/cycles/kernel/closure/bsdf_microfacet.h (+8, -8) (Diff)
/intern/cycles/kernel/closure/bsdf_oren_nayar.h (+1, -1) (Diff)
/intern/cycles/kernel/closure/bsdf_toon.h (+4, -4) (Diff)
/intern/cycles/kernel/closure/bssrdf.h (+3, -3) (Diff)
/intern/cycles/kernel/geom/geom_curve.h (+2, -2) (Diff)
/intern/cycles/kernel/kernel_film.h (+5, -5) (Diff)
/intern/cycles/kernel/kernel_globals.h (+2, -2) (Diff)
/intern/cycles/kernel/kernel_passes.h (+1, -1) (Diff)
/intern/cycles/kernel/svm/svm_brick.h (+1, -1) (Diff)
/intern/cycles/kernel/svm/svm_closure.h (+2, -2) (Diff)
/intern/cycles/kernel/svm/svm_gradient.h (+1, -1) (Diff)
/intern/cycles/kernel/svm/svm_image.h (+3, -3) (Diff)
/intern/cycles/kernel/svm/svm_math_util.h (+1, -1) (Diff)
/intern/cycles/kernel/svm/svm_mix.h (+4, -4) (Diff)
/intern/cycles/kernel/svm/svm_musgrave.h (+1, -1) (Diff)
/intern/cycles/kernel/svm/svm_ramp.h (+1, -1) (Diff)
/intern/cycles/render/buffers.cpp (+2, -2) (Diff)
/intern/cycles/render/nodes.cpp (+1, -1) (Diff)
/intern/cycles/util/util_math.h (+9, -0) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021