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-01-10 01:41:04 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2015-01-12 12:49:56 +0300
commitb56f5900dc776c45d83c99334473d1cb3874feaf (patch)
tree5fdcf4ea44b3953463bd9f2f2eb95cee9e77d3fa /intern/cycles/kernel
parentd8fc404415ded274f75b754437597543705cf0ec (diff)
Cycles: BVH params option to split leaf node by primitive types
The idea of this change is make it possible to split leaf nodes by primitive type, making leaf containing primitives of the same type. This would become handy when working on a single ray to multiple triangles intersection code, plus with careful implementation it might give some extra benefits on BVH traversal code by avoiding primitive type fetch and check for each primitive in the node. But that's a bit tricky to have benefits on this change only because depth of BVH increases. This option is not exposed to the interface at all and not used even secretly, the commit is only needed to help working further in this direction without messing around with local patches and worrying of them running out of date.
Diffstat (limited to 'intern/cycles/kernel')
-rw-r--r--intern/cycles/kernel/kernel_types.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/intern/cycles/kernel/kernel_types.h b/intern/cycles/kernel/kernel_types.h
index aff9a001061..82619b3f854 100644
--- a/intern/cycles/kernel/kernel_types.h
+++ b/intern/cycles/kernel/kernel_types.h
@@ -481,7 +481,12 @@ typedef enum PrimitiveType {
PRIMITIVE_ALL_TRIANGLE = (PRIMITIVE_TRIANGLE|PRIMITIVE_MOTION_TRIANGLE),
PRIMITIVE_ALL_CURVE = (PRIMITIVE_CURVE|PRIMITIVE_MOTION_CURVE),
PRIMITIVE_ALL_MOTION = (PRIMITIVE_MOTION_TRIANGLE|PRIMITIVE_MOTION_CURVE),
- PRIMITIVE_ALL = (PRIMITIVE_ALL_TRIANGLE|PRIMITIVE_ALL_CURVE)
+ PRIMITIVE_ALL = (PRIMITIVE_ALL_TRIANGLE|PRIMITIVE_ALL_CURVE),
+
+ /* Total number of different primitives.
+ * NOTE: This is an actual value, not a bitflag.
+ */
+ PRIMITIVE_NUM_TOTAL = 4,
} PrimitiveType;
#define PRIMITIVE_PACK_SEGMENT(type, segment) ((segment << 16) | type)