summaryrefslogtreecommitdiffstats
path: root/src/compiler/spirv/vtn_variables.c
diff options
context:
space:
mode:
authorLionel Landwerlin <[email protected]>2017-01-25 13:58:14 +0000
committerLionel Landwerlin <[email protected]>2017-02-01 15:08:33 +0000
commit875b15eec4c1a0cab986f5eccfc54e3c0df02f7c (patch)
tree9c34ae3f20d2cf0d7262f20f959891926c5ff0c9 /src/compiler/spirv/vtn_variables.c
parentbd46040162c703b11db4cd042abe323a0c829325 (diff)
spirv: add SPV_KHR_shader_draw_parameters support
Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Reviewed-by: Anuj Phogat <[email protected]>
Diffstat (limited to 'src/compiler/spirv/vtn_variables.c')
-rw-r--r--src/compiler/spirv/vtn_variables.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c
index 05345b303e5..098cfb5de7a 100644
--- a/src/compiler/spirv/vtn_variables.c
+++ b/src/compiler/spirv/vtn_variables.c
@@ -1010,6 +1010,18 @@ vtn_get_builtin_location(struct vtn_builder *b,
*location = SYSTEM_VALUE_GLOBAL_INVOCATION_ID;
set_mode_system_value(mode);
break;
+ case SpvBuiltInBaseVertex:
+ *location = SYSTEM_VALUE_BASE_VERTEX;
+ set_mode_system_value(mode);
+ break;
+ case SpvBuiltInBaseInstance:
+ *location = SYSTEM_VALUE_BASE_INSTANCE;
+ set_mode_system_value(mode);
+ break;
+ case SpvBuiltInDrawIndex:
+ *location = SYSTEM_VALUE_DRAW_ID;
+ set_mode_system_value(mode);
+ break;
case SpvBuiltInHelperInvocation:
default:
unreachable("unsupported builtin");