From f73c7560fecfdec87e9ba9e073c661a547fccff1 Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Sun, 8 Nov 2026 07:38:14 -0800 Subject: [PATCH] Linear runs: the checked frames count their windows once the in-place check ended checked_frames_merge_once read the device's counts around each frame as the other tests of the module did before 8d4c3f3db1: the device's in-place check of textures over host pages renders passes over linear images of its own on its own thread, which the forced rule renders apart and the device counts with the test's (an RTX 5080 under load counted 727 passes through copies for 706). The test now waits for the check to end before it makes anything (merge_scratch::settled) and opens each frame's window through merge_scratch::counts_alone, as the module's other tests do. Verified: see the tip's evidence (lavapipe on gem10, clippy with --cfg m2v_gpu). (cherry picked from commit e62a71d0958bbf0e08d8811ca719f215c5974a2d) --- crates/metal2vulkan-runtime/src/tests/linear_runs.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/metal2vulkan-runtime/src/tests/linear_runs.rs b/crates/metal2vulkan-runtime/src/tests/linear_runs.rs index 2316b97d7..69db42dc6 100644 --- a/crates/metal2vulkan-runtime/src/tests/linear_runs.rs +++ b/crates/metal2vulkan-runtime/src/tests/linear_runs.rs @@ -1042,7 +1042,7 @@ fn checked_frames_merge_once() { let chunk_bytes = (CHUNK_STRIDE * FRAME_PASSES as u64).next_multiple_of(64 << 10); let (host, chunk_pages) = (Host::new(row * H), Host::new(chunk_bytes)); let cache = Scratch::new("linear-runs-checked"); - let device = device(&cache.0); + let device = settled(device(&cache.0)); let queue = device.new_command_queue().unwrap(); let states = FrameStates::new(&device); let usage = TextureUsage::RENDER_TARGET | TextureUsage::SHADER_READ; @@ -1090,8 +1090,8 @@ fn checked_frames_merge_once() { "the target is a linear image" ); let forced = &device.shared().linear_rule_forced; + let before = counts_alone(&device); forced.store(true, Ordering::Relaxed); - let before = device.work_counts(); let gpu = checked_frame(&queue, &texture, &states, shape, &chunk); let after = device.work_counts(); forced.store(false, Ordering::Relaxed);