shader: lower RDNA2 32-bit scalar complement logic in pixel_aot #561
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!561
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/561/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?
@stan495 on GitHub · 2026-11-22 12:20 UTC · original
stan495:shader/lower-s-nand-nor-xnor-b32→main· +23 −5 · 4 files · 1 commits · merged 2026-11-22 12:58 UTCChange
Translate RDNA2 32-bit scalar complement logic instructions
s_nand_b32,s_nor_b32, ands_xnor_b32intools/pixel_aot.py. Each operation inverts the 32-bit bitwise AND, OR, or XOR of its scalar operands and updates SCC when the result is nonzero, matching the existingSCALARtable definitions and mirroring the 64-bit complement forms in #400.Add scanner recognition in
tools/scan_unsupported_shaders.pyandtests/rdna2_tools_check.py. Add draw fixture steps, mutation checks, and negative controls intests/pixel_aot_check.pyverifying that mutatings_nand_b32,s_nor_b32, ors_xnor_b32to uncomplemented forms produces a pixel mismatch.Verification
Tested commit
a1b0312on Windows 11 Build 26100, AMD Ryzen 7 7800X3D + AMD Radeon RX 7900 XTX (driver 32.0.32029.2010), debug layer enabled, and Microsoft Basic Render Driver (WARP, driver 10.0.26100.9711).Commands:
Results:
pixel_aot_hardwareandpixel_aot_warp: 18/18 tests passed (100%), 0 errors, 0 warnings.max_absolute_error=0.s_nand_b32 -> s_and_b32,s_nor_b32 -> s_or_b32, ands_xnor_b32 -> s_xor_b32each triggered a verifiedpixel_mismatch.Evidence and follow-up
The draw fixture extends
SCALAR_VALUESintests/pixel_aot_check.pyusing synthetic constants, checking both output values and SCC updates across constant sets, and verifying negative controls under mutations to uncomplemented forms. The public reproduction command is unchanged:ctest --preset dev --no-tests=error -R '^pixel_aot_'.Checklist
AI-assisted.