From 99a11fd507a584fe6d662e6311ff20e7cb71b4e6 Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Sun, 8 Nov 2026 21:49:31 -0800 Subject: [PATCH] RUNTIME_VERSION 1944 and the runtime-sources pin for attached reads through a narrowed view The four commits before this (ownpixel) let a draw's slot that samples a mipmapped texture, one level of which a colour attachment of its render pass instance renders, read the texture's own image through a view of the levels before the attached one (same base, fewer levels), where every read the slot can make (StageModule::level_reads, through the sampler the draw binds) stays below the lowest attached level. Such a slot no longer reads a usage shadow, and nothing is copied for it. The answer is the shadow's: no draw of the instance writes those levels, and the view overlaps no attachment. A slot that reaches the attached level, any level, or a texture's first level keeps the shadow, counted by reason (attached_read_slots_apart, _written and _narrowed replace _below). FAST-PATHS records it. Verified (ownpixel, M3 MoltenVK m3-max-10859 at fd1ddfb852): --cfg m2v_gpu clippy on runtime and validation green; 61/61, among them tests::attached_levels (five cases: explicit level 1 with level 2 attached narrowed; level 2 with level 2 attached copied; an implicit read clamped by the bound sampler at LOD 1 narrowed; the same read unclamped copied; level 1 with level 0 attached copied; every byte against the level's colour before the pass), attachment_reads, view_attachments, snapshot_reads, attached_read_standing, kept_shadowed_draws, draw_again, shadow_carried_read and shadow_merge_read. Linux clippy x3, Rustdoc, the runtime suite, lavapipe and the 780M counts follow (m3-max-10860). The new fixture's golden and expectation rows are re-blessed on development. --- 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 8857ef9e0..231eecdd8 100644 --- a/crates/metal2vulkan-validation/runtime-sources.sha256 +++ b/crates/metal2vulkan-validation/runtime-sources.sha256 @@ -1 +1 @@ -f3390de20b1d22da36ebc6fbcb97a8f5733f8086662bca62f207198c47a2ea79 +472966aa53dc439abed13b5d5b0aae8ff102598630490ba73520ad799f1fca3b diff --git a/crates/metal2vulkan/src/cache/mod.rs b/crates/metal2vulkan/src/cache/mod.rs index 2479e527c..3d2d95674 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 = 496; /// 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 = 1943; +pub const RUNTIME_VERSION: u32 = 1944; /// 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