projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a38038c
)
nir: Collapse repeated bcsels on the same argument.
author
Eric Anholt
<eric@anholt.net>
Fri, 20 Feb 2015 09:20:34 +0000
(
01:20
-0800)
committer
Eric Anholt
<eric@anholt.net>
Sat, 21 Feb 2015 22:57:14 +0000
(14:57 -0800)
vc4 results:
total instructions in shared programs: 39881 -> 39794 (-0.22%)
instructions in affected programs: 6302 -> 6215 (-1.38%)
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
src/glsl/nir/nir_opt_algebraic.py
patch
|
blob
|
history
diff --git
a/src/glsl/nir/nir_opt_algebraic.py
b/src/glsl/nir/nir_opt_algebraic.py
index c3a884bb1e648adb38262c14f1f5152ef63a1d61..3ea6320d36c329075456a203bdb25cd4a2af742e 100644
(file)
--- 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)),