diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-12-29 11:37:18 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-12-29 11:37:18 +0300 |
commit | 40517283ca12a423140cbe20652418839877026a (patch) | |
tree | 9b76c6239f77d220e2bcb86b4c8503fdbe1176b8 | |
parent | 9c4aba11c9dcd677c74453746eaa0d9d9b8c226b (diff) |
Cycles: Bump stack size for QBVH traversal code
Traversal now can push up to 2x of nodes to the stack, so need some tweaks
to the stack size.
-rw-r--r-- | intern/cycles/kernel/geom/geom.h | 1 | ||||
-rw-r--r-- | intern/cycles/kernel/geom/geom_qbvh_shadow.h | 2 | ||||
-rw-r--r-- | intern/cycles/kernel/geom/geom_qbvh_subsurface.h | 2 | ||||
-rw-r--r-- | intern/cycles/kernel/geom/geom_qbvh_traversal.h | 2 | ||||
-rw-r--r-- | intern/cycles/kernel/geom/geom_qbvh_volume.h | 2 |
5 files changed, 5 insertions, 4 deletions
diff --git a/intern/cycles/kernel/geom/geom.h b/intern/cycles/kernel/geom/geom.h index 38fd7858a99..bf0d86e6206 100644 --- a/intern/cycles/kernel/geom/geom.h +++ b/intern/cycles/kernel/geom/geom.h @@ -20,6 +20,7 @@ /* 64 object BVH + 64 mesh BVH + 64 object node splitting */ #define BVH_STACK_SIZE 192 +#define BVH_QSTACK_SIZE 384 #define BVH_NODE_SIZE 4 #define BVH_QNODE_SIZE 7 #define TRI_NODE_SIZE 3 diff --git a/intern/cycles/kernel/geom/geom_qbvh_shadow.h b/intern/cycles/kernel/geom/geom_qbvh_shadow.h index 09d05f17e89..57c799ccd4f 100644 --- a/intern/cycles/kernel/geom/geom_qbvh_shadow.h +++ b/intern/cycles/kernel/geom/geom_qbvh_shadow.h @@ -39,7 +39,7 @@ ccl_device bool BVH_FUNCTION_FULL_NAME(QBVH)(KernelGlobals *kg, */ /* Traversal stack in CUDA thread-local memory. */ - QBVHStackItem traversalStack[BVH_STACK_SIZE]; + QBVHStackItem traversalStack[BVH_QSTACK_SIZE]; traversalStack[0].addr = ENTRYPOINT_SENTINEL; /* Traversal variables in registers. */ diff --git a/intern/cycles/kernel/geom/geom_qbvh_subsurface.h b/intern/cycles/kernel/geom/geom_qbvh_subsurface.h index acb1bbd01c0..89b582557fe 100644 --- a/intern/cycles/kernel/geom/geom_qbvh_subsurface.h +++ b/intern/cycles/kernel/geom/geom_qbvh_subsurface.h @@ -42,7 +42,7 @@ ccl_device uint BVH_FUNCTION_FULL_NAME(QBVH)(KernelGlobals *kg, */ /* Traversal stack in CUDA thread-local memory. */ - QBVHStackItem traversalStack[BVH_STACK_SIZE]; + QBVHStackItem traversalStack[BVH_QSTACK_SIZE]; traversalStack[0].addr = ENTRYPOINT_SENTINEL; /* Traversal variables in registers. */ diff --git a/intern/cycles/kernel/geom/geom_qbvh_traversal.h b/intern/cycles/kernel/geom/geom_qbvh_traversal.h index 9989f83c031..efa519fbe3e 100644 --- a/intern/cycles/kernel/geom/geom_qbvh_traversal.h +++ b/intern/cycles/kernel/geom/geom_qbvh_traversal.h @@ -47,7 +47,7 @@ ccl_device bool BVH_FUNCTION_FULL_NAME(QBVH)(KernelGlobals *kg, */ /* Traversal stack in CUDA thread-local memory. */ - QBVHStackItem traversalStack[BVH_STACK_SIZE]; + QBVHStackItem traversalStack[BVH_QSTACK_SIZE]; traversalStack[0].addr = ENTRYPOINT_SENTINEL; traversalStack[0].dist = -FLT_MAX; diff --git a/intern/cycles/kernel/geom/geom_qbvh_volume.h b/intern/cycles/kernel/geom/geom_qbvh_volume.h index 21466cca92a..00eaa1761a1 100644 --- a/intern/cycles/kernel/geom/geom_qbvh_volume.h +++ b/intern/cycles/kernel/geom/geom_qbvh_volume.h @@ -38,7 +38,7 @@ ccl_device bool BVH_FUNCTION_FULL_NAME(QBVH)(KernelGlobals *kg, */ /* Traversal stack in CUDA thread-local memory. */ - QBVHStackItem traversalStack[BVH_STACK_SIZE]; + QBVHStackItem traversalStack[BVH_QSTACK_SIZE]; traversalStack[0].addr = ENTRYPOINT_SENTINEL; /* Traversal variables in registers. */ |