fix(main): round 8_24_UNORM depth repack once without fma #16807
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/16807"
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 boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-11-07T16:56:24Z.
What
Fixes main's
linux:agc_driver_image_depth24(run 42379298429), broken by #16294. On lavapipe (no sampled D24S8) the 8_24_UNORM texture is repacked to R32_SFLOAT;fma(scaled, 2^-24, scaled)came out one ulp high there (0x3effe004 instead of 0x3effe003 for texel 0x007ff001), so the test read depth+1. The scale and the excess are nowpreciseseparate steps: the scale is exact and the add is the only rounding. #16294's feature is kept.Tested
Not reproduced locally (build tree unavailable here); main's push build is the proof. Expected value checked by hand: float(d/(2^24-1)) for d=0x7ff001 is 0x3effe003, which the test maps back to d.
Checklist
main; no other open PR implements the same functions.mdfiles or images added to the repository