1 /*-------------------------------------------------------------------------
2  * Vulkan Conformance Tests
3  * ------------------------
4  *
5  * Copyright (c) 2015 Google Inc.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  *//*!
20  * \file
21  * \brief API Tests
22  *//*--------------------------------------------------------------------*/
23 
24 #include "vktApiTests.hpp"
25 
26 #include "vktTestGroupUtil.hpp"
27 #include "vktApiDeviceInitializationTests.hpp"
28 #include "vktApiDriverPropertiesTests.hpp"
29 #include "vktApiObjectManagementTests.hpp"
30 #include "vktApiBufferTests.hpp"
31 #include "vktApiBufferViewCreateTests.hpp"
32 #include "vktApiBufferViewAccessTests.hpp"
33 #include "vktApiFeatureInfo.hpp"
34 #include "vktApiCommandBuffersTests.hpp"
35 #include "vktApiCopiesAndBlittingTests.hpp"
36 #include "vktApiImageClearingTests.hpp"
37 #include "vktApiFillBufferTests.hpp"
38 #include "vktApiDescriptorPoolTests.hpp"
39 #include "vktApiNullHandleTests.hpp"
40 #include "vktApiGranularityTests.hpp"
41 #include "vktApiGetMemoryCommitment.hpp"
42 #include "vktApiVersionCheck.hpp"
43 #include "vktApiMaintenance3Check.hpp"
44 #include "vktApiDescriptorSetTests.hpp"
45 #include "vktApiPipelineTests.hpp"
46 #include "vktApiMemoryRequirementInvarianceTests.hpp"
47 #include "vktApiBufferMemoryRequirementsTests.hpp"
48 
49 #ifndef CTS_USES_VULKANSC
50 #include "vktApiSmokeTests.hpp"
51 #include "vktApiBufferMarkerTests.hpp"
52 #include "vktApiDeviceDrmPropertiesTests.hpp"
53 #include "vktApiExternalMemoryTests.hpp"
54 #include "vktApiToolingInfoTests.hpp"
55 #include "vktApiFormatPropertiesExtendedKHRtests.hpp"
56 #include "vktApiImageCompressionControlTests.hpp"
57 #endif // CTS_USES_VULKANSC
58 
59 namespace vkt
60 {
61 namespace api
62 {
63 
64 namespace
65 {
66 
createBufferViewTests(tcu::TestCaseGroup* bufferViewTests)67 void createBufferViewTests (tcu::TestCaseGroup* bufferViewTests)
68 {
69 	tcu::TestContext&	testCtx		= bufferViewTests->getTestContext();
70 
71 	bufferViewTests->addChild(createBufferViewCreateTests	(testCtx));
72 	bufferViewTests->addChild(createBufferViewAccessTests	(testCtx));
73 }
74 
createApiTests(tcu::TestCaseGroup* apiTests)75 void createApiTests (tcu::TestCaseGroup* apiTests)
76 {
77 	tcu::TestContext&	testCtx		= apiTests->getTestContext();
78 
79 	apiTests->addChild(createVersionSanityCheckTests			(testCtx));
80 	apiTests->addChild(createDriverPropertiesTests				(testCtx));
81 #ifndef CTS_USES_VULKANSC
82 	apiTests->addChild(createSmokeTests							(testCtx));
83 #endif // CTS_USES_VULKANSC
84 	apiTests->addChild(api::createFeatureInfoTests				(testCtx));
85 #ifndef CTS_USES_VULKANSC
86 	apiTests->addChild(createDeviceDrmPropertiesTests			(testCtx));
87 #endif // CTS_USES_VULKANSC
88 	apiTests->addChild(createDeviceInitializationTests			(testCtx));
89 	apiTests->addChild(createObjectManagementTests				(testCtx));
90 	apiTests->addChild(createBufferTests						(testCtx));
91 #ifndef CTS_USES_VULKANSC
92 	apiTests->addChild(createBufferMarkerTests					(testCtx));
93 #endif // CTS_USES_VULKANSC
94 	apiTests->addChild(createTestGroup							(testCtx, "buffer_view",	"BufferView tests",		createBufferViewTests));
95 	apiTests->addChild(createCommandBuffersTests				(testCtx));
96 	apiTests->addChild(createCopiesAndBlittingTests				(testCtx));
97 	apiTests->addChild(createImageClearingTests					(testCtx));
98 	apiTests->addChild(createFillAndUpdateBufferTests			(testCtx));
99 	apiTests->addChild(createDescriptorPoolTests				(testCtx));
100 	apiTests->addChild(createNullHandleTests					(testCtx));
101 	apiTests->addChild(createGranularityQueryTests				(testCtx));
102 	apiTests->addChild(createMemoryCommitmentTests				(testCtx));
103 #ifndef CTS_USES_VULKANSC
104 	apiTests->addChild(createExternalMemoryTests				(testCtx));
105 #endif // CTS_USES_VULKANSC
106 	apiTests->addChild(createMaintenance3Tests					(testCtx));
107 	apiTests->addChild(createDescriptorSetTests					(testCtx));
108 	apiTests->addChild(createPipelineTests						(testCtx));
109 	apiTests->addChild(createMemoryRequirementInvarianceTests	(testCtx));
110 #ifndef CTS_USES_VULKANSC
111 	apiTests->addChild(createToolingInfoTests					(testCtx));
112 	apiTests->addChild(createFormatPropertiesExtendedKHRTests	(testCtx));
113 #endif // CTS_USES_VULKANSC
114 	apiTests->addChild(createBufferMemoryRequirementsTests		(testCtx));
115 #ifndef CTS_USES_VULKANSC
116 	apiTests->addChild(createImageCompressionControlTests		(testCtx));
117 #endif
118 }
119 
120 } // anonymous
121 
createTests(tcu::TestContext& testCtx)122 tcu::TestCaseGroup* createTests (tcu::TestContext& testCtx)
123 {
124 	return createTestGroup(testCtx, "api", "API Tests", createApiTests);
125 }
126 
127 } // api
128 } // vkt
129