From 1acf714d579114ff591c00989b2e6a97de8830b8 Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Thu, 9 Jan 2020 14:41:48 +0100 Subject: [PATCH] radeonsi: release saved resources in si_compute_copy_image MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fixes: 1b25d340b79 ("radeonsi: use compute for resource_copy_region when possible") Reviewed-by: Marek Olšák --- src/gallium/drivers/radeonsi/si_compute_blit.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/drivers/radeonsi/si_compute_blit.c b/src/gallium/drivers/radeonsi/si_compute_blit.c index accf04ff9d0..18dafac1a45 100644 --- a/src/gallium/drivers/radeonsi/si_compute_blit.c +++ b/src/gallium/drivers/radeonsi/si_compute_blit.c @@ -486,6 +486,9 @@ void si_compute_copy_image(struct si_context *sctx, ctx->set_shader_images(ctx, PIPE_SHADER_COMPUTE, 0, 2, saved_image); ctx->set_constant_buffer(ctx, PIPE_SHADER_COMPUTE, 0, &saved_cb); si_compute_internal_end(sctx); + for (int i = 0; i < 2; i++) + pipe_resource_reference(&saved_image[i].resource, NULL); + pipe_resource_reference(&saved_cb.buffer, NULL); } void si_retile_dcc(struct si_context *sctx, struct si_texture *tex) -- 2.30.2