diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-01-12 20:20:19 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-01-12 20:20:19 +0300 |
commit | b53ce9a1d0dc05c04c950cc614b6bba845cabfa4 (patch) | |
tree | f8dbac264f0f7e08505b9497f0c01e2607b10069 /intern/cycles/kernel/bvh/bvh_traversal.h | |
parent | f12f906dd92764746faf90a56a14d366a366940b (diff) |
Cycles: Prepare BVH traversal code to work with multiple curve primitives per node
Diffstat (limited to 'intern/cycles/kernel/bvh/bvh_traversal.h')
-rw-r--r-- | intern/cycles/kernel/bvh/bvh_traversal.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/intern/cycles/kernel/bvh/bvh_traversal.h b/intern/cycles/kernel/bvh/bvh_traversal.h index e85716df33f..80c8f31473a 100644 --- a/intern/cycles/kernel/bvh/bvh_traversal.h +++ b/intern/cycles/kernel/bvh/bvh_traversal.h @@ -297,7 +297,8 @@ 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) & PRIMITIVE_ALL) == (type & PRIMITIVE_ALL)); + const uint curve_type = kernel_tex_fetch(__prim_type, prim_addr); + kernel_assert((curve_type & PRIMITIVE_ALL) == (type & PRIMITIVE_ALL)); bool hit; if(kernel_data.curve.curveflags & CURVE_KN_INTERPOLATE) { hit = bvh_cardinal_curve_intersect(kg, @@ -308,7 +309,7 @@ ccl_device_noinline bool BVH_FUNCTION_FULL_NAME(BVH)(KernelGlobals *kg, object, prim_addr, ray->time, - type, + curve_type, lcg_state, difl, extmax); @@ -322,7 +323,7 @@ ccl_device_noinline bool BVH_FUNCTION_FULL_NAME(BVH)(KernelGlobals *kg, object, prim_addr, ray->time, - type, + curve_type, lcg_state, difl, extmax); |