summaryrefslogtreecommitdiffstats
path: root/src/compiler/spirv
diff options
context:
space:
mode:
authorKarol Herbst <[email protected]>2019-01-14 18:36:37 +0100
committerKarol Herbst <[email protected]>2019-03-05 22:28:29 +0100
commitd0b47ec4df0eafe4f4afddc2a0594b392c27f426 (patch)
treed6fd1867040779845271c0e4c630d028c60b3b6b /src/compiler/spirv
parentf48c6729650e0a81b1a12487188163ba351571c8 (diff)
nir/vtn: add support for SpvBuiltInGlobalLinearId
v2: use formula with fewer operations Signed-off-by: Karol Herbst <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/compiler/spirv')
-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 69dd72941ba..b155681ca1f 100644
--- a/src/compiler/spirv/vtn_variables.c
+++ b/src/compiler/spirv/vtn_variables.c
@@ -1337,6 +1337,10 @@ vtn_get_builtin_location(struct vtn_builder *b,
*location = SYSTEM_VALUE_GLOBAL_INVOCATION_ID;
set_mode_system_value(b, mode);
break;
+ case SpvBuiltInGlobalLinearId:
+ *location = SYSTEM_VALUE_GLOBAL_INVOCATION_INDEX;
+ set_mode_system_value(b, mode);
+ break;
case SpvBuiltInBaseVertex:
/* OpenGL gl_BaseVertex (SYSTEM_VALUE_BASE_VERTEX) is not the same
* semantic as SPIR-V BaseVertex (SYSTEM_VALUE_FIRST_VERTEX).