Check for required features in no_attachment tests
authorGary Sweet <gsweet@broadcom.com>
Thu, 13 Jul 2017 14:08:07 +0000 (15:08 +0100)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Fri, 21 Jul 2017 16:03:26 +0000 (12:03 -0400)
dEQP-VK.pipeline.framebuffer_attachment.no_attachments uses
gl_PrimitiveID and therefore requires geometry or tessellation support.

dEQP-VK.pipeline.framebuffer_attachment.no_attachments_ms additionally
uses gl_SampleID which requires sample rate shading support.

Add checks for these features are mark test as NotSupported if
they are not present.

Affects:

dEQP-VK.pipeline.framebuffer_attachment.no_attachments
dEQP-VK.pipeline.framebuffer_attachment.no_attachments_ms

Components: Vulkan

VK-GL-CTS issue: 573

Change-Id: Iff7710287e8c5844bd85982fb532381513ad2123

external/vulkancts/modules/vulkan/pipeline/vktPipelineFramebufferAttachmentTests.cpp

index 07b329d..2ca4f3d 100644 (file)
@@ -915,6 +915,10 @@ tcu::TestStatus testNoAtt (Context& context, const bool multisample)
        const VkPhysicalDeviceFeatures          features                                = context.getDeviceFeatures();
        if (!features.fragmentStoresAndAtomics)
                throw tcu::NotSupportedError("fragmentStoresAndAtomics feature not supported");
+       if (!features.geometryShader && !features.tessellationShader) // Shader uses gl_PrimitiveID
+               throw tcu::NotSupportedError("geometryShader or tessellationShader feature not supported");
+       if (multisample && !features.sampleRateShading) // MS shader uses gl_SampleID
+               throw tcu::NotSupportedError("sampleRateShading feature not supported");
 
        const DeviceInterface&                          vk                                              = context.getDeviceInterface();
        const VkDevice                                          device                                  = context.getDevice();