radeonsi: release saved resources in si_compute_clear_12bytes_buffer
authorPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Thu, 9 Jan 2020 13:57:41 +0000 (14:57 +0100)
committerPierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Fri, 10 Jan 2020 07:41:38 +0000 (08:41 +0100)
Fixes: 6c901f06752 ("radeonsi: use compute shader for clear 12-byte buffer")
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeonsi/si_compute_blit.c

index 18dafac1a45d6c6549d1bbcd7058e6e9e17dc070..10bbd8ef5803b98f6f4096afe79a224b8963fb81 100644 (file)
@@ -141,6 +141,8 @@ static void si_compute_clear_12bytes_buffer(struct si_context *sctx,
        ctx->set_constant_buffer(ctx, PIPE_SHADER_COMPUTE, 0, &saved_cb);
 
        si_compute_internal_end(sctx);
+       pipe_resource_reference(&saved_sb.buffer, NULL);
+       pipe_resource_reference(&saved_cb.buffer, NULL);
 }
 
 static void si_compute_do_clear_or_copy(struct si_context *sctx,