From 6912149ee5eabf6e1f3f60f2c783c521cf631fb6 Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Thu, 9 Jan 2020 14:57:41 +0100 Subject: [PATCH] radeonsi: release saved resources in si_compute_clear_12bytes_buffer MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fixes: 6c901f06752 ("radeonsi: use compute shader for clear 12-byte 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 18dafac1a45..10bbd8ef580 100644 --- a/src/gallium/drivers/radeonsi/si_compute_blit.c +++ b/src/gallium/drivers/radeonsi/si_compute_blit.c @@ -141,6 +141,8 @@ static void si_compute_clear_12bytes_buffer(struct si_context *sctx, ctx->set_constant_buffer(ctx, PIPE_SHADER_COMPUTE, 0, &saved_cb); si_compute_internal_end(sctx); + pipe_resource_reference(&saved_sb.buffer, NULL); + pipe_resource_reference(&saved_cb.buffer, NULL); } static void si_compute_do_clear_or_copy(struct si_context *sctx, -- 2.30.2