diff options
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_link.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_link.cpp b/src/mesa/drivers/dri/i965/brw_link.cpp index 9ddf0230183..80868569ed7 100644 --- a/src/mesa/drivers/dri/i965/brw_link.cpp +++ b/src/mesa/drivers/dri/i965/brw_link.cpp @@ -297,14 +297,15 @@ brw_link_shader(struct gl_context *ctx, struct gl_shader_program *shProg) nir_lower_indirect_derefs(consumer, indirect_mask); const bool p_is_scalar = compiler->scalar_stage[producer->stage]; - shProg->_LinkedShaders[i]->Program->nir = - brw_nir_optimize(producer, compiler, p_is_scalar); + producer = brw_nir_optimize(producer, compiler, p_is_scalar); const bool c_is_scalar = compiler->scalar_stage[producer->stage]; - shProg->_LinkedShaders[next]->Program->nir = - brw_nir_optimize(consumer, compiler, c_is_scalar); + consumer = brw_nir_optimize(consumer, compiler, c_is_scalar); } + shProg->_LinkedShaders[i]->Program->nir = producer; + shProg->_LinkedShaders[next]->Program->nir = consumer; + next = i; } } |