From acd5e00c0f7be26242a18d58ea063bf3798fa45f Mon Sep 17 00:00:00 2001 From: fiestorra Date: Tue, 1 Dec 2026 18:32:38 +0100 Subject: [PATCH] listed_raw_twin: return where the host makes no raw twins The test says in its own `ignore` why it exists - "offscreen descriptor probe requiring a host with raw view twins" - and then, on a host without them, compares 0 with 0: assertion `left != right` failed: the host must allocate raw twins left: 0 right: 0 which reads as a host that is broken rather than as a probe that does not apply to it. `assert_ne!(0, 0, ...)` cannot tell the two apart and its message does not try. Now it returns with a line saying so, which is what the other card probes in this crate do (`the_table_of_static_samplers` returns when there is no card, and the upcheck tests name the variable they need). Nothing else changes: a host that does make raw twins runs the same probe as before. Measured on an RTX 4090 with 621.24, where HostHeap::new(false, 4) makes none: cargo test -p leonida-gpu --features diagnostics --lib listed_raw_tests -- --ignored --nocapture --test-threads=1 ok, 2 passed; prints "this host makes no raw view twins: the probe does not apply here" Written with an AI assistant. --- .../leonida-gpu/src/descriptor/host/listed_raw_tests.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/d3d12/crates/leonida-gpu/src/descriptor/host/listed_raw_tests.rs b/d3d12/crates/leonida-gpu/src/descriptor/host/listed_raw_tests.rs index 24da6bf47a..111c24fb72 100644 --- a/d3d12/crates/leonida-gpu/src/descriptor/host/listed_raw_tests.rs +++ b/d3d12/crates/leonida-gpu/src/descriptor/host/listed_raw_tests.rs @@ -30,7 +30,14 @@ fn listed_off_alignment_raw_twin_readback() { let host = host().expect("an active D3D12 device"); let heap = HostHeap::new(false, 4).expect("a host view heap"); let first = heap.dynamic(6).expect("six visible descriptor slots"); - assert_ne!(heap.raw, 0, "the host must allocate raw twins"); + // The `ignore` above says it needs a host that makes raw twins; a host + // that does not is the case this returns on, not a fault. Before, it + // compared 0 with 0 and said "the host must allocate raw twins", which + // reads as a broken host rather than as a probe that does not apply. + if heap.raw == 0 { + println!("this host makes no raw view twins: the probe does not apply here"); + return; + } let cpu = ListViews::new().expect("CPU-only per-recording descriptor storage"); let title = Box::new([0u32; SIZE as usize / 4]);