• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*------------------------------------------------------------------------
2  * Vulkan Conformance Tests
3  * ------------------------
4  *
5  * Copyright (c) 2015 The Khronos Group Inc.
6  * Copyright (c) 2015 Intel Corporation
7  *
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
11  *
12  *      http://www.apache.org/licenses/LICENSE-2.0
13  *
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.
19  *
20  *//*!
21  * \file
22  * \brief Dynamic State Tests
23  *//*--------------------------------------------------------------------*/
24 
25 #include "vktDynamicStateTests.hpp"
26 
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 "vktDynamicStateClearTests.hpp"
35 #include "vktDynamicStateDiscardTests.hpp"
36 #include "vktTestGroupUtil.hpp"
37 
38 namespace vkt
39 {
40 namespace DynamicState
41 {
42 
43 namespace
44 {
45 
createChildren(tcu::TestCaseGroup * group,vk::PipelineConstructionType pipelineConstructionType)46 void createChildren (tcu::TestCaseGroup* group, vk::PipelineConstructionType pipelineConstructionType)
47 {
48 	tcu::TestContext&	testCtx		= group->getTestContext();
49 
50 	group->addChild(new DynamicStateVPTests				(testCtx, pipelineConstructionType));
51 	group->addChild(new DynamicStateRSTests				(testCtx, pipelineConstructionType));
52 	group->addChild(new DynamicStateCBTests				(testCtx, pipelineConstructionType));
53 	group->addChild(new DynamicStateDSTests				(testCtx, pipelineConstructionType));
54 	group->addChild(new DynamicStateGeneralTests		(testCtx, pipelineConstructionType));
55 	group->addChild(new DynamicStateInheritanceTests	(testCtx, pipelineConstructionType));
56 	group->addChild(new DynamicStateClearTests			(testCtx, pipelineConstructionType));
57 	group->addChild(new DynamicStateDiscardTests		(testCtx, pipelineConstructionType));
58 
59 	if (pipelineConstructionType == vk::PIPELINE_CONSTRUCTION_TYPE_MONOLITHIC)
60 		group->addChild(createDynamicStateComputeTests	(testCtx));
61 }
62 
cleanupGroup(tcu::TestCaseGroup *,vk::PipelineConstructionType)63 static void cleanupGroup(tcu::TestCaseGroup*, vk::PipelineConstructionType)
64 {
65 	// Destroy singleton objects.
66 	cleanupDevice();
67 }
68 
69 } // anonymous
70 
createTests(tcu::TestContext & testCtx)71 tcu::TestCaseGroup* createTests (tcu::TestContext& testCtx)
72 {
73 	de::MovePtr<tcu::TestCaseGroup> monolithicGroup			(createTestGroup(testCtx, "monolithic",				"Monolithic pipeline tests",					createChildren, vk::PIPELINE_CONSTRUCTION_TYPE_MONOLITHIC, cleanupGroup));
74 	de::MovePtr<tcu::TestCaseGroup> pipelineLibraryGroup	(createTestGroup(testCtx, "pipeline_library",		"Graphics pipeline library tests",				createChildren, vk::PIPELINE_CONSTRUCTION_TYPE_LINK_TIME_OPTIMIZED_LIBRARY, cleanupGroup));
75 	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));
76 
77 	de::MovePtr<tcu::TestCaseGroup> mainGroup(new tcu::TestCaseGroup(testCtx, "dynamic_state", "Dynamic State Tests"));
78 	mainGroup->addChild(monolithicGroup.release());
79 	mainGroup->addChild(pipelineLibraryGroup.release());
80 	mainGroup->addChild(fastLinkedLibraryGroup.release());
81 	return mainGroup.release();
82 }
83 
84 } // DynamicState
85 } // vkt
86