From: Pierre-Eric Pelloux-Prayer Date: Thu, 9 Jan 2020 13:59:49 +0000 (+0100) Subject: radeonsi: release saved resources in si_compute_do_clear_or_copy X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a5fe84aefb6858bee123f60b330db1e0287f9cc0;p=mesa.git radeonsi: release saved resources in si_compute_do_clear_or_copy Fixes: 9b331e462e5 ("radeonsi: use compute shaders for clear_buffer & copy_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 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,