Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Mours <pmours@nvidia.com>2019-08-21 12:59:57 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-08-26 11:26:53 +0300
commit2b999c6a68f85523c46f39bb6a877baba2343d9b (patch)
treee76d9728ffdc44f0b38afe1cede2741d5f031ab5 /intern/cycles/kernel/svm/svm.h
parentdb257e679a63b1a6a5e361a0b1906e89e8de50cf (diff)
Cycles: change svm node decoding for more efficient code generation on GPU
These functions no longer accept NULL. They were renamed for clarity and to avoid hidden merge issues. Ref D5363
Diffstat (limited to 'intern/cycles/kernel/svm/svm.h')
-rw-r--r--intern/cycles/kernel/svm/svm.h27
1 files changed, 18 insertions, 9 deletions
diff --git a/intern/cycles/kernel/svm/svm.h b/intern/cycles/kernel/svm/svm.h
index 8f8451b364d..ab8570618ab 100644
--- a/intern/cycles/kernel/svm/svm.h
+++ b/intern/cycles/kernel/svm/svm.h
@@ -132,16 +132,25 @@ ccl_device_inline float4 fetch_node_float(KernelGlobals *kg, int offset)
__uint_as_float(node.w));
}
-ccl_device_inline void decode_node_uchar4(uint i, uint *x, uint *y, uint *z, uint *w)
+ccl_device_forceinline void svm_unpack_node_uchar2(uint i, uint *x, uint *y)
{
- if (x)
- *x = (i & 0xFF);
- if (y)
- *y = ((i >> 8) & 0xFF);
- if (z)
- *z = ((i >> 16) & 0xFF);
- if (w)
- *w = ((i >> 24) & 0xFF);
+ *x = (i & 0xFF);
+ *y = ((i >> 8) & 0xFF);
+}
+
+ccl_device_forceinline void svm_unpack_node_uchar3(uint i, uint *x, uint *y, uint *z)
+{
+ *x = (i & 0xFF);
+ *y = ((i >> 8) & 0xFF);
+ *z = ((i >> 16) & 0xFF);
+}
+
+ccl_device_forceinline void svm_unpack_node_uchar4(uint i, uint *x, uint *y, uint *z, uint *w)
+{
+ *x = (i & 0xFF);
+ *y = ((i >> 8) & 0xFF);
+ *z = ((i >> 16) & 0xFF);
+ *w = ((i >> 24) & 0xFF);
}
CCL_NAMESPACE_END