shader: lower binary16 VOP1 reciprocal square root and exponent #3559
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!3559
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3557"
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?
@lambirou on GitHub · 2026-11-30 05:59 UTC · original
lambirou:shader/f16-rsq-exp→main· +653 −26 · 7 files · 1 commits · closed without mergingPart of the VOP1 f16 slice. Stacked on #3558; rebase after it lands.
This adds the plain binary16 VOP1 forms of
v_rsq_f16andv_exp_f16, e32 and e64 (four reference rows):rsqrtorexp2in binary32, then narrow with the existing integer nearest-even conversion.rsqmaps zero tosource | 0x7c00,0x7c00to 0 and anything above0x7c00to0x7e00;expapplies the 70 midpoint corrections,0xce40to 0 and magnitudes above0x7c00to0x7e00.f16_rsq_exp_resultfollows the P4a contract, and a Python midpoint table is checked against the C++ table in the direct compute lowering.Tests
pixel_aot_f16_rsq_exp_hardwarepassed on the AMD RX 9060 XT, andpixel_aot_f16_rsq_exp_warppassed on WARP.pixel_aot_|compute_store_aot_entries passes 195/195, 0 fail, 0 skip.form_coverage_check.pypasses;rdna2_tools_check.pyreports 159 tests and 19LLVM_LIBskips.Limits
The high half of the destination is not observed. The
rsqrt/exp2error window is not reproduced bit for bit;expmidpoints are corrected and the fixture avoids ambiguousrsqsources. NaN/infinity constants, runtime sources, DPP/SDWA and the remaininglog/sin/cosforms are out of scope.The branch includes the commits of #3544 (and #3551/#3556 below it); they drop out of the diff once those land.
AI-assisted.
4815a98c6bto933b8e6926@lambirou on GitHub · 2026-11-30 10:06 UTC · original
Merged as part of #3566: that PR was squashed onto
mainatf0a10b12, and the reciprocal-square-root/exponent lowerings are inmain(the squash body lists this commit). Closing this now-redundant PR. The next DPP slice is #3580.Pull request closed