shader: lower the binary64 rounding and fraction forms #3865
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!3865
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/3863/head"
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-12-02 15:03 UTC · original
lambirou:shader/f64-rounding→main· +767 −5 · 7 files · 1 commits · closed without mergingPart of the f64 slice (P5).
This adds the ten binary64 rounding/fraction forms:
v_ceil_f64,v_floor_f64,v_trunc_f64,v_rndne_f64andv_fract_f64in both the VOP1_e32and VOP3_e64spellings. The lowering works only on the two 32-bit words, with no HLSL double:r64_roundcovers trunc/floor/ceil/rndne (ties to even), andr64_fractcomputes x - floor(x) from the significand, with the below-one ceiling for tiny negative fractions. NaN inputs are quieted and infinities become the canonical qNaN, following the existing binary16/binary32 helpers.Guards: entry EXEC, destination pair
v[d:d+1]withd <= 254, no outstanding sample, preserved entry denormal profile; modifiers, clamp/omod,op_sel, DPP, SDWA, inline constants, literals and unproven pairs are refused.Tests
pixel_aot_f64_round_warpand_hardwarepass on WARP and the AMD Radeon RX 9060 XT (driver 32.0.32029.2010).pixel_mismatch.form_coverage_check.pypins exactly the ten forms;rdna2_tools_check.pypasses 162 tests (19 LLVM-dependent skips); the neighbouringdraw-cmp-f64,draw-cvt-f64-*anddraw-cvt-*-f64tests still pass on both adapters.Limits
The draws prove the translated shader on desktop adapters, not gfx1013 or the console. NaN quieting and the fract below-one ceiling are chosen from the existing helpers without a console measurement. No LLVM 15 round-trip of the ten forms was run; the spellings are covered by the controls and draws.
AI-assisted.
Merge with origin/main (2026-12-01)
Merged
origin/mainata3bfd019into this branch; head is9601449e. The shared CMake, docs and test files keep both the #3609/#3623 additions and the PR additions. Local post-merge:pixel_aot_check.py,form_coverage_check.pyandrdna2_tools_check.pypass (163 tests, 19 skips); CTestpixel_aot_f64_round_warpandpixel_aot_f64_minmax_ldexp_warppass.Replacement for #3645 after an accidental empty-branch push during a rebase; the original branch is restored and the code is unchanged.
Pull request closed