f46c57fafc8ff4a69aa7dd1f0b11e713ca9c9f26
[platform/upstream/VK-GL-CTS.git] / external / vulkancts / modules / vulkan / protected_memory / vktProtectedMemTests.cpp
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
41 namespace vkt
42 {
43 namespace ProtectedMem
44 {
45
46 tcu::TestCaseGroup* createTests (tcu::TestContext& testCtx)
47 {
48         de::MovePtr<tcu::TestCaseGroup> protectedTests (new tcu::TestCaseGroup(testCtx, "protected_memory", "Protected Memory Tests"));
49
50         // Attachment test case group
51         {
52                 de::MovePtr<tcu::TestCaseGroup> attachmentTestGroup (new tcu::TestCaseGroup(testCtx, "attachment", "Protected Memory Attachment Tests"));
53                 attachmentTestGroup->addChild(createAttachmentLoadTests(testCtx));
54                 attachmentTestGroup->addChild(createAttachmentClearTests(testCtx));
55                 protectedTests->addChild(attachmentTestGroup.release());
56         }
57
58         // Image test case group
59         {
60                 de::MovePtr<tcu::TestCaseGroup> imageTestGroup (new tcu::TestCaseGroup(testCtx, "image", "Protected Memory Image Tests"));
61                 imageTestGroup->addChild(createCopyImageTests(testCtx));
62                 imageTestGroup->addChild(createBlitImageTests(testCtx));
63                 imageTestGroup->addChild(createClearColorImageTests(testCtx));
64                 imageTestGroup->addChild(createCopyBufferToImageTests(testCtx));
65                 imageTestGroup->addChild(createShaderImageAccessTests(testCtx));
66                 protectedTests->addChild(imageTestGroup.release());
67         }
68
69         // Buffer test case group
70         {
71                 de::MovePtr<tcu::TestCaseGroup> bufferTestGroup (new tcu::TestCaseGroup(testCtx, "buffer", "Protected Memory Buffer Tests"));
72                 bufferTestGroup->addChild(createFillBufferTests(testCtx));
73                 bufferTestGroup->addChild(createUpdateBufferTests(testCtx));
74                 bufferTestGroup->addChild(createCopyBufferTests(testCtx));
75                 bufferTestGroup->addChild(createCopyImageToFloatBufferTests(testCtx));
76                 protectedTests->addChild(bufferTestGroup.release());
77         }
78
79         // Storage buffer test case group
80         {
81                 de::MovePtr<tcu::TestCaseGroup> ssboTestGroup (new tcu::TestCaseGroup(testCtx, "ssbo", "Storage Buffer Tests"));
82                 ssboTestGroup->addChild(createReadStorageBufferTests(testCtx));
83                 ssboTestGroup->addChild(createWriteStorageBufferTests(testCtx));
84                 ssboTestGroup->addChild(createAtomicStorageBufferTests(testCtx));
85                 protectedTests->addChild(ssboTestGroup.release());
86         }
87
88         return protectedTests.release();
89
90 }
91
92 } // ProtectedMem
93 } // vkt