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>
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;