diff options
author | Sergey Sharybin <sergey@blender.org> | 2021-11-10 19:18:55 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey@blender.org> | 2021-11-11 17:21:35 +0300 |
commit | d26d3cfe193793728cac77be9b44463a84a0f57e (patch) | |
tree | bd949dffbe4e8476f008dcd855a941bd9e030a28 /intern/cycles/device | |
parent | 9be6880d020eb2a6891c07e0b8794400f20f5464 (diff) |
Fix T92868: Cycles catcher with transparency crashes
The issue was caused by splitting happening twice.
Fixed by checking for split flag which is assigned to the both states
during split.
The tricky part was to write catcher data at the moment of split: the
transparency and shadow catcher sample count is to be accumulated at
that point. Now it is happening in the `intersect_closest` kernel.
The downside is that render buffer is to be passed to the kernel, but
the benefit is that extra split bounce check is not needed now.
Had to move the passes write to shadow catcher header, since include
of `film/passes.h` causes all the fun of requirement to have BSDF
data structures available.
Differential Revision: https://developer.blender.org/D13177
Diffstat (limited to 'intern/cycles/device')
-rw-r--r-- | intern/cycles/device/cpu/kernel.h | 2 | ||||
-rw-r--r-- | intern/cycles/device/optix/queue.cpp | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/intern/cycles/device/cpu/kernel.h b/intern/cycles/device/cpu/kernel.h index 406bd07ab3d..2d1de975c2b 100644 --- a/intern/cycles/device/cpu/kernel.h +++ b/intern/cycles/device/cpu/kernel.h @@ -42,7 +42,7 @@ class CPUKernels { IntegratorInitFunction integrator_init_from_camera; IntegratorInitFunction integrator_init_from_bake; - IntegratorFunction integrator_intersect_closest; + IntegratorShadeFunction integrator_intersect_closest; IntegratorFunction integrator_intersect_shadow; IntegratorFunction integrator_intersect_subsurface; IntegratorFunction integrator_intersect_volume_stack; diff --git a/intern/cycles/device/optix/queue.cpp b/intern/cycles/device/optix/queue.cpp index f5bfd916ccf..e3946d94f5d 100644 --- a/intern/cycles/device/optix/queue.cpp +++ b/intern/cycles/device/optix/queue.cpp @@ -73,7 +73,8 @@ bool OptiXDeviceQueue::enqueue(DeviceKernel kernel, const int work_size, void *a sizeof(device_ptr), cuda_stream_)); - if (kernel == DEVICE_KERNEL_INTEGRATOR_SHADE_SURFACE_RAYTRACE) { + if (kernel == DEVICE_KERNEL_INTEGRATOR_INTERSECT_CLOSEST || + kernel == DEVICE_KERNEL_INTEGRATOR_SHADE_SURFACE_RAYTRACE) { cuda_device_assert( cuda_device_, cuMemcpyHtoDAsync(launch_params_ptr + offsetof(KernelParamsOptiX, render_buffer), |