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>
Sat, 29 Jan 2022 17:19:26 +0000 (17:19 +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 cfd53eb..6e1e0ec 100644 (file)
@@ -424,8 +424,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);
        createAttachmentRateTests(testCtx, group, useDynamicRendering);
 
@@ -444,11 +445,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());