mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 05:08:08 +02:00
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 <anuj.phogat@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
parent
d13bcdb3a9
commit
189ac07764
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue