diff --git a/bridge/patches/0033-room-thread-ages-spares-in-a-section.patch b/bridge/patches/0033-room-thread-ages-spares-in-a-section.patch new file mode 100644 index 0000000..27e6d5c --- /dev/null +++ b/bridge/patches/0033-room-thread-ages-spares-in-a-section.patch @@ -0,0 +1,15 @@ +diff --git a/crates/metal2vulkan-runtime/src/device/room.rs b/crates/metal2vulkan-runtime/src/device/room.rs +index e970e1da49c94da1ae6acc527a233aeb6ffa4ada..0bd3beae740946b54655fd6e28d229a10ae9d56e 100644 +--- a/crates/metal2vulkan-runtime/src/device/room.rs ++++ b/crates/metal2vulkan-runtime/src/device/room.rs +@@ -123,7 +123,9 @@ fn run(shared: &Shared, weak: &WeakDevice) { + }; + if requested { + keep(&device); +- } else { ++ } else if let Some(_busy) = exit_guard::enter() { ++ // In a section of the exit guard, as every Vulkan call of a thread of the runtime's is: ++ // a spare whose time is up is freed here. + let parts = device.shared(); + crate::memory::age_spares(&parts.memory, parts.vk()); + }