1 #ifndef VULKAN_WIN32_H_ 2 #define VULKAN_WIN32_H_ 1 3 4 #ifdef __cplusplus 5 extern "C" { 6 #endif 7 8 /* 9 ** Copyright (c) 2015-2018 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 #define VK_KHR_win32_surface 1 31 #define VK_KHR_WIN32_SURFACE_SPEC_VERSION 6 32 #define VK_KHR_WIN32_SURFACE_EXTENSION_NAME "VK_KHR_win32_surface" 33 34 typedef VkFlags VkWin32SurfaceCreateFlagsKHR; 35 36 typedef struct VkWin32SurfaceCreateInfoKHR { 37 VkStructureType sType; 38 const void* pNext; 39 VkWin32SurfaceCreateFlagsKHR flags; 40 HINSTANCE hinstance; 41 HWND hwnd; 42 } VkWin32SurfaceCreateInfoKHR; 43 44 45 typedef VkResult (VKAPI_PTR *PFN_vkCreateWin32SurfaceKHR)(VkInstance instance, const VkWin32SurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); 46 typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex); 47 48 #ifndef VK_NO_PROTOTYPES 49 VKAPI_ATTR VkResult VKAPI_CALL vkCreateWin32SurfaceKHR( 50 VkInstance instance, 51 const VkWin32SurfaceCreateInfoKHR* pCreateInfo, 52 const VkAllocationCallbacks* pAllocator, 53 VkSurfaceKHR* pSurface); 54 55 VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceWin32PresentationSupportKHR( 56 VkPhysicalDevice physicalDevice, 57 uint32_t queueFamilyIndex); 58 #endif 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 64 typedef struct VkImportMemoryWin32HandleInfoKHR { 65 VkStructureType sType; 66 const void* pNext; 67 VkExternalMemoryHandleTypeFlagBits handleType; 68 HANDLE handle; 69 LPCWSTR name; 70 } VkImportMemoryWin32HandleInfoKHR; 71 72 typedef struct VkExportMemoryWin32HandleInfoKHR { 73 VkStructureType sType; 74 const void* pNext; 75 const SECURITY_ATTRIBUTES* pAttributes; 76 DWORD dwAccess; 77 LPCWSTR name; 78 } VkExportMemoryWin32HandleInfoKHR; 79 80 typedef struct VkMemoryWin32HandlePropertiesKHR { 81 VkStructureType sType; 82 void* pNext; 83 uint32_t memoryTypeBits; 84 } VkMemoryWin32HandlePropertiesKHR; 85 86 typedef struct VkMemoryGetWin32HandleInfoKHR { 87 VkStructureType sType; 88 const void* pNext; 89 VkDeviceMemory memory; 90 VkExternalMemoryHandleTypeFlagBits handleType; 91 } VkMemoryGetWin32HandleInfoKHR; 92 93 94 typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandleKHR)(VkDevice device, const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle); 95 typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandlePropertiesKHR)(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, HANDLE handle, VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties); 96 97 #ifndef VK_NO_PROTOTYPES 98 VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandleKHR( 99 VkDevice device, 100 const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo, 101 HANDLE* pHandle); 102 103 VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandlePropertiesKHR( 104 VkDevice device, 105 VkExternalMemoryHandleTypeFlagBits handleType, 106 HANDLE handle, 107 VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties); 108 #endif 109 110 #define VK_KHR_win32_keyed_mutex 1 111 #define VK_KHR_WIN32_KEYED_MUTEX_SPEC_VERSION 1 112 #define VK_KHR_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_KHR_win32_keyed_mutex" 113 114 typedef struct VkWin32KeyedMutexAcquireReleaseInfoKHR { 115 VkStructureType sType; 116 const void* pNext; 117 uint32_t acquireCount; 118 const VkDeviceMemory* pAcquireSyncs; 119 const uint64_t* pAcquireKeys; 120 const uint32_t* pAcquireTimeouts; 121 uint32_t releaseCount; 122 const VkDeviceMemory* pReleaseSyncs; 123 const uint64_t* pReleaseKeys; 124 } VkWin32KeyedMutexAcquireReleaseInfoKHR; 125 126 127 128 #define VK_KHR_external_semaphore_win32 1 129 #define VK_KHR_EXTERNAL_SEMAPHORE_WIN32_SPEC_VERSION 1 130 #define VK_KHR_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME "VK_KHR_external_semaphore_win32" 131 132 typedef struct VkImportSemaphoreWin32HandleInfoKHR { 133 VkStructureType sType; 134 const void* pNext; 135 VkSemaphore semaphore; 136 VkSemaphoreImportFlags flags; 137 VkExternalSemaphoreHandleTypeFlagBits handleType; 138 HANDLE handle; 139 LPCWSTR name; 140 } VkImportSemaphoreWin32HandleInfoKHR; 141 142 typedef struct VkExportSemaphoreWin32HandleInfoKHR { 143 VkStructureType sType; 144 const void* pNext; 145 const SECURITY_ATTRIBUTES* pAttributes; 146 DWORD dwAccess; 147 LPCWSTR name; 148 } VkExportSemaphoreWin32HandleInfoKHR; 149 150 typedef struct VkD3D12FenceSubmitInfoKHR { 151 VkStructureType sType; 152 const void* pNext; 153 uint32_t waitSemaphoreValuesCount; 154 const uint64_t* pWaitSemaphoreValues; 155 uint32_t signalSemaphoreValuesCount; 156 const uint64_t* pSignalSemaphoreValues; 157 } VkD3D12FenceSubmitInfoKHR; 158 159 typedef struct VkSemaphoreGetWin32HandleInfoKHR { 160 VkStructureType sType; 161 const void* pNext; 162 VkSemaphore semaphore; 163 VkExternalSemaphoreHandleTypeFlagBits handleType; 164 } VkSemaphoreGetWin32HandleInfoKHR; 165 166 167 typedef VkResult (VKAPI_PTR *PFN_vkImportSemaphoreWin32HandleKHR)(VkDevice device, const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo); 168 typedef VkResult (VKAPI_PTR *PFN_vkGetSemaphoreWin32HandleKHR)(VkDevice device, const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle); 169 170 #ifndef VK_NO_PROTOTYPES 171 VKAPI_ATTR VkResult VKAPI_CALL vkImportSemaphoreWin32HandleKHR( 172 VkDevice device, 173 const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo); 174 175 VKAPI_ATTR VkResult VKAPI_CALL vkGetSemaphoreWin32HandleKHR( 176 VkDevice device, 177 const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, 178 HANDLE* pHandle); 179 #endif 180 181 #define VK_KHR_external_fence_win32 1 182 #define VK_KHR_EXTERNAL_FENCE_WIN32_SPEC_VERSION 1 183 #define VK_KHR_EXTERNAL_FENCE_WIN32_EXTENSION_NAME "VK_KHR_external_fence_win32" 184 185 typedef struct VkImportFenceWin32HandleInfoKHR { 186 VkStructureType sType; 187 const void* pNext; 188 VkFence fence; 189 VkFenceImportFlags flags; 190 VkExternalFenceHandleTypeFlagBits handleType; 191 HANDLE handle; 192 LPCWSTR name; 193 } VkImportFenceWin32HandleInfoKHR; 194 195 typedef struct VkExportFenceWin32HandleInfoKHR { 196 VkStructureType sType; 197 const void* pNext; 198 const SECURITY_ATTRIBUTES* pAttributes; 199 DWORD dwAccess; 200 LPCWSTR name; 201 } VkExportFenceWin32HandleInfoKHR; 202 203 typedef struct VkFenceGetWin32HandleInfoKHR { 204 VkStructureType sType; 205 const void* pNext; 206 VkFence fence; 207 VkExternalFenceHandleTypeFlagBits handleType; 208 } VkFenceGetWin32HandleInfoKHR; 209 210 211 typedef VkResult (VKAPI_PTR *PFN_vkImportFenceWin32HandleKHR)(VkDevice device, const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo); 212 typedef VkResult (VKAPI_PTR *PFN_vkGetFenceWin32HandleKHR)(VkDevice device, const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle); 213 214 #ifndef VK_NO_PROTOTYPES 215 VKAPI_ATTR VkResult VKAPI_CALL vkImportFenceWin32HandleKHR( 216 VkDevice device, 217 const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo); 218 219 VKAPI_ATTR VkResult VKAPI_CALL vkGetFenceWin32HandleKHR( 220 VkDevice device, 221 const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, 222 HANDLE* pHandle); 223 #endif 224 225 #define VK_NV_external_memory_win32 1 226 #define VK_NV_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1 227 #define VK_NV_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_NV_external_memory_win32" 228 229 typedef struct VkImportMemoryWin32HandleInfoNV { 230 VkStructureType sType; 231 const void* pNext; 232 VkExternalMemoryHandleTypeFlagsNV handleType; 233 HANDLE handle; 234 } VkImportMemoryWin32HandleInfoNV; 235 236 typedef struct VkExportMemoryWin32HandleInfoNV { 237 VkStructureType sType; 238 const void* pNext; 239 const SECURITY_ATTRIBUTES* pAttributes; 240 DWORD dwAccess; 241 } VkExportMemoryWin32HandleInfoNV; 242 243 244 typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandleNV)(VkDevice device, VkDeviceMemory memory, VkExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle); 245 246 #ifndef VK_NO_PROTOTYPES 247 VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandleNV( 248 VkDevice device, 249 VkDeviceMemory memory, 250 VkExternalMemoryHandleTypeFlagsNV handleType, 251 HANDLE* pHandle); 252 #endif 253 254 #define VK_NV_win32_keyed_mutex 1 255 #define VK_NV_WIN32_KEYED_MUTEX_SPEC_VERSION 1 256 #define VK_NV_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_NV_win32_keyed_mutex" 257 258 typedef struct VkWin32KeyedMutexAcquireReleaseInfoNV { 259 VkStructureType sType; 260 const void* pNext; 261 uint32_t acquireCount; 262 const VkDeviceMemory* pAcquireSyncs; 263 const uint64_t* pAcquireKeys; 264 const uint32_t* pAcquireTimeoutMilliseconds; 265 uint32_t releaseCount; 266 const VkDeviceMemory* pReleaseSyncs; 267 const uint64_t* pReleaseKeys; 268 } VkWin32KeyedMutexAcquireReleaseInfoNV; 269 270 271 272 #ifdef __cplusplus 273 } 274 #endif 275 276 #endif 277