From 05e9681d5524981db623c077708816476553f908 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Fri, 8 Aug 2014 09:30:33 -0400 Subject: [PATCH] radeonsi/compute: Update reference counts for buffers in si_set_global_binding() CC: "10.2" --- src/gallium/drivers/radeonsi/si_compute.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_compute.c b/src/gallium/drivers/radeonsi/si_compute.c index 12e4f5611c5..2ddd7c2bafd 100644 --- a/src/gallium/drivers/radeonsi/si_compute.c +++ b/src/gallium/drivers/radeonsi/si_compute.c @@ -105,7 +105,7 @@ static void si_set_global_binding( if (!resources) { for (i = first; i < first + n; i++) { - program->global_buffers[i] = NULL; + pipe_resource_reference(&program->global_buffers[i], NULL); } return; } @@ -113,7 +113,7 @@ static void si_set_global_binding( for (i = first; i < first + n; i++) { uint64_t va; uint32_t offset; - program->global_buffers[i] = resources[i]; + pipe_resource_reference(&program->global_buffers[i], resources[i]); va = r600_resource(resources[i])->gpu_address; offset = util_le32_to_cpu(*handles[i]); va += offset; -- 2.30.2