101e04c3fSmrg#ifndef VULKAN_WIN32_H_ 201e04c3fSmrg#define VULKAN_WIN32_H_ 1 301e04c3fSmrg 401e04c3fSmrg/* 57ec681f3Smrg** Copyright 2015-2021 The Khronos Group Inc. 601e04c3fSmrg** 77ec681f3Smrg** SPDX-License-Identifier: Apache-2.0 801e04c3fSmrg*/ 901e04c3fSmrg 1001e04c3fSmrg/* 1101e04c3fSmrg** This header is generated from the Khronos Vulkan XML API Registry. 1201e04c3fSmrg** 1301e04c3fSmrg*/ 1401e04c3fSmrg 1501e04c3fSmrg 167ec681f3Smrg#ifdef __cplusplus 177ec681f3Smrgextern "C" { 187ec681f3Smrg#endif 197ec681f3Smrg 207ec681f3Smrg 21ed98bd31Smaya 2201e04c3fSmrg#define VK_KHR_win32_surface 1 2301e04c3fSmrg#define VK_KHR_WIN32_SURFACE_SPEC_VERSION 6 2401e04c3fSmrg#define VK_KHR_WIN32_SURFACE_EXTENSION_NAME "VK_KHR_win32_surface" 2501e04c3fSmrgtypedef VkFlags VkWin32SurfaceCreateFlagsKHR; 2601e04c3fSmrgtypedef struct VkWin32SurfaceCreateInfoKHR { 2701e04c3fSmrg VkStructureType sType; 2801e04c3fSmrg const void* pNext; 2901e04c3fSmrg VkWin32SurfaceCreateFlagsKHR flags; 3001e04c3fSmrg HINSTANCE hinstance; 3101e04c3fSmrg HWND hwnd; 3201e04c3fSmrg} VkWin32SurfaceCreateInfoKHR; 3301e04c3fSmrg 3401e04c3fSmrgtypedef VkResult (VKAPI_PTR *PFN_vkCreateWin32SurfaceKHR)(VkInstance instance, const VkWin32SurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); 3501e04c3fSmrgtypedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex); 3601e04c3fSmrg 3701e04c3fSmrg#ifndef VK_NO_PROTOTYPES 3801e04c3fSmrgVKAPI_ATTR VkResult VKAPI_CALL vkCreateWin32SurfaceKHR( 3901e04c3fSmrg VkInstance instance, 4001e04c3fSmrg const VkWin32SurfaceCreateInfoKHR* pCreateInfo, 4101e04c3fSmrg const VkAllocationCallbacks* pAllocator, 4201e04c3fSmrg VkSurfaceKHR* pSurface); 4301e04c3fSmrg 4401e04c3fSmrgVKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceWin32PresentationSupportKHR( 4501e04c3fSmrg VkPhysicalDevice physicalDevice, 4601e04c3fSmrg uint32_t queueFamilyIndex); 4701e04c3fSmrg#endif 4801e04c3fSmrg 49ed98bd31Smaya 5001e04c3fSmrg#define VK_KHR_external_memory_win32 1 5101e04c3fSmrg#define VK_KHR_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1 5201e04c3fSmrg#define VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_KHR_external_memory_win32" 5301e04c3fSmrgtypedef struct VkImportMemoryWin32HandleInfoKHR { 5401e04c3fSmrg VkStructureType sType; 5501e04c3fSmrg const void* pNext; 5601e04c3fSmrg VkExternalMemoryHandleTypeFlagBits handleType; 5701e04c3fSmrg HANDLE handle; 5801e04c3fSmrg LPCWSTR name; 5901e04c3fSmrg} VkImportMemoryWin32HandleInfoKHR; 6001e04c3fSmrg 6101e04c3fSmrgtypedef struct VkExportMemoryWin32HandleInfoKHR { 6201e04c3fSmrg VkStructureType sType; 6301e04c3fSmrg const void* pNext; 6401e04c3fSmrg const SECURITY_ATTRIBUTES* pAttributes; 6501e04c3fSmrg DWORD dwAccess; 6601e04c3fSmrg LPCWSTR name; 6701e04c3fSmrg} VkExportMemoryWin32HandleInfoKHR; 6801e04c3fSmrg 6901e04c3fSmrgtypedef struct VkMemoryWin32HandlePropertiesKHR { 7001e04c3fSmrg VkStructureType sType; 7101e04c3fSmrg void* pNext; 7201e04c3fSmrg uint32_t memoryTypeBits; 7301e04c3fSmrg} VkMemoryWin32HandlePropertiesKHR; 7401e04c3fSmrg 7501e04c3fSmrgtypedef struct VkMemoryGetWin32HandleInfoKHR { 7601e04c3fSmrg VkStructureType sType; 7701e04c3fSmrg const void* pNext; 7801e04c3fSmrg VkDeviceMemory memory; 7901e04c3fSmrg VkExternalMemoryHandleTypeFlagBits handleType; 8001e04c3fSmrg} VkMemoryGetWin32HandleInfoKHR; 8101e04c3fSmrg 8201e04c3fSmrgtypedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandleKHR)(VkDevice device, const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle); 8301e04c3fSmrgtypedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandlePropertiesKHR)(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, HANDLE handle, VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties); 8401e04c3fSmrg 8501e04c3fSmrg#ifndef VK_NO_PROTOTYPES 8601e04c3fSmrgVKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandleKHR( 8701e04c3fSmrg VkDevice device, 8801e04c3fSmrg const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo, 8901e04c3fSmrg HANDLE* pHandle); 9001e04c3fSmrg 9101e04c3fSmrgVKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandlePropertiesKHR( 9201e04c3fSmrg VkDevice device, 9301e04c3fSmrg VkExternalMemoryHandleTypeFlagBits handleType, 9401e04c3fSmrg HANDLE handle, 9501e04c3fSmrg VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties); 9601e04c3fSmrg#endif 9701e04c3fSmrg 98ed98bd31Smaya 9901e04c3fSmrg#define VK_KHR_win32_keyed_mutex 1 10001e04c3fSmrg#define VK_KHR_WIN32_KEYED_MUTEX_SPEC_VERSION 1 10101e04c3fSmrg#define VK_KHR_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_KHR_win32_keyed_mutex" 10201e04c3fSmrgtypedef struct VkWin32KeyedMutexAcquireReleaseInfoKHR { 10301e04c3fSmrg VkStructureType sType; 10401e04c3fSmrg const void* pNext; 10501e04c3fSmrg uint32_t acquireCount; 10601e04c3fSmrg const VkDeviceMemory* pAcquireSyncs; 10701e04c3fSmrg const uint64_t* pAcquireKeys; 10801e04c3fSmrg const uint32_t* pAcquireTimeouts; 10901e04c3fSmrg uint32_t releaseCount; 11001e04c3fSmrg const VkDeviceMemory* pReleaseSyncs; 11101e04c3fSmrg const uint64_t* pReleaseKeys; 11201e04c3fSmrg} VkWin32KeyedMutexAcquireReleaseInfoKHR; 11301e04c3fSmrg 11401e04c3fSmrg 11501e04c3fSmrg 11601e04c3fSmrg#define VK_KHR_external_semaphore_win32 1 11701e04c3fSmrg#define VK_KHR_EXTERNAL_SEMAPHORE_WIN32_SPEC_VERSION 1 11801e04c3fSmrg#define VK_KHR_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME "VK_KHR_external_semaphore_win32" 11901e04c3fSmrgtypedef struct VkImportSemaphoreWin32HandleInfoKHR { 12001e04c3fSmrg VkStructureType sType; 12101e04c3fSmrg const void* pNext; 12201e04c3fSmrg VkSemaphore semaphore; 12301e04c3fSmrg VkSemaphoreImportFlags flags; 12401e04c3fSmrg VkExternalSemaphoreHandleTypeFlagBits handleType; 12501e04c3fSmrg HANDLE handle; 12601e04c3fSmrg LPCWSTR name; 12701e04c3fSmrg} VkImportSemaphoreWin32HandleInfoKHR; 12801e04c3fSmrg 12901e04c3fSmrgtypedef struct VkExportSemaphoreWin32HandleInfoKHR { 13001e04c3fSmrg VkStructureType sType; 13101e04c3fSmrg const void* pNext; 13201e04c3fSmrg const SECURITY_ATTRIBUTES* pAttributes; 13301e04c3fSmrg DWORD dwAccess; 13401e04c3fSmrg LPCWSTR name; 13501e04c3fSmrg} VkExportSemaphoreWin32HandleInfoKHR; 13601e04c3fSmrg 13701e04c3fSmrgtypedef struct VkD3D12FenceSubmitInfoKHR { 13801e04c3fSmrg VkStructureType sType; 13901e04c3fSmrg const void* pNext; 14001e04c3fSmrg uint32_t waitSemaphoreValuesCount; 14101e04c3fSmrg const uint64_t* pWaitSemaphoreValues; 14201e04c3fSmrg uint32_t signalSemaphoreValuesCount; 14301e04c3fSmrg const uint64_t* pSignalSemaphoreValues; 14401e04c3fSmrg} VkD3D12FenceSubmitInfoKHR; 14501e04c3fSmrg 14601e04c3fSmrgtypedef struct VkSemaphoreGetWin32HandleInfoKHR { 14701e04c3fSmrg VkStructureType sType; 14801e04c3fSmrg const void* pNext; 14901e04c3fSmrg VkSemaphore semaphore; 15001e04c3fSmrg VkExternalSemaphoreHandleTypeFlagBits handleType; 15101e04c3fSmrg} VkSemaphoreGetWin32HandleInfoKHR; 15201e04c3fSmrg 15301e04c3fSmrgtypedef VkResult (VKAPI_PTR *PFN_vkImportSemaphoreWin32HandleKHR)(VkDevice device, const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo); 15401e04c3fSmrgtypedef VkResult (VKAPI_PTR *PFN_vkGetSemaphoreWin32HandleKHR)(VkDevice device, const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle); 15501e04c3fSmrg 15601e04c3fSmrg#ifndef VK_NO_PROTOTYPES 15701e04c3fSmrgVKAPI_ATTR VkResult VKAPI_CALL vkImportSemaphoreWin32HandleKHR( 15801e04c3fSmrg VkDevice device, 15901e04c3fSmrg const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo); 16001e04c3fSmrg 16101e04c3fSmrgVKAPI_ATTR VkResult VKAPI_CALL vkGetSemaphoreWin32HandleKHR( 16201e04c3fSmrg VkDevice device, 16301e04c3fSmrg const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, 16401e04c3fSmrg HANDLE* pHandle); 16501e04c3fSmrg#endif 16601e04c3fSmrg 167ed98bd31Smaya 16801e04c3fSmrg#define VK_KHR_external_fence_win32 1 16901e04c3fSmrg#define VK_KHR_EXTERNAL_FENCE_WIN32_SPEC_VERSION 1 17001e04c3fSmrg#define VK_KHR_EXTERNAL_FENCE_WIN32_EXTENSION_NAME "VK_KHR_external_fence_win32" 17101e04c3fSmrgtypedef struct VkImportFenceWin32HandleInfoKHR { 17201e04c3fSmrg VkStructureType sType; 17301e04c3fSmrg const void* pNext; 17401e04c3fSmrg VkFence fence; 17501e04c3fSmrg VkFenceImportFlags flags; 17601e04c3fSmrg VkExternalFenceHandleTypeFlagBits handleType; 17701e04c3fSmrg HANDLE handle; 17801e04c3fSmrg LPCWSTR name; 17901e04c3fSmrg} VkImportFenceWin32HandleInfoKHR; 18001e04c3fSmrg 18101e04c3fSmrgtypedef struct VkExportFenceWin32HandleInfoKHR { 18201e04c3fSmrg VkStructureType sType; 18301e04c3fSmrg const void* pNext; 18401e04c3fSmrg const SECURITY_ATTRIBUTES* pAttributes; 18501e04c3fSmrg DWORD dwAccess; 18601e04c3fSmrg LPCWSTR name; 18701e04c3fSmrg} VkExportFenceWin32HandleInfoKHR; 18801e04c3fSmrg 18901e04c3fSmrgtypedef struct VkFenceGetWin32HandleInfoKHR { 19001e04c3fSmrg VkStructureType sType; 19101e04c3fSmrg const void* pNext; 19201e04c3fSmrg VkFence fence; 19301e04c3fSmrg VkExternalFenceHandleTypeFlagBits handleType; 19401e04c3fSmrg} VkFenceGetWin32HandleInfoKHR; 19501e04c3fSmrg 19601e04c3fSmrgtypedef VkResult (VKAPI_PTR *PFN_vkImportFenceWin32HandleKHR)(VkDevice device, const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo); 19701e04c3fSmrgtypedef VkResult (VKAPI_PTR *PFN_vkGetFenceWin32HandleKHR)(VkDevice device, const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle); 19801e04c3fSmrg 19901e04c3fSmrg#ifndef VK_NO_PROTOTYPES 20001e04c3fSmrgVKAPI_ATTR VkResult VKAPI_CALL vkImportFenceWin32HandleKHR( 20101e04c3fSmrg VkDevice device, 20201e04c3fSmrg const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo); 20301e04c3fSmrg 20401e04c3fSmrgVKAPI_ATTR VkResult VKAPI_CALL vkGetFenceWin32HandleKHR( 20501e04c3fSmrg VkDevice device, 20601e04c3fSmrg const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, 20701e04c3fSmrg HANDLE* pHandle); 20801e04c3fSmrg#endif 20901e04c3fSmrg 210ed98bd31Smaya 21101e04c3fSmrg#define VK_NV_external_memory_win32 1 21201e04c3fSmrg#define VK_NV_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1 21301e04c3fSmrg#define VK_NV_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_NV_external_memory_win32" 21401e04c3fSmrgtypedef struct VkImportMemoryWin32HandleInfoNV { 21501e04c3fSmrg VkStructureType sType; 21601e04c3fSmrg const void* pNext; 21701e04c3fSmrg VkExternalMemoryHandleTypeFlagsNV handleType; 21801e04c3fSmrg HANDLE handle; 21901e04c3fSmrg} VkImportMemoryWin32HandleInfoNV; 22001e04c3fSmrg 22101e04c3fSmrgtypedef struct VkExportMemoryWin32HandleInfoNV { 22201e04c3fSmrg VkStructureType sType; 22301e04c3fSmrg const void* pNext; 22401e04c3fSmrg const SECURITY_ATTRIBUTES* pAttributes; 22501e04c3fSmrg DWORD dwAccess; 22601e04c3fSmrg} VkExportMemoryWin32HandleInfoNV; 22701e04c3fSmrg 22801e04c3fSmrgtypedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandleNV)(VkDevice device, VkDeviceMemory memory, VkExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle); 22901e04c3fSmrg 23001e04c3fSmrg#ifndef VK_NO_PROTOTYPES 23101e04c3fSmrgVKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandleNV( 23201e04c3fSmrg VkDevice device, 23301e04c3fSmrg VkDeviceMemory memory, 23401e04c3fSmrg VkExternalMemoryHandleTypeFlagsNV handleType, 23501e04c3fSmrg HANDLE* pHandle); 23601e04c3fSmrg#endif 23701e04c3fSmrg 238ed98bd31Smaya 23901e04c3fSmrg#define VK_NV_win32_keyed_mutex 1 2407ec681f3Smrg#define VK_NV_WIN32_KEYED_MUTEX_SPEC_VERSION 2 24101e04c3fSmrg#define VK_NV_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_NV_win32_keyed_mutex" 24201e04c3fSmrgtypedef struct VkWin32KeyedMutexAcquireReleaseInfoNV { 24301e04c3fSmrg VkStructureType sType; 24401e04c3fSmrg const void* pNext; 24501e04c3fSmrg uint32_t acquireCount; 24601e04c3fSmrg const VkDeviceMemory* pAcquireSyncs; 24701e04c3fSmrg const uint64_t* pAcquireKeys; 24801e04c3fSmrg const uint32_t* pAcquireTimeoutMilliseconds; 24901e04c3fSmrg uint32_t releaseCount; 25001e04c3fSmrg const VkDeviceMemory* pReleaseSyncs; 25101e04c3fSmrg const uint64_t* pReleaseKeys; 25201e04c3fSmrg} VkWin32KeyedMutexAcquireReleaseInfoNV; 25301e04c3fSmrg 25401e04c3fSmrg 25501e04c3fSmrg 256ed98bd31Smaya#define VK_EXT_full_screen_exclusive 1 2577ec681f3Smrg#define VK_EXT_FULL_SCREEN_EXCLUSIVE_SPEC_VERSION 4 258ed98bd31Smaya#define VK_EXT_FULL_SCREEN_EXCLUSIVE_EXTENSION_NAME "VK_EXT_full_screen_exclusive" 259ed98bd31Smaya 260ed98bd31Smayatypedef enum VkFullScreenExclusiveEXT { 261ed98bd31Smaya VK_FULL_SCREEN_EXCLUSIVE_DEFAULT_EXT = 0, 262ed98bd31Smaya VK_FULL_SCREEN_EXCLUSIVE_ALLOWED_EXT = 1, 263ed98bd31Smaya VK_FULL_SCREEN_EXCLUSIVE_DISALLOWED_EXT = 2, 264ed98bd31Smaya VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT = 3, 265ed98bd31Smaya VK_FULL_SCREEN_EXCLUSIVE_MAX_ENUM_EXT = 0x7FFFFFFF 266ed98bd31Smaya} VkFullScreenExclusiveEXT; 267ed98bd31Smayatypedef struct VkSurfaceFullScreenExclusiveInfoEXT { 268ed98bd31Smaya VkStructureType sType; 269ed98bd31Smaya void* pNext; 270ed98bd31Smaya VkFullScreenExclusiveEXT fullScreenExclusive; 271ed98bd31Smaya} VkSurfaceFullScreenExclusiveInfoEXT; 272ed98bd31Smaya 273ed98bd31Smayatypedef struct VkSurfaceCapabilitiesFullScreenExclusiveEXT { 274ed98bd31Smaya VkStructureType sType; 275ed98bd31Smaya void* pNext; 276ed98bd31Smaya VkBool32 fullScreenExclusiveSupported; 277ed98bd31Smaya} VkSurfaceCapabilitiesFullScreenExclusiveEXT; 278ed98bd31Smaya 279ed98bd31Smayatypedef struct VkSurfaceFullScreenExclusiveWin32InfoEXT { 280ed98bd31Smaya VkStructureType sType; 281ed98bd31Smaya const void* pNext; 282ed98bd31Smaya HMONITOR hmonitor; 283ed98bd31Smaya} VkSurfaceFullScreenExclusiveWin32InfoEXT; 284ed98bd31Smaya 285ed98bd31Smayatypedef VkResult (VKAPI_PTR *PFN_vkGetPhysicalDeviceSurfacePresentModes2EXT)(VkPhysicalDevice physicalDevice, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, uint32_t* pPresentModeCount, VkPresentModeKHR* pPresentModes); 286ed98bd31Smayatypedef VkResult (VKAPI_PTR *PFN_vkAcquireFullScreenExclusiveModeEXT)(VkDevice device, VkSwapchainKHR swapchain); 287ed98bd31Smayatypedef VkResult (VKAPI_PTR *PFN_vkReleaseFullScreenExclusiveModeEXT)(VkDevice device, VkSwapchainKHR swapchain); 288ed98bd31Smayatypedef VkResult (VKAPI_PTR *PFN_vkGetDeviceGroupSurfacePresentModes2EXT)(VkDevice device, const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, VkDeviceGroupPresentModeFlagsKHR* pModes); 289ed98bd31Smaya 290ed98bd31Smaya#ifndef VK_NO_PROTOTYPES 291ed98bd31SmayaVKAPI_ATTR VkResult VKAPI_CALL vkGetPhysicalDeviceSurfacePresentModes2EXT( 292ed98bd31Smaya VkPhysicalDevice physicalDevice, 293ed98bd31Smaya const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, 294ed98bd31Smaya uint32_t* pPresentModeCount, 295ed98bd31Smaya VkPresentModeKHR* pPresentModes); 296ed98bd31Smaya 297ed98bd31SmayaVKAPI_ATTR VkResult VKAPI_CALL vkAcquireFullScreenExclusiveModeEXT( 298ed98bd31Smaya VkDevice device, 299ed98bd31Smaya VkSwapchainKHR swapchain); 300ed98bd31Smaya 301ed98bd31SmayaVKAPI_ATTR VkResult VKAPI_CALL vkReleaseFullScreenExclusiveModeEXT( 302ed98bd31Smaya VkDevice device, 303ed98bd31Smaya VkSwapchainKHR swapchain); 304ed98bd31Smaya 305ed98bd31SmayaVKAPI_ATTR VkResult VKAPI_CALL vkGetDeviceGroupSurfacePresentModes2EXT( 306ed98bd31Smaya VkDevice device, 307ed98bd31Smaya const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo, 308ed98bd31Smaya VkDeviceGroupPresentModeFlagsKHR* pModes); 309ed98bd31Smaya#endif 310ed98bd31Smaya 31101e04c3fSmrg#ifdef __cplusplus 31201e04c3fSmrg} 31301e04c3fSmrg#endif 31401e04c3fSmrg 31501e04c3fSmrg#endif 316