radeonsi/sqtt: don't leak the pipeline bo

Pass the reference from si_aligned_buffer_create directly
to pipeline instead.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31171>
This commit is contained in:
Pierre-Eric Pelloux-Prayer 2024-09-13 17:12:14 +02:00 committed by Marge Bot
parent 721ccd0292
commit a1408e9ad3

View file

@ -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);