Ian Elliott | d3ef02f | 2015-07-06 14:36:13 -0600 | [diff] [blame] | 1 | /* |
Ian Elliott | d3ef02f | 2015-07-06 14:36:13 -0600 | [diff] [blame] | 2 | * |
Courtney Goeltzenleuchter | fcbe16f | 2015-10-29 13:50:34 -0600 | [diff] [blame] | 3 | * Copyright (C) 2015 Valve Corporation |
Ian Elliott | d3ef02f | 2015-07-06 14:36:13 -0600 | [diff] [blame] | 4 | * |
| 5 | * Permission is hereby granted, free of charge, to any person obtaining a |
| 6 | * copy of this software and associated documentation files (the "Software"), |
| 7 | * to deal in the Software without restriction, including without limitation |
| 8 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, |
| 9 | * and/or sell copies of the Software, and to permit persons to whom the |
| 10 | * Software is furnished to do so, subject to the following conditions: |
| 11 | * |
| 12 | * The above copyright notice and this permission notice shall be included |
| 13 | * in all copies or substantial portions of the Software. |
| 14 | * |
| 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 16 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 17 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
| 18 | * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 19 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
| 20 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
| 21 | * DEALINGS IN THE SOFTWARE. |
| 22 | * |
Courtney Goeltzenleuchter | 0555952 | 2015-10-30 11:14:30 -0600 | [diff] [blame] | 23 | * Author: Ian Elliott <ian@lunarg.com> |
| 24 | * |
Ian Elliott | d3ef02f | 2015-07-06 14:36:13 -0600 | [diff] [blame] | 25 | */ |
| 26 | |
| 27 | #include "vk_loader_platform.h" |
| 28 | #include "loader.h" |
Ian Elliott | d3ef02f | 2015-07-06 14:36:13 -0600 | [diff] [blame] | 29 | |
Jon Ashburn | 8a39efc | 2015-11-06 11:02:40 -0700 | [diff] [blame] | 30 | bool wsi_swapchain_instance_gpa(struct loader_instance *ptr_instance, |
| 31 | const char* name, void **addr); |
Ian Elliott | 954fa34 | 2015-10-30 15:28:23 -0600 | [diff] [blame] | 32 | void wsi_add_instance_extensions( |
| 33 | const struct loader_instance *inst, |
| 34 | struct loader_extension_list *ext_list); |
Ian Elliott | d3ef02f | 2015-07-06 14:36:13 -0600 | [diff] [blame] | 35 | |
Ian Elliott | 954fa34 | 2015-10-30 15:28:23 -0600 | [diff] [blame] | 36 | void wsi_create_instance( |
| 37 | struct loader_instance *ptr_instance, |
| 38 | const VkInstanceCreateInfo *pCreateInfo); |
Ian Elliott | d3ef02f | 2015-07-06 14:36:13 -0600 | [diff] [blame] | 39 | |
Ian Elliott | d3ef02f | 2015-07-06 14:36:13 -0600 | [diff] [blame] | 40 | |
Ian Elliott | fb42cd7 | 2015-11-25 14:43:02 -0700 | [diff] [blame] | 41 | VKAPI_ATTR void VKAPI_CALL loader_DestroySurfaceKHR( |
| 42 | VkInstance instance, |
| 43 | VkSurfaceKHR surface, |
| 44 | const VkAllocationCallbacks* pAllocator); |
| 45 | |
Chia-I Wu | 9ab6150 | 2015-11-06 06:42:02 +0800 | [diff] [blame] | 46 | VKAPI_ATTR VkResult VKAPI_CALL loader_GetPhysicalDeviceSurfaceSupportKHR( |
Ian Elliott | af5c595 | 2015-11-17 17:46:38 -0700 | [diff] [blame] | 47 | VkPhysicalDevice physicalDevice, |
| 48 | uint32_t queueFamilyIndex, |
| 49 | VkSurfaceKHR surface, |
| 50 | VkBool32* pSupported); |
Ian Elliott | 486c550 | 2015-11-19 16:05:09 -0700 | [diff] [blame] | 51 | |
| 52 | VKAPI_ATTR VkResult VKAPI_CALL loader_GetPhysicalDeviceSurfaceCapabilitiesKHR( |
| 53 | VkPhysicalDevice physicalDevice, |
| 54 | VkSurfaceKHR surface, |
| 55 | VkSurfaceCapabilitiesKHR* pSurfaceCapabilities); |
| 56 | |
| 57 | VKAPI_ATTR VkResult VKAPI_CALL loader_GetPhysicalDeviceSurfaceFormatsKHR( |
| 58 | VkPhysicalDevice physicalDevice, |
| 59 | VkSurfaceKHR surface, |
| 60 | uint32_t* pSurfaceFormatCount, |
| 61 | VkSurfaceFormatKHR* pSurfaceFormats); |
| 62 | |
| 63 | VKAPI_ATTR VkResult VKAPI_CALL loader_GetPhysicalDeviceSurfacePresentModesKHR( |
| 64 | VkPhysicalDevice physicalDevice, |
| 65 | VkSurfaceKHR surface, |
| 66 | uint32_t* pPresentModeCount, |
| 67 | VkPresentModeKHR* pPresentModes); |
Ian Elliott | 919fa30 | 2015-11-24 15:39:10 -0700 | [diff] [blame] | 68 | |
| 69 | #ifdef VK_USE_PLATFORM_WIN32_KHR |
Jon Ashburn | f72a04b | 2015-11-25 17:55:49 -0700 | [diff] [blame] | 70 | VKAPI_ATTR VkResult VKAPI_CALL loader_CreateWin32SurfaceKHR( |
| 71 | VkInstance instance, |
| 72 | HINSTANCE hinstance, |
| 73 | HWND hwnd, |
| 74 | const VkAllocationCallbacks* pAllocator, |
| 75 | VkSurfaceKHR* pSurface); |
Ian Elliott | 919fa30 | 2015-11-24 15:39:10 -0700 | [diff] [blame] | 76 | VKAPI_ATTR VkBool32 VKAPI_CALL loader_GetPhysicalDeviceWin32PresentationSupportKHR( |
| 77 | VkPhysicalDevice physicalDevice, |
| 78 | uint32_t queueFamilyIndex); |
| 79 | #endif |
| 80 | #ifdef VK_USE_PLATFORM_MIR_KHR |
Jon Ashburn | f72a04b | 2015-11-25 17:55:49 -0700 | [diff] [blame] | 81 | VKAPI_ATTR VkResult VKAPI_CALL loader_CreateMirSurfaceKHR( |
| 82 | VkInstance instance, |
| 83 | Display* dpy, |
| 84 | Window window, |
| 85 | const VkAllocationCallbacks* pAllocator, |
| 86 | VkSurfaceKHR* pSurface); |
Ian Elliott | 919fa30 | 2015-11-24 15:39:10 -0700 | [diff] [blame] | 87 | VKAPI_ATTR VkBool32 VKAPI_CALL loader_GetPhysicalDeviceMirPresentationSupportKHR( |
| 88 | VkPhysicalDevice physicalDevice, |
| 89 | uint32_t queueFamilyIndex, |
| 90 | MirConnection* connection); |
| 91 | #endif |
| 92 | #ifdef VK_USE_PLATFORM_WAYLAND_KHR |
Jon Ashburn | f72a04b | 2015-11-25 17:55:49 -0700 | [diff] [blame] | 93 | VKAPI_ATTR VkResult VKAPI_CALL loader_CreateWaylandSurfaceKHR( |
| 94 | VkInstance instance, |
| 95 | struct wl_display* display, |
| 96 | struct wl_surface* surface, |
| 97 | const VkAllocationCallbacks* pAllocator, |
| 98 | VkSurfaceKHR* pSurface); |
Ian Elliott | 919fa30 | 2015-11-24 15:39:10 -0700 | [diff] [blame] | 99 | VKAPI_ATTR VkBool32 VKAPI_CALL loader_GetPhysicalDeviceWaylandPresentationSupportKHR( |
| 100 | VkPhysicalDevice physicalDevice, |
| 101 | uint32_t queueFamilyIndex, |
| 102 | struct wl_display* display); |
| 103 | #endif |
| 104 | #ifdef VK_USE_PLATFORM_XCB_KHR |
Jon Ashburn | f72a04b | 2015-11-25 17:55:49 -0700 | [diff] [blame] | 105 | VKAPI_ATTR VkResult VKAPI_CALL loader_CreateXcbSurfaceKHR( |
| 106 | VkInstance instance, |
| 107 | xcb_connection_t* connection, |
| 108 | xcb_window_t window, |
| 109 | const VkAllocationCallbacks* pAllocator, |
| 110 | VkSurfaceKHR* pSurface); |
| 111 | |
Ian Elliott | 919fa30 | 2015-11-24 15:39:10 -0700 | [diff] [blame] | 112 | VKAPI_ATTR VkBool32 VKAPI_CALL loader_GetPhysicalDeviceXcbPresentationSupportKHR( |
| 113 | VkPhysicalDevice physicalDevice, |
| 114 | uint32_t queueFamilyIndex, |
| 115 | xcb_connection_t* connection, |
| 116 | xcb_visualid_t visual_id); |
| 117 | #endif |
| 118 | #ifdef VK_USE_PLATFORM_XLIB_KHR |
Jon Ashburn | f72a04b | 2015-11-25 17:55:49 -0700 | [diff] [blame] | 119 | VKAPI_ATTR VkResult VKAPI_CALL loader_CreateXlibSurfaceKHR( |
| 120 | VkInstance instance, |
| 121 | Display* dpy, |
| 122 | Window window, |
| 123 | const VkAllocationCallbacks* pAllocator, |
| 124 | VkSurfaceKHR* pSurface); |
Ian Elliott | 919fa30 | 2015-11-24 15:39:10 -0700 | [diff] [blame] | 125 | VKAPI_ATTR VkBool32 VKAPI_CALL loader_GetPhysicalDeviceXlibPresentationSupportKHR( |
| 126 | VkPhysicalDevice physicalDevice, |
| 127 | uint32_t queueFamilyIndex, |
| 128 | Display* dpy, |
| 129 | VisualID visualID); |
| 130 | #endif |