1 /*------------------------------------------------------------------------
2 * Vulkan Conformance Tests
3 * ------------------------
4 *
5 * Copyright (c) 2017 The Khronos Group Inc.
6 * Copyright (c) 2017 Samsung Electronics Co., Ltd.
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 Protected memory tests
23 *//*--------------------------------------------------------------------*/
24
25 #include "vktProtectedMemTests.hpp"
26
27 #include "vktTestCase.hpp"
28 #include "vktTestGroupUtil.hpp"
29
30 #include "vktProtectedMemAttachmentLoadTests.hpp"
31 #include "vktProtectedMemAttachmentClearTests.hpp"
32 #include "vktProtectedMemCopyImageTests.hpp"
33 #include "vktProtectedMemBlitImageTests.hpp"
34 #include "vktProtectedMemClearColorImageTests.hpp"
35 #include "vktProtectedMemFillUpdateCopyBufferTests.hpp"
36 #include "vktProtectedMemCopyImageToBufferTests.hpp"
37 #include "vktProtectedMemCopyBufferToImageTests.hpp"
38 #include "vktProtectedMemStorageBufferTests.hpp"
39 #include "vktProtectedMemShaderImageAccessTests.hpp"
40 #include "vktProtectedMemWsiSwapchainTests.hpp"
41 #include "vktProtectedMemYCbCrConversionTests.hpp"
42 #include "vktProtectedMemWorkgroupStorageTests.hpp"
43 #include "vktProtectedMemStackTests.hpp"
44
45 namespace vkt
46 {
47 namespace ProtectedMem
48 {
49
createTests(tcu::TestContext & testCtx,const std::string & name)50 tcu::TestCaseGroup *createTests(tcu::TestContext &testCtx, const std::string &name)
51 {
52 de::MovePtr<tcu::TestCaseGroup> protectedTests(new tcu::TestCaseGroup(testCtx, name.c_str()));
53
54 // Attachment test case group
55 {
56 de::MovePtr<tcu::TestCaseGroup> attachmentTestGroup(new tcu::TestCaseGroup(testCtx, "attachment"));
57 attachmentTestGroup->addChild(createAttachmentLoadTests(testCtx));
58 attachmentTestGroup->addChild(createAttachmentClearTests(testCtx));
59 protectedTests->addChild(attachmentTestGroup.release());
60 }
61
62 // Image test case group
63 {
64 de::MovePtr<tcu::TestCaseGroup> imageTestGroup(new tcu::TestCaseGroup(testCtx, "image"));
65 imageTestGroup->addChild(createCopyImageTests(testCtx));
66 imageTestGroup->addChild(createBlitImageTests(testCtx));
67 imageTestGroup->addChild(createClearColorImageTests(testCtx));
68 imageTestGroup->addChild(createCopyBufferToImageTests(testCtx));
69 imageTestGroup->addChild(createShaderImageAccessTests(testCtx));
70 protectedTests->addChild(imageTestGroup.release());
71 }
72
73 // Buffer test case group
74 {
75 de::MovePtr<tcu::TestCaseGroup> bufferTestGroup(new tcu::TestCaseGroup(testCtx, "buffer"));
76 bufferTestGroup->addChild(createFillBufferTests(testCtx));
77 bufferTestGroup->addChild(createUpdateBufferTests(testCtx));
78 bufferTestGroup->addChild(createCopyBufferTests(testCtx));
79 bufferTestGroup->addChild(createCopyImageToFloatBufferTests(testCtx));
80 protectedTests->addChild(bufferTestGroup.release());
81 }
82
83 // Storage buffer test case group
84 {
85 de::MovePtr<tcu::TestCaseGroup> ssboTestGroup(new tcu::TestCaseGroup(testCtx, "ssbo"));
86 ssboTestGroup->addChild(createReadStorageBufferTests(testCtx));
87 ssboTestGroup->addChild(createWriteStorageBufferTests(testCtx));
88 ssboTestGroup->addChild(createAtomicStorageBufferTests(testCtx));
89 protectedTests->addChild(ssboTestGroup.release());
90 }
91
92 {
93 de::MovePtr<tcu::TestCaseGroup> interactionTestGroup(new tcu::TestCaseGroup(testCtx, "interaction"));
94 #ifndef CTS_USES_VULKANSC
95 interactionTestGroup->addChild(createSwapchainTests(testCtx));
96 #endif
97 interactionTestGroup->addChild(createYCbCrConversionTests(testCtx));
98 protectedTests->addChild(interactionTestGroup.release());
99 }
100
101 protectedTests->addChild(createWorkgroupStorageTests(testCtx));
102 protectedTests->addChild(createStackTests(testCtx));
103
104 return protectedTests.release();
105 }
106
107 } // namespace ProtectedMem
108 } // namespace vkt
109