projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9b577d5
)
nir: Transform pow(x, 4) into (x*x)*(x*x).
author
Matt Turner
<mattst88@gmail.com>
Fri, 24 Apr 2015 18:37:30 +0000
(11:37 -0700)
committer
Matt Turner
<mattst88@gmail.com>
Fri, 24 Apr 2015 18:39:01 +0000
(11:39 -0700)
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 cdb19241c43634cd5e071a3829363d81f27d4dbc..2a2b9561efbe66dc9f5882ecec6f32e2f0a452fd 100644
(file)
--- a/
src/glsl/nir/nir_opt_algebraic.py
+++ b/
src/glsl/nir/nir_opt_algebraic.py
@@
-144,6
+144,7
@@
optimizations = [
(('fexp', ('fmul', ('flog', a), b)), ('fpow', a, b), '!options->lower_fpow'), # e^(ln(a)*b) = a^b
(('fpow', a, 1.0), a),
(('fpow', a, 2.0), ('fmul', a, a)),
+ (('fpow', a, 4.0), ('fmul', ('fmul', a, a), ('fmul', a, a))),
(('fpow', 2.0, a), ('fexp2', a)),
(('fsqrt', ('fexp2', a)), ('fexp2', ('fmul', 0.5, a))),
(('fsqrt', ('fexp', a)), ('fexp', ('fmul', 0.5, a))),