Mesa (master): nir: Fix broken fsat recognizer.

Eric Anholt anholt at kemper.freedesktop.org
Fri Feb 6 23:59:45 UTC 2015


Module: Mesa
Branch: master
Commit: bff4cbdafaca5825f8985c93c3c0646f9c4b7649
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=bff4cbdafaca5825f8985c93c3c0646f9c4b7649

Author: Eric Anholt <eric at anholt.net>
Date:   Fri Jan 30 14:03:14 2015 -0800

nir: Fix broken fsat recognizer.

We've probably never seen this ridiculous pattern in the wild, so it
didn't matter.

Reviewed-by: Connor Abbott <cwabbott0 at gmail.com>
Reviewed-by: Jason Ekstrand <jason.ekstrand at intel.com>

---

 src/glsl/nir/nir_opt_algebraic.py |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/glsl/nir/nir_opt_algebraic.py b/src/glsl/nir/nir_opt_algebraic.py
index 9b40d48..a5fe19a 100644
--- a/src/glsl/nir/nir_opt_algebraic.py
+++ b/src/glsl/nir/nir_opt_algebraic.py
@@ -82,7 +82,7 @@ optimizations = [
    (('feq', ('fadd', a, b), 0.0), ('feq', a, ('fneg', b))),
    (('fne', ('fadd', a, b), 0.0), ('fne', a, ('fneg', b))),
    (('fge', ('fneg', ('fabs', a)), 0.0), ('feq', a, 0.0)),
-   (('fmin', ('fmax', a, 1.0), 0.0), ('fsat', a)),
+   (('fmin', ('fmax', a, 0.0), 1.0), ('fsat', a)),
    # Logical and bit operations
    (('fand', a, 0.0), 0.0),
    (('iand', a, a), a),




More information about the mesa-commit mailing list