summaryrefslogtreecommitdiff
path: root/src/amd/vulkan/radv_meta_buffer.c
diff options
context:
space:
mode:
authorJesse Natalie <jenatali@microsoft.com>2020-07-27 16:56:21 -0700
committerMarge Bot <eric+marge@anholt.net>2020-08-21 22:07:05 +0000
commit41e4eb9948d0ca62e9586b491c720a1a05904802 (patch)
tree4c8113ec87da98941768ba5cbf75c9c09b3c8a4b /src/amd/vulkan/radv_meta_buffer.c
parent6b1515cb849d29cb93e9c4be23723770e26f2409 (diff)
nir: Add new system values and intrinsics for dealing with CL work offsets
New intrinsics are added for global invocation IDs and work group IDs to deal with offsets in both. The only one of these that needs a system value is global invocation offset, for CL's get_global_offset(). Note that CL requires very large work group sizes, so these intrinsics are modified to be able to use 64bit values, for 64bit SPIR-V. Reviewed-by: Karol Herbst <kherbst@redhat.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5891>
Diffstat (limited to 'src/amd/vulkan/radv_meta_buffer.c')
-rw-r--r--src/amd/vulkan/radv_meta_buffer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/amd/vulkan/radv_meta_buffer.c b/src/amd/vulkan/radv_meta_buffer.c
index 28343ebd83a..e27cae1e61b 100644
--- a/src/amd/vulkan/radv_meta_buffer.c
+++ b/src/amd/vulkan/radv_meta_buffer.c
@@ -16,7 +16,7 @@ build_buffer_fill_shader(struct radv_device *dev)
b.shader->info.cs.local_size[2] = 1;
nir_ssa_def *invoc_id = nir_load_local_invocation_id(&b);
- nir_ssa_def *wg_id = nir_load_work_group_id(&b);
+ nir_ssa_def *wg_id = nir_load_work_group_id(&b, 32);
nir_ssa_def *block_size = nir_imm_ivec4(&b,
b.shader->info.cs.local_size[0],
b.shader->info.cs.local_size[1],
@@ -71,7 +71,7 @@ build_buffer_copy_shader(struct radv_device *dev)
b.shader->info.cs.local_size[2] = 1;
nir_ssa_def *invoc_id = nir_load_local_invocation_id(&b);
- nir_ssa_def *wg_id = nir_load_work_group_id(&b);
+ nir_ssa_def *wg_id = nir_load_work_group_id(&b, 32);
nir_ssa_def *block_size = nir_imm_ivec4(&b,
b.shader->info.cs.local_size[0],
b.shader->info.cs.local_size[1],