Cycles: Add some sanity check asserts in the traversal code

This way we'll be sure (in debug builds) that regular BVH traversal is not used
for QBVH tree (could happen because of mismatch of logic in kernel and render).
This commit is contained in:
Sergey Sharybin 2014-12-29 13:34:10 +05:00
parent 0a76be81b7
commit 9c4aba11c9
4 changed files with 4 additions and 0 deletions

View File

@ -394,6 +394,7 @@ ccl_device_inline bool BVH_FUNCTION_NAME(KernelGlobals *kg,
else
#endif
{
kernel_assert(kernel_data.bvh.use_qbvh == false);
return BVH_FUNCTION_FULL_NAME(BVH)(kg,
ray,
isect_array,

View File

@ -316,6 +316,7 @@ ccl_device_inline uint BVH_FUNCTION_NAME(KernelGlobals *kg,
else
#endif
{
kernel_assert(kernel_data.bvh.use_qbvh == false);
return BVH_FUNCTION_FULL_NAME(BVH)(kg,
ray,
isect_array,

View File

@ -401,6 +401,7 @@ ccl_device_inline bool BVH_FUNCTION_NAME(KernelGlobals *kg,
else
#endif
{
kernel_assert(kernel_data.bvh.use_qbvh == false);
return BVH_FUNCTION_FULL_NAME(BVH)(kg,
ray,
isect,

View File

@ -327,6 +327,7 @@ ccl_device_inline bool BVH_FUNCTION_NAME(KernelGlobals *kg,
else
#endif
{
kernel_assert(kernel_data.bvh.use_qbvh == false);
return BVH_FUNCTION_FULL_NAME(BVH)(kg,
ray,
isect);