1 /*------------------------------------------------------------------------- 2 * Vulkan CTS Framework 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 Vulkan platform abstraction. 22 *//*--------------------------------------------------------------------*/ 23 24 #include "vkPlatform.hpp" 25 #include "tcuFunctionLibrary.hpp" 26 27 namespace vk 28 { 29 30 PlatformDriver::PlatformDriver (const tcu::FunctionLibrary& library) 31 { 32 #define GET_PROC_ADDR(NAME) library.getFunction(NAME) 33 #include "vkInitPlatformFunctionPointers.inl" 34 #undef GET_PROC_ADDR 35 } 36 37 PlatformDriver::~PlatformDriver (void) 38 { 39 } 40 41 InstanceDriver::InstanceDriver (const PlatformInterface& platformInterface, VkInstance instance) 42 { 43 #define GET_PROC_ADDR(NAME) platformInterface.getInstanceProcAddr(instance, NAME) 44 #include "vkInitInstanceFunctionPointers.inl" 45 #undef GET_PROC_ADDR 46 } 47 48 InstanceDriver::~InstanceDriver (void) 49 { 50 } 51 52 DeviceDriver::DeviceDriver (const InstanceInterface& instanceInterface, VkDevice device) 53 { 54 #define GET_PROC_ADDR(NAME) instanceInterface.getDeviceProcAddr(device, NAME) 55 #include "vkInitDeviceFunctionPointers.inl" 56 #undef GET_PROC_ADDR 57 } 58 59 DeviceDriver::~DeviceDriver (void) 60 { 61 } 62 63 #include "vkPlatformDriverImpl.inl" 64 #include "vkInstanceDriverImpl.inl" 65 #include "vkDeviceDriverImpl.inl" 66 67 wsi::Display* Platform::createWsiDisplay (wsi::Type) const 68 { 69 TCU_THROW(NotSupportedError, "WSI not supported"); 70 } 71 72 void Platform::describePlatform (std::ostream& dst) const 73 { 74 dst << "vk::Platform::describePlatform() not implemented"; 75 } 76 77 } // vk 78