1 /*------------------------------------------------------------------------
2  * Vulkan Conformance Tests
3  * ------------------------
4  *
5  * Copyright (c) 2014 The Android Open Source Project
6  * Copyright (c) 2016 The Khronos Group Inc.
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 Tessellation Tests
23  *//*--------------------------------------------------------------------*/
24 
25 #include "vktTessellationTests.hpp"
26 #include "vktTestGroupUtil.hpp"
27 #include "vktTessellationLimitsTests.hpp"
28 #include "vktTessellationCoordinatesTests.hpp"
29 #include "vktTessellationWindingTests.hpp"
30 #include "vktTessellationShaderInputOutputTests.hpp"
31 #include "vktTessellationMiscDrawTests.hpp"
32 #include "vktTessellationCommonEdgeTests.hpp"
33 #include "vktTessellationFractionalSpacingTests.hpp"
34 #include "vktTessellationPrimitiveDiscardTests.hpp"
35 #include "vktTessellationInvarianceTests.hpp"
36 #include "vktTessellationUserDefinedIO.hpp"
37 #include "vktTessellationGeometryPassthroughTests.hpp"
38 #include "vktTessellationGeometryPointSizeTests.hpp"
39 #include "vktTessellationGeometryGridRenderTests.hpp"
40 
41 #include "deUniquePtr.hpp"
42 
43 namespace vkt
44 {
45 namespace tessellation
46 {
47 namespace
48 {
49 
createGeometryInteractionTests(tcu::TestContext & testCtx)50 tcu::TestCaseGroup* createGeometryInteractionTests (tcu::TestContext& testCtx)
51 {
52 	de::MovePtr<tcu::TestCaseGroup> group (new tcu::TestCaseGroup(testCtx, "geometry_interaction", "Tessellation and geometry shader interaction tests"));
53 
54 	group->addChild(createGeometryPassthroughTests		(testCtx));
55 	group->addChild(createGeometryGridRenderLimitsTests	(testCtx));
56 	group->addChild(createGeometryGridRenderScatterTests(testCtx));
57 	group->addChild(createGeometryPointSizeTests		(testCtx));
58 
59 	return group.release();
60 }
61 
createChildren(tcu::TestCaseGroup * tessellationTests)62 void createChildren (tcu::TestCaseGroup* tessellationTests)
63 {
64 	tcu::TestContext& testCtx = tessellationTests->getTestContext();
65 
66 	tessellationTests->addChild(createLimitsTests				(testCtx));
67 	tessellationTests->addChild(createCoordinatesTests			(testCtx));
68 	tessellationTests->addChild(createWindingTests				(testCtx));
69 	tessellationTests->addChild(createShaderInputOutputTests	(testCtx));
70 	tessellationTests->addChild(createMiscDrawTests				(testCtx));
71 	tessellationTests->addChild(createCommonEdgeTests			(testCtx));
72 	tessellationTests->addChild(createFractionalSpacingTests	(testCtx));
73 	tessellationTests->addChild(createPrimitiveDiscardTests		(testCtx));
74 	tessellationTests->addChild(createInvarianceTests			(testCtx));
75 	tessellationTests->addChild(createUserDefinedIOTests		(testCtx));
76 	tessellationTests->addChild(createGeometryInteractionTests	(testCtx));
77 }
78 
79 } // anonymous
80 
createTests(tcu::TestContext & testCtx)81 tcu::TestCaseGroup* createTests (tcu::TestContext& testCtx)
82 {
83 	return createTestGroup(testCtx, "tessellation", "Tessellation tests", createChildren);
84 }
85 
86 } // tessellation
87 } // vkt
88