Fix: add extensions checking
authorArkadiusz Sarwa <arkadiusz.sarwa@mobica.com>
Fri, 22 Jun 2018 10:40:40 +0000 (12:40 +0200)
committerArkadiusz Sarwa <arkadiusz.sarwa@mobica.com>
Fri, 22 Jun 2018 10:40:40 +0000 (12:40 +0200)
Affects:
dEQP-VK.spirv_assembly.instruction.graphics.*

Components: Vulkan

VK-GL-CTS issue: 1235

Change-Id: Ic312f6571534dfbb7117ca9f49b7c9067cfc04d6

external/vulkancts/modules/vulkan/spirv_assembly/vktSpvAsmGraphicsShaderTestUtil.cpp

index d082f1c8ee9501506d8d731aa7ef78d3ea44c130..199292ed070ccae601c3530cb242597b298b257d 100644 (file)
@@ -2419,6 +2419,13 @@ TestStatus runAndVerifyDefaultPipeline (Context& context, InstanceContext instan
                TCU_THROW(NotSupportedError, "Geometry not supported");
        }
 
+       // Check all required extensions are supported
+       for (std::vector<std::string>::const_iterator i = instance.requiredDeviceExtensions.begin(); i != instance.requiredDeviceExtensions.end(); ++i)
+       {
+               if (!de::contains(context.getDeviceExtensions().begin(), context.getDeviceExtensions().end(), *i))
+                       TCU_THROW(NotSupportedError, (std::string("Extension not supported: ") + *i).c_str());
+       }
+
        {
                for (deUint32 featureNdx = 0; featureNdx < instance.requiredDeviceFeatures.size(); ++featureNdx)
                {