Shaders: lower scalar quadmask instructions (port of VIctory#1443) #192
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Belobug--VIctory-Belobug-AMD!192
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-192"
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?
@lcg007xd-c on GitHub · 2026-11-25 20:25 UTC · original
lcg007xd-c:port/vic-1443→main· +74 −0 · 2 files · 2 commits · openPort of Marvisak/VIctory#1443 by Luiz Otavio Mello de Campos. It is cherry-picked with
-x, so the commit keeps its author and its upstream hash. This fork'smain(000ffdd) does not have it, and it is not in #142.What it fixes
s_quadmask_b32/s_quadmask_b64were refused (the fork's own opcode audit lists them). They now lower: bit i of the result is set when any bit of quad i of the source is.Tested (Linux, Rust 1.98.1)
opcode_audit::refused_opcodesreports both lowering with the port and refused without. Upstream's D3D12 test is included (Windows).opcode_refusals.txtwas not edited; its two quadmask lines are now stale, which the audit allows.cargo test -p victory-shader --libon this branch alone: no failures.mainwithout conflicts, and does not depend on the other open ports.Not run here: Windows/GPU tests, since I have no Windows machine.
🤖 Generated with Claude Code
@MamaLeVrai on GitHub · 2026-11-26 05:00 UTC · original
RDNA2 data point. This PR (
871ebc4) merged onmain4f62c2a,cargo test --release -p victory-shader --libon an RX 6950 XT (Windows 11 build 26300, Rust 1.98.1):main: 275 passed, 2 failed.The 2 failures are the same as on
main: the RDNA2 wave-size testsscalar_counted_in_a_divergent_loop_read_after_itandscalar_counted_in_nested_divergent_loops, fixed by #110 and #204. No regression here. Not run in the game.harness machine: rx6950xt-w11 | AMD Radeon RX 6950 XT (RDNA2), driver 32.0.21045.29003 | 32 GB RAM | Windows 11 build 26300
AI-assisted (Claude Code); no game data.
@adrianmjim on GitHub · 2026-11-26 19:45 UTC · original
Tested on Windows 11 with an RX 7900 XT (RDNA3, driver 32.0.32029.2010) and Rust 1.98.1. I merged
871ebc4onto current main4f62c2a. The merge is clean, because the two changed files are the same in000ffddand4f62c2a.Windows D3D12 test:
emit::valu_tests::scalar_quad_masks_pack_nibbles_and_set_sccpasses on both the hardware adapter and WARP.4f62c2a, it fails withemit: Unsupported { offset: 48, what: "s_quadmask_b32" }.cargo test -p victory-shader --lib -- --test-threads=1: 278 passed, 0 failed, 6 ignored. On4f62c2aalone it is 277/0/6. The only difference is the new test.Game shaders (whole
shaders.rpf,translate --validate --host-lanes 32-64):s_quadmask_b32ors_quadmask_b64instructions.4f62c2a: 26084/26084 programs translated, the same 40,601,701 IR instructions, and all 25,623 emitted DXIL programs are byte-identical.So the new lowering gives the expected values in the D3D12 test. It does not change any of this title's shaders.
Not tested: wave64 (the test program is wave32), other host-lane configs, and an in-game run.
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.