r600: Delete possible old NIR variant when translating from TGSI
With shader variants it may happen that we already translated a TGSI shader for the current selector, so delete the old nir shader if we already had one. Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17729>
This commit is contained in:
parent
92feb77bbb
commit
97d4e98501
|
@ -195,6 +195,8 @@ int r600_pipe_shader_create(struct pipe_context *ctx,
|
|||
}
|
||||
} else {
|
||||
if (sel->ir_type == PIPE_SHADER_IR_TGSI) {
|
||||
if (sel->nir)
|
||||
ralloc_free(sel->nir);
|
||||
sel->nir = tgsi_to_nir(sel->tokens, ctx->screen, true);
|
||||
const nir_shader_compiler_options *nir_options =
|
||||
(const nir_shader_compiler_options *)
|
||||
|
|
Loading…
Reference in New Issue