From 368e9a0b545633ca352596964657a334b88e0473 Mon Sep 17 00:00:00 2001 From: Jesse Natalie Date: Tue, 28 Jul 2020 10:37:09 -0700 Subject: [PATCH] spirv: Use new global invocation offset system value Reviewed-by: Karol Herbst Reviewed-by: Jason Ekstrand Part-of: --- src/compiler/spirv/vtn_variables.c | 4 ++++ 1 file changed, 4 insertions(+) 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). -- 2.30.2