nir: Add new system values and intrinsics for dealing with CL work offsets
authorJesse Natalie <jenatali@microsoft.com>
Mon, 27 Jul 2020 23:56:21 +0000 (16:56 -0700)
committerMarge Bot <eric+marge@anholt.net>
Fri, 21 Aug 2020 22:07:05 +0000 (22:07 +0000)
commit41e4eb9948d0ca62e9586b491c720a1a05904802
tree4c8113ec87da98941768ba5cbf75c9c09b3c8a4b
parent6b1515cb849d29cb93e9c4be23723770e26f2409
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>
13 files changed:
src/amd/vulkan/radv_meta_buffer.c
src/amd/vulkan/radv_meta_bufimage.c
src/amd/vulkan/radv_meta_clear.c
src/amd/vulkan/radv_meta_fast_clear.c
src/amd/vulkan/radv_meta_fmask_expand.c
src/amd/vulkan/radv_meta_resolve_cs.c
src/amd/vulkan/radv_query.c
src/compiler/nir/nir.c
src/compiler/nir/nir_intrinsics.py
src/compiler/nir/nir_lower_system_values.c
src/compiler/shader_enums.c
src/compiler/shader_enums.h
src/gallium/auxiliary/nir/tgsi_to_nir.c