Cycles: Metal cherrypicks from 4.0 into 3.6 #114399
|
@ -25,6 +25,7 @@ class MetalDevice : public Device {
|
|||
id<MTLLibrary> mtlLibrary[PSO_NUM] = {nil};
|
||||
id<MTLArgumentEncoder> mtlBufferKernelParamsEncoder =
|
||||
nil; /* encoder used for fetching device pointers from MTLBuffers */
|
||||
id<MTLCommandQueue> mtlComputeCommandQueue = nil;
|
||||
id<MTLCommandQueue> mtlGeneralCommandQueue = nil;
|
||||
id<MTLArgumentEncoder> mtlAncillaryArgEncoder =
|
||||
nil; /* encoder used for fetching device pointers from MTLBuffers */
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -288,10 +288,11 @@ void ShaderCache::load_kernel(DeviceKernel device_kernel,
|
|||
* limit. */
|
||||
int max_mtlcompiler_threads = 2;
|
||||
|
||||
# if defined(MAC_OS_VERSION_13_3)
|
||||
# if defined(MAC_OS_VERSION_13_3)
|
||||
if (@available(macOS 13.3, *)) {
|
||||
/* Subtract one to avoid contention with the real-time GPU module. */
|
||||
max_mtlcompiler_threads = max(2, int([mtlDevice maximumConcurrentCompilationTaskCount]) - 1);
|
||||
max_mtlcompiler_threads = max(2,
|
||||
int([mtlDevice maximumConcurrentCompilationTaskCount]) - 1);
|
||||
}
|
||||
# endif
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue