Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tests done on several devices of all 3 vendors and of different generations showed that there are several ways of handling infs and NaN for d3d9. Tests showed Intel on windows does always clamp RCP, RSQ and LOG (thus preventing inf/nan generation), for all shader versions (some vendor behaviours vary with shader versions). Doing this in nine avoids 0*inf issues for drivers that can't generate 0*inf=0 (which is controled by TGSI's MUL_ZERO_WINS). For now clamp for all drivers. An ulterior optimization would be to avoid clamping for drivers with MUL_ZERO_WINS for the specific shader versions where NV or AMD don't clamp. LOG and RSQ being already clamped, this patch only clamps RCP. Fixes: iXit/Mesa-3D#316 Signed-off-by: Axel Davy <davyaxel0@gmail.com> CC: <mesa-stable@lists.freedesktop.org> (cherry picked from commit 7ee5e5e)
- Loading branch information