From: Tom Stellard Date: Fri, 8 Aug 2014 13:30:33 +0000 (-0400) Subject: radeonsi/compute: Update reference counts for buffers in si_set_global_binding() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=05e9681d5524981db623c077708816476553f908;p=mesa.git radeonsi/compute: Update reference counts for buffers in si_set_global_binding() CC: "10.2" --- 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;