diff options
author | Matt Turner <[email protected]> | 2014-09-27 10:34:07 -0700 |
---|---|---|
committer | Matt Turner <[email protected]> | 2014-09-30 17:09:34 -0700 |
commit | 189ac077644c4ef2c6c15080b6d094410c74abdc (patch) | |
tree | 0d66fb36ec6fae28f93b164851009cf1220daebd /src/mesa/drivers | |
parent | d13bcdb3a9f9b43010fe8cbb4efbfe7eec0b705b (diff) |
i965/vec4: Call opt_algebraic after opt_cse.
The next patch adds an algebraic optimization for the pattern
sqrt a, b
rcp c, a
and turns it into
sqrt a, b
rsq c, b
but many vertex shaders do
a = sqrt(b);
var1 /= a;
var2 /= a;
which generates
sqrt a, b
rcp c, a
rcp d, a
If we apply the algebraic optimization before CSE, we'll end up with
sqrt a, b
rsq c, b
rcp d, a
Applying CSE combines the RCP instructions, preventing this from
happening.
No shader-db changes.
Reviewed-by: Anuj Phogat <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vec4.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp index 022ed37a8ef..e0a3d5fa786 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp @@ -1790,8 +1790,8 @@ vec4_visitor::run() OPT(dead_code_eliminate); OPT(dead_control_flow_eliminate, this); OPT(opt_copy_propagation); - OPT(opt_algebraic); OPT(opt_cse); + OPT(opt_algebraic); OPT(opt_register_coalesce); } while (progress); |