Cycles: Replace __MAX_CLOSURE__ build option with runtime integrator variable

Goal is to reduce OpenCL kernel recompilations.

Currently viewport renders are still set to use 64 closures as this seems to
be faster and we don't want to cause a performance regression there. Needs
to be investigated.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2775
This commit is contained in:
Mai Lavelle
2017-11-09 00:49:15 -05:00
parent 6febe6e725
commit 087331c495
28 changed files with 87 additions and 59 deletions

View File

@@ -34,7 +34,6 @@ DeviceSplitKernel::DeviceSplitKernel(Device *device)
use_queues_flag(device, "use_queues_flag"),
work_pool_wgs(device, "work_pool_wgs")
{
current_max_closure = -1;
first_tile = true;
avg_time_per_sample = 0.0;
@@ -116,8 +115,6 @@ bool DeviceSplitKernel::load_kernels(const DeviceRequestedFeatures& requested_fe
#undef LOAD_KERNEL
current_max_closure = requested_features.max_closure;
return true;
}