Assembler supports new builtins in Rev32
authorDavid Neto <dneto@google.com>
Wed, 23 Sep 2015 19:35:27 +0000 (15:35 -0400)
committerDavid Neto <dneto@google.com>
Mon, 26 Oct 2015 16:55:33 +0000 (12:55 -0400)
They are VertexIndex and InstanceIndex.

source/operand.cpp
test/TextToBinary.Annotation.cpp

index 97a28eb..2d10b6f 100644 (file)
@@ -954,6 +954,16 @@ static const spv_operand_desc_t builtInEntries[] = {
      SPV_OPCODE_FLAGS_CAPABILITIES,
      CapabilityKernel,
      {SPV_OPERAND_TYPE_NONE}},
+    {"VertexIndex",
+     BuiltInVertexIndex,
+     SPV_OPCODE_FLAGS_CAPABILITIES,
+     CapabilityShader,
+     {SPV_OPERAND_TYPE_NONE}},
+    {"InstanceIndex",
+     BuiltInInstanceIndex,
+     SPV_OPCODE_FLAGS_CAPABILITIES,
+     CapabilityShader,
+     {SPV_OPERAND_TYPE_NONE}},
 };
 
 static const spv_operand_desc_t selectionControlEntries[] = {
index e4f2f36..5d9c5cd 100644 (file)
@@ -180,6 +180,8 @@ INSTANTIATE_TEST_CASE_P(TextToBinaryDecorateBuiltIn, OpDecorateEnumTest,
                             CASE(NumEnqueuedSubgroups),
                             CASE(SubgroupId),
                             CASE(SubgroupLocalInvocationId),
+                            CASE(VertexIndex),
+                            CASE(InstanceIndex),
                         }));
 #undef CASE
 // clang-format on