1 /*------------------------------------------------------------------------- 2 * Vulkan Conformance Tests 3 * ------------------------ 4 * 5 * Copyright (c) 2015 Google 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 Memory Tests 22 *//*--------------------------------------------------------------------*/ 23 24 #include "vktMemoryTests.hpp" 25 26 #include "vktMemoryAllocationTests.hpp" 27 #include "vktMemoryPipelineBarrierTests.hpp" 28 #include "vktMemoryRequirementsTests.hpp" 29 #include "vktMemoryBindingTests.hpp" 30 #include "vktMemoryExternalMemoryHostTests.hpp" 31 #include "vktTestGroupUtil.hpp" 32 #ifndef CTS_USES_VULKANSC 33 #include "vktMemoryMappingTests.hpp" 34 #include "vktMemoryAddressBindingTests.hpp" 35 #include "vktMemoryDeviceMemoryReportTests.hpp" 36 #endif // CTS_USES_VULKANSC 37 38 namespace vkt 39 { 40 namespace memory 41 { 42 43 namespace 44 { 45 createChildren(tcu::TestCaseGroup * memoryTests)46void createChildren(tcu::TestCaseGroup *memoryTests) 47 { 48 tcu::TestContext &testCtx = memoryTests->getTestContext(); 49 50 #ifndef CTS_USES_VULKANSC 51 // In Vulkan SC subsequent tests allocate memory but do not make it free, because vkFreeMemory was removed. 52 // As a consequence - random memory allocation tests start to report ResourceError ( VK_ERROR_OUT_OF_*_MEMORY ) 53 memoryTests->addChild(createAllocationTests(testCtx)); 54 memoryTests->addChild(createDeviceGroupAllocationTests(testCtx)); 55 memoryTests->addChild(createPageableAllocationTests(testCtx)); 56 memoryTests->addChild(createMappingTests(testCtx)); 57 memoryTests->addChild(createPipelineBarrierTests(testCtx)); 58 #endif // CTS_USES_VULKANSC 59 memoryTests->addChild(createRequirementsTests(testCtx)); 60 memoryTests->addChild(createMemoryBindingTests(testCtx)); 61 memoryTests->addChild(createMemoryExternalMemoryHostTests(testCtx)); 62 #ifndef CTS_USES_VULKANSC 63 memoryTests->addChild(createDeviceMemoryReportTests(testCtx)); 64 memoryTests->addChild(createAddressBindingReportTests(testCtx)); 65 #endif 66 } 67 68 } // namespace 69 createTests(tcu::TestContext & testCtx,const std::string & name)70tcu::TestCaseGroup *createTests(tcu::TestContext &testCtx, const std::string &name) 71 { 72 return createTestGroup(testCtx, name, createChildren); 73 } 74 75 } // namespace memory 76 } // namespace vkt 77