projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c2ece77
)
nir: Add a couple of simplifications of csel operations.
author
Eric Anholt
<eric@anholt.net>
Thu, 29 Jan 2015 23:50:18 +0000
(15:50 -0800)
committer
Eric Anholt
<eric@anholt.net>
Sat, 21 Feb 2015 22:57:14 +0000
(14:57 -0800)
vc4 was already cleaning these up, but it does shave 4 NIR instructions in
shader-db.
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 504c9f69054a37ee4a3524c7961fc3d12d914684..ef3a02974573edb5a6a83715833078598fbc724c 100644
(file)
--- a/
src/glsl/nir/nir_opt_algebraic.py
+++ b/
src/glsl/nir/nir_opt_algebraic.py
@@
-145,6
+145,9
@@
optimizations = [
# next round of opt_algebraic, get picked up by one of the above two.
(('bcsel', '#a', b, c), ('bcsel', ('ine', 'a', 0), b, c)),
+ (('bcsel', a, b, b), b),
+ (('fcsel', a, b, b), b),
+
# Subtracts
(('fsub', 0.0, ('fsub', 0.0, a)), a),
(('isub', 0, ('isub', 0, a)), a),