diff options
author | Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> | 2020-01-09 14:41:48 +0100 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2020-01-14 13:26:25 -0800 |
commit | 964883551dcce75f71ba330991c463ae16de7420 (patch) | |
tree | 458ba2a34ab24516fd63e0701ba9764b13945add /src/gallium | |
parent | 4dfdceeedcf0bd09386871bdb7682f177ebd91ac (diff) | |
download | mesa-964883551dcce75f71ba330991c463ae16de7420.tar.gz |
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 <marek.olsak@amd.com>
(cherry picked from commit 1acf714d579114ff591c00989b2e6a97de8830b8)
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_compute_blit.c | 3 |
1 files changed, 3 insertions, 0 deletions
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) |