shader: lower binary16 DPP reciprocal and square root #3580
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!3580
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3578"
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 10:06 UTC · original
lambirou:shader/f16-dpp-unary→main· +423 −9 · 7 files · 1 commits · merged 2026-11-30 10:12 UTCPart of the f16 VOP1 slice (Refs #839).
This adds quad-local
v_rcp_f16_dppandv_sqrt_f16_dppin both the DPP16 (quad_permwithrow_mask:0xf bank_mask:0xf) and DPP8 (the same 2x2 selection repeated in lanes 4-7) encodings. The source is read through the existing DPP helpers, widened exactly, evaluated as one binary32 division orsqrt, and narrowed to nearest even.f16_rcp_sqrt_resultsupplies the signed infinity of a zero reciprocal, keepssqrt(-0), and leaves the negative-root NaN payload unmodelled (the result gains no finite proof). DPP16 accepts bit-15abs/neg; DPP8, partial masks,bound_ctrl,fi, cross-quad or non-repeated DPP8, clamp, omod, a non-VGPR source, a non-entry EXEC mask and a non-preserved denormal profile stay refused. The other unary DPP opcodes (v_rsq_f16_dpp,v_exp_f16_dpp,v_log_f16_dpp,v_sin_f16_dpp,v_cos_f16_dpp) and the SDWA spellings stay refused.Tests
pixel_aot_f16_dpp_unary_hardwareandpixel_aot_f16_dpp_unary_warppass on the AMD Radeon RX 9060 XT (driver 32.0.32029.2010) and WARP, Windows 11 build 10.0.26300.10075.-denorm ftzbuild.rcp/sqrtswapped, source read from bits 31:16) reportpixel_mismatch; mixing DPP8 and DPP16 controls is refused at translation.check_f16_dpp_unary_controlspins the reference rows and every spelling, proof, control, modifier, mode, scheduling and reader refusal.form_coverage_check.pypasses and pins exactly the four new forms (rcp/sqrt times DPP16/DPP8); expected full table: 1,563/1,968 gfx1013 and 1,554/1,863 gfx1030.tests/rdna2_tools_check.py test_binary16_dpp_unary_scanner_translator_agreementpasses; the scanner and translator agree on the accepted and refused shapes.Limits
The high half of the destination is not observed; the console's denormal and rounding state beyond the declared nearest-even entry profile is not measured; NaN payloads and special-function results beyond the modelled infinities are not covered; runtime sources are out of scope; lane routing cannot be exercised because every lane of a statically proven source holds the same word. No title is known to execute these paths.
AI-assisted.
@lambirou on GitHub · 2026-11-30 10:16 UTC · original
Local verification on the rebased head
16b69154: the 194-test WARP pixel/compute suite passes (194 pass, 0 fail, 0 skip), andform_coverage.pyon those records reports 1,563/1,968 gfx1013 and 1,554/1,863 gfx1030.pixel_aot_f16_dpp_unary_hardwareand_warpboth pass (RX 9060 XT driver 32.0.32029.2010 / WARP), as doform_coverage_check.pyand the scanner/translator agreement test.