shader: cover eight SOPK, SOP1 and no-carry lowerings that no draw observed #614
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/620"
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 Leyukaka on 2026-11-22T16:11:41Z.
Change
This closes eight coverage gaps in the SOPK, SOP1 and no-carry lowerings of
tools/pixel_aot.py. Each was a mutation of the translator that passed every WARP test onmain. Onlytests/pixel_aot_check.pychanges; the translator does not.s_cmpk_eq_u32against0x8001, ans_cmovk_i32of0x8000(the lowest signed immediate), and rows wheres_cmovk_i32leaves its destination unchanged.s_bitset1_b32targets bit 4.v_subrev_nc_u32with two VGPR operands.The references extend the existing Python models; they do not call the translator.
Verification
On
9fac366(branch one7e9133), Windows 11 build 26300.9974, MSVC 14.44.35207, Python 3.14, WARP and NVIDIA GeForce RTX 5080:All WARP tests pass, and so does the full suite (281 of 281).
Each mutation was applied to
tools/pixel_aot.pyone at a time, and all WARP tests were run. Onmain, all of them passed for each mutation. A control that turnedv_subrev_nc_u32into a forward subtraction was caught by five WARP tests, so the run does detect a broken translator. On this branch:s_cmpk_*_u32clears immediate bit 0pixel_aot_predicate_rounding_warps_cmovk_i32zero-extends0x8000pixel_aot_predicate_rounding_warps_cmovk_i32sets SCC from whether the value changedpixel_aot_predicate_rounding_warps_cmov_b32sets SCC from whether the value changedpixel_aot_blend_scalar_warps_abs_i32SCC looks only at bits 31 and 0pixel_aot_blend_scalar_warps_bitset0_b32with bit 31 clears bit 30pixel_aot_blend_scalar_warps_bitset1_b32always sets bit 31pixel_aot_blend_scalar_warpv_subrev_nc_u32with two VGPRs subtracts forwardpixel_aot_e64_warpChecklist
AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by JB2WIN on 2026-11-22T18:49:46Z.
Independent Windows run of this PR on physical hardware, since the evidence so far is WARP-only:
9fac366(PR head), built from sourcectest --preset dev --no-tests=error -R '^pixel_aot_' -V: 22/22 passed, 11 hardware + 11 WARP, no skips. The debug layer reporteddebug_errors=0on all 442 draws.pixel_aot_predicate_rounding_hardwaretook 33.2 s,pixel_aot_blend_scalar_hardware34.6 s andpixel_aot_integer_nc_hardware3.6 s.I only ran the unmutated PR. I did not re-run the eight mutations on the RTX 3080.
AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by JB2WIN on 2026-11-22T19:00:22Z.
Follow-up to my earlier run: I applied the eight mutations from the table to
tools/pixel_aot.pyon9fac366, one at a time, and ran only the hardware variant of the listed test on the RTX 3080 (driver 32.0.16.2124). The unmutated head passes these tests (22/22 in the run above).s_cmpk_*_u32clears immediate bit 0pixel_aot_predicate_rounding_hardwarepixel_mismatchs_cmovk_i32zero-extends0x8000pixel_aot_predicate_rounding_hardwarepixel_mismatchs_cmovk_i32SCC from "value changed"pixel_aot_predicate_rounding_hardwarepixel_mismatchs_cmov_b32SCC from "value changed"pixel_aot_blend_scalar_hardwarepixel_mismatchs_abs_i32SCC from bits 31 and 0 onlypixel_aot_blend_scalar_hardwarepixel_mismatchs_bitset0_b32bit 31 clears bit 30pixel_aot_blend_scalar_hardwarepixel_mismatchs_bitset1_b32always sets bit 31pixel_aot_blend_scalar_hardwarepixel_mismatchv_subrev_nc_u32two VGPRs subtracts forwardpixel_aot_e64_hardwarecase=0 status=mismatchexpectedSo on hardware too, every mutation is caught by the test the table names. For mutations 2 and 7 I used the most literal reading: only
0x8000is zero-extended, and bit 31 is set regardless of the operand.AI-assisted.