Test dynamic rendering with draw tests
[platform/upstream/VK-GL-CTS.git] / external / vulkancts / modules / vulkan / draw / vktDrawIndirectTest.cpp
index b0b495a..68f2879 100644 (file)
@@ -70,16 +70,26 @@ enum DrawType
        DRAWTYPE_LAST
 };
 
+enum class IndirectCountType
+{
+       NONE,
+       BUFFER_LIMIT,
+       PARAM_LIMIT,
+
+       LAST
+};
+
 struct DrawTypedTestSpec : public TestSpecBase
 {
        DrawTypedTestSpec()
-               : testFirstInstanceNdx(false)
-               , testIndirectCountExt(false)
-       {};
-
-       DrawType        drawType;
-       bool            testFirstInstanceNdx;
-       bool            testIndirectCountExt;
+               : drawType(DRAWTYPE_LAST)
+               , testFirstInstanceNdx(false)
+               , testIndirectCountExt(IndirectCountType::NONE)
+       {}
+
+       DrawType                        drawType;
+       bool                            testFirstInstanceNdx;
+       IndirectCountType       testIndirectCountExt;
 };
 
 class IndirectDraw : public DrawTestsBaseClass
@@ -101,7 +111,7 @@ protected:
        vk::VkDeviceSize                        m_offsetInBuffer;
        deUint32                                        m_strideInBuffer;
 
-       const bool                                      m_testIndirectCountExt;
+       const IndirectCountType         m_testIndirectCountExt;
        de::SharedPtr<Buffer>           m_indirectCountBuffer;
        vk::VkDeviceSize                        m_offsetInCountBuffer;
        const deUint32                          m_indirectCountExtDrawPadding;
@@ -238,7 +248,7 @@ void IndirectDraw::setFirstInstanceVertexBuffer (void)
 }
 
 IndirectDraw::IndirectDraw (Context &context, TestSpec testSpec)
-       : DrawTestsBaseClass                            (context, testSpec.shaders[glu::SHADERTYPE_VERTEX], testSpec.shaders[glu::SHADERTYPE_FRAGMENT], testSpec.topology)
+       : DrawTestsBaseClass                            (context, testSpec.shaders[glu::SHADERTYPE_VERTEX], testSpec.shaders[glu::SHADERTYPE_FRAGMENT], testSpec.useDynamicRendering, testSpec.topology)
        , m_testIndirectCountExt                        (testSpec.testIndirectCountExt)
        , m_indirectCountExtDrawPadding         (1u)
        , m_drawType                                            (testSpec.drawType)
@@ -303,6 +313,10 @@ tcu::TestStatus IndirectDraw::iterate (void)
        const vk::VkQueue       queue   = m_context.getUniversalQueue();
        const vk::VkDevice      device  = m_context.getDevice();
 
+                                       m_drawCount                     = 2;
+                                       m_offsetInBuffer        = sizeof(m_junkData);
+       const deUint32  m_bufferDrawCount       = 2u * m_drawCount;
+
        if (m_drawType == DRAW_TYPE_SEQUENTIAL)
        {
                switch (m_topology)
@@ -328,10 +342,15 @@ tcu::TestStatus IndirectDraw::iterate (void)
                        addCommand(drawCommands[0]);
                        addCommand(drawCommands[1]);
                        addCommand(drawCommands[2]);
-                       if (m_testIndirectCountExt)
+                       addCommand(drawCommands[1]);
+                       if (m_testIndirectCountExt != IndirectCountType::NONE)
                        {
-                               addCommand(drawCommands[1]);
-                               addCommand(drawCommands[1]);
+                               // Add padding data to the buffer to make sure it's large enough.
+                               for (deUint32 i = 0; i < m_bufferDrawCount; ++i)
+                               {
+                                       addCommand(drawCommands[1]);
+                                       addCommand(drawCommands[1]);
+                               }
                        }
                        break;
                }
@@ -356,10 +375,15 @@ tcu::TestStatus IndirectDraw::iterate (void)
                        addCommand(drawCommands[0]);
                        addCommand(drawCommands[1]);
                        addCommand(drawCommands[2]);
-                       if (m_testIndirectCountExt)
+                       addCommand(drawCommands[1]);
+                       if (m_testIndirectCountExt != IndirectCountType::NONE)
                        {
-                               addCommand(drawCommands[1]);
-                               addCommand(drawCommands[1]);
+                               // Add padding data to the buffer to make sure it's large enough.
+                               for (deUint32 i = 0; i < m_bufferDrawCount; ++i)
+                               {
+                                       addCommand(drawCommands[1]);
+                                       addCommand(drawCommands[1]);
+                               }
                        }
                        break;
                }
@@ -396,10 +420,15 @@ tcu::TestStatus IndirectDraw::iterate (void)
                        addCommand(drawCommands[0]);
                        addCommand(drawCommands[1]);
                        addCommand(drawCommands[2]);
-                       if (m_testIndirectCountExt)
+                       addCommand(drawCommands[1]);
+                       if (m_testIndirectCountExt != IndirectCountType::NONE)
                        {
-                               addCommand(drawCommands[1]);
-                               addCommand(drawCommands[1]);
+                               // Add padding data to the buffer to make sure it's large enough.
+                               for (deUint32 i = 0; i < m_bufferDrawCount; ++i)
+                               {
+                                       addCommand(drawCommands[1]);
+                                       addCommand(drawCommands[1]);
+                               }
                        }
                        break;
                }
@@ -426,10 +455,15 @@ tcu::TestStatus IndirectDraw::iterate (void)
                        addCommand(drawCommands[0]);
                        addCommand(drawCommands[1]);
                        addCommand(drawCommands[2]);
-                       if (m_testIndirectCountExt)
+                       addCommand(drawCommands[1]);
+                       if (m_testIndirectCountExt != IndirectCountType::NONE)
                        {
-                               addCommand(drawCommands[1]);
-                               addCommand(drawCommands[1]);
+                               // Add padding data to the buffer to make sure it's large enough.
+                               for (deUint32 i = 0; i < m_bufferDrawCount; ++i)
+                               {
+                                       addCommand(drawCommands[1]);
+                                       addCommand(drawCommands[1]);
+                               }
                        }
                        break;
                }
@@ -440,10 +474,7 @@ tcu::TestStatus IndirectDraw::iterate (void)
                m_strideInBuffer = 2 * (deUint32)sizeof(vk::VkDrawIndexedIndirectCommand);
        }
 
-       m_drawCount                     = 2;
-       m_offsetInBuffer        = sizeof(m_junkData);
-
-       beginRenderPass();
+       beginRender();
 
        const vk::VkDeviceSize vertexBufferOffset       = 0;
        const vk::VkBuffer vertexBuffer                         = m_vertexBuffer->object();
@@ -466,7 +497,7 @@ tcu::TestStatus IndirectDraw::iterate (void)
 
        vk::flushAlloc(m_vk, m_context.getDevice(), m_indirectBuffer->getBoundMemory());
 
-       if (m_testIndirectCountExt)
+       if (m_testIndirectCountExt != IndirectCountType::NONE)
        {
                m_offsetInCountBuffer = sizeof(tcu::Vec3);
                m_indirectCountBuffer = Buffer::createAndAlloc(m_vk,
@@ -478,10 +509,11 @@ tcu::TestStatus IndirectDraw::iterate (void)
 
                deUint8* countBufferPtr = reinterpret_cast<deUint8*>(m_indirectCountBuffer->getBoundMemory().getHostPtr());
 
+               // For IndirectCountType::PARAM_LIMIT, the real limit will be set using the call parameter.
                if (m_isMultiDrawEnabled && m_drawCount <= m_drawIndirectMaxCount)
-                       *(deUint32*)(countBufferPtr + m_offsetInCountBuffer) = m_drawCount;
+                       *(deUint32*)(countBufferPtr + m_offsetInCountBuffer) = m_drawCount + (m_testIndirectCountExt == IndirectCountType::BUFFER_LIMIT ? 0u : m_indirectCountExtDrawPadding);
                else
-                       *(deUint32*)(countBufferPtr + m_offsetInCountBuffer) = 1u;
+                       *(deUint32*)(countBufferPtr + m_offsetInCountBuffer) = (m_testIndirectCountExt == IndirectCountType::BUFFER_LIMIT ? 1u : m_drawCount + m_indirectCountExtDrawPadding);
 
                vk::flushAlloc(m_vk, m_context.getDevice(), m_indirectCountBuffer->getBoundMemory());
        }
@@ -499,20 +531,26 @@ tcu::TestStatus IndirectDraw::iterate (void)
                {
                        case DRAW_TYPE_SEQUENTIAL:
                        {
-                               if (m_testIndirectCountExt)
+                               if (m_testIndirectCountExt != IndirectCountType::NONE)
+                               {
+                                       const deUint32 maxDrawCount = m_drawCount + (m_testIndirectCountExt == IndirectCountType::BUFFER_LIMIT ? m_indirectCountExtDrawPadding : 0u);
                                        m_vk.cmdDrawIndirectCount(*m_cmdBuffer, m_indirectBuffer->object(), m_offsetInBuffer,
-                                                                                         m_indirectCountBuffer->object(), m_offsetInCountBuffer, m_drawCount + m_indirectCountExtDrawPadding,
+                                                                                         m_indirectCountBuffer->object(), m_offsetInCountBuffer, maxDrawCount,
                                                                                          m_strideInBuffer);
+                               }
                                else
                                        m_vk.cmdDrawIndirect(*m_cmdBuffer, m_indirectBuffer->object(), m_offsetInBuffer, m_drawCount, m_strideInBuffer);
                                break;
                        }
                        case DRAW_TYPE_INDEXED:
                        {
-                               if (m_testIndirectCountExt)
+                               if (m_testIndirectCountExt != IndirectCountType::NONE)
+                               {
+                                       const deUint32 maxDrawCount = m_drawCount + (m_testIndirectCountExt == IndirectCountType::BUFFER_LIMIT ? m_indirectCountExtDrawPadding : 0u);
                                        m_vk.cmdDrawIndexedIndirectCount(*m_cmdBuffer, m_indirectBuffer->object(), m_offsetInBuffer,
-                                                                                                        m_indirectCountBuffer->object(), m_offsetInCountBuffer, m_drawCount + m_indirectCountExtDrawPadding,
+                                                                                                        m_indirectCountBuffer->object(), m_offsetInCountBuffer, maxDrawCount,
                                                                                                         m_strideInBuffer);
+                               }
                                else
                                        m_vk.cmdDrawIndexedIndirect(*m_cmdBuffer, m_indirectBuffer->object(), m_offsetInBuffer, m_drawCount, m_strideInBuffer);
                                break;
@@ -529,20 +567,26 @@ tcu::TestStatus IndirectDraw::iterate (void)
                        {
                                case DRAW_TYPE_SEQUENTIAL:
                                {
-                                       if (m_testIndirectCountExt)
+                                       if (m_testIndirectCountExt != IndirectCountType::NONE)
+                                       {
+                                               const deUint32 maxDrawCount = (m_testIndirectCountExt == IndirectCountType::BUFFER_LIMIT ? m_drawCount + m_indirectCountExtDrawPadding : 1u);
                                                m_vk.cmdDrawIndirectCount(*m_cmdBuffer, m_indirectBuffer->object(), m_offsetInBuffer + drawNdx*m_strideInBuffer,
-                                                                                                 m_indirectCountBuffer->object(), m_offsetInCountBuffer, m_drawCount + m_indirectCountExtDrawPadding,
+                                                                                                 m_indirectCountBuffer->object(), m_offsetInCountBuffer, maxDrawCount,
                                                                                                  m_strideInBuffer);
+                                       }
                                        else
                                                m_vk.cmdDrawIndirect(*m_cmdBuffer, m_indirectBuffer->object(), m_offsetInBuffer + drawNdx*m_strideInBuffer, 1u, 0u);
                                        break;
                                }
                                case DRAW_TYPE_INDEXED:
                                {
-                                       if (m_testIndirectCountExt)
+                                       if (m_testIndirectCountExt != IndirectCountType::NONE)
+                                       {
+                                               const deUint32 maxDrawCount = (m_testIndirectCountExt == IndirectCountType::BUFFER_LIMIT ? m_drawCount + m_indirectCountExtDrawPadding : 1u);
                                                m_vk.cmdDrawIndexedIndirectCount(*m_cmdBuffer, m_indirectBuffer->object(), m_offsetInBuffer + drawNdx*m_strideInBuffer,
-                                                                                                                m_indirectCountBuffer->object(), m_offsetInCountBuffer, m_drawCount + m_indirectCountExtDrawPadding,
+                                                                                                                m_indirectCountBuffer->object(), m_offsetInCountBuffer, maxDrawCount,
                                                                                                                 m_strideInBuffer);
+                                       }
                                        else
                                                m_vk.cmdDrawIndexedIndirect(*m_cmdBuffer, m_indirectBuffer->object(), m_offsetInBuffer + drawNdx*m_strideInBuffer, 1u, 0u);
                                        break;
@@ -552,7 +596,7 @@ tcu::TestStatus IndirectDraw::iterate (void)
                        }
                }
        }
-       endRenderPass(m_vk, *m_cmdBuffer);
+       endRender();
        endCommandBuffer(m_vk, *m_cmdBuffer);
 
        submitCommandsAndWait(m_vk, device, queue, m_cmdBuffer.get());
@@ -616,6 +660,10 @@ tcu::TestStatus IndirectDrawInstanced<FirstInstanceSupport>::iterate (void)
        const vk::VkQueue       queue   = m_context.getUniversalQueue();
        const vk::VkDevice      device  = m_context.getDevice();
 
+                                       m_drawCount                     = 2;
+                                       m_offsetInBuffer        = sizeof(m_junkData);
+       const deUint32  m_bufferDrawCount       = 2u * m_drawCount;
+
        if (m_drawType == DRAW_TYPE_SEQUENTIAL)
        {
                switch (m_topology)
@@ -641,10 +689,14 @@ tcu::TestStatus IndirectDrawInstanced<FirstInstanceSupport>::iterate (void)
                                addCommand(drawCmd[0]);
                                addCommand(drawCmd[1]);
                                addCommand(drawCmd[2]);
-                               if (m_testIndirectCountExt)
+                               if (m_testIndirectCountExt != IndirectCountType::NONE)
                                {
-                                       addCommand(drawCmd[1]);
-                                       addCommand(drawCmd[1]);
+                                       // Add padding data to the buffer to make sure it's large enough.
+                                       for (deUint32 i = 0; i < m_bufferDrawCount; ++i)
+                                       {
+                                               addCommand(drawCmd[1]);
+                                               addCommand(drawCmd[1]);
+                                       }
                                }
                                break;
                        }
@@ -669,10 +721,14 @@ tcu::TestStatus IndirectDrawInstanced<FirstInstanceSupport>::iterate (void)
                                addCommand(drawCmd[0]);
                                addCommand(drawCmd[1]);
                                addCommand(drawCmd[2]);
-                               if (m_testIndirectCountExt)
+                               if (m_testIndirectCountExt != IndirectCountType::NONE)
                                {
-                                       addCommand(drawCmd[1]);
-                                       addCommand(drawCmd[1]);
+                                       // Add padding data to the buffer to make sure it's large enough.
+                                       for (deUint32 i = 0; i < m_bufferDrawCount; ++i)
+                                       {
+                                               addCommand(drawCmd[1]);
+                                               addCommand(drawCmd[1]);
+                                       }
                                }
                                break;
                        }
@@ -710,10 +766,14 @@ tcu::TestStatus IndirectDrawInstanced<FirstInstanceSupport>::iterate (void)
                                addCommand(drawCmd[0]);
                                addCommand(drawCmd[1]);
                                addCommand(drawCmd[2]);
-                               if (m_testIndirectCountExt)
+                               if (m_testIndirectCountExt != IndirectCountType::NONE)
                                {
-                                       addCommand(drawCmd[1]);
-                                       addCommand(drawCmd[1]);
+                                       // Add padding data to the buffer to make sure it's large enough.
+                                       for (deUint32 i = 0; i < m_bufferDrawCount; ++i)
+                                       {
+                                               addCommand(drawCmd[1]);
+                                               addCommand(drawCmd[1]);
+                                       }
                                }
                                break;
                        }
@@ -740,10 +800,14 @@ tcu::TestStatus IndirectDrawInstanced<FirstInstanceSupport>::iterate (void)
                                addCommand(drawCmd[0]);
                                addCommand(drawCmd[1]);
                                addCommand(drawCmd[2]);
-                               if (m_testIndirectCountExt)
+                               if (m_testIndirectCountExt != IndirectCountType::NONE)
                                {
-                                       addCommand(drawCmd[1]);
-                                       addCommand(drawCmd[1]);
+                                       // Add padding data to the buffer to make sure it's large enough.
+                                       for (deUint32 i = 0; i < m_bufferDrawCount; ++i)
+                                       {
+                                               addCommand(drawCmd[1]);
+                                               addCommand(drawCmd[1]);
+                                       }
                                }
                                break;
                        }
@@ -755,10 +819,7 @@ tcu::TestStatus IndirectDrawInstanced<FirstInstanceSupport>::iterate (void)
                m_strideInBuffer = 2 * (deUint32)sizeof(vk::VkDrawIndexedIndirectCommand);
        }
 
-       m_drawCount                     = 2;
-       m_offsetInBuffer        = sizeof(m_junkData);
-
-       beginRenderPass();
+       beginRender();
 
        const vk::VkDeviceSize vertexBufferOffset = 0;
        const vk::VkBuffer vertexBuffer = m_vertexBuffer->object();
@@ -781,7 +842,7 @@ tcu::TestStatus IndirectDrawInstanced<FirstInstanceSupport>::iterate (void)
 
        vk::flushAlloc(m_vk, m_context.getDevice(), m_indirectBuffer->getBoundMemory());
 
-       if (m_testIndirectCountExt)
+       if (m_testIndirectCountExt != IndirectCountType::NONE)
        {
                m_offsetInCountBuffer = sizeof(tcu::Vec3);
                m_indirectCountBuffer = Buffer::createAndAlloc(m_vk,
@@ -793,8 +854,9 @@ tcu::TestStatus IndirectDrawInstanced<FirstInstanceSupport>::iterate (void)
 
                deUint8* countBufferPtr = reinterpret_cast<deUint8*>(m_indirectCountBuffer->getBoundMemory().getHostPtr());
 
+               // For IndirectCountType::PARAM_LIMIT, the real limit will be set using the call parameter.
                if (m_isMultiDrawEnabled && m_drawCount <= m_drawIndirectMaxCount)
-                       *(deUint32*)(countBufferPtr + m_offsetInCountBuffer) = m_drawCount;
+                       *(deUint32*)(countBufferPtr + m_offsetInCountBuffer) = m_drawCount + (m_testIndirectCountExt == IndirectCountType::BUFFER_LIMIT ? 0u : m_indirectCountExtDrawPadding);
                else
                        *(deUint32*)(countBufferPtr + m_offsetInCountBuffer) = 1u;
 
@@ -814,20 +876,26 @@ tcu::TestStatus IndirectDrawInstanced<FirstInstanceSupport>::iterate (void)
                {
                        case DRAW_TYPE_SEQUENTIAL:
                        {
-                               if (m_testIndirectCountExt)
+                               if (m_testIndirectCountExt != IndirectCountType::NONE)
+                               {
+                                       const deUint32 maxDrawCount = m_drawCount + (m_testIndirectCountExt == IndirectCountType::BUFFER_LIMIT ? m_indirectCountExtDrawPadding : 0u);
                                        m_vk.cmdDrawIndirectCount(*m_cmdBuffer, m_indirectBuffer->object(), m_offsetInBuffer,
                                                                                          m_indirectCountBuffer->object(), m_offsetInCountBuffer,
-                                                                                         m_drawCount + m_indirectCountExtDrawPadding, m_strideInBuffer);
+                                                                                         maxDrawCount, m_strideInBuffer);
+                               }
                                else
                                        m_vk.cmdDrawIndirect(*m_cmdBuffer, m_indirectBuffer->object(), m_offsetInBuffer, m_drawCount, m_strideInBuffer);
                                break;
                        }
                        case DRAW_TYPE_INDEXED:
                        {
-                               if (m_testIndirectCountExt)
+                               if (m_testIndirectCountExt != IndirectCountType::NONE)
+                               {
+                                       const deUint32 maxDrawCount = m_drawCount + (m_testIndirectCountExt == IndirectCountType::BUFFER_LIMIT ? m_indirectCountExtDrawPadding : 0u);
                                        m_vk.cmdDrawIndexedIndirectCount(*m_cmdBuffer, m_indirectBuffer->object(), m_offsetInBuffer,
                                                                                                         m_indirectCountBuffer->object(), m_offsetInCountBuffer,
-                                                                                                        m_drawCount + m_indirectCountExtDrawPadding, m_strideInBuffer);
+                                                                                                        maxDrawCount, m_strideInBuffer);
+                               }
                                else
                                        m_vk.cmdDrawIndexedIndirect(*m_cmdBuffer, m_indirectBuffer->object(), m_offsetInBuffer, m_drawCount, m_strideInBuffer);
                                break;
@@ -844,20 +912,26 @@ tcu::TestStatus IndirectDrawInstanced<FirstInstanceSupport>::iterate (void)
                        {
                                case DRAW_TYPE_SEQUENTIAL:
                                {
-                                       if (m_testIndirectCountExt)
+                                       if (m_testIndirectCountExt != IndirectCountType::NONE)
+                                       {
+                                               const deUint32 maxDrawCount = (m_testIndirectCountExt == IndirectCountType::BUFFER_LIMIT ? m_drawCount + m_indirectCountExtDrawPadding : 1u);
                                                m_vk.cmdDrawIndirectCount(*m_cmdBuffer, m_indirectBuffer->object(), m_offsetInBuffer + drawNdx*m_strideInBuffer,
-                                                                                                 m_indirectCountBuffer->object(), m_offsetInCountBuffer, m_drawCount + m_indirectCountExtDrawPadding,
+                                                                                                 m_indirectCountBuffer->object(), m_offsetInCountBuffer, maxDrawCount,
                                                                                                  m_strideInBuffer);
+                                       }
                                        else
                                                m_vk.cmdDrawIndirect(*m_cmdBuffer, m_indirectBuffer->object(), m_offsetInBuffer + drawNdx*m_strideInBuffer, 1u, 0u);
                                        break;
                                }
                                case DRAW_TYPE_INDEXED:
                                {
-                                       if (m_testIndirectCountExt)
+                                       if (m_testIndirectCountExt != IndirectCountType::NONE)
+                                       {
+                                               const deUint32 maxDrawCount = (m_testIndirectCountExt == IndirectCountType::BUFFER_LIMIT ? m_drawCount + m_indirectCountExtDrawPadding : 1u);
                                                m_vk.cmdDrawIndexedIndirectCount(*m_cmdBuffer, m_indirectBuffer->object(), m_offsetInBuffer + drawNdx*m_strideInBuffer,
-                                                                                                                m_indirectCountBuffer->object(), m_offsetInCountBuffer, m_drawCount + m_indirectCountExtDrawPadding,
+                                                                                                                m_indirectCountBuffer->object(), m_offsetInCountBuffer, maxDrawCount,
                                                                                                                 m_strideInBuffer);
+                                       }
                                        else
                                                m_vk.cmdDrawIndexedIndirect(*m_cmdBuffer, m_indirectBuffer->object(), m_offsetInBuffer + drawNdx*m_strideInBuffer, 1u, 0u);
                                        break;
@@ -867,7 +941,7 @@ tcu::TestStatus IndirectDrawInstanced<FirstInstanceSupport>::iterate (void)
                        }
                }
        }
-       endRenderPass(m_vk, *m_cmdBuffer);
+       endRender();
        endCommandBuffer(m_vk, *m_cmdBuffer);
 
        submitCommandsAndWait(m_vk, device, queue, m_cmdBuffer.get());
@@ -917,15 +991,20 @@ tcu::TestStatus IndirectDrawInstanced<FirstInstanceSupport>::iterate (void)
        return tcu::TestStatus(res, qpGetTestResultName(res));
 }
 
-void checkIndirectCountExt (Context& context)
+void checkSupport(Context& context, IndirectDraw::TestSpec testSpec)
 {
-       context.requireDeviceFunctionality("VK_KHR_draw_indirect_count");
+       if (testSpec.testIndirectCountExt != IndirectCountType::NONE)
+               context.requireDeviceFunctionality("VK_KHR_draw_indirect_count");
+
+       if (testSpec.useDynamicRendering)
+               context.requireDeviceFunctionality("VK_KHR_dynamic_rendering");
 }
 
 }      // anonymous
 
-IndirectDrawTests::IndirectDrawTests (tcu::TestContext& testCtx)
-       : TestCaseGroup(testCtx, "indirect_draw", "indirect drawing simple geometry")
+IndirectDrawTests::IndirectDrawTests (tcu::TestContext& testCtx, bool useDynamicRendering)
+       : TestCaseGroup                 (testCtx, "indirect_draw", "indirect drawing simple geometry")
+       , m_useDynamicRendering (useDynamicRendering)
 {
        /* Left blank on purpose */
 }
@@ -952,101 +1031,170 @@ void IndirectDrawTests::init (void)
 
                tcu::TestCaseGroup* drawTypeGroup = new tcu::TestCaseGroup(m_testCtx, drawTypeStr.c_str(), ("Draws geometry using " + drawTypeStr + "draw call").c_str());
                {
-                       tcu::TestCaseGroup* indirectDrawGroup           = new tcu::TestCaseGroup(m_testCtx, "indirect_draw", "Draws geometry");
-                       tcu::TestCaseGroup* indirectDrawCountGroup      = new tcu::TestCaseGroup(m_testCtx, "indirect_draw_count", "Draws geometry with VK_KHR_draw_indirect_count extension");
+                       tcu::TestCaseGroup* indirectDrawGroup                   = new tcu::TestCaseGroup(m_testCtx, "indirect_draw", "Draws geometry");
+                       tcu::TestCaseGroup* indirectDrawCountGroup              = new tcu::TestCaseGroup(m_testCtx, "indirect_draw_count", "Draws geometry with VK_KHR_draw_indirect_count extension");
+                       tcu::TestCaseGroup* indirectDrawParamCountGroup = new tcu::TestCaseGroup(m_testCtx, "indirect_draw_param_count", "Draws geometry with VK_KHR_draw_indirect_count extension and limit draws count with call parameter");
                        {
                                IndirectDraw::TestSpec testSpec;
                                testSpec.drawType = static_cast<DrawType>(drawTypeIdx);
+                               testSpec.useDynamicRendering = m_useDynamicRendering;
                                testSpec.shaders[glu::SHADERTYPE_VERTEX] = "vulkan/draw/VertexFetch.vert";
                                testSpec.shaders[glu::SHADERTYPE_FRAGMENT] = "vulkan/draw/VertexFetch.frag";
+
                                testSpec.topology = vk::VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST;
-                               indirectDrawGroup->addChild(new InstanceFactory<IndirectDraw>(m_testCtx, "triangle_list", "Draws triangle list", testSpec));
+                               indirectDrawGroup->addChild(new InstanceFactory<IndirectDraw, FunctionSupport1<IndirectDraw::TestSpec> >
+                                       (m_testCtx, "triangle_list", "Draws triangle list", testSpec, FunctionSupport1<IndirectDraw::TestSpec>::Args(checkSupport, testSpec)));
                                testSpec.topology = vk::VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP;
-                               indirectDrawGroup->addChild(new InstanceFactory<IndirectDraw>(m_testCtx, "triangle_strip", "Draws triangle strip", testSpec));
+                               indirectDrawGroup->addChild(new InstanceFactory<IndirectDraw, FunctionSupport1<IndirectDraw::TestSpec> >
+                                       (m_testCtx, "triangle_strip", "Draws triangle strip", testSpec, FunctionSupport1<IndirectDraw::TestSpec>::Args(checkSupport, testSpec)));
 
-                               testSpec.testIndirectCountExt = true;
+                               testSpec.testIndirectCountExt = IndirectCountType::BUFFER_LIMIT;
                                testSpec.topology = vk::VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST;
-                               indirectDrawCountGroup->addChild(new InstanceFactory<IndirectDraw, FunctionSupport0>(m_testCtx, "triangle_list", "Draws triangle list", testSpec, FunctionSupport0(checkIndirectCountExt)));
+                               indirectDrawCountGroup->addChild(new InstanceFactory<IndirectDraw, FunctionSupport1<IndirectDraw::TestSpec> >
+                                       (m_testCtx, "triangle_list", "Draws triangle list", testSpec, FunctionSupport1<IndirectDraw::TestSpec>::Args(checkSupport, testSpec)));
                                testSpec.topology = vk::VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP;
-                               indirectDrawCountGroup->addChild(new InstanceFactory<IndirectDraw, FunctionSupport0>(m_testCtx, "triangle_strip", "Draws triangle strip", testSpec, FunctionSupport0(checkIndirectCountExt)));
+                               indirectDrawCountGroup->addChild(new InstanceFactory<IndirectDraw, FunctionSupport1<IndirectDraw::TestSpec> >
+                                       (m_testCtx, "triangle_strip", "Draws triangle strip", testSpec, FunctionSupport1<IndirectDraw::TestSpec>::Args(checkSupport, testSpec)));
+
+                               testSpec.testIndirectCountExt = IndirectCountType::PARAM_LIMIT;
+                               testSpec.topology = vk::VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST;
+                               indirectDrawParamCountGroup->addChild(new InstanceFactory<IndirectDraw, FunctionSupport1<IndirectDraw::TestSpec> >
+                                       (m_testCtx, "triangle_list", "Draws triangle list", testSpec, FunctionSupport1<IndirectDraw::TestSpec>::Args(checkSupport, testSpec)));
+                               testSpec.topology = vk::VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP;
+                               indirectDrawParamCountGroup->addChild(new InstanceFactory<IndirectDraw, FunctionSupport1<IndirectDraw::TestSpec> >
+                                       (m_testCtx, "triangle_strip", "Draws triangle strip", testSpec, FunctionSupport1<IndirectDraw::TestSpec>::Args(checkSupport, testSpec)));
                        }
                        drawTypeGroup->addChild(indirectDrawGroup);
                        drawTypeGroup->addChild(indirectDrawCountGroup);
+                       drawTypeGroup->addChild(indirectDrawParamCountGroup);
 
                        {
-                               tcu::TestCaseGroup* indirectDrawFirstInstanceGroup = new tcu::TestCaseGroup(m_testCtx, "indirect_draw_first_instance", "Draws geometry with different first instance in one commandbuffer");
-                               tcu::TestCaseGroup* indirectDrawCountFirstInstanceGroup = new tcu::TestCaseGroup(m_testCtx, "indirect_draw_count_first_instance", "Draws geometry with VK_KHR_draw_indirect_count extension with different first instance in one commandbuffer using ");
+                               tcu::TestCaseGroup* indirectDrawFirstInstanceGroup                              = new tcu::TestCaseGroup(m_testCtx, "indirect_draw_first_instance", "Draws geometry with different first instance in one commandbuffer");
+                               tcu::TestCaseGroup* indirectDrawCountFirstInstanceGroup                 = new tcu::TestCaseGroup(m_testCtx, "indirect_draw_count_first_instance", "Draws geometry with VK_KHR_draw_indirect_count extension with different first instance in one commandbuffer");
+                               tcu::TestCaseGroup* indirectDrawParamCountFirstInstanceGroup    = new tcu::TestCaseGroup(m_testCtx, "indirect_draw_param_count_first_instance", "Draws geometry with VK_KHR_draw_indirect_count extension with different first instance in one commandbuffer and limit draws count with call parameter");
                                {
                                        IndirectDraw::TestSpec testSpec;
                                        testSpec.testFirstInstanceNdx = true;
                                        testSpec.drawType = static_cast<DrawType>(drawTypeIdx);
+                                       testSpec.useDynamicRendering = m_useDynamicRendering;
                                        testSpec.shaders[glu::SHADERTYPE_VERTEX] = "vulkan/draw/VertexFetchInstanceIndex.vert";
                                        testSpec.shaders[glu::SHADERTYPE_FRAGMENT] = "vulkan/draw/VertexFetch.frag";
+
                                        testSpec.topology = vk::VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST;
-                                       indirectDrawFirstInstanceGroup->addChild(new InstanceFactory<IndirectDraw>(m_testCtx, "triangle_list", "Draws triangle list", testSpec));
+                                       indirectDrawFirstInstanceGroup->addChild(new InstanceFactory<IndirectDraw, FunctionSupport1<IndirectDraw::TestSpec> >
+                                               (m_testCtx, "triangle_list", "Draws triangle list", testSpec, FunctionSupport1<IndirectDraw::TestSpec>::Args(checkSupport, testSpec)));
                                        testSpec.topology = vk::VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP;
-                                       indirectDrawFirstInstanceGroup->addChild(new InstanceFactory<IndirectDraw>(m_testCtx, "triangle_strip", "Draws triangle strip", testSpec));
+                                       indirectDrawFirstInstanceGroup->addChild(new InstanceFactory<IndirectDraw, FunctionSupport1<IndirectDraw::TestSpec> >
+                                               (m_testCtx, "triangle_strip", "Draws triangle strip", testSpec, FunctionSupport1<IndirectDraw::TestSpec>::Args(checkSupport, testSpec)));
 
-                                       testSpec.testIndirectCountExt = true;
+                                       testSpec.testIndirectCountExt = IndirectCountType::BUFFER_LIMIT;
                                        testSpec.topology = vk::VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST;
-                                       indirectDrawCountFirstInstanceGroup->addChild(new InstanceFactory<IndirectDraw, FunctionSupport0>(m_testCtx, "triangle_list", "Draws triangle list", testSpec, FunctionSupport0(checkIndirectCountExt)));
+                                       indirectDrawCountFirstInstanceGroup->addChild(new InstanceFactory<IndirectDraw, FunctionSupport1<IndirectDraw::TestSpec> >
+                                               (m_testCtx, "triangle_list", "Draws triangle list", testSpec, FunctionSupport1<IndirectDraw::TestSpec>::Args(checkSupport, testSpec)));
                                        testSpec.topology = vk::VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP;
-                                       indirectDrawCountFirstInstanceGroup->addChild(new InstanceFactory<IndirectDraw, FunctionSupport0>(m_testCtx, "triangle_strip", "Draws triangle strip", testSpec, FunctionSupport0(checkIndirectCountExt)));
+                                       indirectDrawCountFirstInstanceGroup->addChild(new InstanceFactory<IndirectDraw, FunctionSupport1<IndirectDraw::TestSpec> >
+                                               (m_testCtx, "triangle_strip", "Draws triangle strip", testSpec, FunctionSupport1<IndirectDraw::TestSpec>::Args(checkSupport, testSpec)));
+
+                                       testSpec.testIndirectCountExt = IndirectCountType::PARAM_LIMIT;
+                                       testSpec.topology = vk::VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST;
+                                       indirectDrawParamCountFirstInstanceGroup->addChild(new InstanceFactory<IndirectDraw, FunctionSupport1<IndirectDraw::TestSpec> >
+                                               (m_testCtx, "triangle_list", "Draws triangle list", testSpec, FunctionSupport1<IndirectDraw::TestSpec>::Args(checkSupport, testSpec)));
+                                       testSpec.topology = vk::VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP;
+                                       indirectDrawParamCountFirstInstanceGroup->addChild(new InstanceFactory<IndirectDraw, FunctionSupport1<IndirectDraw::TestSpec> >
+                                               (m_testCtx, "triangle_strip", "Draws triangle strip", testSpec, FunctionSupport1<IndirectDraw::TestSpec>::Args(checkSupport, testSpec)));
                                }
                                drawTypeGroup->addChild(indirectDrawFirstInstanceGroup);
                                drawTypeGroup->addChild(indirectDrawCountFirstInstanceGroup);
+                               drawTypeGroup->addChild(indirectDrawParamCountFirstInstanceGroup);
                        }
 
-                       tcu::TestCaseGroup* indirectDrawInstancedGroup          = new tcu::TestCaseGroup(m_testCtx, "indirect_draw_instanced", "Draws an instanced geometry");
-                       tcu::TestCaseGroup* indirectDrawCountInstancedGroup     = new tcu::TestCaseGroup(m_testCtx, "indirect_draw_count_instanced", "Draws an instanced geometry with VK_KHR_draw_indirect_count extension");
+                       tcu::TestCaseGroup* indirectDrawInstancedGroup                          = new tcu::TestCaseGroup(m_testCtx, "indirect_draw_instanced", "Draws an instanced geometry");
+                       tcu::TestCaseGroup* indirectDrawCountInstancedGroup                     = new tcu::TestCaseGroup(m_testCtx, "indirect_draw_count_instanced", "Draws an instanced geometry with VK_KHR_draw_indirect_count extension");
+                       tcu::TestCaseGroup* indirectDrawParamCountInstancedGroup        = new tcu::TestCaseGroup(m_testCtx, "indirect_draw_param_count_instanced", "Draws an instanced geometry with VK_KHR_draw_indirect_count extension and limit draws count with call parameter");
                        {
-                               tcu::TestCaseGroup*     indirectDrawNoFirstInstanceGroup                = new tcu::TestCaseGroup(m_testCtx, "no_first_instance", "Use 0 as firstInstance");
-                               tcu::TestCaseGroup*     indirectDrawCountNoFirstInstanceGroup   = new tcu::TestCaseGroup(m_testCtx, "no_first_instance", "Use 0 as firstInstance");
+                               tcu::TestCaseGroup*     indirectDrawNoFirstInstanceGroup                        = new tcu::TestCaseGroup(m_testCtx, "no_first_instance", "Use 0 as firstInstance");
+                               tcu::TestCaseGroup*     indirectDrawCountNoFirstInstanceGroup           = new tcu::TestCaseGroup(m_testCtx, "no_first_instance", "Use 0 as firstInstance");
+                               tcu::TestCaseGroup*     indirectDrawParamCountNoFirstInstanceGroup      = new tcu::TestCaseGroup(m_testCtx, "no_first_instance", "Use 0 as firstInstance");
                                {
-                                       IndirectDrawInstanced<FirstInstanceNotSupported>::TestSpec testSpec;
+                                       typedef IndirectDrawInstanced<FirstInstanceNotSupported> IDFirstInstanceNotSupported;
+
+                                       IDFirstInstanceNotSupported::TestSpec testSpec;
                                        testSpec.drawType = static_cast<DrawType>(drawTypeIdx);
+                                       testSpec.useDynamicRendering = m_useDynamicRendering;
 
                                        testSpec.shaders[glu::SHADERTYPE_VERTEX] = "vulkan/draw/VertexFetchInstanced.vert";
                                        testSpec.shaders[glu::SHADERTYPE_FRAGMENT] = "vulkan/draw/VertexFetch.frag";
 
                                        testSpec.topology = vk::VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST;
-                                       indirectDrawNoFirstInstanceGroup->addChild(new InstanceFactory<IndirectDrawInstanced<FirstInstanceNotSupported> >(m_testCtx, "triangle_list", "Draws an instanced triangle list", testSpec));
+                                       indirectDrawNoFirstInstanceGroup->addChild(new InstanceFactory<IDFirstInstanceNotSupported, FunctionSupport1<IDFirstInstanceNotSupported::TestSpec> >
+                                               (m_testCtx, "triangle_list", "Draws an instanced triangle list", testSpec, FunctionSupport1<IDFirstInstanceNotSupported::TestSpec>::Args(checkSupport, testSpec)));
                                        testSpec.topology = vk::VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP;
-                                       indirectDrawNoFirstInstanceGroup->addChild(new InstanceFactory<IndirectDrawInstanced<FirstInstanceNotSupported> >(m_testCtx, "triangle_strip", "Draws an instanced triangle strip", testSpec));
-                                       testSpec.testIndirectCountExt = true;
+                                       indirectDrawNoFirstInstanceGroup->addChild(new InstanceFactory<IDFirstInstanceNotSupported, FunctionSupport1<IDFirstInstanceNotSupported::TestSpec> >
+                                               (m_testCtx, "triangle_strip", "Draws an instanced triangle strip", testSpec, FunctionSupport1<IDFirstInstanceNotSupported::TestSpec>::Args(checkSupport, testSpec)));
+
+                                       testSpec.testIndirectCountExt = IndirectCountType::BUFFER_LIMIT;
+                                       testSpec.topology = vk::VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST;
+                                       indirectDrawCountNoFirstInstanceGroup->addChild(new InstanceFactory<IDFirstInstanceNotSupported, FunctionSupport1<IDFirstInstanceNotSupported::TestSpec> >
+                                               (m_testCtx, "triangle_list", "Draws an instanced triangle list", testSpec, FunctionSupport1<IDFirstInstanceNotSupported::TestSpec>::Args(checkSupport, testSpec)));
+                                       testSpec.topology = vk::VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP;
+                                       indirectDrawCountNoFirstInstanceGroup->addChild(new InstanceFactory<IDFirstInstanceNotSupported, FunctionSupport1<IDFirstInstanceNotSupported::TestSpec> >
+                                               (m_testCtx, "triangle_strip", "Draws an instanced triangle strip", testSpec, FunctionSupport1<IDFirstInstanceNotSupported::TestSpec>::Args(checkSupport, testSpec)));
+
+                                       testSpec.testIndirectCountExt = IndirectCountType::PARAM_LIMIT;
                                        testSpec.topology = vk::VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST;
-                                       indirectDrawCountNoFirstInstanceGroup->addChild(new InstanceFactory<IndirectDrawInstanced<FirstInstanceNotSupported>, FunctionSupport0>(m_testCtx, "triangle_list", "Draws an instanced triangle list", testSpec, FunctionSupport0(checkIndirectCountExt)));
+                                       indirectDrawParamCountNoFirstInstanceGroup->addChild(new InstanceFactory<IDFirstInstanceNotSupported, FunctionSupport1<IDFirstInstanceNotSupported::TestSpec> >
+                                               (m_testCtx, "triangle_list", "Draws an instanced triangle list", testSpec, FunctionSupport1<IDFirstInstanceNotSupported::TestSpec>::Args(checkSupport, testSpec)));
                                        testSpec.topology = vk::VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP;
-                                       indirectDrawCountNoFirstInstanceGroup->addChild(new InstanceFactory<IndirectDrawInstanced<FirstInstanceNotSupported>, FunctionSupport0>(m_testCtx, "triangle_strip", "Draws an instanced triangle strip", testSpec, FunctionSupport0(checkIndirectCountExt)));
+                                       indirectDrawParamCountNoFirstInstanceGroup->addChild(new InstanceFactory<IDFirstInstanceNotSupported, FunctionSupport1<IDFirstInstanceNotSupported::TestSpec> >
+                                               (m_testCtx, "triangle_strip", "Draws an instanced triangle strip", testSpec, FunctionSupport1<IDFirstInstanceNotSupported::TestSpec>::Args(checkSupport, testSpec)));
                                }
                                indirectDrawInstancedGroup->addChild(indirectDrawNoFirstInstanceGroup);
                                indirectDrawCountInstancedGroup->addChild(indirectDrawCountNoFirstInstanceGroup);
+                               indirectDrawParamCountInstancedGroup->addChild(indirectDrawParamCountNoFirstInstanceGroup);
 
-                               tcu::TestCaseGroup*     indirectDrawFirstInstanceGroup          = new tcu::TestCaseGroup(m_testCtx, "first_instance", "Use drawIndirectFirstInstance optional feature");
-                               tcu::TestCaseGroup*     indirectDrawCountFirstInstanceGroup     = new tcu::TestCaseGroup(m_testCtx, "first_instance", "Use drawIndirectFirstInstance optional feature");
+                               tcu::TestCaseGroup*     indirectDrawFirstInstanceGroup                          = new tcu::TestCaseGroup(m_testCtx, "first_instance", "Use drawIndirectFirstInstance optional feature");
+                               tcu::TestCaseGroup*     indirectDrawCountFirstInstanceGroup                     = new tcu::TestCaseGroup(m_testCtx, "first_instance", "Use drawIndirectFirstInstance optional feature");
+                               tcu::TestCaseGroup*     indirectDrawParamCountFirstInstanceGroup        = new tcu::TestCaseGroup(m_testCtx, "first_instance", "Use drawIndirectFirstInstance optional feature");
                                {
-                                       IndirectDrawInstanced<FirstInstanceSupported>::TestSpec testSpec;
+                                       typedef IndirectDrawInstanced<FirstInstanceSupported> IDFirstInstanceSupported;
+
+                                       IDFirstInstanceSupported::TestSpec testSpec;
                                        testSpec.drawType = static_cast<DrawType>(drawTypeIdx);
+                                       testSpec.useDynamicRendering = m_useDynamicRendering;
 
                                        testSpec.shaders[glu::SHADERTYPE_VERTEX] = "vulkan/draw/VertexFetchInstancedFirstInstance.vert";
                                        testSpec.shaders[glu::SHADERTYPE_FRAGMENT] = "vulkan/draw/VertexFetch.frag";
 
                                        testSpec.topology = vk::VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST;
-                                       indirectDrawFirstInstanceGroup->addChild(new InstanceFactory<IndirectDrawInstanced<FirstInstanceSupported> >(m_testCtx, "triangle_list", "Draws an instanced triangle list", testSpec));
+                                       indirectDrawFirstInstanceGroup->addChild(new InstanceFactory<IDFirstInstanceSupported, FunctionSupport1<IDFirstInstanceSupported::TestSpec> >
+                                               (m_testCtx, "triangle_list", "Draws an instanced triangle list", testSpec, FunctionSupport1<IDFirstInstanceSupported::TestSpec>::Args(checkSupport, testSpec)));
+                                       testSpec.topology = vk::VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP;
+                                       indirectDrawFirstInstanceGroup->addChild(new InstanceFactory<IDFirstInstanceSupported, FunctionSupport1<IDFirstInstanceSupported::TestSpec> >
+                                               (m_testCtx, "triangle_strip", "Draws an instanced triangle strip", testSpec, FunctionSupport1<IDFirstInstanceSupported::TestSpec>::Args(checkSupport, testSpec)));
+
+                                       testSpec.testIndirectCountExt = IndirectCountType::BUFFER_LIMIT;
+                                       testSpec.topology = vk::VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST;
+                                       indirectDrawCountFirstInstanceGroup->addChild(new InstanceFactory<IDFirstInstanceSupported, FunctionSupport1<IDFirstInstanceSupported::TestSpec> >
+                                               (m_testCtx, "triangle_list", "Draws an instanced triangle list", testSpec, FunctionSupport1<IDFirstInstanceSupported::TestSpec>::Args(checkSupport, testSpec)));
                                        testSpec.topology = vk::VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP;
-                                       indirectDrawFirstInstanceGroup->addChild(new InstanceFactory<IndirectDrawInstanced<FirstInstanceSupported> >(m_testCtx, "triangle_strip", "Draws an instanced triangle strip", testSpec));
+                                       indirectDrawCountFirstInstanceGroup->addChild(new InstanceFactory<IDFirstInstanceSupported, FunctionSupport1<IDFirstInstanceSupported::TestSpec> >
+                                               (m_testCtx, "triangle_strip", "Draws an instanced triangle strip", testSpec, FunctionSupport1<IDFirstInstanceSupported::TestSpec>::Args(checkSupport, testSpec)));
 
-                                       testSpec.testIndirectCountExt = true;
+                                       testSpec.testIndirectCountExt = IndirectCountType::PARAM_LIMIT;
                                        testSpec.topology = vk::VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST;
-                                       indirectDrawCountFirstInstanceGroup->addChild(new InstanceFactory<IndirectDrawInstanced<FirstInstanceSupported>, FunctionSupport0>(m_testCtx, "triangle_list", "Draws an instanced triangle list", testSpec, FunctionSupport0(checkIndirectCountExt)));
+                                       indirectDrawParamCountFirstInstanceGroup->addChild(new InstanceFactory<IDFirstInstanceSupported, FunctionSupport1<IDFirstInstanceSupported::TestSpec> >
+                                               (m_testCtx, "triangle_list", "Draws an instanced triangle list", testSpec, FunctionSupport1<IDFirstInstanceSupported::TestSpec>::Args(checkSupport, testSpec)));
                                        testSpec.topology = vk::VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP;
-                                       indirectDrawCountFirstInstanceGroup->addChild(new InstanceFactory<IndirectDrawInstanced<FirstInstanceSupported>, FunctionSupport0>(m_testCtx, "triangle_strip", "Draws an instanced triangle strip", testSpec, FunctionSupport0(checkIndirectCountExt)));
+                                       indirectDrawParamCountFirstInstanceGroup->addChild(new InstanceFactory<IDFirstInstanceSupported, FunctionSupport1<IDFirstInstanceSupported::TestSpec> >
+                                               (m_testCtx, "triangle_strip", "Draws an instanced triangle strip", testSpec, FunctionSupport1<IDFirstInstanceSupported::TestSpec>::Args(checkSupport, testSpec)));
                                }
                                indirectDrawInstancedGroup->addChild(indirectDrawFirstInstanceGroup);
                                indirectDrawCountInstancedGroup->addChild(indirectDrawCountFirstInstanceGroup);
+                               indirectDrawParamCountInstancedGroup->addChild(indirectDrawParamCountFirstInstanceGroup);
                        }
                        drawTypeGroup->addChild(indirectDrawInstancedGroup);
                        drawTypeGroup->addChild(indirectDrawCountInstancedGroup);
+                       drawTypeGroup->addChild(indirectDrawParamCountInstancedGroup);
                }
 
                addChild(drawTypeGroup);