projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
97e6c1b
)
nir: Remove useless ftrunc inside f2i/f2u.
author
Matt Turner
<mattst88@gmail.com>
Thu, 26 Mar 2015 17:09:42 +0000
(10:09 -0700)
committer
Matt Turner
<mattst88@gmail.com>
Wed, 1 Apr 2015 20:43:57 +0000
(13:43 -0700)
No shader-db changes, probably because they're all removed by the GLSL
compiler optimization added in commit
69ad5fd4
.
Reviewed-by: Eric Anholt <eric@anholt.net>
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 6181f5df7a486b9fb7996c21e0d96b78c1753ce6..60d11607f6f12de528096ca43e94932e025be5c7 100644
(file)
--- a/
src/glsl/nir/nir_opt_algebraic.py
+++ b/
src/glsl/nir/nir_opt_algebraic.py
@@
-181,6
+181,10
@@
optimizations = [
(('bcsel', a, b, b), b),
(('fcsel', a, b, b), b),
+ # Conversions
+ (('f2i', ('ftrunc', a)), ('f2i', a)),
+ (('f2u', ('ftrunc', a)), ('f2u', a)),
+
# Subtracts
(('fsub', a, ('fsub', 0.0, b)), ('fadd', a, b)),
(('isub', a, ('isub', 0, b)), ('iadd', a, b)),