Cycles: Prepare BVH traversal code to work with multiple curve primitives per node
This commit is contained in:
parent
f12f906dd9
commit
b53ce9a1d0
@ -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);
|
||||
|
@ -372,7 +372,8 @@ 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) & 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,
|
||||
@ -383,7 +384,7 @@ ccl_device bool BVH_FUNCTION_FULL_NAME(QBVH)(KernelGlobals *kg,
|
||||
object,
|
||||
prim_addr,
|
||||
ray->time,
|
||||
type,
|
||||
curve_type,
|
||||
lcg_state,
|
||||
difl,
|
||||
extmax);
|
||||
@ -397,7 +398,7 @@ ccl_device bool BVH_FUNCTION_FULL_NAME(QBVH)(KernelGlobals *kg,
|
||||
object,
|
||||
prim_addr,
|
||||
ray->time,
|
||||
type,
|
||||
curve_type,
|
||||
lcg_state,
|
||||
difl,
|
||||
extmax);
|
||||
|
@ -295,7 +295,6 @@ ccl_device bool BVH_FUNCTION_FULL_NAME(QBVH)(KernelGlobals *kg,
|
||||
int object_flag = kernel_tex_fetch(__object_flag, object);
|
||||
|
||||
if(object_flag & SD_OBJECT_HAS_VOLUME) {
|
||||
|
||||
# if BVH_FEATURE(BVH_MOTION)
|
||||
bvh_instance_motion_push(kg, object, ray, &P, &dir, &idir, &isect->t, &ob_itfm);
|
||||
# else
|
||||
|
Loading…
Reference in New Issue
Block a user