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
diff options
context:
space:
mode:
Diffstat (limited to 'intern/cycles/kernel/bvh/bvh.h')
-rw-r--r--intern/cycles/kernel/bvh/bvh.h19
1 files changed, 11 insertions, 8 deletions
diff --git a/intern/cycles/kernel/bvh/bvh.h b/intern/cycles/kernel/bvh/bvh.h
index bdbd574bf0f..0d9ba7e6369 100644
--- a/intern/cycles/kernel/bvh/bvh.h
+++ b/intern/cycles/kernel/bvh/bvh.h
@@ -34,6 +34,8 @@
#include "kernel/bvh/bvh_types.h"
#include "kernel/bvh/bvh_util.h"
+#include "kernel/integrator/integrator_state_util.h"
+
CCL_NAMESPACE_BEGIN
#ifndef __KERNEL_OPTIX__
@@ -361,15 +363,15 @@ ccl_device_intersect bool scene_intersect_local(KernelGlobals kg,
#ifdef __SHADOW_RECORD_ALL__
ccl_device_intersect bool scene_intersect_shadow_all(KernelGlobals kg,
+ IntegratorShadowState state,
ccl_private const Ray *ray,
- ccl_private Intersection *isect,
uint visibility,
uint max_hits,
ccl_private uint *num_hits)
{
# ifdef __KERNEL_OPTIX__
- uint p0 = pointer_pack_to_uint_0(isect);
- uint p1 = pointer_pack_to_uint_1(isect);
+ uint p0 = state;
+ uint p1 = 0; /* Unused */
uint p2 = 0; /* Number of hits. */
uint p3 = max_hits;
uint p4 = visibility;
@@ -412,7 +414,8 @@ ccl_device_intersect bool scene_intersect_shadow_all(KernelGlobals kg,
# ifdef __EMBREE__
if (kernel_data.bvh.scene) {
CCLIntersectContext ctx(kg, CCLIntersectContext::RAY_SHADOW_ALL);
- ctx.isect_s = isect;
+ Intersection *isect_array = (Intersection *)state->shadow_isect;
+ ctx.isect_s = isect_array;
ctx.max_hits = max_hits;
IntersectContext rtc_ctx(&ctx);
RTCRay rtc_ray;
@@ -428,21 +431,21 @@ ccl_device_intersect bool scene_intersect_shadow_all(KernelGlobals kg,
if (kernel_data.bvh.have_motion) {
# ifdef __HAIR__
if (kernel_data.bvh.have_curves) {
- return bvh_intersect_shadow_all_hair_motion(kg, ray, isect, visibility, max_hits, num_hits);
+ return bvh_intersect_shadow_all_hair_motion(kg, ray, state, visibility, max_hits, num_hits);
}
# endif /* __HAIR__ */
- return bvh_intersect_shadow_all_motion(kg, ray, isect, visibility, max_hits, num_hits);
+ return bvh_intersect_shadow_all_motion(kg, ray, state, visibility, max_hits, num_hits);
}
# endif /* __OBJECT_MOTION__ */
# ifdef __HAIR__
if (kernel_data.bvh.have_curves) {
- return bvh_intersect_shadow_all_hair(kg, ray, isect, visibility, max_hits, num_hits);
+ return bvh_intersect_shadow_all_hair(kg, ray, state, visibility, max_hits, num_hits);
}
# endif /* __HAIR__ */
- return bvh_intersect_shadow_all(kg, ray, isect, visibility, max_hits, num_hits);
+ return bvh_intersect_shadow_all(kg, ray, state, visibility, max_hits, num_hits);
# endif /* __KERNEL_OPTIX__ */
}
#endif /* __SHADOW_RECORD_ALL__ */