summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Natalie <jenatali@microsoft.com>2020-07-28 10:37:09 -0700
committerMarge Bot <eric+marge@anholt.net>2020-08-21 22:07:05 +0000
commit368e9a0b545633ca352596964657a334b88e0473 (patch)
tree6a108d5d34a4d45ba973ded244de241b587a7fa2
parentd3faac7a155969722cd5c1e7806c141762c39757 (diff)
spirv: Use new global invocation offset system value
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>
-rw-r--r--src/compiler/spirv/vtn_variables.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c
index a7ccafdc8b9..68174abb6d8 100644
--- a/src/compiler/spirv/vtn_variables.c
+++ b/src/compiler/spirv/vtn_variables.c
@@ -1397,6 +1397,10 @@ vtn_get_builtin_location(struct vtn_builder *b,
*location = SYSTEM_VALUE_GLOBAL_INVOCATION_INDEX;
set_mode_system_value(b, mode);
break;
+ case SpvBuiltInGlobalOffset:
+ *location = SYSTEM_VALUE_BASE_GLOBAL_INVOCATION_ID;
+ set_mode_system_value(b, mode);
+ break;
case SpvBuiltInBaseVertex:
/* OpenGL gl_BaseVertex (SYSTEM_VALUE_BASE_VERTEX) is not the same
* semantic as Vulkan BaseVertex (SYSTEM_VALUE_FIRST_VERTEX).