diff options
author | Eric Anholt <[email protected]> | 2015-02-20 01:20:34 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2015-02-21 14:57:14 -0800 |
commit | 345c2b288a5f49b82d505eb098847b8e53dde91f (patch) | |
tree | 2e7f6be7cafedb130dcbffe003cfdb6cac7d471b | |
parent | a38038ca5e329c074f67399a993a653c8e439cae (diff) |
nir: Collapse repeated bcsels on the same argument.
vc4 results:
total instructions in shared programs: 39881 -> 39794 (-0.22%)
instructions in affected programs: 6302 -> 6215 (-1.38%)
Reviewed-by: Matt Turner <[email protected]>
Reviewed-by: Connor Abbott <[email protected]>
-rw-r--r-- | src/glsl/nir/nir_opt_algebraic.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/glsl/nir/nir_opt_algebraic.py b/src/glsl/nir/nir_opt_algebraic.py index c3a884bb1e6..3ea6320d36c 100644 --- a/src/glsl/nir/nir_opt_algebraic.py +++ b/src/glsl/nir/nir_opt_algebraic.py @@ -86,6 +86,7 @@ optimizations = [ (('bcsel', ('flt', a, b), a, b), ('fmin', a, b)), (('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', ('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)), |