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
path: root/intern
diff options
context:
space:
mode:
authorBrecht Van Lommel <brecht@blender.org>2021-10-20 15:47:04 +0300
committerBrecht Van Lommel <brecht@blender.org>2021-10-20 18:50:31 +0300
commit0c52eed863522b4dbac2704e8c88b5c009e886e7 (patch)
treec7fa93d722899c32c9fb21f4b23a6bc7d5602c5d /intern
parent52c5300214e58776623b308de4e5ac33fc8f17d5 (diff)
Cycles: more accurately count main paths for adding work tiles
Easy now thanks to the main and shadow path decoupling. Doesn't help in an benchmark scene except Spring, where it reduces render time by maybe 2-3%. Ref T87836
Diffstat (limited to 'intern')
-rw-r--r--intern/cycles/integrator/path_trace_work_gpu.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/intern/cycles/integrator/path_trace_work_gpu.cpp b/intern/cycles/integrator/path_trace_work_gpu.cpp
index f898f3fce81..2c71b1cf876 100644
--- a/intern/cycles/integrator/path_trace_work_gpu.cpp
+++ b/intern/cycles/integrator/path_trace_work_gpu.cpp
@@ -731,7 +731,6 @@ void PathTraceWorkGPU::enqueue_work_tiles(DeviceKernel kernel,
int PathTraceWorkGPU::num_active_main_paths_paths()
{
- /* TODO: this is wrong, does not account for duplicates with shadow! */
IntegratorQueueCounter *queue_counter = integrator_queue_counter_.data();
int num_paths = 0;
@@ -739,7 +738,10 @@ int PathTraceWorkGPU::num_active_main_paths_paths()
DCHECK_GE(queue_counter->num_queued[i], 0)
<< "Invalid number of queued states for kernel "
<< device_kernel_as_string(static_cast<DeviceKernel>(i));
- num_paths += queue_counter->num_queued[i];
+
+ if (!kernel_is_shadow_path((DeviceKernel)i)) {
+ num_paths += queue_counter->num_queued[i];
+ }
}
return num_paths;