Test SPV_KHR_device_group in assembler, disassembler
authorDavid Neto <dneto@google.com>
Fri, 27 Jan 2017 01:05:01 +0000 (20:05 -0500)
committerDavid Neto <dneto@google.com>
Wed, 8 Mar 2017 22:11:22 +0000 (17:11 -0500)
test/text_to_binary.extension_test.cpp

index 9581c14..ad98c9f 100644 (file)
@@ -211,4 +211,20 @@ INSTANTIATE_TEST_CASE_P(
                                  {SpvCapabilityStorageInputOutput16})},
             })), );
 
+// SPV_KHR_device_group
+
+INSTANTIATE_TEST_CASE_P(
+    SPV_KHR_device_group, ExtensionRoundTripTest,
+    // We'll get coverage over operand tables by trying the universal
+    // environments, and at least one specific environment.
+    Combine(Values(SPV_ENV_UNIVERSAL_1_0, SPV_ENV_UNIVERSAL_1_1,
+                   SPV_ENV_VULKAN_1_0),
+            ValuesIn(std::vector<AssemblyCase>{
+                {"OpCapability DeviceGroup\n",
+                 MakeInstruction(SpvOpCapability, {SpvCapabilityDeviceGroup})},
+                {"OpDecorate %1 BuiltIn DeviceIndex\n",
+                 MakeInstruction(SpvOpDecorate, {1, SpvDecorationBuiltIn,
+                                                 SpvBuiltInDeviceIndex})},
+            })), );
+
 }  // anonymous namespace