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:
authorSergey Sharybin <sergey.vfx@gmail.com>2015-05-09 17:22:16 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2015-05-09 17:22:16 +0300
commit6fc166967989072bda085ae4cf54fc513f6f1daf (patch)
treefa5e0d9f33200fce7b16e6de5528ff8bf790a45e /intern/cycles/kernel/svm/svm_types.h
parent17c95d0a96e306b2f38ff6e489064d6f021e494c (diff)
Cycles: Initial work towards selective nodes support compilation
The goal is to be able to compile kernel with nodes which are actually needed to render current scene, hence improving performance of the kernel, The idea is: - Have few node groups, starting with a group which contains nodes are used really often, and then couple of groups which will be extension of this one. - Have feature-based nodes disabling, so it's possible to disable nodes related to features which are not used with the currently used nodes group. This commit only lays down needed routines for this approach, actual split will happen later after gathering statistics from bunch of production scenes.
Diffstat (limited to 'intern/cycles/kernel/svm/svm_types.h')
-rw-r--r--intern/cycles/kernel/svm/svm_types.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/intern/cycles/kernel/svm/svm_types.h b/intern/cycles/kernel/svm/svm_types.h
index 848c16be327..4f2117a605b 100644
--- a/intern/cycles/kernel/svm/svm_types.h
+++ b/intern/cycles/kernel/svm/svm_types.h
@@ -28,6 +28,23 @@ CCL_NAMESPACE_BEGIN
/* Nodes */
+/* Known frequencies of used nodes, used for selective nodes compilation
+ * in the kernel. Currently only affects split OpenCL kernel.
+ *
+ * Keep as defines so it's easy to check which nodes are to be compiled
+ * from preprocessor.
+ *
+ * Lower the number of group more often the node is used.
+ */
+#define NODE_GROUP_LEVEL_0 0
+#define NODE_GROUP_LEVEL_1 1
+#define NODE_GROUP_LEVEL_2 2
+#define NODE_GROUP_LEVEL_MAX NODE_GROUP_LEVEL_2
+
+#define NODE_FEATURE_VOLUME (1 << 0)
+#define NODE_FEATURE_HAIR (1 << 1)
+#define NODE_FEATURE_ALL (NODE_FEATURE_VOLUME|NODE_FEATURE_HAIR)
+
typedef enum NodeType {
NODE_END = 0,
NODE_CLOSURE_BSDF,