I noticed this pattern in glmark's jellyfish scene. v2: Add inexact qualifier to avoid changing NaN behaviour
I would appreciate if someone did a shader-db run. Signed-off-by: Alyssa Rosenzweig <[email protected]> Cc: Ilia Mirkin <[email protected]> Cc: Ian Romanick <[email protected]> Cc: Elie Tournier <[email protected]> --- src/compiler/nir/nir_opt_algebraic.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compiler/nir/nir_opt_algebraic.py b/src/compiler/nir/nir_opt_algebraic.py index 89d07aa1261..e607e5b6fe2 100644 --- a/src/compiler/nir/nir_opt_algebraic.py +++ b/src/compiler/nir/nir_opt_algebraic.py @@ -397,6 +397,7 @@ optimizations = [ (('imax', a, ('iabs', a)), ('iabs', a)), (('fmax', a, ('fneg', a)), ('fabs', a)), (('imax', a, ('ineg', a)), ('iabs', a)), + (('~fmax', ('fabs', a), 0.0), ('fabs', a)), (('~fmin', ('fmax', a, 0.0), 1.0), ('fsat', a), '!options->lower_fsat'), (('~fmax', ('fmin', a, 1.0), 0.0), ('fsat', a), '!options->lower_fsat'), (('~fmin', ('fmax', a, -1.0), 0.0), ('fneg', ('fsat', ('fneg', a))), '!options->lower_negate && !options->lower_fsat'), -- 2.20.1 _______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
