From e9eaa4743676104f60d97f8da7510495d69de265 Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Sat, 14 Nov 2026 21:20:04 -0800 Subject: [PATCH] RUNTIME 2334: A reader through snapshots rebound into an instance recorded inline after a split keeps its pairs RUNTIME 2332 admits an instance whose draw reads colors through snapshots to the inline splits (render/inline_splits.rs), but record_rebound still refused a kept reader rebound into such an instance: the arm (Some(pairs), Some(held)) returned the internal error "a reader rebound into an instance recorded inline after a split", whose comment the admission had made false. On ms01's Iris Xe (ANV, which takes snapshots) runtime_lane::attachment_reads:: own_pixel_reads_copy_in_only_around_their_scissors failed its draw with that error (job m3-max-31219, at 5a4df749ec). The arm now keeps each of the reader's pairs in the instance's room, the drawing one inside its coverage query, as the every-step path keeps them (Kept::draw, begin_query, end_query): the pass's end records them through the pass's record, in order. Verification: the jobs that compile and run it are reported with this sha. --- .../src/render/draw_again/rebound.rs | 21 +++++++++++++------ crates/metal2vulkan/src/cache/mod.rs | 2 +- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/crates/metal2vulkan-runtime/src/render/draw_again/rebound.rs b/crates/metal2vulkan-runtime/src/render/draw_again/rebound.rs index 64cdb75f4..90213c63b 100644 --- a/crates/metal2vulkan-runtime/src/render/draw_again/rebound.rs +++ b/crates/metal2vulkan-runtime/src/render/draw_again/rebound.rs @@ -1750,12 +1750,21 @@ impl RenderLowering { } } } - // A reader through snapshots never records into such an instance (its admission), - // nor is it kept into one (`RenderLowering::rehome_aside`). - (Some(_), Some(_)) => { - return Err(crate::error::internal( - "a reader rebound into an instance recorded inline after a split", - )) + // A reader through snapshots whose instance records inline after a split, its colors + // in the feedback loop layout (`render/inline_splits.rs`): each of its pairs kept with + // the others' draws, the drawing one inside its query, as every step keeps them. + (Some(pairs), Some(held)) => { + for pair in pairs { + let counted = query.filter(|_| pair.phase == Phase::Drawing); + if let Some((pool, query)) = counted { + held.begin_query(pool, query); + } + recording.pair = Some(pair); + held.draw(&recording, owned.pipeline); + if let Some((pool, query)) = counted { + held.end_query(pool, query); + } + } } (Some(pairs), None) => { for pair in pairs { diff --git a/crates/metal2vulkan/src/cache/mod.rs b/crates/metal2vulkan/src/cache/mod.rs index 4b5292985..c66561ffb 100644 --- a/crates/metal2vulkan/src/cache/mod.rs +++ b/crates/metal2vulkan/src/cache/mod.rs @@ -94,7 +94,7 @@ pub const ARTIFACT_FORMAT_VERSION: u32 = 523; /// 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 = 2333; +pub const RUNTIME_VERSION: u32 = 2334; /// 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