summaryrefslogtreecommitdiff
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2014-08-08 09:30:33 -0400
committerEmil Velikov <emil.l.velikov@gmail.com>2014-08-27 13:25:19 +0100
commitc5885eca151bd6d0405c68b8494c94be3c3f0050 (patch)
treea9eb7d9d542b72e62e34684d3361286fd060f49c /src/gallium/drivers
parentf1ff7753f1c7d08800ce9162ddd05650bb851d6a (diff)
radeonsi/compute: Update reference counts for buffers in si_set_global_binding()
CC: "10.2" <mesa-stable@lists.freedesktop.org> (cherry picked from commit 05e9681d5524981db623c077708816476553f908) Conflicts: src/gallium/drivers/radeonsi/si_compute.c
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/radeonsi/si_compute.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeonsi/si_compute.c b/src/gallium/drivers/radeonsi/si_compute.c
index c0637f6f7ec..34b82cfd19b 100644
--- a/src/gallium/drivers/radeonsi/si_compute.c
+++ b/src/gallium/drivers/radeonsi/si_compute.c
@@ -100,7 +100,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;
}
@@ -108,7 +108,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;