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

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


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

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

radeonsi: release saved resources in si_compute_clear_render_target

Fixes: 984fd735152 ("radeonsi: use compute for clear_render_target when possible")
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 cb21a313afd..accf04ff9d0 100644
--- a/src/gallium/drivers/radeonsi/si_compute_blit.c
+++ b/src/gallium/drivers/radeonsi/si_compute_blit.c
@@ -755,4 +755,6 @@ void si_compute_clear_render_target(struct pipe_context *ctx,
 	ctx->set_shader_images(ctx, PIPE_SHADER_COMPUTE, 0, 1, &saved_image);
 	ctx->set_constant_buffer(ctx, PIPE_SHADER_COMPUTE, 0, &saved_cb);
 	si_compute_internal_end(sctx);
+	pipe_resource_reference(&saved_image.resource, NULL);
+	pipe_resource_reference(&saved_cb.buffer, NULL);
 }




More information about the mesa-commit mailing list