shader: lower gfx1013 v_rcp_iflag_f32 in pixel_aot #345
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/350"
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:03:02Z.
Change
Advances an independent problem: gfx1013 instruction coverage in
pixel_aot. It touches theALUtable and the unary/binary regex intools/pixel_aot.py, plus a new draw check intests/pixel_aot_check.py. No open PR claimsv_rcp_iflag_f32, and no prerequisite PR is needed.v_rcp_iflag_f32computes the same reciprocal asv_rcp_f32and additionally raises the integer-divide flag. Compilers emit it in integer-division sequences. The flag has no desktop equivalent and nothing in the fixture reads it, so the lowering is1.0f / x, likev_rcp_f32.Fixture
reciprocal_iflag(). Four forms run through the sharedwith_constantsprogram:-|s|;|s|;|s|andclamp.Draw check
check_reciprocal_iflag_draws. Three constant sets run on the selected backend:clampturning +inf into 1.Each set is compared bit for bit over the 64×64 target. The fixture is also added to
check_binaryfor the LLVM assemble/disassemble round trip.Negative control: replacing the reciprocal with
v_sqrt_f32must producepixel_mismatch.Verification
Head
4427510onmainbc24dfd. Windows 11 build 26200, MSVC 19.50.35720, Windows SDK 10.0.26100.0, DXC 1.8.2502.11, D3D12 debug layer enabled on both backends.max_absolute_error=0anddebug_errors=0 debug_warnings=0.-1.0f / xmakespixel_aot_warpfail withpixel_mismatch x=0 y=0in the new draw.v_rcp_iflag_f32_e32and_e64now appear in theFORM_COVERAGE_RECORDfile of both pixel tests.ctest --preset dev --no-tests=errorgives 146 passed, 0 failed, on the pre-rebase baseb860dd5.bvh_wave64_warpandwave_shuffle_warpreported capability skips. After the rebase ontobc24dfd, the two pixel tests above were rerun.Not run locally:
tests/pixel_aot_check.py binary, because this machine has no LLVM with gfx1013. The new fixture is incheck_binary, so the Ubuntu CI job covers the round trip.Checklist
AI-assisted (Claude Code).
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-22T02:44:42Z.
The three-way merge against main at
1606f7bconflicts in both tools/pixel_aot.py and tests/pixel_aot_check.py. Please reconcile the shared ALU matcher against current main so the other accepted operations retain their dispatch, and keep check_reciprocal_iflag_draws registered alongside the existing draws, after the adapter availability check. Please rerun the binary fixture and pixel_aot_warp on the reconciled head.Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-22T03:07:55Z.
Let’s take your overlapping pixel changes one at a time, starting with #350. Please refresh this branch first and hold #353, #356, #357 and #358 until it lands. We’ll check the next branch against the resulting translator and draw tests.