1 /*------------------------------------------------------------------------
2 * Vulkan Conformance Tests
3 * ------------------------
5 * Copyright (c) 2016 The Khronos Group Inc.
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
11 * http://www.apache.org/licenses/LICENSE-2.0
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.
21 * \brief Synchronization tests
22 *//*--------------------------------------------------------------------*/
24 #include "vktSynchronizationTests.hpp"
25 #include "vktTestGroupUtil.hpp"
26 #include "vktSynchronizationSmokeTests.hpp"
27 #include "vktSynchronizationBasicFenceTests.hpp"
28 #include "vktSynchronizationBasicSemaphoreTests.hpp"
29 #include "vktSynchronizationBasicEventTests.hpp"
30 #include "vktSynchronizationOperationSingleQueueTests.hpp"
31 #include "vktSynchronizationOperationMultiQueueTests.hpp"
32 #include "vktSynchronizationInternallySynchronizedObjectsTests.hpp"
33 #include "vktSynchronizationCrossInstanceSharingTests.hpp"
34 #include "vktSynchronizationWin32KeyedMutexTests.hpp"
35 #include "vktSynchronizationUtil.hpp"
37 #include "deUniquePtr.hpp"
41 namespace synchronization
47 void createBasicTests (tcu::TestCaseGroup* group)
49 group->addChild(createBasicFenceTests (group->getTestContext()));
50 group->addChild(createBasicSemaphoreTests(group->getTestContext()));
51 group->addChild(createBasicEventTests (group->getTestContext()));
54 class OperationTests : public tcu::TestCaseGroup
57 OperationTests (tcu::TestContext& testCtx)
58 : tcu::TestCaseGroup(testCtx, "op", "Synchronization of a memory-modifying operation")
64 addChild(createSynchronizedOperationSingleQueueTests(m_testCtx, m_pipelineCacheData));
65 addChild(createSynchronizedOperationMultiQueueTests (m_testCtx, m_pipelineCacheData));
69 // synchronization.op tests share pipeline cache data to speed up test
71 PipelineCacheData m_pipelineCacheData;
74 void createChildren (tcu::TestCaseGroup* group)
76 tcu::TestContext& testCtx = group->getTestContext();
78 group->addChild(createSmokeTests(testCtx));
79 group->addChild(createTestGroup (testCtx, "basic", "Basic synchronization tests", createBasicTests));
80 group->addChild(new OperationTests(testCtx));
81 group->addChild(createInternallySynchronizedObjects(testCtx));
82 group->addChild(synchronization::createCrossInstanceSharingTest(testCtx));
83 group->addChild(synchronization::createWin32KeyedMutexTest(testCtx));
88 tcu::TestCaseGroup* createTests (tcu::TestContext& testCtx)
90 return createTestGroup(testCtx, "synchronization", "Synchronization tests", createChildren);