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>
}
} 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 *)