[Bf-blender-cvs] [69f2732a139] blender-v3.3-release: Cleanup: remove unnecessary bvh_instance_motion_pop
Brecht Van Lommel
noreply at git.blender.org
Wed Jul 27 21:25:39 CEST 2022
Commit: 69f2732a1391680d252c86365b2df62b084ceeb8
Author: Brecht Van Lommel
Date: Tue Jul 26 16:52:33 2022 +0200
Branches: blender-v3.3-release
https://developer.blender.org/rB69f2732a1391680d252c86365b2df62b084ceeb8
Cleanup: remove unnecessary bvh_instance_motion_pop
===================================================================
M intern/cycles/kernel/bvh/shadow_all.h
M intern/cycles/kernel/bvh/traversal.h
M intern/cycles/kernel/bvh/volume.h
M intern/cycles/kernel/bvh/volume_all.h
M intern/cycles/kernel/geom/object.h
===================================================================
diff --git a/intern/cycles/kernel/bvh/shadow_all.h b/intern/cycles/kernel/bvh/shadow_all.h
index f37af2a1e65..2ffe1496c72 100644
--- a/intern/cycles/kernel/bvh/shadow_all.h
+++ b/intern/cycles/kernel/bvh/shadow_all.h
@@ -300,11 +300,7 @@ ccl_device_inline
kernel_assert(object != OBJECT_NONE);
/* Instance pop. */
-#if BVH_FEATURE(BVH_MOTION)
- bvh_instance_motion_pop(kg, object, ray, &P, &dir, &idir);
-#else
- bvh_instance_pop(kg, object, ray, &P, &dir, &idir);
-#endif
+ bvh_instance_pop(ray, &P, &dir, &idir);
object = OBJECT_NONE;
node_addr = traversal_stack[stack_ptr];
diff --git a/intern/cycles/kernel/bvh/traversal.h b/intern/cycles/kernel/bvh/traversal.h
index 9069d16912b..f3744aca5c0 100644
--- a/intern/cycles/kernel/bvh/traversal.h
+++ b/intern/cycles/kernel/bvh/traversal.h
@@ -237,11 +237,7 @@ ccl_device_noinline bool BVH_FUNCTION_FULL_NAME(BVH)(KernelGlobals kg,
kernel_assert(object != OBJECT_NONE);
/* instance pop */
-#if BVH_FEATURE(BVH_MOTION)
- bvh_instance_motion_pop(kg, object, ray, &P, &dir, &idir);
-#else
- bvh_instance_pop(kg, object, ray, &P, &dir, &idir);
-#endif
+ bvh_instance_pop(ray, &P, &dir, &idir);
object = OBJECT_NONE;
node_addr = traversal_stack[stack_ptr];
diff --git a/intern/cycles/kernel/bvh/volume.h b/intern/cycles/kernel/bvh/volume.h
index cc3915b4bf7..664c692dd3d 100644
--- a/intern/cycles/kernel/bvh/volume.h
+++ b/intern/cycles/kernel/bvh/volume.h
@@ -210,11 +210,7 @@ ccl_device_inline
kernel_assert(object != OBJECT_NONE);
/* instance pop */
-#if BVH_FEATURE(BVH_MOTION)
- bvh_instance_motion_pop(kg, object, ray, &P, &dir, &idir);
-#else
- bvh_instance_pop(kg, object, ray, &P, &dir, &idir);
-#endif
+ bvh_instance_pop(ray, &P, &dir, &idir);
object = OBJECT_NONE;
node_addr = traversal_stack[stack_ptr];
diff --git a/intern/cycles/kernel/bvh/volume_all.h b/intern/cycles/kernel/bvh/volume_all.h
index 5cdea3e354c..721eb555d4d 100644
--- a/intern/cycles/kernel/bvh/volume_all.h
+++ b/intern/cycles/kernel/bvh/volume_all.h
@@ -242,11 +242,7 @@ ccl_device_inline
kernel_assert(object != OBJECT_NONE);
/* Instance pop. */
-#if BVH_FEATURE(BVH_MOTION)
- bvh_instance_motion_pop(kg, object, ray, &P, &dir, &idir);
-#else
- bvh_instance_pop(kg, object, ray, &P, &dir, &idir);
-#endif
+ bvh_instance_pop(ray, &P, &dir, &idir);
object = OBJECT_NONE;
node_addr = traversal_stack[stack_ptr];
diff --git a/intern/cycles/kernel/geom/object.h b/intern/cycles/kernel/geom/object.h
index badfd311985..14ceb636e2e 100644
--- a/intern/cycles/kernel/geom/object.h
+++ b/intern/cycles/kernel/geom/object.h
@@ -503,20 +503,6 @@ ccl_device_inline void bvh_instance_push(KernelGlobals kg,
*idir = bvh_inverse_direction(*dir);
}
-/* Transform ray to exit static object in BVH. */
-
-ccl_device_inline void bvh_instance_pop(KernelGlobals kg,
- int object,
- ccl_private const Ray *ray,
- ccl_private float3 *P,
- ccl_private float3 *dir,
- ccl_private float3 *idir)
-{
- *P = ray->P;
- *dir = bvh_clamp_direction(ray->D);
- *idir = bvh_inverse_direction(*dir);
-}
-
#ifdef __OBJECT_MOTION__
/* Transform ray into object space to enter motion blurred object in BVH */
@@ -536,22 +522,20 @@ ccl_device_inline void bvh_instance_motion_push(KernelGlobals kg,
*idir = bvh_inverse_direction(*dir);
}
-/* Transform ray to exit motion blurred object in BVH. */
+#endif
-ccl_device_inline void bvh_instance_motion_pop(KernelGlobals kg,
- int object,
- ccl_private const Ray *ray,
- ccl_private float3 *P,
- ccl_private float3 *dir,
- ccl_private float3 *idir)
+/* Transform ray to exit static object in BVH. */
+
+ccl_device_inline void bvh_instance_pop(ccl_private const Ray *ray,
+ ccl_private float3 *P,
+ ccl_private float3 *dir,
+ ccl_private float3 *idir)
{
*P = ray->P;
*dir = bvh_clamp_direction(ray->D);
*idir = bvh_inverse_direction(*dir);
}
-#endif
-
/* TODO: This can be removed when we know if no devices will require explicit
* address space qualifiers for this case. */
More information about the Bf-blender-cvs
mailing list