From: Pierre-Eric Pelloux-Prayer Date: Thu, 9 Jan 2020 13:57:41 +0000 (+0100) Subject: radeonsi: release saved resources in si_compute_clear_12bytes_buffer X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6912149ee5eabf6e1f3f60f2c783c521cf631fb6;p=mesa.git radeonsi: release saved resources in si_compute_clear_12bytes_buffer Fixes: 6c901f06752 ("radeonsi: use compute shader for clear 12-byte buffer") Reviewed-by: Marek Olšák --- 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,