Delay initializing fragment_shading_rate tests
authorSean Risser <srisser@google.com>
Thu, 20 Jan 2022 08:35:37 +0000 (03:35 -0500)
committerMatthew Netsch <quic_mnetsch@quicinc.com>
Fri, 4 Feb 2022 15:34:21 +0000 (15:34 +0000)
When the shading rate tests were renamed, they turned a delayed call
to createChildren into an immediate call. For partial test-suite runs,
this can significantly impact run times.

Components: Vulkan

VK-GL_CTS Issue: 3460

Affects:
dEQP-VK.fragment_shading_rate.*

Change-Id: Ie2bb7a7690b2650006da888433397dae9a5ff7cf

external/vulkancts/modules/vulkan/fragment_shading_rate/vktFragmentShadingRateTests.cpp

index ef95728..2fa4240 100644 (file)
@@ -423,8 +423,9 @@ void createMiscTests(tcu::TestContext& testCtx, tcu::TestCaseGroup* parentGroup)
        parentGroup->addChild(group.release());
 }
 
-void createChildren (tcu::TestContext& testCtx, tcu::TestCaseGroup* group, bool useDynamicRendering)
+void createChildren (tcu::TestCaseGroup* group, bool useDynamicRendering)
 {
+       tcu::TestContext&       testCtx         = group->getTestContext();
        createBasicTests(testCtx, group, useDynamicRendering);
 
        if (!useDynamicRendering)
@@ -442,11 +443,8 @@ void createChildren (tcu::TestContext& testCtx, tcu::TestCaseGroup* group, bool
 tcu::TestCaseGroup* createTests (tcu::TestContext& testCtx)
 {
        de::MovePtr<tcu::TestCaseGroup> mainGroup                               (new tcu::TestCaseGroup(testCtx, "fragment_shading_rate", "Fragment shading rate tests"));
-       de::MovePtr<tcu::TestCaseGroup> renderpass2Group                (new tcu::TestCaseGroup(testCtx, "renderpass2", "Draw using render pass object"));
-       de::MovePtr<tcu::TestCaseGroup> dynamicRenderingGroup   (new tcu::TestCaseGroup(testCtx, "dynamic_rendering", "Draw using VK_KHR_dynamic_rendering"));
-
-       createChildren(testCtx, renderpass2Group.get(), false);
-       createChildren(testCtx, dynamicRenderingGroup.get(), true);
+       de::MovePtr<tcu::TestCaseGroup> renderpass2Group                (createTestGroup(testCtx, "renderpass2", "Draw using render pass object", createChildren, false));
+       de::MovePtr<tcu::TestCaseGroup> dynamicRenderingGroup   (createTestGroup(testCtx, "dynamic_rendering", "Draw using VK_KHR_dynamic_rendering", createChildren, true));
 
        mainGroup->addChild(renderpass2Group.release());
        mainGroup->addChild(dynamicRenderingGroup.release());