mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-29 12:15:39 +00:00
v_rcp_f32 and v_rcp_iflag_f32 lower to the driver's 1/x, whose low bits differ from the console's on NVIDIA and Intel. With APS5_EXACT_RCP set, normal inputs with normal results take the RDNA reciprocal datapath instead: a cubic over 32 segments of the mantissa in 32-bit integer arithmetic, the linear term rounded to nearest even, and a 2,761-entry table of one-ULP corrections, looked up only when the dropped bits fall next to the rounding cut (6.25 % of inputs). This reproduces all 2^23 mantissas of an RDNA2 (gfx1031) sweep. Other inputs keep 1/x. It is off by default: the tables add about 13k SPIR-V words to each shader that uses it. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017EjjFU1FjMR11oWDYs8UMo