From 6f7bb169d25f66ba7caf55ed9e4365d5307d6a3f Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Tue, 10 Nov 2026 02:31:57 -0800 Subject: [PATCH] RUNTIME_VERSION 2006 and the runtime-sources pin for texture CPU copies staged beside the device's queues What: the four commits before this one (getbytes, steelbrain/getbytes 6695d4f056): where no memory the host caches may hold a texture's image and the device has no copy engine, the queue plan reserves the first queue of a free graphics or compute family as the staging queue, and textures' CPU copies (get_bytes, replace_region) go through a host-cached staging buffer on it. Chosen from memory types and queue families only. Under DeviceOptions::queue_limits the staging queue is the plan's (the runtime's own, shared by no command queue): it counts against neither limit and raises no limits message. RUNTIME_VERSION 2005 -> 2006. The pin follows. Why: a 1080p Shared texture's get_bytes on the RX 7900 XTX (RADV NAVI31, ReBAR) read through vkCopyImageToMemoryEXT from device-local uncached memory: 1.0-1.7 s (4-byte loads 1.0-1.4 us each). Verified (getbytes, all on the XTX, MESA_VK_DEVICE_SELECT=1002:744c!, Mesa 26.2.6): focused tests 38/38 (13435), the device keeping the plan's staging queue at 1+0 with 0 limits messages; lane frame_sized_textures_copy_texel_exact at 1+0: 1080p get_bytes best 3.26 ms, median 2.88 ms with 2 s of GPU work running, texel-exact; runtime suite 2032/2032 (13436/13438/13439); lane at 1+0 1929/1929 (13440-13442); GPU-time tests 5/5 (13443); negative control (fix off) fails the new assertion; RX 550 runtime suite 2002/2002; um790 clippy (three configurations), rustdoc and 31 unit tests (13425). Base: 256x256 33-41 ms, 1080p 1.26-1.71 s; tip: 0.10 ms, 2.0-2.2 ms, 4096 17 ms. replace_region was never slow (1.5 -> 1.1 ms). --- crates/metal2vulkan-validation/runtime-sources.sha256 | 2 +- crates/metal2vulkan/src/cache/mod.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/metal2vulkan-validation/runtime-sources.sha256 b/crates/metal2vulkan-validation/runtime-sources.sha256 index 75c20b8d5..afc6b65d5 100644 --- a/crates/metal2vulkan-validation/runtime-sources.sha256 +++ b/crates/metal2vulkan-validation/runtime-sources.sha256 @@ -1 +1 @@ -e30cd410207f9febc7c7df885fc4490dc2deb7dbc4e8e0bfa0dfb88158d707e6 +1a138459472083a570265773ec529b9aee5a84bff271c1ab7a74f78acccdabfd diff --git a/crates/metal2vulkan/src/cache/mod.rs b/crates/metal2vulkan/src/cache/mod.rs index e89777d80..2d83690aa 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 = 499; /// 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 = 2005; +pub const RUNTIME_VERSION: u32 = 2006; /// 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