Rename dynamic_rendering tests
[platform/upstream/VK-GL-CTS.git] / external / vulkancts / modules / vulkan / draw / vktDrawTests.cpp
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 Draw Tests
23  *//*--------------------------------------------------------------------*/
24
25 #include "vktDrawTests.hpp"
26
27 #include "vktDrawSimpleTest.hpp"
28 #include "vktDrawConcurrentTests.hpp"
29 #include "vktDrawIndexedTest.hpp"
30 #include "vktDrawIndirectTest.hpp"
31 #include "vktDrawInstancedTests.hpp"
32 #include "vktTestGroupUtil.hpp"
33 #include "vktBasicDrawTests.hpp"
34 #include "vktDrawShaderDrawParametersTests.hpp"
35 #include "vktDrawNegativeViewportHeightTests.hpp"
36 #include "vktDrawInvertedDepthRangesTests.hpp"
37 #include "vktDrawDifferingInterpolationTests.hpp"
38 #include "vktDrawShaderLayerTests.hpp"
39 #include "vktDrawShaderViewportIndexTests.hpp"
40 #include "vktDrawScissorTests.hpp"
41 #include "vktDrawMultipleInterpolationTests.hpp"
42 #include "vktDrawDiscardRectanglesTests.hpp"
43 #include "vktDrawExplicitVertexParameterTests.hpp"
44 #include "vktDrawOutputLocationTests.hpp"
45 #include "vktDrawDepthClampTests.hpp"
46 #include "vktDrawAhbTests.hpp"
47 #include "vktDrawMultipleClearsWithinRenderPass.hpp"
48 #include "vktDrawMultiExtTests.hpp"
49
50 namespace vkt
51 {
52 namespace Draw
53 {
54
55 namespace
56 {
57
58 void createChildren (tcu::TestContext& testCtx, tcu::TestCaseGroup* group, bool useDynamicRendering)
59 {
60         group->addChild(new ConcurrentDrawTests                                 (testCtx, useDynamicRendering));
61         group->addChild(new SimpleDrawTests                                             (testCtx, useDynamicRendering));
62         group->addChild(new DrawIndexedTests                                    (testCtx, useDynamicRendering));
63         group->addChild(new IndirectDrawTests                                   (testCtx, useDynamicRendering));
64         group->addChild(createBasicDrawTests                                    (testCtx, useDynamicRendering));
65         group->addChild(new InstancedTests                                              (testCtx, useDynamicRendering));
66         group->addChild(new ShaderDrawParametersTests                   (testCtx, useDynamicRendering));
67         group->addChild(createNegativeViewportHeightTests               (testCtx, useDynamicRendering));
68         group->addChild(createZeroViewportHeightTests                   (testCtx, useDynamicRendering));
69         group->addChild(createInvertedDepthRangesTests                  (testCtx, useDynamicRendering));
70         group->addChild(createDifferingInterpolationTests               (testCtx, useDynamicRendering));
71         group->addChild(createShaderLayerTests                                  (testCtx, useDynamicRendering));
72         group->addChild(createShaderViewportIndexTests                  (testCtx, useDynamicRendering));
73         group->addChild(createScissorTests                                              (testCtx, useDynamicRendering));
74         group->addChild(createMultipleInterpolationTests                (testCtx, useDynamicRendering));
75         group->addChild(createDiscardRectanglesTests                    (testCtx, useDynamicRendering));
76         group->addChild(createExplicitVertexParameterTests              (testCtx, useDynamicRendering));
77         group->addChild(createDepthClampTests                                   (testCtx, useDynamicRendering));
78         group->addChild(new MultipleClearsWithinRenderPassTests (testCtx, useDynamicRendering));
79         group->addChild(createDrawMultiExtTests                                 (testCtx, useDynamicRendering));
80
81         if (!useDynamicRendering)
82         {
83                 // amber tests - no support for dynamic rendering
84                 group->addChild(createOutputLocationTests                       (testCtx));
85
86                 // subpasses can't be translated to dynamic rendering
87                 group->addChild(createAhbTests                                          (testCtx));
88         }
89 }
90
91 } // anonymous
92
93 tcu::TestCaseGroup* createTests (tcu::TestContext& testCtx)
94 {
95         de::MovePtr<tcu::TestCaseGroup> mainGroup                               (new tcu::TestCaseGroup(testCtx, "draw", "Simple Draw tests"));
96         de::MovePtr<tcu::TestCaseGroup> renderpassGroup                 (new tcu::TestCaseGroup(testCtx, "renderpass", "Draw using render pass object"));
97         de::MovePtr<tcu::TestCaseGroup> dynamicRenderingGroup   (new tcu::TestCaseGroup(testCtx, "dynamic_rendering", "Draw using VK_KHR_dynamic_rendering"));
98
99         createChildren(testCtx, renderpassGroup.get(), false);
100         createChildren(testCtx, dynamicRenderingGroup.get(), true);
101
102         mainGroup->addChild(renderpassGroup.release());
103         mainGroup->addChild(dynamicRenderingGroup.release());
104
105         return mainGroup.release();
106 }
107
108 } // Draw
109 } // vkt