From 8166be0e83ea9ef84e047aa36bf9e486792a9ed6 Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Sun, 24 Jul 2022 13:58:42 +0200 Subject: [PATCH] r600: don't clone the nir shader, just use it The nir shader passed in with the shader state has to be released by the backe-end, so don't clone it, just use it. Signed-off-by: Gert Wollny Part-of: --- src/gallium/drivers/r600/r600_state_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/r600/r600_state_common.c b/src/gallium/drivers/r600/r600_state_common.c index 56b37606a1f..8e1c061c37b 100644 --- a/src/gallium/drivers/r600/r600_state_common.c +++ b/src/gallium/drivers/r600/r600_state_common.c @@ -996,7 +996,7 @@ struct r600_pipe_shader_selector *r600_create_shader_state_tokens(struct pipe_co ir = PIPE_SHADER_IR_TGSI; tgsi_scan_shader(sel->tokens, &sel->info); } else { - sel->nir = nir_shader_clone(NULL, s); + sel->nir = s; nir_tgsi_scan_shader(sel->nir, &sel->info, true); } }