st/mesa: call nir_sweep in st_finalize_nir
This is invoked sooner before (pre-)compiling the first variant and is also applied to fixed-func and ARB programs.
This commit is contained in:
parent
4e70cba638
commit
610fb0e19c
|
@ -821,8 +821,6 @@ st_link_nir(struct gl_context *ctx,
|
|||
return false;
|
||||
}
|
||||
|
||||
nir_sweep(prog->nir);
|
||||
|
||||
/* The GLSL IR won't be needed anymore. */
|
||||
ralloc_free(shader->ir);
|
||||
shader->ir = NULL;
|
||||
|
|
|
@ -2064,6 +2064,9 @@ st_finalize_program(struct st_context *st, struct gl_program *prog)
|
|||
st->dirty |= ((struct st_program *)prog)->affected_states;
|
||||
}
|
||||
|
||||
if (prog->nir)
|
||||
nir_sweep(prog->nir);
|
||||
|
||||
/* Create Gallium shaders now instead of on demand. */
|
||||
if (ST_DEBUG & DEBUG_PRECOMPILE ||
|
||||
st->shader_has_one_variant[prog->info.stage])
|
||||
|
|
Loading…
Reference in New Issue