From a5fe84aefb6858bee123f60b330db1e0287f9cc0 Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Thu, 9 Jan 2020 14:59:49 +0100 Subject: [PATCH] radeonsi: release saved resources in si_compute_do_clear_or_copy MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fixes: 9b331e462e5 ("radeonsi: use compute shaders for clear_buffer & copy_buffer") Reviewed-by: Marek Olšák --- src/gallium/drivers/radeonsi/si_compute_blit.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gallium/drivers/radeonsi/si_compute_blit.c b/src/gallium/drivers/radeonsi/si_compute_blit.c index 10bbd8ef580..b75d4daa7cd 100644 --- a/src/gallium/drivers/radeonsi/si_compute_blit.c +++ b/src/gallium/drivers/radeonsi/si_compute_blit.c @@ -255,6 +255,8 @@ static void si_compute_do_clear_or_copy(struct si_context *sctx, ctx->set_shader_buffers(ctx, PIPE_SHADER_COMPUTE, 0, src ? 2 : 1, saved_sb, saved_writable_mask); si_compute_internal_end(sctx); + for (int i = 0; i < 2; i++) + pipe_resource_reference(&saved_sb[i].buffer, NULL); } void si_clear_buffer(struct si_context *sctx, struct pipe_resource *dst, -- 2.30.2