mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
compiler/glsl: Always propagate_invariance() last
Suggested-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10292>
This commit is contained in:
parent
d35f8604c7
commit
7f8c5844ef
1 changed files with 10 additions and 0 deletions
|
|
@ -2413,6 +2413,16 @@ do_common_optimization(exec_list *ir, bool linked,
|
|||
delete ls;
|
||||
}
|
||||
|
||||
/* If the PIPE_CAP_GLSL_OPTIMIZE_CONSERVATIVELY cap is set, this pass will
|
||||
* only be called once rather than repeatedly until no further progress is
|
||||
* made.
|
||||
*
|
||||
* If an optimization pass fails to preserve the invariant flag, calling
|
||||
* the pass only once may result in incorrect code generation. Always call
|
||||
* propagate_invariance() last to avoid this possibility.
|
||||
*/
|
||||
OPT(propagate_invariance, ir);
|
||||
|
||||
#undef OPT
|
||||
|
||||
return progress;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue