shader: lower RDNA2 integer VOP2 operations #495
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!495
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/495/head"
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?
@agilesh08 on GitHub · 2026-11-22 07:40 UTC · original
agilesh08:feat/shader-vop2-integer→main· +77 −0 · 5 files · 2 commits · merged 2026-11-22 08:18 UTC## Change
Lowers 8 uncovered RDNA2 integer VOP2 e32 instructions in
tools/pixel_aot.pyacrossgfx1013andgfx1030:v_lshrrev_b32,v_ashrrev_i32,v_lshlrev_b32(preserving reverse operand orderingsrc1 >> (src0 & 31u)and signed arithmetic right shift withasintonv_ashrrev_i32).v_and_b32,v_or_b32,v_xor_b32.v_add_nc_u32,v_sub_nc_u32(wrapping modulo 32 bits without carry output).Preserves 32-bit bit patterns in destination vector registers via
asfloat(...), enforcesmask == "entry", prevents writes to pending sample destinations, and rejects float modifiers (-,abs) and uninitialized VGPRs.Verification
python -B tests/rdna2_tools_check.py: 28 passed on Windows (includingtest_vop2_integer_opcode_table_synthetic_formsacross opcodes0x16,0x18,0x1a,0x1b,0x1c,0x1d,0x25,0x26and truncated data handling).python -B tests/pixel_aot_check.py: passed on Windows (asserts all 8 forms inACCEPTED, verifies reverse-shift direction andasint, rejects float modifiers andv106).python -B tests/form_coverage_check.py: passed on Windows (asserts all 8 VOP2 forms map into bothdocs/coverage/gfx1013.tsvanddocs/coverage/rdna2.tsv).git -c core.whitespace=cr-at-eol diff --check: 0 errors.dxc.exe; DXBC compilation and D3D12/WARP offscreen readback run in GitHub Actions CI (windows.yml).Evidence and follow-up
Adds unit test
vop2_integer_group()intests/pixel_aot_check.pyandtest_vop2_integer_opcode_table_synthetic_formsintests/rdna2_tools_check.py. No copyrighted assets or external shader binaries are included.Assisted by AI.
Checklist
@R0Y00 on GitHub · 2026-11-22 08:13 UTC · original · approved these changes
Integrated main at
e020691. The shared integer handler already implements six of the eight operations, so the new lowering only adds e32 add/sub without carry. Both coverage sets, malformed-input controls and decoder tests are retained. On Windows I tested the merged translator using DXC and D3D12 WARP: four draws for each of the eight VOP2 operations checked the 32-bit result against a CPU reference and its one-bit mutation, and all 72 separate SCC comparison draws from #494 still matched. The local pixel controls and form coverage passed. The disassembler suite ran 31 tests with one skip.