1 /*------------------------------------------------------------------------
2 * Vulkan Conformance Tests
3 * ------------------------
5 * Copyright (c) 2015 The Khronos Group Inc.
6 * Copyright (c) 2015 Intel Corporation
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
22 * \brief Dynamic State Tests
23 *//*--------------------------------------------------------------------*/
25 #include "vktDynamicStateTests.hpp"
27 #include "vktDynamicStateVPTests.hpp"
28 #include "vktDynamicStateRSTests.hpp"
29 #include "vktDynamicStateCBTests.hpp"
30 #include "vktDynamicStateDSTests.hpp"
31 #include "vktDynamicStateGeneralTests.hpp"
32 #include "vktDynamicStateComputeTests.hpp"
33 #include "vktDynamicStateInheritanceTests.hpp"
34 #include "vktTestGroupUtil.hpp"
38 namespace DynamicState
44 void createChildren (tcu::TestCaseGroup* group, vk::PipelineConstructionType pipelineConstructionType)
46 tcu::TestContext& testCtx = group->getTestContext();
48 group->addChild(new DynamicStateVPTests (testCtx, pipelineConstructionType));
49 group->addChild(new DynamicStateRSTests (testCtx, pipelineConstructionType));
50 group->addChild(new DynamicStateCBTests (testCtx, pipelineConstructionType));
51 group->addChild(new DynamicStateDSTests (testCtx, pipelineConstructionType));
52 group->addChild(new DynamicStateGeneralTests (testCtx, pipelineConstructionType));
53 group->addChild(new DynamicStateInheritanceTests (testCtx, pipelineConstructionType));
55 if (pipelineConstructionType == vk::PIPELINE_CONSTRUCTION_TYPE_MONOLITHIC)
56 group->addChild(createDynamicStateComputeTests (testCtx));
59 static void cleanupGroup(tcu::TestCaseGroup*, vk::PipelineConstructionType)
61 // Destroy singleton objects.
67 tcu::TestCaseGroup* createTests (tcu::TestContext& testCtx)
69 de::MovePtr<tcu::TestCaseGroup> monolithicGroup (createTestGroup(testCtx, "monolithic", "Monolithic pipeline tests", createChildren, vk::PIPELINE_CONSTRUCTION_TYPE_MONOLITHIC, cleanupGroup));
70 de::MovePtr<tcu::TestCaseGroup> pipelineLibraryGroup (createTestGroup(testCtx, "pipeline_library", "Graphics pipeline library tests", createChildren, vk::PIPELINE_CONSTRUCTION_TYPE_LINK_TIME_OPTIMIZED_LIBRARY, cleanupGroup));
71 de::MovePtr<tcu::TestCaseGroup> fastLinkedLibraryGroup (createTestGroup(testCtx, "fast_linked_library", "Fast linked graphics pipeline library tests", createChildren, vk::PIPELINE_CONSTRUCTION_TYPE_FAST_LINKED_LIBRARY, cleanupGroup));
73 de::MovePtr<tcu::TestCaseGroup> mainGroup(new tcu::TestCaseGroup(testCtx, "dynamic_state", "Dynamic State Tests"));
74 mainGroup->addChild(monolithicGroup.release());
75 mainGroup->addChild(pipelineLibraryGroup.release());
76 mainGroup->addChild(fastLinkedLibraryGroup.release());
77 return mainGroup.release();