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