Recompiler: implement S_QUADMASK_B32 and S_QUADMASK_B64 #1473
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!1473
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1473"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@hajduzsolt on GitHub · 2026-11-24 16:38 UTC · original
hajduzsolt:fix/recomp-quadmask→main· +59 −0 · 2 files · 1 commits · openWhat is in it
crates/xcl/src/gpu/recomp/emit.rs:s_quadmask_b32insalu, computing an 8-bit quad mask from SSRC0 into SDST and setting SCC if non-zero.s_quadmask_b64insalu64, packing low and high 8-bit quad masks into the low dword of the 64-bit SDST with the high dword cleared to 0 and SCC set if non-zero.quadmaskbranchless bit-compression helper in the HLSL preamble.crates/xcl/src/gpu/recomp/tests.rs:scalar_quadmask_b32_and_b64unit test verifying generated HLSL translation and DXC compilation.gpu_scalar_quadmaskhardware execution test on AMD Radeon RX 9070 XT verifying zero masks, multi-quad bit patterns, full masks, 64-bit pair packing, and SCC flags.Tested
cargo test --workspace -- --test-threads=2: passedcargo test -p xcl --lib quadmask: 2 passed, 0 failedRegression run
main:
PR:
Not tested
AI use
@nnonno91 on GitHub · 2026-11-24 16:43 UTC · original
Quad-mask results on native and split waves at
be1fa02Both new quad-mask tests passed on integrated AMD Radeon graphics and the RTX 5090. I also ran a temporary probe that compared both opcodes with a CPU implementation of AMD’s quad-mask rule. It checked each of the 64 single-bit positions plus six other masks, including zero, all ones, and a high-word-only pattern. The probe checked result bits, SCC, and clearing the upper destination dword for
S_QUADMASK_B64.Tested
be1fa02b4d90d43cdcd9ad5dfb3d32e2c5e9973e, Windows 11 25H2 (26200.9974), Ryzen 7 9800X3D, Radeon(TM) Graphics (32.0.21042.62), RTX 5090 (617.42), Rust 1.100.0 MSVC, DXC 1.8.2502.11, debug/test profiles.cargo test --locked -p xcl --lib quadmask -- --nocapture --test-threads=1reported 2 passed, 0 failed on each adapter, with no skips.probe_quadmask_all_input_bit_positionsusing the same Cargo test invocation passed 70 input patterns per mode. AMD ran wave32 and native wave64. NVIDIA ran wave32 and split wave64. All results matched the CPU reference.cargo build --workspace --lockedandcargo test --workspace --locked --no-fail-fast -- --test-threads=4 --show-outputpassed on the RTX 5090. Total 772 passed, 0 failed, 41 ignored. The count includes twono wave64skips:gpu_geometry_wave32_prefix_count_over_a_maskandgpu_wave32_program_in_wave64_hardware.Not tested
AI use
@DavidM1911 on GitHub · 2026-11-24 18:53 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~21 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodifiedmain.)Thanks!
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.