From d21208a18dee15c2d4e12eb63f1c72b093deed48 Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Mon, 9 Nov 2026 19:21:28 -0800 Subject: [PATCH] RUNTIME_VERSION 1994 and the runtime-sources pin for a Clear's reach past its render area on Apple silicon Behaviour from exitcrash's f856f3a2c8, ea34c27388 and 4cb247a148. On an AppleSilicon-presenting device, a Clear in a pass without a draw call reaches what the M3's Metal clears: - the whole level or slice, where Metal compresses the attachment; - otherwise the render area rounded up to 32x32 tiles and clipped to the level; - with a draw call, always the tiles. How it is done: - A no-draw pass whose clear would reach past its area clears in a pass of its own first, then loads. So the main pass's render area stays Metal's, and a DontCare attachment never sits in a grown pass. - FreshUnwritten counts the reach as written. - A pre-existing bug found by the new test is fixed: a texture over a buffer with a shadow image, cleared past its render area without a draw call, wrote nothing to the buffer. IntelOrAmd answers are unchanged (the whole level without a draw call, the 5300M's). API.md records the x86 Macs' disagreement as an accepted difference. Verified by exitcrash: - runtime_lane::fresh_clear_reach: 300 cases texel by texel against Metal's answers. - fresh_contents' multisampled depth test. - M3 MoltenVK 258/258 (job 12799) and lavapipe 259/259 (12800). - The negative control at 32ea3ac198 fails 36 of 300 cases on both devices. - clippy is clean. --- 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 411d1a84e..8a3654640 100644 --- a/crates/metal2vulkan-validation/runtime-sources.sha256 +++ b/crates/metal2vulkan-validation/runtime-sources.sha256 @@ -1 +1 @@ -d2253f72fca107f1685bcd3acaf9deeb4623f5519fe78100ad729d6274935f7f +6d59eec5bae5f4f0b8137ab3c030e2e8c5ed92b0075cde6e4fcf8fff7e7e3f3e diff --git a/crates/metal2vulkan/src/cache/mod.rs b/crates/metal2vulkan/src/cache/mod.rs index 35e16bcbd..764ffa78e 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 = 497; /// 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 = 1993; +pub const RUNTIME_VERSION: u32 = 1994; /// 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