aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre-Eric Pelloux-Prayer <[email protected]>2020-01-09 14:59:49 +0100
committerPierre-Eric Pelloux-Prayer <[email protected]>2020-01-10 08:41:40 +0100
commita5fe84aefb6858bee123f60b330db1e0287f9cc0 (patch)
tree1859372123f06f4b19969210c43599ae9560b095
parent6912149ee5eabf6e1f3f60f2c783c521cf631fb6 (diff)
radeonsi: release saved resources in si_compute_do_clear_or_copy
Fixes: 9b331e462e5 ("radeonsi: use compute shaders for clear_buffer & copy_buffer") Reviewed-by: Marek Olšák <[email protected]>
-rw-r--r--src/gallium/drivers/radeonsi/si_compute_blit.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_compute_blit.c b/src/gallium/drivers/radeonsi/si_compute_blit.c
index 10bbd8ef580..b75d4daa7cd 100644
--- a/src/gallium/drivers/radeonsi/si_compute_blit.c
+++ b/src/gallium/drivers/radeonsi/si_compute_blit.c
@@ -255,6 +255,8 @@ static void si_compute_do_clear_or_copy(struct si_context *sctx,
ctx->set_shader_buffers(ctx, PIPE_SHADER_COMPUTE, 0, src ? 2 : 1, saved_sb,
saved_writable_mask);
si_compute_internal_end(sctx);
+ for (int i = 0; i < 2; i++)
+ pipe_resource_reference(&saved_sb[i].buffer, NULL);
}
void si_clear_buffer(struct si_context *sctx, struct pipe_resource *dst,