[Mesa-stable] [PATCH 3/7] radeonsi/compute: Update reference counts for buffers in si_set_global_binding()

Tom Stellard thomas.stellard at amd.com
Fri Aug 8 07:16:40 PDT 2014


CC: "10.2" <mesa-stable at lists.freedesktop.org>
---
 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 42e4fec..482d475 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_va(ctx->screen, resources[i]);
 		offset = util_le32_to_cpu(*handles[i]);
 		va += offset;
-- 
1.8.1.5



More information about the mesa-stable mailing list