radeonsi: release saved resources in si_compute_clear_render_target
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Thu, 9 Jan 2020 13:40:44 +0000 (14:40 +0100)
committerPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Fri, 10 Jan 2020 07:41:33 +0000 (08:41 +0100)
Fixes: 984fd735152 ("radeonsi: use compute for clear_render_target when possible")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeonsi/si_compute_blit.c

index cb21a313afd0ce916cc31feb3f7b87b938dde568..accf04ff9d0ca47f143040de61a7d6bf74a1351d 100644 (file)
@@ -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);
 }