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