diff options
author | Matt Turner <[email protected]> | 2015-05-05 20:20:30 -0700 |
---|---|---|
committer | Matt Turner <[email protected]> | 2015-05-07 10:51:05 -0700 |
commit | ceb8b739ce37ee041b903643656d9d16c371ff95 (patch) | |
tree | 113827b648be84d8660f58c564ff30a1773b869c /src/glsl/nir | |
parent | 8ae559971a692b417acb9fec04386e1e95c619ec (diff) |
nir: Recognize trivial min/max.
No changes, but does prevent some regressions in the next commit.
Reviewed-by: Jordan Justen <[email protected]>
Reviewed-by: Glenn Kennard <[email protected]>
Diffstat (limited to 'src/glsl/nir')
-rw-r--r-- | src/glsl/nir/nir_opt_algebraic.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/glsl/nir/nir_opt_algebraic.py b/src/glsl/nir/nir_opt_algebraic.py index fda4bd5b6ff..42f4f479412 100644 --- a/src/glsl/nir/nir_opt_algebraic.py +++ b/src/glsl/nir/nir_opt_algebraic.py @@ -90,6 +90,12 @@ optimizations = [ (('bcsel', ('flt', a, b), b, a), ('fmax', a, b)), (('bcsel', ('inot', 'a@bool'), b, c), ('bcsel', a, c, b)), (('bcsel', a, ('bcsel', a, b, c), d), ('bcsel', a, b, d)), + (('fmin', a, a), a), + (('fmax', a, a), a), + (('imin', a, a), a), + (('imax', a, a), a), + (('umin', a, a), a), + (('umax', a, a), a), (('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)), |