From 06fd49b2218012f3845b2b8edbf12a29b3afa7c8 Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Wed, 11 Nov 2026 23:31:58 -0800 Subject: [PATCH] RUNTIME_VERSION 2089: the queue-switch check's gate opens on the GPU, so no round waits on its host while another device is destroyed The commits before this one. A queue-switch round submitted its first batch waiting on the GPU for a gate its host signalled only after the second batch's vkQueueSubmit returned. On NVIDIA that second vkQueueSubmit and another VkDevice's vkDestroyDevice in the same process never returned: - RTX 5080 Laptop (615.71.09), beside the runtime suite: recorder_slots timed out at 1201 s, and the dma-buf leak probe's exit waited on the same submission section (gdb stacks, nv5080reg); - RTX 3090 (620.70.06): managed_copy_device's recovery test hung after the device was made again, the old generation's vkDestroyDevice against the new generation's round (gdb stacks, nvxid); 1 of 13 copies hung without the fix (m3-max-19330), 0 of 13 with it (m3-max-19329), both exclusive on gem10's 3090. Each round now submits an opening first, fills of the check's scratch buffer that signal the gate as they complete, so every batch it submits completes with no further call of the check's thread. A round whose gate had opened before its batches were in is late, counts for nothing and doubles the opening's fills (at most 1024). Tests: tests::queue_switch_gate holds a round between its submissions, and once all are submitted, and waits on the host (at most 20 s) for the batches' timeline values; they cannot complete under the host-signalled gate. zeroed_start (test-only) paces its busy work without the target's fill and says where the making's time went. Verified at the branch: the 3090 recovery runs above. Lint m3-max-19481 and lavapipe m3-max-19482 (66942365f6), and the gate tests' pre-fix vs fix runs on the 3090 (19452) and the 5080, ride the checks after landing. --- crates/metal2vulkan/src/cache/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/metal2vulkan/src/cache/mod.rs b/crates/metal2vulkan/src/cache/mod.rs index 7a40dc70b..c828112df 100644 --- a/crates/metal2vulkan/src/cache/mod.rs +++ b/crates/metal2vulkan/src/cache/mod.rs @@ -93,7 +93,7 @@ pub const ARTIFACT_FORMAT_VERSION: u32 = 502; /// changes no behaviour, and then updates that hash alone with the commit saying why, or changes /// behaviour and also bumps this version. The commit that bumps it says what changed; this comment /// keeps no history. -pub const RUNTIME_VERSION: u32 = 2088; +pub const RUNTIME_VERSION: u32 = 2089; /// The digest of the sources this build of the crate was compiled from: SHA-256, as lowercase hex, /// of the manifest, the build script, and exactly the files the crate roots' module tree compiles