Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Jones <michael_p_jones@apple.com>2022-02-10 13:51:11 +0300
committerMichael Jones <michael_p_jones@apple.com>2022-02-10 20:04:08 +0300
commit410e4e7ce1823aa15d51ee231eedc63cdf72c8e3 (patch)
tree2f566a0792e9b4bae79af6cd3b500e8b5f3904af
parent25c4000796833966386b125744b17ede81aa62b1 (diff)
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
-rw-r--r--intern/cycles/device/metal/kernel.mm7
1 files changed, 6 insertions, 1 deletions
diff --git a/intern/cycles/device/metal/kernel.mm b/intern/cycles/device/metal/kernel.mm
index e9bd1cea5df..91aac8831ca 100644
--- a/intern/cycles/device/metal/kernel.mm
+++ b/intern/cycles/device/metal/kernel.mm
@@ -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) {