nir: make fsat return 0.0 with NaN instead of passing it through
authorRhys Perry <pendingchaos02@gmail.com>
Mon, 3 Feb 2020 21:19:52 +0000 (21:19 +0000)
committerMarge Bot <eric+marge@anholt.net>
Thu, 7 May 2020 10:39:19 +0000 (10:39 +0000)
commitabc4a8285776dcded21d0b7f3035c9858d061611
tree9f2dabe31f5f5d237e8a46e5898bfc465e6e5621
parentd8a27c0bb3049963934c77d104db39ecf610e3b9
nir: make fsat return 0.0 with NaN instead of passing it through

This is how lower_fsat and ACO implements fsat and is a more useful
definition since it can be exactly created from fmin(fmax(a, 0.0), 1.0).

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3716>
src/compiler/nir/nir_opcodes.py
src/compiler/nir/nir_opt_algebraic.py