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:
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