diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-01-12 19:38:27 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-01-12 19:38:27 +0300 |
commit | f12f906dd92764746faf90a56a14d366a366940b (patch) | |
tree | 769ee450515788e9c7f19bbc6c77cab44301e7ef | |
parent | 76a4cf1941ef0f1e8ca2dd641fb94703dce5a9b0 (diff) |
Cycles: Correct assert() for cases when there are multiple curves per BVH node
-rw-r--r-- | intern/cycles/kernel/bvh/bvh_traversal.h | 2 | ||||
-rw-r--r-- | intern/cycles/kernel/bvh/qbvh_traversal.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/intern/cycles/kernel/bvh/bvh_traversal.h b/intern/cycles/kernel/bvh/bvh_traversal.h index c80a769ffa6..e85716df33f 100644 --- a/intern/cycles/kernel/bvh/bvh_traversal.h +++ b/intern/cycles/kernel/bvh/bvh_traversal.h @@ -297,7 +297,7 @@ ccl_device_noinline bool BVH_FUNCTION_FULL_NAME(BVH)(KernelGlobals *kg, case PRIMITIVE_MOTION_CURVE: { for(; prim_addr < prim_addr2; prim_addr++) { BVH_DEBUG_NEXT_INTERSECTION(); - kernel_assert(kernel_tex_fetch(__prim_type, prim_addr) == type); + kernel_assert((kernel_tex_fetch(__prim_type, prim_addr) & PRIMITIVE_ALL) == (type & PRIMITIVE_ALL)); bool hit; if(kernel_data.curve.curveflags & CURVE_KN_INTERPOLATE) { hit = bvh_cardinal_curve_intersect(kg, diff --git a/intern/cycles/kernel/bvh/qbvh_traversal.h b/intern/cycles/kernel/bvh/qbvh_traversal.h index 1846a6073ac..c51b3a91153 100644 --- a/intern/cycles/kernel/bvh/qbvh_traversal.h +++ b/intern/cycles/kernel/bvh/qbvh_traversal.h @@ -372,7 +372,7 @@ ccl_device bool BVH_FUNCTION_FULL_NAME(QBVH)(KernelGlobals *kg, case PRIMITIVE_MOTION_CURVE: { for(; prim_addr < prim_addr2; prim_addr++) { BVH_DEBUG_NEXT_INTERSECTION(); - kernel_assert(kernel_tex_fetch(__prim_type, prim_addr) == type); + kernel_assert((kernel_tex_fetch(__prim_type, prim_addr) & PRIMITIVE_ALL) == (type & PRIMITIVE_ALL)); bool hit; if(kernel_data.curve.curveflags & CURVE_KN_INTERPOLATE) { hit = bvh_cardinal_curve_intersect(kg, |