shader: lower RDNA2 32-bit scalar complement logic in pixel_aot #555
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/561"
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?
Imported from R0Y00/Xbox2Windows. Originally posted by stan495 on 2026-11-22T12:20:25Z.
Change
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.