diff options
author | Brecht Van Lommel <brecht> | 2021-10-21 16:14:30 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2021-10-21 16:38:03 +0300 |
commit | df004637643241136a3294a63c7d4ca865cdea98 (patch) | |
tree | cfd103da7148e930b2b6bfdf1f4848824b3e6d64 /intern/cycles/integrator/path_trace_work_gpu.h | |
parent | fd560ef2af6aef06e6dad00854bfdd3fd81a8d6f (diff) |
Cycles: add shadow path compaction for GPU rendering
Similar to main path compaction that happens before adding work tiles, this
compacts shadow paths before launching kernels that may add shadow paths.
Only do it when more than 50% of space is wasted.
It's not a clear win in all scenes, some are up to 1.5% slower. Likely caused
by different order of scheduling kernels having an unpredictable performance
impact. Still feels like compaction is just the right thing to avoid cases
where a few shadow paths can hold up a lot of main paths.
Differential Revision: https://developer.blender.org/D12944
Diffstat (limited to 'intern/cycles/integrator/path_trace_work_gpu.h')
-rw-r--r-- | intern/cycles/integrator/path_trace_work_gpu.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/intern/cycles/integrator/path_trace_work_gpu.h b/intern/cycles/integrator/path_trace_work_gpu.h index e16c491695b..8734d2c2852 100644 --- a/intern/cycles/integrator/path_trace_work_gpu.h +++ b/intern/cycles/integrator/path_trace_work_gpu.h @@ -86,7 +86,13 @@ class PathTraceWorkGPU : public PathTraceWork { DeviceKernel queued_kernel, const int num_paths_limit); - void compact_states(const int num_active_paths); + void compact_main_paths(const int num_active_paths); + void compact_shadow_paths(); + void compact_paths(const int num_active_paths, + const int max_active_path_index, + DeviceKernel terminated_paths_kernel, + DeviceKernel compact_paths_kernel, + DeviceKernel compact_kernel); int num_active_main_paths_paths(); |