shader: lower gfx1013 v_cvt_off_f32_i4 in pixel_aot #350
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/356"
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 denn0x on 2026-11-21T23:11:12Z.
Change
Advances an independent problem: gfx1013 instruction coverage in
pixel_aot. It adds one lowering branch intools/pixel_aot.pyand a draw check intests/pixel_aot_check.py. No open PR claimsv_cvt_off_f32_i4, and no prerequisite PR is needed.v_cvt_off_f32_i4converts bits 3:0 of the source, as a signed nibble, to binary32 in units of 1/16. Per the RDNA 2 ISA table, 0x0 to 0x7 map to 0.0 to 0.4375 and 0x8 to 0xF map to -0.5 to -0.0625. The source is read as bits, and the lowering isfloat(asint(word << 28) >> 28) * 0.0625f, which is exact. Floatabs/negmodifiers do not apply to an integer source, so the translator does not accept them.Fixture
offset_nibbles(). Four forms in e32 and e64, and the last lane usesclamp.Draw check
check_offset_nibble_draws.check_binary.Negative control: reading the nibble as unsigned must produce
pixel_mismatchon negative nibbles.Verification
Windows 11 build 26200, MSVC 19.50.35720, Windows SDK 10.0.26100.0, DXC 1.8.2502.11, D3D12 debug layer enabled.
float(word & 0xf) * 0.0625fmakespixel_aot_warpfail withpixel_mismatch x=0 y=0in the new draw.ctest --preset dev --no-tests=errorgives 146 passed, 0 failed, with thebvh_wave64_warpandwave_shuffle_warpcapability skips.Not run locally:
tests/pixel_aot_check.py binary, because this machine has no LLVM with gfx1013. Ubuntu CI covers it.This is independent of #350 and #353. All three add a fixture next to the ceiling fixture, so later merges need a trivial rebase.
Checklist
AI-assisted (Claude Code).
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-22T02:44:48Z.
A three-way merge against main at
1606f7bconflicts in tests/pixel_aot_check.py. The lowering hunk merges cleanly. Please retain the main draw registrations and the offset_nibbles/check_offset_nibble_draws coverage, including the negative half of the signed nibble range. Run the binary fixture and pixel_aot_warp on the reconciled head.