1 /*------------------------------------------------------------------------
2  * Vulkan Conformance Tests
3  * ------------------------
4  *
5  * Copyright (c) 2021 The Khronos Group 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 Video Encoding and Decoding tests
22  *//*--------------------------------------------------------------------*/
23 
24 #include "vktVideoTests.hpp"
25 #include "vktVideoCapabilitiesTests.hpp"
26 #include "vktVideoDecodeTests.hpp"
27 #include "synchronization/vktSynchronizationTests.hpp"
28 
29 #include "deUniquePtr.hpp"
30 
31 namespace vkt
32 {
33 namespace video
34 {
35 
36 using namespace vk;
37 
createTests(tcu::TestContext& testCtx)38 tcu::TestCaseGroup*	createTests (tcu::TestContext& testCtx)
39 {
40 	de::MovePtr<tcu::TestCaseGroup>	group	(new tcu::TestCaseGroup(testCtx, "video", "Video encoding and decoding tests"));
41 
42 	group->addChild(createVideoCapabilitiesTests(testCtx));
43 	group->addChild(createVideoDecodeTests(testCtx));
44 
45 	{
46 		de::MovePtr<tcu::TestCaseGroup>	syncGroup(new tcu::TestCaseGroup(testCtx, "synchronization", ""));
47 
48 		syncGroup->addChild(createSynchronizationTests(testCtx, VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_EXT));
49 		syncGroup->addChild(createSynchronizationTests(testCtx, VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_EXT));
50 		syncGroup->addChild(createSynchronizationTests(testCtx, VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR));
51 		syncGroup->addChild(createSynchronizationTests(testCtx, VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR));
52 
53 		group->addChild(syncGroup.release());
54 	}
55 
56 	{
57 		de::MovePtr<tcu::TestCaseGroup>	syncGroup(new tcu::TestCaseGroup(testCtx, "synchronization2", ""));
58 
59 		syncGroup->addChild(createSynchronizationTests(testCtx, VK_VIDEO_CODEC_OPERATION_ENCODE_H264_BIT_EXT));
60 		syncGroup->addChild(createSynchronizationTests(testCtx, VK_VIDEO_CODEC_OPERATION_ENCODE_H265_BIT_EXT));
61 		syncGroup->addChild(createSynchronizationTests(testCtx, VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR));
62 		syncGroup->addChild(createSynchronizationTests(testCtx, VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR));
63 
64 		group->addChild(syncGroup.release());
65 	}
66 
67 	return group.release();
68 }
69 
70 }	// video
71 }	// vkt
72