• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2015-2016 The Khronos Group Inc.
3  * Copyright (c) 2015-2016 Valve Corporation
4  * Copyright (c) 2015-2016 LunarG, Inc.
5  *
6  * Permission is hereby granted, free of charge, to any person obtaining a copy
7  * of this software and/or associated documentation files (the "Materials"), to
8  * deal in the Materials without restriction, including without limitation the
9  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10  * sell copies of the Materials, and to permit persons to whom the Materials are
11  * furnished to do so, subject to the following conditions:
12  *
13  * The above copyright notice(s) and this permission notice shall be included in
14  * all copies or substantial portions of the Materials.
15  *
16  * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19  *
20  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
21  * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
22  * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE
23  * USE OR OTHER DEALINGS IN THE MATERIALS.
24  *
25  * Author: Ian Elliott <ian@lunarg.com>
26  *
27  */
28 
29 #include "vk_loader_platform.h"
30 #include "loader.h"
31 
32 bool wsi_swapchain_instance_gpa(struct loader_instance *ptr_instance,
33                                 const char *name, void **addr);
34 void wsi_add_instance_extensions(const struct loader_instance *inst,
35                                  struct loader_extension_list *ext_list);
36 
37 void wsi_create_instance(struct loader_instance *ptr_instance,
38                          const VkInstanceCreateInfo *pCreateInfo);
39 
40 VKAPI_ATTR void VKAPI_CALL
41 terminator_DestroySurfaceKHR(VkInstance instance, VkSurfaceKHR surface,
42                              const VkAllocationCallbacks *pAllocator);
43 
44 VKAPI_ATTR VkResult VKAPI_CALL
45 terminator_GetPhysicalDeviceSurfaceSupportKHR(VkPhysicalDevice physicalDevice,
46                                               uint32_t queueFamilyIndex,
47                                               VkSurfaceKHR surface,
48                                               VkBool32 *pSupported);
49 
50 VKAPI_ATTR VkResult VKAPI_CALL
51 terminator_GetPhysicalDeviceSurfaceCapabilitiesKHR(
52     VkPhysicalDevice physicalDevice, VkSurfaceKHR surface,
53     VkSurfaceCapabilitiesKHR *pSurfaceCapabilities);
54 
55 VKAPI_ATTR VkResult VKAPI_CALL terminator_GetPhysicalDeviceSurfaceFormatsKHR(
56     VkPhysicalDevice physicalDevice, VkSurfaceKHR surface,
57     uint32_t *pSurfaceFormatCount, VkSurfaceFormatKHR *pSurfaceFormats);
58 
59 VKAPI_ATTR VkResult VKAPI_CALL
60 terminator_GetPhysicalDeviceSurfacePresentModesKHR(
61     VkPhysicalDevice physicalDevice, VkSurfaceKHR surface,
62     uint32_t *pPresentModeCount, VkPresentModeKHR *pPresentModes);
63 
64 #ifdef VK_USE_PLATFORM_WIN32_KHR
65 VKAPI_ATTR VkResult VKAPI_CALL
66 terminator_CreateWin32SurfaceKHR(VkInstance instance,
67                                  const VkWin32SurfaceCreateInfoKHR *pCreateInfo,
68                                  const VkAllocationCallbacks *pAllocator,
69                                  VkSurfaceKHR *pSurface);
70 VKAPI_ATTR VkBool32 VKAPI_CALL
71 terminator_GetPhysicalDeviceWin32PresentationSupportKHR(
72     VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex);
73 #endif
74 #ifdef VK_USE_PLATFORM_MIR_KHR
75 VKAPI_ATTR VkResult VKAPI_CALL
76 terminator_CreateMirSurfaceKHR(VkInstance instance,
77                                const VkMirSurfaceCreateInfoKHR *pCreateInfo,
78                                const VkAllocationCallbacks *pAllocator,
79                                VkSurfaceKHR *pSurface);
80 VKAPI_ATTR VkBool32 VKAPI_CALL
81 terminator_GetPhysicalDeviceMirPresentationSupportKHR(
82     VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex,
83     MirConnection *connection);
84 #endif
85 #ifdef VK_USE_PLATFORM_WAYLAND_KHR
86 VKAPI_ATTR VkResult VKAPI_CALL terminator_CreateWaylandSurfaceKHR(
87     VkInstance instance, const VkWaylandSurfaceCreateInfoKHR *pCreateInfo,
88     const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface);
89 VKAPI_ATTR VkBool32 VKAPI_CALL
90 terminator_GetPhysicalDeviceWaylandPresentationSupportKHR(
91     VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex,
92     struct wl_display *display);
93 #endif
94 #ifdef VK_USE_PLATFORM_XCB_KHR
95 VKAPI_ATTR VkResult VKAPI_CALL
96 terminator_CreateXcbSurfaceKHR(VkInstance instance,
97                                const VkXcbSurfaceCreateInfoKHR *pCreateInfo,
98                                const VkAllocationCallbacks *pAllocator,
99                                VkSurfaceKHR *pSurface);
100 
101 VKAPI_ATTR VkBool32 VKAPI_CALL
102 terminator_GetPhysicalDeviceXcbPresentationSupportKHR(
103     VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex,
104     xcb_connection_t *connection, xcb_visualid_t visual_id);
105 #endif
106 #ifdef VK_USE_PLATFORM_XLIB_KHR
107 VKAPI_ATTR VkResult VKAPI_CALL
108 terminator_CreateXlibSurfaceKHR(VkInstance instance,
109                                 const VkXlibSurfaceCreateInfoKHR *pCreateInfo,
110                                 const VkAllocationCallbacks *pAllocator,
111                                 VkSurfaceKHR *pSurface);
112 VKAPI_ATTR VkBool32 VKAPI_CALL
113 terminator_GetPhysicalDeviceXlibPresentationSupportKHR(
114     VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, Display *dpy,
115     VisualID visualID);
116 #endif
117 VKAPI_ATTR VkResult VKAPI_CALL
118 terminator_GetPhysicalDeviceDisplayPropertiesKHR(
119     VkPhysicalDevice                            physicalDevice,
120     uint32_t*                                   pPropertyCount,
121     VkDisplayPropertiesKHR*                     pProperties);
122 VKAPI_ATTR VkResult VKAPI_CALL
123 terminator_GetPhysicalDeviceDisplayPlanePropertiesKHR(
124     VkPhysicalDevice                            physicalDevice,
125     uint32_t*                                   pPropertyCount,
126     VkDisplayPlanePropertiesKHR*                pProperties);
127 VKAPI_ATTR VkResult VKAPI_CALL
128 terminator_GetDisplayPlaneSupportedDisplaysKHR(
129     VkPhysicalDevice                            physicalDevice,
130     uint32_t                                    planeIndex,
131     uint32_t*                                   pDisplayCount,
132     VkDisplayKHR*                               pDisplays);
133 VKAPI_ATTR VkResult VKAPI_CALL
134 terminator_GetDisplayModePropertiesKHR(
135     VkPhysicalDevice                            physicalDevice,
136     VkDisplayKHR                                display,
137     uint32_t*                                   pPropertyCount,
138     VkDisplayModePropertiesKHR*                 pProperties);
139 VKAPI_ATTR VkResult VKAPI_CALL
140 terminator_CreateDisplayModeKHR(
141     VkPhysicalDevice                            physicalDevice,
142     VkDisplayKHR                                display,
143     const VkDisplayModeCreateInfoKHR*           pCreateInfo,
144     const VkAllocationCallbacks*                pAllocator,
145     VkDisplayModeKHR*                           pMode);
146 VKAPI_ATTR VkResult VKAPI_CALL
147 terminator_GetDisplayPlaneCapabilitiesKHR(
148     VkPhysicalDevice                            physicalDevice,
149     VkDisplayModeKHR                            mode,
150     uint32_t                                    planeIndex,
151     VkDisplayPlaneCapabilitiesKHR*              pCapabilities);
152 VKAPI_ATTR VkResult VKAPI_CALL
153 terminator_CreateDisplayPlaneSurfaceKHR(
154     VkInstance                                  instance,
155     const VkDisplaySurfaceCreateInfoKHR*        pCreateInfo,
156     const VkAllocationCallbacks*                pAllocator,
157     VkSurfaceKHR*                               pSurface);