Mesa (master): spirv: Use new global invocation offset system value

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Aug 21 22:24:18 UTC 2020


Module: Mesa
Branch: master
Commit: 368e9a0b545633ca352596964657a334b88e0473
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=368e9a0b545633ca352596964657a334b88e0473

Author: Jesse Natalie <jenatali at microsoft.com>
Date:   Tue Jul 28 10:37:09 2020 -0700

spirv: Use new global invocation offset system value

Reviewed-by: Karol Herbst <kherbst at redhat.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5891>

---

 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).



More information about the mesa-commit mailing list