From 6fc166967989072bda085ae4cf54fc513f6f1daf Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Sat, 9 May 2015 19:22:16 +0500 Subject: 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. --- intern/cycles/kernel/kernel_compat_cpu.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'intern/cycles/kernel/kernel_compat_cpu.h') diff --git a/intern/cycles/kernel/kernel_compat_cpu.h b/intern/cycles/kernel/kernel_compat_cpu.h index 200667a0911..b209fff88e6 100644 --- a/intern/cycles/kernel/kernel_compat_cpu.h +++ b/intern/cycles/kernel/kernel_compat_cpu.h @@ -26,6 +26,14 @@ # pragma GCC diagnostic ignored "-Wmaybe-uninitialized" #endif +/* Selective nodes compilation. */ +#ifndef __NODES_MAX_GROUP__ +# define __NODES_MAX_GROUP__ NODE_GROUP_LEVEL_MAX +#endif +#ifndef __NODES_FEATURES__ +# define __NODES_FEATURES__ NODE_FEATURE_ALL +#endif + #include "util_debug.h" #include "util_math.h" #include "util_simd.h" -- cgit v1.2.3