Repository navigation
fix(shader): allow untracked scalar lane masks in v_cndmask_b32 - #2792
legayclightning22 wants to merge 1 commit into
Conversation
|
Chaining x.st.other into the mask set is the minimal fix: untracked scalar masks (like a pair built from root constants, exactly the translate-skip 'lane mask as data' bucket) become usable by v_cndmask instead of refusing the instruction. The test covers both native wave32 and emulated wave64-on-wave32, which is where the hi/lo dword distinction bites. |
|
Reviewed and tested 1. WARP test regression reproducedRunning
2. Wave64 split-dword test silently skipped & depends on
|
|
Automated triage for the maintainers. Verdict: merge candidate. The rebased head now merges cleanly. Two small points:
#439 also takes "selects on masks held as numbers"; this is the smaller, separate form. CI: passing ( Generated by Claude Code |
4d84cad to
90339e5
Compare
|
Thank you both for the thorough review and testing! Updated and force-pushed (
|
Dukestar69
left a comment
There was a problem hiding this comment.
Tested merged onto origin/main (63bcca4) on Windows 11 x64 (NVIDIA GeForce RTX 5090 + WARP, dxil.dll validator active):
cargo test -p victory-shader --lib emit::valu_tests::v_cndmask_b32_with_untracked_mask_selects_per_lane: 1 passed, 0 failed (RTX 5090 hardware + WARP).cargo clippy -p victory-shader --all-targets -- -D warnings: clean.cargo xtask policy: 191 files ok.
Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
Summary
Fixes the WARP wave-size regression where unrelated
st.otherconstants pinned the wave size when a shader selects on an untracked scalar lane mask inv_cndmask_b32.Instead of chaining in all of
st.other,Lower::new(crates/victory-shader/src/emit/lower.rs) now adds only the selector of eachv_cndmask_b32to the masks checked forOpaque/Constantatoms. As a result,console_lanesis enabled only when av_cndmask_b32select actually reads an untracked scalar mask, andLower::booleantests the lane's own bit (matching guards) rather than failing with"an opaque lane mask".Test Plan
emit::valu_tests::v_cndmask_b32_with_untracked_mask_selects_per_lane, which fails at lowering onmainand verifies per-lane mask selection against each lane's mask bit (with expliciteprintln!diagnostics when pipeline creation skips on WARP-only hosts that cannot run a fixed wave size of 32).cargo test -p victory-shader --libcargo clippy --locked -p victory-shader --all-targets -- -D warningscargo xtask policy