Workaround for T94142: Cycles Metal crash with simultaneous viewport and final render
Disable binary archives on Apple Silicon (issue stems from instancing multiple PSOs from the same binary archive). Pipeline creation still filters through the OS shader cache, mitigating any impact on setup times after the initial render. Reviewed By: brecht Differential Revision: https://developer.blender.org/D14072
This commit is contained in:
@@ -59,10 +59,15 @@ bool MetalDeviceKernel::load(MetalDevice *device,
|
||||
}
|
||||
|
||||
bool use_binary_archive = true;
|
||||
if (getenv("CYCLES_METAL_DISABLE_BINARY_ARCHIVES")) {
|
||||
if (device->device_vendor == METAL_GPU_APPLE) {
|
||||
/* Workaround for T94142: Cycles Metal crash with simultaneous viewport and final render */
|
||||
use_binary_archive = false;
|
||||
}
|
||||
|
||||
if (auto str = getenv("CYCLES_METAL_DISABLE_BINARY_ARCHIVES")) {
|
||||
use_binary_archive = (atoi(str) == 0);
|
||||
}
|
||||
|
||||
id<MTLBinaryArchive> archive = nil;
|
||||
string metalbin_path;
|
||||
if (use_binary_archive) {
|
||||
|
Reference in New Issue
Block a user