Repository navigation
Conversation
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.
|
Independent raw-twin probe matrix at Main fails at the raw-twin availability assertion in all four cases. With this PR, all four runs print MEASURED with the offscreen test. AI-assisted (Codex). |
|
Verified on Windows 11 on a second card, a different NVIDIA generation from the one in the description, with the native D3D12 driver. Head
So GPUs tested: one NVIDIA card, native driver, model not given. AI-assisted: yes (Claude Code). |
KelboLive
left a comment
There was a problem hiding this comment.
Returning here is safe for the only caller: the ignored test is #[cfg(test)]-only, and the guard precedes cpu, the buffers and the first SetDescriptorHeaps at :101, so no binding or cleanup is skipped, and heap drops normally. The mutation confirms the guard is the right one — flipping it to != 0 fails at :193 with 0x80000004 vs 0x84000004.
But it is not the only option, and it costs coverage on exactly the hosts that hit it. On this RTX 4070 Ti SUPER (heap.raw == 0), the sibling's synthetic heap.raw = 64 + 32 twins fallback (sub_dword..., :305-311) makes the full probe pass 1/1 — I swapped the return for that fallback and got all three biases. So this turns the probe into a no-op on NVIDIA rather than preserving the check. If you keep the return, I would at least prefer the fallback, since the machinery already exists two tests above.
Two caveats if it stays:
heap.raw == 0also coversLEONIDA_RAW_VIEWS=0and a regression inprobe_view_limit's 4M-descriptor fit — so a real regression now passes silently. Wording the skip as "raw twins are off" and checkingtwin_bias()(as the sibling does at:299) would narrow that.- The probe still calls
host().expect(...)at:30, so a machine with no device panics before reaching the guard; #2908'srequire_host()does not touch this test.
Non-blocking: shader suite 414/5/0, both ignored tests pass here, and merge-tree with main is clean. Note #2834 rewrites this same test into a listed_readback(bool) helper — whichever lands second must reapply the guard (or the fallback) there.
|
Positive raw-twin readback check for the new early return at With stock heap limits and raw views enabled, main hit the raw-twin assertion on both adapters. The PR printed its early-return message on both. I then reduced the heap limits in a local test build so these adapters could create the raw twins. On that same build, explicit raw views off still printed the early-return message, and raw views on reached DX12 readback and passed on both adapters. The readback verified listed-twin and public transfers at all three source/target bias pairs (4/12, 8/8, 12/4). MEASURED with synthetic buffers and a local smaller-heap positive control. AI-assisted (Codex). |
The test says in its own
ignorewhy it exists —"offscreen descriptor probe requiring a host with raw view twins"— and then, on a host without them, compares 0 with 0:assert_ne!(0, 0, "the host must allocate raw twins")cannot tell "this host makes no twins" from "the twins this host makes are wrong", and its message chooses the second.A host that does not make raw view twins is the case the probe does not apply to, and it is exactly what the
ignoreattribute says. So it now returns with a line saying so:which is what the other card probes in this crate already do —
the_table_of_static_samplersreturns when there is no card, and theupchecktests name the variable they need instead of asserting into a wall.Nothing else changes: a host that does make raw twins runs the same probe, the same reads and the same comparisons as before.
Measured on an RTX 4090 with 621.24, where
HostHeap::new(false, 4)makes none:AI-assisted: yes — DeepSeek v4.1 (flash), which ran the whole card suite to find this one.
Written with an AI assistant.