From dcc1b7affeeff7e7cbcd7dfcbabbe387aba35cac Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Wed, 18 Nov 2026 08:42:07 -0800 Subject: [PATCH] rt tests: the copy form's held-strip read and its draw's eighth barrier The covering-area host test expected a read over nine held strips to copy all of it. The ninth strip, at the read's end, is still held after the first went past eight, so the plan copies the read less that strip, one area: [0, 64] by [0, 8]. The attachment-read device test expected seven barriers on the copy form. The new shadow is homed by the next submission's upload, whose end barrier counts too: eight. Verified: the UHD 630 leg of a20271ce5b (job m3-max-46933) failed exactly these two assertions, 62 of 64 passing, with attachment_read_copies 2 printed. --- crates/metal2vulkan-rt/src/tests/draw.rs | 5 +++-- crates/metal2vulkan-rt/src/tests/shadow.rs | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/crates/metal2vulkan-rt/src/tests/draw.rs b/crates/metal2vulkan-rt/src/tests/draw.rs index d4e1b3153..b63481eb8 100644 --- a/crates/metal2vulkan-rt/src/tests/draw.rs +++ b/crates/metal2vulkan-rt/src/tests/draw.rs @@ -1125,10 +1125,11 @@ mod on_device { let shadows = counters.gauges(); // Through the loop: the pass's two, the move, the memory barrier's, the segment's // end. Through a copy: the pass's two, two around each of the two copies, the - // segment's end. + // segment's end, and the upload's end, which moves the new shadow home ahead of + // the pass. let barriers = match looped { true => 5, - false => 7, + false => 8, }; assert_eq!( ( diff --git a/crates/metal2vulkan-rt/src/tests/shadow.rs b/crates/metal2vulkan-rt/src/tests/shadow.rs index f5ad00ae2..09602806f 100644 --- a/crates/metal2vulkan-rt/src/tests/shadow.rs +++ b/crates/metal2vulkan-rt/src/tests/shadow.rs @@ -176,9 +176,10 @@ fn a_covering_area_drops_what_it_covers_and_past_eight_the_oldest_goes() { assert_eq!(held.plan(&[strips[0]]), vec![strips[0]]); // The last ones are still held. assert_eq!(held.plan(&[strips[8]]), Vec::::new()); - // One area over every strip drops them all and holds them. + // One area over every strip copies what the held strip at its end leaves of it, one area, + // then drops them all and holds it. let all = rect([0, 72], [0, 8]); - assert_eq!(held.plan(&[all]), vec![all]); + assert_eq!(held.plan(&[all]), vec![rect([0, 64], [0, 8])]); for strip in &strips { assert_eq!(held.plan(&[*strip]), Vec::::new()); }