radeonsi: release saved resources in si_compute_expand_fmask
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Thu, 9 Jan 2020 13:39:24 +0000 (14:39 +0100)
committerPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Fri, 10 Jan 2020 07:41:31 +0000 (08:41 +0100)
Fixes: 095a58204d9 ("radeonsi: expand FMASK before MSAA image stores are used")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeonsi/si_compute_blit.c

index 4d6c29ab43eeae64cfbfa7730457643c631b95de..cb21a313afd0ce916cc31feb3f7b87b938dde568 100644 (file)
@@ -636,6 +636,7 @@ void si_compute_expand_fmask(struct pipe_context *ctx, struct pipe_resource *tex
        ctx->bind_compute_state(ctx, saved_cs);
        ctx->set_shader_images(ctx, PIPE_SHADER_COMPUTE, 0, 1, &saved_image);
        si_compute_internal_end(sctx);
+       pipe_resource_reference(&saved_image.resource, NULL);
 
        /* Array of fully expanded FMASK values, arranged by [log2(fragments)][log2(samples)-1]. */
 #define INVALID 0 /* never used */