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:
authorMichael Jones <michael_p_jones@apple.com>2022-07-13 22:56:57 +0300
committerMichael Jones <michael_p_jones@apple.com>2022-07-14 16:26:18 +0300
commit4b1d315017ef103f3034160d349b3c3c21a4cd6a (patch)
tree779dd8c27d37e710d3014911e962027b56049084 /intern/cycles/integrator/path_trace_work_gpu.h
parent47d4ce498e3f5a11a0210b1efd57053f0b1c85bd (diff)
Cycles: Improve cache usage on Apple GPUs by chunking active indices
This patch partitions the active indices into chunks prior to sorting by material in order to tradeoff some material coherence for better locality. On Apple Silicon GPUs (particularly higher end M1-family GPUs), we observe overall render time speedups of up to 15%. The partitioning is implemented by repeating the range of `shader_sort_key` for each partition, and encoding a "locator" key which distributes the indices into sorted chunks. Reviewed By: brecht Differential Revision: https://developer.blender.org/D15331
Diffstat (limited to 'intern/cycles/integrator/path_trace_work_gpu.h')
-rw-r--r--intern/cycles/integrator/path_trace_work_gpu.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/intern/cycles/integrator/path_trace_work_gpu.h b/intern/cycles/integrator/path_trace_work_gpu.h
index 4c10a221a30..a805258d1b5 100644
--- a/intern/cycles/integrator/path_trace_work_gpu.h
+++ b/intern/cycles/integrator/path_trace_work_gpu.h
@@ -156,6 +156,9 @@ class PathTraceWorkGPU : public PathTraceWork {
bool interop_use_checked_ = false;
bool interop_use_ = false;
+ /* Number of partitions to sort state indices into prior to material sort. */
+ int num_sort_partitions_;
+
/* Maximum number of concurrent integrator states. */
int max_num_paths_;