• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef VULKAN_WIN32_H_
2 #define VULKAN_WIN32_H_ 1
3 
4 /*
5 ** Copyright 2015-2021 The Khronos Group Inc.
6 **
7 ** SPDX-License-Identifier: Apache-2.0
8 */
9 
10 /*
11 ** This header is generated from the Khronos Vulkan XML API Registry.
12 **
13 */
14 
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19 
20 
21 
22 #define VK_KHR_win32_surface 1
23 #define VK_KHR_WIN32_SURFACE_SPEC_VERSION 6
24 #define VK_KHR_WIN32_SURFACE_EXTENSION_NAME "VK_KHR_win32_surface"
25 typedef VkFlags VkWin32SurfaceCreateFlagsKHR;
26 typedef struct VkWin32SurfaceCreateInfoKHR {
27     VkStructureType                 sType;
28     const void*                     pNext;
29     VkWin32SurfaceCreateFlagsKHR    flags;
30     HINSTANCE                       hinstance;
31     HWND                            hwnd;
32 } VkWin32SurfaceCreateInfoKHR;
33 
34 typedef VkResult (VKAPI_PTR *PFN_vkCreateWin32SurfaceKHR)(VkInstance instance, const VkWin32SurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
35 typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex);
36 
37 #ifndef VK_NO_PROTOTYPES
38 VKAPI_ATTR VkResult VKAPI_CALL vkCreateWin32SurfaceKHR(
39     VkInstance                                  instance,
40     const VkWin32SurfaceCreateInfoKHR*          pCreateInfo,
41     const VkAllocationCallbacks*                pAllocator,
42     VkSurfaceKHR*                               pSurface);
43 
44 VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceWin32PresentationSupportKHR(
45     VkPhysicalDevice                            physicalDevice,
46     uint32_t                                    queueFamilyIndex);
47 #endif
48 
49 
50 #define VK_KHR_external_memory_win32 1
51 #define VK_KHR_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1
52 #define VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_KHR_external_memory_win32"
53 typedef struct VkImportMemoryWin32HandleInfoKHR {
54     VkStructureType                       sType;
55     const void*                           pNext;
56     VkExternalMemoryHandleTypeFlagBits    handleType;
57     HANDLE                                handle;
58     LPCWSTR                               name;
59 } VkImportMemoryWin32HandleInfoKHR;
60 
61 typedef struct VkExportMemoryWin32HandleInfoKHR {
62     VkStructureType               sType;
63     const void*                   pNext;
64     const SECURITY_ATTRIBUTES*    pAttributes;
65     DWORD                         dwAccess;
66     LPCWSTR                       name;
67 } VkExportMemoryWin32HandleInfoKHR;
68 
69 typedef struct VkMemoryWin32HandlePropertiesKHR {
70     VkStructureType    sType;
71     void*              pNext;
72     uint32_t           memoryTypeBits;
73 } VkMemoryWin32HandlePropertiesKHR;
74 
75 typedef struct VkMemoryGetWin32HandleInfoKHR {
76     VkStructureType                       sType;
77     const void*                           pNext;
78     VkDeviceMemory                        memory;
79     VkExternalMemoryHandleTypeFlagBits    handleType;
80 } VkMemoryGetWin32HandleInfoKHR;
81 
82 typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandleKHR)(VkDevice device, const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle);
83 typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandlePropertiesKHR)(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, HANDLE handle, VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties);
84 
85 #ifndef VK_NO_PROTOTYPES
86 VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandleKHR(
87     VkDevice                                    device,
88     const VkMemoryGetWin32HandleInfoKHR*        pGetWin32HandleInfo,
89     HANDLE*                                     pHandle);
90 
91 VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandlePropertiesKHR(
92     VkDevice                                    device,
93     VkExternalMemoryHandleTypeFlagBits          handleType,
94     HANDLE                                      handle,
95     VkMemoryWin32HandlePropertiesKHR*           pMemoryWin32HandleProperties);
96 #endif
97 
98 
99 #define VK_KHR_win32_keyed_mutex 1
100 #define VK_KHR_WIN32_KEYED_MUTEX_SPEC_VERSION 1
101 #define VK_KHR_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_KHR_win32_keyed_mutex"
102 typedef struct VkWin32KeyedMutexAcquireReleaseInfoKHR {
103     VkStructureType          sType;
104     const void*              pNext;
105     uint32_t                 acquireCount;
106     const VkDeviceMemory*    pAcquireSyncs;
107     const uint64_t*          pAcquireKeys;
108     const uint32_t*          pAcquireTimeouts;
109     uint32_t                 releaseCount;
110     const VkDeviceMemory*    pReleaseSyncs;
111     const uint64_t*          pReleaseKeys;
112 } VkWin32KeyedMutexAcquireReleaseInfoKHR;
113 
114 
115 
116 #define VK_KHR_external_semaphore_win32 1
117 #define VK_KHR_EXTERNAL_SEMAPHORE_WIN32_SPEC_VERSION 1
118 #define VK_KHR_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME "VK_KHR_external_semaphore_win32"
119 typedef struct VkImportSemaphoreWin32HandleInfoKHR {
120     VkStructureType                          sType;
121     const void*                              pNext;
122     VkSemaphore                              semaphore;
123     VkSemaphoreImportFlags                   flags;
124     VkExternalSemaphoreHandleTypeFlagBits    handleType;
125     HANDLE                                   handle;
126     LPCWSTR                                  name;
127 } VkImportSemaphoreWin32HandleInfoKHR;
128 
129 typedef struct VkExportSemaphoreWin32HandleInfoKHR {
130     VkStructureType               sType;
131     const void*                   pNext;
132     const SECURITY_ATTRIBUTES*    pAttributes;
133     DWORD                         dwAccess;
134     LPCWSTR                       name;
135 } VkExportSemaphoreWin32HandleInfoKHR;
136 
137 typedef struct VkD3D12FenceSubmitInfoKHR {
138     VkStructureType    sType;
139     const void*        pNext;
140     uint32_t           waitSemaphoreValuesCount;
141     const uint64_t*    pWaitSemaphoreValues;
142     uint32_t           signalSemaphoreValuesCount;
143     const uint64_t*    pSignalSemaphoreValues;
144 } VkD3D12FenceSubmitInfoKHR;
145 
146 typedef struct VkSemaphoreGetWin32HandleInfoKHR {
147     VkStructureType                          sType;
148     const void*                              pNext;
149     VkSemaphore                              semaphore;
150     VkExternalSemaphoreHandleTypeFlagBits    handleType;
151 } VkSemaphoreGetWin32HandleInfoKHR;
152 
153 typedef VkResult (VKAPI_PTR *PFN_vkImportSemaphoreWin32HandleKHR)(VkDevice device, const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo);
154 typedef VkResult (VKAPI_PTR *PFN_vkGetSemaphoreWin32HandleKHR)(VkDevice device, const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle);
155 
156 #ifndef VK_NO_PROTOTYPES
157 VKAPI_ATTR VkResult VKAPI_CALL vkImportSemaphoreWin32HandleKHR(
158     VkDevice                                    device,
159     const VkImportSemaphoreWin32HandleInfoKHR*  pImportSemaphoreWin32HandleInfo);
160 
161 VKAPI_ATTR VkResult VKAPI_CALL vkGetSemaphoreWin32HandleKHR(
162     VkDevice                                    device,
163     const VkSemaphoreGetWin32HandleInfoKHR*     pGetWin32HandleInfo,
164     HANDLE*                                     pHandle);
165 #endif
166 
167 
168 #define VK_KHR_external_fence_win32 1
169 #define VK_KHR_EXTERNAL_FENCE_WIN32_SPEC_VERSION 1
170 #define VK_KHR_EXTERNAL_FENCE_WIN32_EXTENSION_NAME "VK_KHR_external_fence_win32"
171 typedef struct VkImportFenceWin32HandleInfoKHR {
172     VkStructureType                      sType;
173     const void*                          pNext;
174     VkFence                              fence;
175     VkFenceImportFlags                   flags;
176     VkExternalFenceHandleTypeFlagBits    handleType;
177     HANDLE                               handle;
178     LPCWSTR                              name;
179 } VkImportFenceWin32HandleInfoKHR;
180 
181 typedef struct VkExportFenceWin32HandleInfoKHR {
182     VkStructureType               sType;
183     const void*                   pNext;
184     const SECURITY_ATTRIBUTES*    pAttributes;
185     DWORD                         dwAccess;
186     LPCWSTR                       name;
187 } VkExportFenceWin32HandleInfoKHR;
188 
189 typedef struct VkFenceGetWin32HandleInfoKHR {
190     VkStructureType                      sType;
191     const void*                          pNext;
192     VkFence                              fence;
193     VkExternalFenceHandleTypeFlagBits    handleType;
194 } VkFenceGetWin32HandleInfoKHR;
195 
196 typedef VkResult (VKAPI_PTR *PFN_vkImportFenceWin32HandleKHR)(VkDevice device, const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo);
197 typedef VkResult (VKAPI_PTR *PFN_vkGetFenceWin32HandleKHR)(VkDevice device, const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle);
198 
199 #ifndef VK_NO_PROTOTYPES
200 VKAPI_ATTR VkResult VKAPI_CALL vkImportFenceWin32HandleKHR(
201     VkDevice                                    device,
202     const VkImportFenceWin32HandleInfoKHR*      pImportFenceWin32HandleInfo);
203 
204 VKAPI_ATTR VkResult VKAPI_CALL vkGetFenceWin32HandleKHR(
205     VkDevice                                    device,
206     const VkFenceGetWin32HandleInfoKHR*         pGetWin32HandleInfo,
207     HANDLE*                                     pHandle);
208 #endif
209 
210 
211 #define VK_NV_external_memory_win32 1
212 #define VK_NV_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1
213 #define VK_NV_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_NV_external_memory_win32"
214 typedef struct VkImportMemoryWin32HandleInfoNV {
215     VkStructureType                      sType;
216     const void*                          pNext;
217     VkExternalMemoryHandleTypeFlagsNV    handleType;
218     HANDLE                               handle;
219 } VkImportMemoryWin32HandleInfoNV;
220 
221 typedef struct VkExportMemoryWin32HandleInfoNV {
222     VkStructureType               sType;
223     const void*                   pNext;
224     const SECURITY_ATTRIBUTES*    pAttributes;
225     DWORD                         dwAccess;
226 } VkExportMemoryWin32HandleInfoNV;
227 
228 typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandleNV)(VkDevice device, VkDeviceMemory memory, VkExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle);
229 
230 #ifndef VK_NO_PROTOTYPES
231 VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandleNV(
232     VkDevice                                    device,
233     VkDeviceMemory                              memory,
234     VkExternalMemoryHandleTypeFlagsNV           handleType,
235     HANDLE*                                     pHandle);
236 #endif
237 
238 
239 #define VK_NV_win32_keyed_mutex 1
240 #define VK_NV_WIN32_KEYED_MUTEX_SPEC_VERSION 2
241 #define VK_NV_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_NV_win32_keyed_mutex"
242 typedef struct VkWin32KeyedMutexAcquireReleaseInfoNV {
243     VkStructureType          sType;
244     const void*              pNext;
245     uint32_t                 acquireCount;
246     const VkDeviceMemory*    pAcquireSyncs;
247     const uint64_t*          pAcquireKeys;
248     const uint32_t*          pAcquireTimeoutMilliseconds;
249     uint32_t                 releaseCount;
250     const VkDeviceMemory*    pReleaseSyncs;
251     const uint64_t*          pReleaseKeys;
252 } VkWin32KeyedMutexAcquireReleaseInfoNV;
253 
254 
255 
256 #define VK_EXT_full_screen_exclusive 1
257 #define VK_EXT_FULL_SCREEN_EXCLUSIVE_SPEC_VERSION 4
258 #define VK_EXT_FULL_SCREEN_EXCLUSIVE_EXTENSION_NAME "VK_EXT_full_screen_exclusive"
259 
260 typedef enum VkFullScreenExclusiveEXT {
261     VK_FULL_SCREEN_EXCLUSIVE_DEFAULT_EXT = 0,
262     VK_FULL_SCREEN_EXCLUSIVE_ALLOWED_EXT = 1,
263     VK_FULL_SCREEN_EXCLUSIVE_DISALLOWED_EXT = 2,
264     VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT = 3,
265     VK_FULL_SCREEN_EXCLUSIVE_MAX_ENUM_EXT = 0x7FFFFFFF
266 } VkFullScreenExclusiveEXT;
267 typedef struct VkSurfaceFullScreenExclusiveInfoEXT {
268     VkStructureType             sType;
269     void*                       pNext;
270     VkFullScreenExclusiveEXT    fullScreenExclusive;
271 } VkSurfaceFullScreenExclusiveInfoEXT;
272 
273 typedef struct VkSurfaceCapabilitiesFullScreenExclusiveEXT {
274     VkStructureType    sType;
275     void*              pNext;
276     VkBool32           fullScreenExclusiveSupported;
277 } VkSurfaceCapabilitiesFullScreenExclusiveEXT;
278 
279 typedef struct VkSurfaceFullScreenExclusiveWin32InfoEXT {
280     VkStructureType    sType;
281     const void*        pNext;
282     HMONITOR           hmonitor;
283 } VkSurfaceFullScreenExclusiveWin32InfoEXT;
284 
285 typedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfacePresentModes2EXT)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, uint32_t* pPresentModeCount, VkPresentModeKHR* pPresentModes);
286 typedef VkResult (VKAPI_PTR *PFN_vkAcquireFullScreenExclusiveModeEXT)(VkDevice device, VkSwapchainKHR swapchain);
287 typedef VkResult (VKAPI_PTR *PFN_vkReleaseFullScreenExclusiveModeEXT)(VkDevice device, VkSwapchainKHR swapchain);
288 typedef VkResult (VKAPI_PTR *PFN_vkGetDeviceGroupSurfacePresentModes2EXT)(VkDevice device, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, VkDeviceGroupPresentModeFlagsKHR* pModes);
289 
290 #ifndef VK_NO_PROTOTYPES
291 VKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfacePresentModes2EXT(
292     VkPhysicalDevice                            physicalDevice,
293     const VkPhysicalDeviceSurfaceInfo2KHR*      pSurfaceInfo,
294     uint32_t*                                   pPresentModeCount,
295     VkPresentModeKHR*                           pPresentModes);
296 
297 VKAPI_ATTR VkResult VKAPI_CALL vkAcquireFullScreenExclusiveModeEXT(
298     VkDevice                                    device,
299     VkSwapchainKHR                              swapchain);
300 
301 VKAPI_ATTR VkResult VKAPI_CALL vkReleaseFullScreenExclusiveModeEXT(
302     VkDevice                                    device,
303     VkSwapchainKHR                              swapchain);
304 
305 VKAPI_ATTR VkResult VKAPI_CALL vkGetDeviceGroupSurfacePresentModes2EXT(
306     VkDevice                                    device,
307     const VkPhysicalDeviceSurfaceInfo2KHR*      pSurfaceInfo,
308     VkDeviceGroupPresentModeFlagsKHR*           pModes);
309 #endif
310 
311 #ifdef __cplusplus
312 }
313 #endif
314 
315 #endif
316