Add checking drawIndirectCount in conditional rendering tests.
authorHyunjun Ko <zzoon@igalia.com>
Fri, 30 Sep 2022 01:02:25 +0000 (10:02 +0900)
committerMatthew Netsch <quic_mnetsch@quicinc.com>
Thu, 6 Oct 2022 15:46:44 +0000 (15:46 +0000)
Affects:
dEQP-VK.conditional_rendering.*_indirect_count

Components: Vulkan

VK-GL-CTS issue: 4012

Change-Id: Iad77cebba4a84833f7733a2f8041285623a000bc

external/vulkancts/modules/vulkan/conditional_rendering/vktConditionalDrawTests.cpp

index e84d114..81cdef5 100644 (file)
@@ -110,6 +110,12 @@ protected:
        de::SharedPtr<Draw::Buffer>             m_indirectCountBuffer;
 };
 
+void checkSupport(Context& context, DrawCommandType command)
+{
+       if (command == DRAW_COMMAND_TYPE_DRAW_INDIRECT_COUNT || command == DRAW_COMMAND_TYPE_DRAW_INDEXED_INDIRECT_COUNT)
+               context.requireDeviceFunctionality("VK_KHR_draw_indirect_count");
+}
+
 ConditionalDraw::ConditionalDraw (Context &context, ConditionalTestSpec testSpec)
        : Draw::DrawTestsBaseClass(context, testSpec.shaders[glu::SHADERTYPE_VERTEX], testSpec.shaders[glu::SHADERTYPE_FRAGMENT], vk::VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST)
        , m_command(testSpec.command)
@@ -117,6 +123,7 @@ ConditionalDraw::ConditionalDraw (Context &context, ConditionalTestSpec testSpec
        , m_conditionalData(testSpec.conditionalData)
 {
        checkConditionalRenderingCapabilities(context, m_conditionalData);
+       checkSupport(context, m_command);
 
        const float minX = -0.3f;
        const float maxX = 0.3f;