Cycles: Maximise MTLCompiler concurrency when GUI isn't active
This PR will result in much faster Metal kernel (re)compilation for command line rendering. Pull Request: https://projects.blender.org/blender/blender/pulls/136247
This commit is contained in:
committed by
Michael Jones (Apple)
parent
77a0c92283
commit
9dca0ba856
@@ -86,6 +86,12 @@ MetalDevice::MetalDevice(const DeviceInfo &info, Stats &stats, Profiler &profile
|
||||
mtlDevice = usable_devices[mtlDevId];
|
||||
metal_printf("Creating new Cycles Metal device: %s\n", info.description.c_str());
|
||||
|
||||
/* Enable increased concurrent shader compiler limit.
|
||||
* This is also done by MTLContext::MTLContext, but only in GUI mode. */
|
||||
if (@available(macOS 13.3, *)) {
|
||||
[mtlDevice setShouldMaximizeConcurrentCompilation:YES];
|
||||
}
|
||||
|
||||
max_threads_per_threadgroup = 512;
|
||||
|
||||
use_metalrt = info.use_hardware_raytracing;
|
||||
|
||||
Reference in New Issue
Block a user