From: Pierre-Eric Pelloux-Prayer Date: Thu, 9 Jan 2020 13:41:48 +0000 (+0100) Subject: radeonsi: release saved resources in si_compute_copy_image X-Git-Tag: android-x86-9.0-r1~1^2~62 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=964883551dcce75f71ba330991c463ae16de7420;p=android-x86%2Fexternal-mesa.git radeonsi: release saved resources in si_compute_copy_image Fixes: 1b25d340b79 ("radeonsi: use compute for resource_copy_region when possible") Reviewed-by: Marek Olšák (cherry picked from commit 1acf714d579114ff591c00989b2e6a97de8830b8) --- diff --git a/src/gallium/drivers/radeonsi/si_compute_blit.c b/src/gallium/drivers/radeonsi/si_compute_blit.c index 732fa24c986..f7c2b6677a8 100644 --- a/src/gallium/drivers/radeonsi/si_compute_blit.c +++ b/src/gallium/drivers/radeonsi/si_compute_blit.c @@ -425,6 +425,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)