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
This commit is contained in:
parent
52c5300214
commit
0c52eed863
Notes:
blender-bot
2023-02-14 08:40:26 +01:00
Referenced by issue #87836, Cycles: GPU Performance
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue