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:
authorMichael Jones <michael_p_jones@apple.com>2022-07-12 18:22:36 +0300
committerBrecht Van Lommel <brecht@blender.org>2022-07-15 14:40:04 +0300
commit5653c5fcdd9f424dc05ddf73b18ba8294daf4788 (patch)
treeee98b2e72ad20f409a9d2d153499afcb687d3fff /intern/cycles/kernel/data_template.h
parent79da7f2a8fbe37070c899cf8d1298694dbbef86e (diff)
Cycles: keep track of SVM nodes used in kernels
To be used for specialization in Metal, to automatically leave out unused nodes from the kernel. Ref D14645
Diffstat (limited to 'intern/cycles/kernel/data_template.h')
-rw-r--r--intern/cycles/kernel/data_template.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/intern/cycles/kernel/data_template.h b/intern/cycles/kernel/data_template.h
index 22f945f1335..b06ac62a5d8 100644
--- a/intern/cycles/kernel/data_template.h
+++ b/intern/cycles/kernel/data_template.h
@@ -194,6 +194,13 @@ KERNEL_STRUCT_MEMBER(integrator, int, direct_light_sampling_type)
KERNEL_STRUCT_MEMBER(integrator, int, pad1)
KERNEL_STRUCT_END(KernelIntegrator)
+/* SVM. For shader specialization. */
+
+KERNEL_STRUCT_BEGIN(KernelSVMUsage, svm_usage)
+#define SHADER_NODE_TYPE(type) KERNEL_STRUCT_MEMBER(svm_usage, int, type)
+#include "kernel/svm/node_types_template.h"
+KERNEL_STRUCT_END(KernelSVMUsage)
+
#undef KERNEL_STRUCT_BEGIN
#undef KERNEL_STRUCT_MEMBER
#undef KERNEL_STRUCT_END