Mesa (master): radeonsi: release saved resources in si_retile_dcc
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Jan 10 08:00:48 UTC 2020
Module: Mesa
Branch: master
Commit: 9211cbe07a0ffb0abdaf3da68f7aa3ee00a430d7
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9211cbe07a0ffb0abdaf3da68f7aa3ee00a430d7
Author: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Date: Thu Jan 9 14:32:11 2020 +0100
radeonsi: release saved resources in si_retile_dcc
Fixes: 1f21396431a ("radeonsi: add support for displayable DCC for multi-RB chips")
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2330
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
---
src/gallium/drivers/radeonsi/si_compute_blit.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/gallium/drivers/radeonsi/si_compute_blit.c b/src/gallium/drivers/radeonsi/si_compute_blit.c
index 8d4f3bab5d7..4d6c29ab43e 100644
--- a/src/gallium/drivers/radeonsi/si_compute_blit.c
+++ b/src/gallium/drivers/radeonsi/si_compute_blit.c
@@ -564,6 +564,10 @@ void si_retile_dcc(struct si_context *sctx, struct si_texture *tex)
/* Restore states. */
ctx->bind_compute_state(ctx, saved_cs);
ctx->set_shader_images(ctx, PIPE_SHADER_COMPUTE, 0, 3, saved_img);
+
+ for (unsigned i = 0; i < 3; i++) {
+ pipe_resource_reference(&saved_img[i].resource, NULL);
+ }
}
/* Expand FMASK to make it identity, so that image stores can ignore it. */
More information about the mesa-commit
mailing list