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