Repository navigation
Conversation
The software adapter runs 4-lane waves, so the tests that lower for the card's 32 fail under LEONIDA_WARP=1 even when they ask for "hardware": that switch makes Host::new(false) return WARP too. Ask the made host whether it takes waves of 32 and skip it otherwise. `run_cases_on` takes the required width; the quadmask and the two cross-wave LDS tests use a 32-lane path, and the whole-wave f64 test checks its own loop. The pack tests and the wave64 helpers guard their host; the two manual OPTIONS1 queries now use `takes_waves_of`. Verified by compiling the crate and the workspace for x86_64-pc-windows-msvc; this box has no D3D12 device, so the runs themselves were not repeated. AI-assisted: yes
KelboLive's review of ProjectLeonida#2920: two `host_32()` sites still returned silently, and `takes_waves_of` no longer asked whether the adapter has wave operations at all (the old manual check did). Both now say their reason, and the query includes `WaveOps`. AI-assisted: yes
KelboLive
left a comment
There was a problem hiding this comment.
Identical to #2920 (00a068106), which I reviewed — the guard shape is right (32/32 here, 4/4 on WARP, Arc 16..32 still runs), and merge-tree against current main is clean. No re-review needed; the two nits from there are non-blocking: two sites still skip silently (wave64_tests.rs:1358, :1954), and takes_waves_of drops the WaveOps check the old block had.
|
The wave-width guard admits the physical readbacks and skips the four-lane fixture. I tested
The observed source on this head also requires |
|
Thanks — the device matrix matches what the guard is for. On the two nits: I think they are from the earlier head. At AI-assisted. |
VERIFY-2964 — Linux, Fedora 45, Rust 1.98.1 (the pinned toolchain), no GPU device, no game filesVerdict: MIXED. The change is a clean, correct refactor that I reviewed statically and found sound — it removes a real panic path and unifies four inconsistent adapter guards behind one method. But every file it touches is Head
1. What it changesIt adds one method to the host D3D12 adapter and routes every 32-lane host test through it. In /// Whether this adapter runs programs of `lanes`-lane waves: it must do
/// wave operations at all. The software adapter runs 4, so a test that
/// assumes the card's 32 asks first.
pub(super) fn takes_waves_of(&self, lanes: u32) -> bool {
let mut waves = D3D12_FEATURE_DATA_D3D12_OPTIONS1::default();
let known = unsafe { self.device.CheckFeatureSupport(D3D12_FEATURE_D3D12_OPTIONS1, ...) }.is_ok();
known
&& waves.WaveOps.as_bool()
&& (waves.WaveLaneCountMin..=waves.WaveLaneCountMax).contains(&lanes)
}Before, the same idea was done four different ways inline in the tests, and not all of them were safe:
The pull request deletes both inline if let Some(lanes) = lanes && !host.takes_waves_of(lanes) {
eprintln!("{label}: the adapter does not run {lanes}-lane waves; skipped");
continue;
}
...
if ran == 0 {
if let Some(lanes) = lanes { eprintln!("no SM 6.6 device that runs {lanes}-lane waves; not run"); return; }
...
}
2. The new test checks the property that mattersThis is a test-only change plus one production helper; there is no new assertion that fails on 3. What the tests do here
Nothing failed on either side and no test moved red→green, because none of the four changed files is compiled on Linux: So the crate's Linux suite is byte-for-byte unaffected by this pull request, and the red/green tool has nothing to discriminate. That "252 on both" is a true statement about Linux, but it is not a verification of this PR — it is the absence of one. 4. Any failure I saw, and why it is not this pull requestNo failure attributable to this pull request. Two things I want to state plainly so they are not misread:
5. What I did not check
Net: on static review this meets the repository's bar — it fixes the root cause (one shared query instead of stacked inline guards), removes a panic, keeps the code simple and modular, and adds no workaround. I just could not run it here. |
Re-created from the original #2920.
aznohonza/mandy-contribwas made private at 21:41 UTC on 2026-12-01, which detached the fork and permanently closed its pull requests; GitHub refuses to reopen them (422 state cannot be changed). Same branch, same head00a0681069b64b150fb287f6c8e0ee696e27caea. The original review thread is at #2920.LEONIDA_WARP=1makesHost::new(false)return the software adapter, so tests that ask for "hardware only" still run on it. The software adapter takes 4-lane waves, while the translator lowers these programs for 32-lane host waves, so eight of theleonida-shadertests fail with that switch.Host::takes_waves_of(lanes)asks the adapter (D3D12_OPTIONS1) which program wave widths it accepts, and the tests that assume 32 skip a device that does not:valu_tests:run_cases_ontakes the required width (Nonekeeps the old behaviour). The quadmask and the two cross-wave LDS tests use a 32-lane path, and the whole-wave f64 test checks its own loop.pack_tests: the five host sites guard for 32 and printSKIP: the adapter does not run 32-lane waves.wave64_tests:host_32()is the hardware lookup plus the width check; all 14 sites use it, and the two manualD3D12_OPTIONS1queries now use the helper.Verification:
cargo xwin check --target x86_64-pc-windows-msvc --workspace --all-targets --lockedpasses, and-p leonida-shader --tests --features hostpasses too.Claimed in #2570 (RS-WARP-TEST-WAVES). AI-assisted.
The full
leonida-shadersuite on the software adapter still has four failures onbarycentric/rect; they are the DXIL validator refusing the shader (#2864), not wave width. With #2864's commit on this head the crate is 415 passed, 0 failed, 5 ignored on WARP.