Ian Elliott | d3ef02f | 2015-07-06 14:36:13 -0600 | [diff] [blame] | 1 | /* |
Jon Ashburn | 23d36b1 | 2016-02-02 17:47:28 -0700 | [diff] [blame] | 2 | * Copyright (c) 2015-2016 The Khronos Group Inc. |
| 3 | * Copyright (c) 2015-2016 Valve Corporation |
| 4 | * Copyright (c) 2015-2016 LunarG, Inc. |
Ian Elliott | d3ef02f | 2015-07-06 14:36:13 -0600 | [diff] [blame] | 5 | * |
Jon Ashburn | 3ebf125 | 2016-04-19 11:30:31 -0600 | [diff] [blame] | 6 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 | * you may not use this file except in compliance with the License. |
| 8 | * You may obtain a copy of the License at |
Ian Elliott | d3ef02f | 2015-07-06 14:36:13 -0600 | [diff] [blame] | 9 | * |
Jon Ashburn | 3ebf125 | 2016-04-19 11:30:31 -0600 | [diff] [blame] | 10 | * http://www.apache.org/licenses/LICENSE-2.0 |
Ian Elliott | d3ef02f | 2015-07-06 14:36:13 -0600 | [diff] [blame] | 11 | * |
Jon Ashburn | 3ebf125 | 2016-04-19 11:30:31 -0600 | [diff] [blame] | 12 | * Unless required by applicable law or agreed to in writing, software |
| 13 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | * See the License for the specific language governing permissions and |
| 16 | * limitations under the License. |
Ian Elliott | d3ef02f | 2015-07-06 14:36:13 -0600 | [diff] [blame] | 17 | * |
Courtney Goeltzenleuchter | 0555952 | 2015-10-30 11:14:30 -0600 | [diff] [blame] | 18 | * Author: Ian Elliott <ian@lunarg.com> |
| 19 | * |
Ian Elliott | d3ef02f | 2015-07-06 14:36:13 -0600 | [diff] [blame] | 20 | */ |
| 21 | |
| 22 | #include "vk_loader_platform.h" |
| 23 | #include "loader.h" |
Ian Elliott | d3ef02f | 2015-07-06 14:36:13 -0600 | [diff] [blame] | 24 | |
Jon Ashburn | 8a39efc | 2015-11-06 11:02:40 -0700 | [diff] [blame] | 25 | bool wsi_swapchain_instance_gpa(struct loader_instance *ptr_instance, |
Jon Ashburn | 23d36b1 | 2016-02-02 17:47:28 -0700 | [diff] [blame] | 26 | const char *name, void **addr); |
Ian Elliott | d3ef02f | 2015-07-06 14:36:13 -0600 | [diff] [blame] | 27 | |
Jon Ashburn | 23d36b1 | 2016-02-02 17:47:28 -0700 | [diff] [blame] | 28 | void wsi_create_instance(struct loader_instance *ptr_instance, |
| 29 | const VkInstanceCreateInfo *pCreateInfo); |
Jon Ashburn | 6fa520f | 2016-03-25 12:49:35 -0600 | [diff] [blame] | 30 | bool wsi_unsupported_instance_extension(const VkExtensionProperties *ext_prop); |
Ian Elliott | d3ef02f | 2015-07-06 14:36:13 -0600 | [diff] [blame] | 31 | |
Jon Ashburn | 23d36b1 | 2016-02-02 17:47:28 -0700 | [diff] [blame] | 32 | VKAPI_ATTR void VKAPI_CALL |
Jon Ashburn | 1530c34 | 2016-02-26 13:14:27 -0700 | [diff] [blame] | 33 | terminator_DestroySurfaceKHR(VkInstance instance, VkSurfaceKHR surface, |
| 34 | const VkAllocationCallbacks *pAllocator); |
Ian Elliott | d3ef02f | 2015-07-06 14:36:13 -0600 | [diff] [blame] | 35 | |
Jon Ashburn | 23d36b1 | 2016-02-02 17:47:28 -0700 | [diff] [blame] | 36 | VKAPI_ATTR VkResult VKAPI_CALL |
Jon Ashburn | 1530c34 | 2016-02-26 13:14:27 -0700 | [diff] [blame] | 37 | terminator_GetPhysicalDeviceSurfaceSupportKHR(VkPhysicalDevice physicalDevice, |
| 38 | uint32_t queueFamilyIndex, |
| 39 | VkSurfaceKHR surface, |
| 40 | VkBool32 *pSupported); |
Ian Elliott | 486c550 | 2015-11-19 16:05:09 -0700 | [diff] [blame] | 41 | |
Jon Ashburn | 1530c34 | 2016-02-26 13:14:27 -0700 | [diff] [blame] | 42 | VKAPI_ATTR VkResult VKAPI_CALL |
| 43 | terminator_GetPhysicalDeviceSurfaceCapabilitiesKHR( |
Jon Ashburn | 23d36b1 | 2016-02-02 17:47:28 -0700 | [diff] [blame] | 44 | VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, |
| 45 | VkSurfaceCapabilitiesKHR *pSurfaceCapabilities); |
Ian Elliott | 486c550 | 2015-11-19 16:05:09 -0700 | [diff] [blame] | 46 | |
Jon Ashburn | 1530c34 | 2016-02-26 13:14:27 -0700 | [diff] [blame] | 47 | VKAPI_ATTR VkResult VKAPI_CALL terminator_GetPhysicalDeviceSurfaceFormatsKHR( |
| 48 | VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, |
| 49 | uint32_t *pSurfaceFormatCount, VkSurfaceFormatKHR *pSurfaceFormats); |
Ian Elliott | 486c550 | 2015-11-19 16:05:09 -0700 | [diff] [blame] | 50 | |
Jon Ashburn | 23d36b1 | 2016-02-02 17:47:28 -0700 | [diff] [blame] | 51 | VKAPI_ATTR VkResult VKAPI_CALL |
Jon Ashburn | 1530c34 | 2016-02-26 13:14:27 -0700 | [diff] [blame] | 52 | terminator_GetPhysicalDeviceSurfacePresentModesKHR( |
| 53 | VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, |
| 54 | uint32_t *pPresentModeCount, VkPresentModeKHR *pPresentModes); |
Ian Elliott | 919fa30 | 2015-11-24 15:39:10 -0700 | [diff] [blame] | 55 | |
| 56 | #ifdef VK_USE_PLATFORM_WIN32_KHR |
Jon Ashburn | 23d36b1 | 2016-02-02 17:47:28 -0700 | [diff] [blame] | 57 | VKAPI_ATTR VkResult VKAPI_CALL |
Jon Ashburn | 1530c34 | 2016-02-26 13:14:27 -0700 | [diff] [blame] | 58 | terminator_CreateWin32SurfaceKHR(VkInstance instance, |
| 59 | const VkWin32SurfaceCreateInfoKHR *pCreateInfo, |
| 60 | const VkAllocationCallbacks *pAllocator, |
| 61 | VkSurfaceKHR *pSurface); |
Jon Ashburn | 23d36b1 | 2016-02-02 17:47:28 -0700 | [diff] [blame] | 62 | VKAPI_ATTR VkBool32 VKAPI_CALL |
Jon Ashburn | 1530c34 | 2016-02-26 13:14:27 -0700 | [diff] [blame] | 63 | terminator_GetPhysicalDeviceWin32PresentationSupportKHR( |
Jon Ashburn | 23d36b1 | 2016-02-02 17:47:28 -0700 | [diff] [blame] | 64 | VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex); |
Ian Elliott | 919fa30 | 2015-11-24 15:39:10 -0700 | [diff] [blame] | 65 | #endif |
| 66 | #ifdef VK_USE_PLATFORM_MIR_KHR |
Jon Ashburn | 23d36b1 | 2016-02-02 17:47:28 -0700 | [diff] [blame] | 67 | VKAPI_ATTR VkResult VKAPI_CALL |
Jon Ashburn | 1530c34 | 2016-02-26 13:14:27 -0700 | [diff] [blame] | 68 | terminator_CreateMirSurfaceKHR(VkInstance instance, |
| 69 | const VkMirSurfaceCreateInfoKHR *pCreateInfo, |
| 70 | const VkAllocationCallbacks *pAllocator, |
| 71 | VkSurfaceKHR *pSurface); |
Jon Ashburn | 23d36b1 | 2016-02-02 17:47:28 -0700 | [diff] [blame] | 72 | VKAPI_ATTR VkBool32 VKAPI_CALL |
Jon Ashburn | 1530c34 | 2016-02-26 13:14:27 -0700 | [diff] [blame] | 73 | terminator_GetPhysicalDeviceMirPresentationSupportKHR( |
Jon Ashburn | 23d36b1 | 2016-02-02 17:47:28 -0700 | [diff] [blame] | 74 | VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, |
| 75 | MirConnection *connection); |
Ian Elliott | 919fa30 | 2015-11-24 15:39:10 -0700 | [diff] [blame] | 76 | #endif |
| 77 | #ifdef VK_USE_PLATFORM_WAYLAND_KHR |
Jon Ashburn | 1530c34 | 2016-02-26 13:14:27 -0700 | [diff] [blame] | 78 | VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateWaylandSurfaceKHR( |
| 79 | VkInstance instance, const VkWaylandSurfaceCreateInfoKHR *pCreateInfo, |
| 80 | const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface); |
Jon Ashburn | 23d36b1 | 2016-02-02 17:47:28 -0700 | [diff] [blame] | 81 | VKAPI_ATTR VkBool32 VKAPI_CALL |
Jon Ashburn | 1530c34 | 2016-02-26 13:14:27 -0700 | [diff] [blame] | 82 | terminator_GetPhysicalDeviceWaylandPresentationSupportKHR( |
Jon Ashburn | 23d36b1 | 2016-02-02 17:47:28 -0700 | [diff] [blame] | 83 | VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, |
| 84 | struct wl_display *display); |
Ian Elliott | 919fa30 | 2015-11-24 15:39:10 -0700 | [diff] [blame] | 85 | #endif |
| 86 | #ifdef VK_USE_PLATFORM_XCB_KHR |
Jon Ashburn | 23d36b1 | 2016-02-02 17:47:28 -0700 | [diff] [blame] | 87 | VKAPI_ATTR VkResult VKAPI_CALL |
Jon Ashburn | 1530c34 | 2016-02-26 13:14:27 -0700 | [diff] [blame] | 88 | terminator_CreateXcbSurfaceKHR(VkInstance instance, |
| 89 | const VkXcbSurfaceCreateInfoKHR *pCreateInfo, |
| 90 | const VkAllocationCallbacks *pAllocator, |
| 91 | VkSurfaceKHR *pSurface); |
Jon Ashburn | f72a04b | 2015-11-25 17:55:49 -0700 | [diff] [blame] | 92 | |
Jon Ashburn | 23d36b1 | 2016-02-02 17:47:28 -0700 | [diff] [blame] | 93 | VKAPI_ATTR VkBool32 VKAPI_CALL |
Jon Ashburn | 1530c34 | 2016-02-26 13:14:27 -0700 | [diff] [blame] | 94 | terminator_GetPhysicalDeviceXcbPresentationSupportKHR( |
Jon Ashburn | 23d36b1 | 2016-02-02 17:47:28 -0700 | [diff] [blame] | 95 | VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, |
| 96 | xcb_connection_t *connection, xcb_visualid_t visual_id); |
Ian Elliott | 919fa30 | 2015-11-24 15:39:10 -0700 | [diff] [blame] | 97 | #endif |
| 98 | #ifdef VK_USE_PLATFORM_XLIB_KHR |
Jon Ashburn | 23d36b1 | 2016-02-02 17:47:28 -0700 | [diff] [blame] | 99 | VKAPI_ATTR VkResult VKAPI_CALL |
Jon Ashburn | 1530c34 | 2016-02-26 13:14:27 -0700 | [diff] [blame] | 100 | terminator_CreateXlibSurfaceKHR(VkInstance instance, |
| 101 | const VkXlibSurfaceCreateInfoKHR *pCreateInfo, |
| 102 | const VkAllocationCallbacks *pAllocator, |
| 103 | VkSurfaceKHR *pSurface); |
Jon Ashburn | 23d36b1 | 2016-02-02 17:47:28 -0700 | [diff] [blame] | 104 | VKAPI_ATTR VkBool32 VKAPI_CALL |
Jon Ashburn | 1530c34 | 2016-02-26 13:14:27 -0700 | [diff] [blame] | 105 | terminator_GetPhysicalDeviceXlibPresentationSupportKHR( |
Jon Ashburn | 23d36b1 | 2016-02-02 17:47:28 -0700 | [diff] [blame] | 106 | VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, Display *dpy, |
| 107 | VisualID visualID); |
Ian Elliott | 919fa30 | 2015-11-24 15:39:10 -0700 | [diff] [blame] | 108 | #endif |
Jon Ashburn | cc407a2 | 2016-04-15 09:25:03 -0600 | [diff] [blame] | 109 | VKAPI_ATTR VkResult VKAPI_CALL terminator_GetPhysicalDeviceDisplayPropertiesKHR( |
| 110 | VkPhysicalDevice physicalDevice, uint32_t *pPropertyCount, |
| 111 | VkDisplayPropertiesKHR *pProperties); |
Jon Ashburn | c7d3e73 | 2016-03-08 09:30:30 -0700 | [diff] [blame] | 112 | VKAPI_ATTR VkResult VKAPI_CALL |
| 113 | terminator_GetPhysicalDeviceDisplayPlanePropertiesKHR( |
Jon Ashburn | cc407a2 | 2016-04-15 09:25:03 -0600 | [diff] [blame] | 114 | VkPhysicalDevice physicalDevice, uint32_t *pPropertyCount, |
| 115 | VkDisplayPlanePropertiesKHR *pProperties); |
Jon Ashburn | c7d3e73 | 2016-03-08 09:30:30 -0700 | [diff] [blame] | 116 | VKAPI_ATTR VkResult VKAPI_CALL |
Jon Ashburn | cc407a2 | 2016-04-15 09:25:03 -0600 | [diff] [blame] | 117 | terminator_GetDisplayPlaneSupportedDisplaysKHR(VkPhysicalDevice physicalDevice, |
| 118 | uint32_t planeIndex, |
| 119 | uint32_t *pDisplayCount, |
| 120 | VkDisplayKHR *pDisplays); |
Jon Ashburn | c7d3e73 | 2016-03-08 09:30:30 -0700 | [diff] [blame] | 121 | VKAPI_ATTR VkResult VKAPI_CALL |
Jon Ashburn | cc407a2 | 2016-04-15 09:25:03 -0600 | [diff] [blame] | 122 | terminator_GetDisplayModePropertiesKHR(VkPhysicalDevice physicalDevice, |
| 123 | VkDisplayKHR display, |
| 124 | uint32_t *pPropertyCount, |
| 125 | VkDisplayModePropertiesKHR *pProperties); |
Jon Ashburn | c7d3e73 | 2016-03-08 09:30:30 -0700 | [diff] [blame] | 126 | VKAPI_ATTR VkResult VKAPI_CALL |
Jon Ashburn | cc407a2 | 2016-04-15 09:25:03 -0600 | [diff] [blame] | 127 | terminator_CreateDisplayModeKHR(VkPhysicalDevice physicalDevice, |
| 128 | VkDisplayKHR display, |
| 129 | const VkDisplayModeCreateInfoKHR *pCreateInfo, |
| 130 | const VkAllocationCallbacks *pAllocator, |
| 131 | VkDisplayModeKHR *pMode); |
| 132 | VKAPI_ATTR VkResult VKAPI_CALL terminator_GetDisplayPlaneCapabilitiesKHR( |
| 133 | VkPhysicalDevice physicalDevice, VkDisplayModeKHR mode, uint32_t planeIndex, |
| 134 | VkDisplayPlaneCapabilitiesKHR *pCapabilities); |
| 135 | VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateDisplayPlaneSurfaceKHR( |
| 136 | VkInstance instance, const VkDisplaySurfaceCreateInfoKHR *pCreateInfo, |
Jon Ashburn | 3ebf125 | 2016-04-19 11:30:31 -0600 | [diff] [blame] | 137 | const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface); |