Blender Git Loki
Git Commits -> Revision ae74169
Revision ae74169 by Sergey Sharybin (cycles-x) July 15, 2021, 15:00 (GMT) |
Cycles X: Implement path compaction for shadow catcher The demo file is BMW27 with the ground set as a shadow catcher. The observed performance improvement is about 5% on RTX5000. The general idea is to schedule new tiles in a way that we always leave space for the shadow catcher. Roughly, we first schedule 50% of path states from the maximum number of paths, then 25% and so on. Summary of changes: - Replace constant offset of shadow catcher state with an atomically incrementing index. - Add new kernel to count number of states which can still spit. Could experiment with some atomics so that path split decreases a value, so does path termination, and increase it when new paths are added. Not sure this will give better performance. - Remove terminated paths kernel from scheduling. The paths are compacted, so we know they are in the beginning of the array. Differential Revision: https://developer.blender.org/D11932 |
Commit Details:
Full Hash: ae741692727bc14c7e40c8fe06126b1ecc1bc36e
Parent Commit: 3e9265a
Lines Changed: +191, -226
11 Modified Paths:
/intern/cycles/device/device_kernel.cpp (+2, -0) (Diff)
/intern/cycles/integrator/path_trace_work_cpu.cpp (+1, -1) (Diff)
/intern/cycles/integrator/path_trace_work_gpu.cpp (+74, -56) (Diff)
/intern/cycles/integrator/path_trace_work_gpu.h (+8, -9) (Diff)
/intern/cycles/kernel/device/cuda/kernel.cu (+29, -20) (Diff)
/intern/cycles/kernel/integrator/integrator_init_from_camera.h (+0, -4) (Diff)
/intern/cycles/kernel/integrator/integrator_state.h (+2, -29) (Diff)
/intern/cycles/kernel/integrator/integrator_state_flow.h (+0, -27) (Diff)
/intern/cycles/kernel/integrator/integrator_state_util.h (+56, -58) (Diff)
/intern/cycles/kernel/kernel_shadow_catcher.h (+18, -22) (Diff)
/intern/cycles/kernel/kernel_types.h (+1, -0) (Diff)
/intern/cycles/integrator/path_trace_work_cpu.cpp (+1, -1) (Diff)
/intern/cycles/integrator/path_trace_work_gpu.cpp (+74, -56) (Diff)
/intern/cycles/integrator/path_trace_work_gpu.h (+8, -9) (Diff)
/intern/cycles/kernel/device/cuda/kernel.cu (+29, -20) (Diff)
/intern/cycles/kernel/integrator/integrator_init_from_camera.h (+0, -4) (Diff)
/intern/cycles/kernel/integrator/integrator_state.h (+2, -29) (Diff)
/intern/cycles/kernel/integrator/integrator_state_flow.h (+0, -27) (Diff)
/intern/cycles/kernel/integrator/integrator_state_util.h (+56, -58) (Diff)
/intern/cycles/kernel/kernel_shadow_catcher.h (+18, -22) (Diff)
/intern/cycles/kernel/kernel_types.h (+1, -0) (Diff)