From 9cad865bb2961ef6f76ea9c4abf395dfd37233cc Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Thu, 12 Nov 2026 00:53:10 -0800 Subject: [PATCH] RUNTIME_VERSION 2092: a batch waits only for the fill queue's fills of memory its commands may reach The commits before this one. On a device with a fill queue (NVIDIA, 2074), every other submission waited on the GPU for the fill queue's last fill until the host saw it complete, fills it never touched included. A batch now takes and waits for only the fills of memory its commands may reach: memory its uses name or make resident; everything where a command reaches memory no use names, or where it took a move in another resource's memory or a staged copy; and the device's own buffers. Internal submissions still wait for the fill queue's last submission; other devices take every fill as before. Counted: WorkCounts::fill_queue_waits and fill_queue_waits_unused. Measured (release; a compositor's one-dispatch frame while an app on another queue makes two 4 MiB Private buffers per command buffer): - RTX 3090: p50 9.0 -> 2.10 ms (2.10 ms with nothing made); frames that waited for fills they never use, per 4 s, 424-429 -> 0 (m3-max-19457). - RTX 5080 Laptop: p50 13.2 / 7.5 -> 1.18 ms (1.18-1.36 with nothing made); unused waits 288 / 430 -> 0 (b5080 fillq-ab-233804, batch m3-max-19646). Shared texture makings wait for no queued fill: p50 <= 0.011 ms, max 1.33 ms, both GPUs. Test: tests::fill_waits::a_batch_that_reaches_no_new_memory_waits_for_none_of_its_fills saw 8 unused waits and failed before the fix, 0 after (3090 19457, 5080 19646); zero-reads passes (19739); zeroed_start / fill_queue / first_move tests 22/22 on both GPUs; lavapipe 24/24 touched (19668); lint 19638, rustdoc 19732. Not run: RADV, Intel, MoltenVK (no fill queue there). --- 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 b0d241ddd..4ccdd8341 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 = 2091; +pub const RUNTIME_VERSION: u32 = 2092; /// 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