diff options
Diffstat (limited to 'intern/cycles/kernel/svm/svm_ramp.h')
-rw-r--r-- | intern/cycles/kernel/svm/svm_ramp.h | 39 |
1 files changed, 11 insertions, 28 deletions
diff --git a/intern/cycles/kernel/svm/svm_ramp.h b/intern/cycles/kernel/svm/svm_ramp.h index ef8b0d103c1..d2dddf4c6eb 100644 --- a/intern/cycles/kernel/svm/svm_ramp.h +++ b/intern/cycles/kernel/svm/svm_ramp.h @@ -21,18 +21,14 @@ CCL_NAMESPACE_BEGIN /* NOTE: svm_ramp.h, svm_ramp_util.h and node_ramp_util.h must stay consistent */ -ccl_device_inline float fetch_float(ccl_global const KernelGlobals *kg, int offset) +ccl_device_inline float fetch_float(KernelGlobals kg, int offset) { uint4 node = kernel_tex_fetch(__svm_nodes, offset); return __uint_as_float(node.x); } -ccl_device_inline float float_ramp_lookup(ccl_global const KernelGlobals *kg, - int offset, - float f, - bool interpolate, - bool extrapolate, - int table_size) +ccl_device_inline float float_ramp_lookup( + KernelGlobals kg, int offset, float f, bool interpolate, bool extrapolate, int table_size) { if ((f < 0.0f || f > 1.0f) && extrapolate) { float t0, dy; @@ -63,12 +59,8 @@ ccl_device_inline float float_ramp_lookup(ccl_global const KernelGlobals *kg, return a; } -ccl_device_inline float4 rgb_ramp_lookup(ccl_global const KernelGlobals *kg, - int offset, - float f, - bool interpolate, - bool extrapolate, - int table_size) +ccl_device_inline float4 rgb_ramp_lookup( + KernelGlobals kg, int offset, float f, bool interpolate, bool extrapolate, int table_size) { if ((f < 0.0f || f > 1.0f) && extrapolate) { float4 t0, dy; @@ -99,11 +91,8 @@ ccl_device_inline float4 rgb_ramp_lookup(ccl_global const KernelGlobals *kg, return a; } -ccl_device_noinline int svm_node_rgb_ramp(ccl_global const KernelGlobals *kg, - ccl_private ShaderData *sd, - ccl_private float *stack, - uint4 node, - int offset) +ccl_device_noinline int svm_node_rgb_ramp( + KernelGlobals kg, ccl_private ShaderData *sd, ccl_private float *stack, uint4 node, int offset) { uint fac_offset, color_offset, alpha_offset; uint interpolate = node.z; @@ -124,11 +113,8 @@ ccl_device_noinline int svm_node_rgb_ramp(ccl_global const KernelGlobals *kg, return offset; } -ccl_device_noinline int svm_node_curves(ccl_global const KernelGlobals *kg, - ccl_private ShaderData *sd, - ccl_private float *stack, - uint4 node, - int offset) +ccl_device_noinline int svm_node_curves( + KernelGlobals kg, ccl_private ShaderData *sd, ccl_private float *stack, uint4 node, int offset) { uint fac_offset, color_offset, out_offset; svm_unpack_node_uchar3(node.y, &fac_offset, &color_offset, &out_offset); @@ -153,11 +139,8 @@ ccl_device_noinline int svm_node_curves(ccl_global const KernelGlobals *kg, return offset; } -ccl_device_noinline int svm_node_curve(ccl_global const KernelGlobals *kg, - ccl_private ShaderData *sd, - ccl_private float *stack, - uint4 node, - int offset) +ccl_device_noinline int svm_node_curve( + KernelGlobals kg, ccl_private ShaderData *sd, ccl_private float *stack, uint4 node, int offset) { uint fac_offset, value_in_offset, out_offset; svm_unpack_node_uchar3(node.y, &fac_offset, &value_in_offset, &out_offset); |