diff options
author | Eric Anholt <[email protected]> | 2015-01-30 14:10:58 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2015-02-18 14:47:51 -0800 |
commit | 6eadde51bba26bc57da7b26cbb40d783259d4a5f (patch) | |
tree | b2014052281ca628464e60edb2ac54c54c373919 /src/glsl/nir | |
parent | 1907a3a7ee4d756b12b6fef32a6e5ea7656436d1 (diff) |
nir: Recognize and reduce duplicated fsats.
No effect on vc4 shader-db.
v2: Rebase to master (no TGSI->NIR present)
Reviewed-by: Kenneth Graunke <[email protected]> (v1)
Diffstat (limited to 'src/glsl/nir')
-rw-r--r-- | src/glsl/nir/nir_opt_algebraic.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/glsl/nir/nir_opt_algebraic.py b/src/glsl/nir/nir_opt_algebraic.py index c7cb651fbb4..504c9f69054 100644 --- a/src/glsl/nir/nir_opt_algebraic.py +++ b/src/glsl/nir/nir_opt_algebraic.py @@ -87,6 +87,8 @@ optimizations = [ (('bcsel', ('flt', a, b), b, a), ('fmax', a, b)), (('fmin', ('fmax', a, 0.0), 1.0), ('fsat', a), '!options->lower_fsat'), (('fsat', a), ('fmin', ('fmax', a, 0.0), 1.0), 'options->lower_fsat'), + (('fsat', ('fsat', a)), ('fsat', a)), + (('fmin', ('fmax', ('fmin', ('fmax', a, 0.0), 1.0), 0.0), 1.0), ('fmin', ('fmax', a, 0.0), 1.0)), # Comparison with the same args. Note that these are not done for # the float versions because NaN always returns false on float # inequalities. |