summaryrefslogtreecommitdiff
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>2020-01-09 14:41:48 +0100
committerPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>2020-01-10 08:41:35 +0100
commit1acf714d579114ff591c00989b2e6a97de8830b8 (patch)
tree9df2f14fe8fe418b28c9e9fa9b2fa638fcf6c750 /src/gallium/drivers
parente1e87466ae7d46c564fdd3154003ae3cddf3147b (diff)
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>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/radeonsi/si_compute_blit.c3
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 accf04ff9d0..18dafac1a45 100644
--- a/src/gallium/drivers/radeonsi/si_compute_blit.c
+++ b/src/gallium/drivers/radeonsi/si_compute_blit.c
@@ -486,6 +486,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)