Check GS support before testing adjacent primitives
authorYanjun Zhang <yanjun.zhang@verisilicon.com>
Wed, 10 Jan 2018 00:12:47 +0000 (16:12 -0800)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Fri, 19 Jan 2018 08:17:43 +0000 (03:17 -0500)
Affects: dEQP-VK.draw.basic_draw.draw.*

Components: Vulkan

VK-GL-CTS issue: 926

Change-Id: I02569b1944eed52f641966f9206d44983d1ff165

external/vulkancts/modules/vulkan/draw/vktBasicDrawTests.cpp

index 65f80a08e09aed7fce52775b8b3c76690fece0e2..e59d45e7214322c6ab07c597b4b398863e42e805 100644 (file)
@@ -319,6 +319,18 @@ void DrawTestInstanceBase::initialize (const DrawParamsBase& data)
        const vk::VkDevice      device                          = m_context.getDevice();
        const deUint32          queueFamilyIndex        = m_context.getUniversalQueueFamilyIndex();
 
+       const vk::VkPhysicalDeviceFeatures features = m_context.getDeviceFeatures();
+
+       if (features.geometryShader == VK_FALSE &&
+               (m_data.topology == vk::VK_PRIMITIVE_TOPOLOGY_LINE_LIST_WITH_ADJACENCY ||
+                m_data.topology == vk::VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY ||
+                m_data.topology == vk::VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY ||
+                m_data.topology == vk::VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY)
+               )
+       {
+               TCU_THROW(NotSupportedError, "Geometry Not Supported");
+       }
+
        const PipelineLayoutCreateInfo pipelineLayoutCreateInfo;
        m_pipelineLayout                                                = vk::createPipelineLayout(m_vk, device, &pipelineLayoutCreateInfo);