Mesa (master): radeonsi: release saved resources in si_compute_do_clear_or_copy

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jan 10 08:00:48 UTC 2020


Module: Mesa
Branch: master
Commit: a5fe84aefb6858bee123f60b330db1e0287f9cc0
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a5fe84aefb6858bee123f60b330db1e0287f9cc0

Author: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Date:   Thu Jan  9 14:59:49 2020 +0100

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 <marek.olsak at amd.com>

---

 src/gallium/drivers/radeonsi/si_compute_blit.c | 2 ++
 1 file changed, 2 insertions(+)

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,




More information about the mesa-commit mailing list