We need to move this to a separate loop because
nir_compact_varyings() can alter the IR of a previous stage.
Fixes: 6648bd68fd27 "st/glsl_to_nir: enable NIR link time opts"
Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
nir, ctx->API != API_OPENGL_COMPAT);
}
prev = i;
+ }
+
+ for (unsigned i = 0; i < MESA_SHADER_STAGES; i++) {
+ struct gl_linked_shader *shader = shader_program->_LinkedShaders[i];
+ if (shader == NULL)
+ continue;
st_glsl_to_nir_post_opts(st, shader->Program, shader_program);