summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi
diff options
context:
space:
mode:
authorTom Stellard <[email protected]>2014-02-13 14:46:25 -0800
committerTom Stellard <[email protected]>2014-02-24 12:56:27 -0800
commit945d87f95877e198fb2203f47a4ebbccae883978 (patch)
tree15299ffc2bff41616eaecda1cf0158ca4c56b094 /src/gallium/drivers/radeonsi
parenteac7236042e3deb87c681c2f70c606c1b6565c22 (diff)
clover: Pass buffer offsets to the driver in set_global_binding() v3
The offsets will be stored in the handles parameter. This makes it possible to use sub-buffers. v2: - Style fixes - Add support for constant sub-buffers - Store handles in device byte order v3: - Use endian helpers Reviewed-by: Francisco Jerez <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r--src/gallium/drivers/radeonsi/si_compute.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_compute.c b/src/gallium/drivers/radeonsi/si_compute.c
index a7f49e790af..ead5862df39 100644
--- a/src/gallium/drivers/radeonsi/si_compute.c
+++ b/src/gallium/drivers/radeonsi/si_compute.c
@@ -107,8 +107,12 @@ 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];
va = r600_resource_va(ctx->screen, resources[i]);
+ offset = util_le32_to_cpu(*handles[i]);
+ va += offset;
+ va = util_cpu_to_le64(va);
memcpy(handles[i], &va, sizeof(va));
}
}