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)
This commit is contained in:
Anees Iqbal committed 2026-11-08 07:41:02 -08:00
1 parent c914ad50b5
commit f73c7560fe
1 file changed
+2 -2
@@ -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);