diff options
author | Timothy Arceri <[email protected]> | 2017-12-14 14:48:49 +1100 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2017-12-27 11:26:08 +1100 |
commit | 351eee05d346a8d226ecb6a5ab0a0e7d5b49aa66 (patch) | |
tree | 431e639eb99a576f7953023a4d7f56b3f43724f6 /src | |
parent | ddc0e7941f688346b5ef4aa5ac630b904f28dcf6 (diff) |
st/glsl_to_nir: call post opt functions after opts have finished
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 <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/state_tracker/st_glsl_to_nir.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_glsl_to_nir.cpp b/src/mesa/state_tracker/st_glsl_to_nir.cpp index 0ff8dcd68cc..b411621ab2c 100644 --- a/src/mesa/state_tracker/st_glsl_to_nir.cpp +++ b/src/mesa/state_tracker/st_glsl_to_nir.cpp @@ -617,6 +617,12 @@ st_link_nir(struct gl_context *ctx, 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); |