summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2017-08-21 22:11:49 -0700
committerAndres Gomez <[email protected]>2017-09-05 16:39:24 +0300
commite439908af9665b50443f1196cb55388c69d0c7d7 (patch)
tree8eff553d093676f456620750bdb7005e8d008e2a /src
parent86df05eb2630641dcd80c3c0c0cc4b9f378132ef (diff)
spirv: Add support for the HelperInvocation builtin
I have no idea how this got missed but it's been missing since forever. Cc: [email protected] Reviewed-by: Samuel Iglesias Gonsálvez <[email protected]> Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/compiler/spirv/vtn_variables.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c
index d4fd1dea746..e03547c8d56 100644
--- a/src/compiler/spirv/vtn_variables.c
+++ b/src/compiler/spirv/vtn_variables.c
@@ -1121,6 +1121,10 @@ vtn_get_builtin_location(struct vtn_builder *b,
*location = FRAG_RESULT_DEPTH;
assert(*mode == nir_var_shader_out);
break;
+ case SpvBuiltInHelperInvocation:
+ *location = SYSTEM_VALUE_HELPER_INVOCATION;
+ set_mode_system_value(mode);
+ break;
case SpvBuiltInNumWorkgroups:
*location = SYSTEM_VALUE_NUM_WORK_GROUPS;
set_mode_system_value(mode);
@@ -1161,7 +1165,6 @@ vtn_get_builtin_location(struct vtn_builder *b,
*location = SYSTEM_VALUE_VIEW_INDEX;
set_mode_system_value(mode);
break;
- case SpvBuiltInHelperInvocation:
default:
unreachable("unsupported builtin");
}