mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-18 23:07:07 -05:00
The f16 forms of v_fma_mix threw for any FLOAT_MODE with an f16 rounding other than to nearest even. ps5-opengl's shaders run with FLOAT_MODE 0xcc, f16 rounding toward zero with f16 denormals kept, so PPSA99005 stopped at its first draw (#2631). The exact product-sum, already computed in f64 with round to odd, is now rounded once in the mode's direction: scaled by the f16 step at its exponent, truncated, floored or ceiled, and scaled back. A result beyond 65504 becomes infinity or 65504 as IEEE 754 gives for the direction. On RDNA2 (gfx1036) -1.5 * 2^-24 + 2^-126 gives 0x8002 with round toward -infinity, and this gives the same. Flushed f16 denormals still throw. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>