Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorBrecht Van Lommel <brecht@blender.org>2022-07-26 17:52:33 +0300
committerBrecht Van Lommel <brecht@blender.org>2022-07-27 22:02:21 +0300
commit69f2732a1391680d252c86365b2df62b084ceeb8 (patch)
tree8863f9d0f0fe296b65b71ffc841d6bc016b8b6f2 /intern
parentcd47d1b2ed0834e52c1e71027c5b5032f1a24afd (diff)
Cleanup: remove unnecessary bvh_instance_motion_pop
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/kernel/bvh/shadow_all.h6
-rw-r--r--intern/cycles/kernel/bvh/traversal.h6
-rw-r--r--intern/cycles/kernel/bvh/volume.h6
-rw-r--r--intern/cycles/kernel/bvh/volume_all.h6
-rw-r--r--intern/cycles/kernel/geom/object.h30
5 files changed, 11 insertions, 43 deletions
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. */