From a1408e9ad386898139ab71d2fb0296a8f43d80f6 Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Fri, 13 Sep 2024 17:12:14 +0200 Subject: [PATCH] radeonsi/sqtt: don't leak the pipeline bo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pass the reference from si_aligned_buffer_create directly to pipeline instead. Reviewed-by: Marek Olšák Part-of: --- src/gallium/drivers/radeonsi/si_state_draw.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/radeonsi/si_state_draw.cpp b/src/gallium/drivers/radeonsi/si_state_draw.cpp index bb996daba8f..8f9db2b9845 100644 --- a/src/gallium/drivers/radeonsi/si_state_draw.cpp +++ b/src/gallium/drivers/radeonsi/si_state_draw.cpp @@ -363,8 +363,9 @@ static bool si_update_shaders(struct si_context *sctx) if (ptr) { pipeline = (struct si_sqtt_fake_pipeline *) CALLOC(1, sizeof(struct si_sqtt_fake_pipeline)); + pipeline->code_hash = pipeline_code_hash; - si_resource_reference(&pipeline->bo, bo); + pipeline->bo = bo; /* Re-upload all gfx shaders and init PM4. */ si_pm4_clear_state(&pipeline->pm4, sctx->screen, false);