shader: cover five integer and float conversion paths that no draw observed #579
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/585"
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-22T14:18:23Z.
Change
This closes five coverage gaps in the integer and float conversions 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.The conversion draws gain inputs from classes they never used. Each new case has a draw with independently computed expected values and a must-mismatch control:
check_cvt_float_int_draw: hex binary32 literals as the source ofv_cvt_u32_f32_e32andv_cvt_i32_f32_e32(3.5, -2.75,0x4f7fffff, -3.25);check_cvt_int_f32_e64_draw: SGPR words with the sign bit set (0xC0000000,0xBF800000) for unclampedv_cvt_f32_u32_e64, and clampedv_cvt_f32_i32_e64words whose low half is zero (0x00010000,0x7FFF0000);CVT_INT_WORDS: the round-up ties2**24+3and2**25-1of[2**24, 2**25), plus a control that rejects their low-bit-cleared neighbours.Verification
On
8950851(branch on1a4c728), 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 (275 of 275).
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 replacedQuadReadAcrossXwithQuadReadAcrossYwas caught, so the run does detect a broken translator. On this branch, each mutation failspixel_aot_e64_warp:v_cvt_u32_f32clamps a hex literal source to [0, 1]v_cvt_i32_f32takes the magnitude of a hex literal sourcev_cvt_f32_u32_e64reads an SGPR word as signedv_cvt_f32_i32_e64drops bits 16 to 30 of a VGPR wordv_cvt_f32_u32_e32clears the low bit of a word in[2**24, 2**25)The new programs are drawn on WARP and hardware. They are not part of the
binaryLLVM fixture list.Checklist
AI-assisted.