This call to ir3_optimize_nir() mirrors what st/mesa does for us in
Gallium, and will be necessary for cross-stage linking and the multiview
lowering.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6515>
#define OPT_V(nir, pass, ...) NIR_PASS_V(nir, pass, ##__VA_ARGS__)
-static void
+void
ir3_optimize_loop(nir_shader *s)
{
bool progress;
void ir3_nir_lower_gs(nir_shader *shader);
const nir_shader_compiler_options * ir3_get_compiler_options(struct ir3_compiler *compiler);
+void ir3_optimize_loop(nir_shader *s);
void ir3_finalize_nir(struct ir3_compiler *compiler, nir_shader *s);
void ir3_nir_post_finalize(struct ir3_compiler *compiler, nir_shader *s);
void ir3_nir_lower_variant(struct ir3_shader_variant *so, nir_shader *s);
NIR_PASS_V(nir, nir_lower_frexp);
+ ir3_optimize_loop(nir);
+
return nir;
}