Don't fail metal create_fence if no shared event could be created (#9415)

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
This commit is contained in:
Andreas ReichandConnor Fitzgerald authored and Connor Fitzgerald committed 2026-05-01 14:04:31 -04:00
1 parent 9890bc9525
commit 7d7b9481ff
1 file changed
+1 -1
+1 -1
View File
@@ -1848,7 +1848,7 @@ impl crate::Device for super::Device {
self.counters.fences.add(1);
// https://developer.apple.com/documentation/metal/mtlsharedevent
let shared_event = if available!(macos = 10.14, ios = 12.0, tvos = 12.0, visionos = 1.0) {
Some(self.shared.device.newSharedEvent().unwrap())
self.shared.device.newSharedEvent() // This should be supported on said devices, but some sandbox environments may still restrict it, making it return `None`.
} else {
None
};