shader: lower gfx1013 v_cvt_f32_ubyte0-3 in pixel_aot #348
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/353"
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:07:21Z.
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_f32_ubyte*, and no prerequisite PR is needed.v_cvt_f32_ubyte0tov_cvt_f32_ubyte3convert byte N of a 32-bit source to binary32 as an unsigned integer, which is a common step when unpacking byte-packed data. The source is read as bits (asuint, or the literal word), givingfloat((word >> 8N) & 0xff). Floatabs/negmodifiers do not apply to an integer source, so the translator does not accept them, and the existing sample-overlap and entry-mask guards apply.Fixture
unpack_bytes(). Each of the four outputs reads a different byte, in e32 and e64 forms, and the last usesclamp.Draw check
check_unpack_byte_draws.check_binaryfor the LLVM assemble/disassemble round trip.Negative control: replacing
ubyte1withubyte0must producepixel_mismatch.Verification
Windows 11 build 26200, MSVC 19.50.35720, Windows SDK 10.0.26100.0, DXC 1.8.2502.11, D3D12 debug layer enabled.
N ^ 1in the lowering makespixel_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 (
v_rcp_iflag_f32). Both add a fixture next to the ceiling fixture, so whichever merges second needs a trivial rebase.Checklist
AI-assisted (Claude Code).
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-22T02:44:45Z.
A three-way merge against main at
1606f7bconflicts in tests/pixel_aot_check.py. The translator hunk merges cleanly. Please preserve the main draw registrations and register check_unpack_byte_draws after the initial adapter availability check. Please rerun the binary fixture and pixel_aot_warp at the new head.