vulkan_win32.h 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276
  1. #ifndef VULKAN_WIN32_H_
  2. #define VULKAN_WIN32_H_ 1
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. /*
  7. ** Copyright (c) 2015-2018 The Khronos Group Inc.
  8. **
  9. ** Licensed under the Apache License, Version 2.0 (the "License");
  10. ** you may not use this file except in compliance with the License.
  11. ** You may obtain a copy of the License at
  12. **
  13. ** http://www.apache.org/licenses/LICENSE-2.0
  14. **
  15. ** Unless required by applicable law or agreed to in writing, software
  16. ** distributed under the License is distributed on an "AS IS" BASIS,
  17. ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  18. ** See the License for the specific language governing permissions and
  19. ** limitations under the License.
  20. */
  21. /*
  22. ** This header is generated from the Khronos Vulkan XML API Registry.
  23. **
  24. */
  25. #define VK_KHR_win32_surface 1
  26. #define VK_KHR_WIN32_SURFACE_SPEC_VERSION 6
  27. #define VK_KHR_WIN32_SURFACE_EXTENSION_NAME "VK_KHR_win32_surface"
  28. typedef VkFlags VkWin32SurfaceCreateFlagsKHR;
  29. typedef struct VkWin32SurfaceCreateInfoKHR {
  30. VkStructureType sType;
  31. const void* pNext;
  32. VkWin32SurfaceCreateFlagsKHR flags;
  33. HINSTANCE hinstance;
  34. HWND hwnd;
  35. } VkWin32SurfaceCreateInfoKHR;
  36. typedef VkResult (VKAPI_PTR *PFN_vkCreateWin32SurfaceKHR)(VkInstance instance, const VkWin32SurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface);
  37. typedef VkBool32 (VKAPI_PTR *PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR)(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex);
  38. #ifndef VK_NO_PROTOTYPES
  39. VKAPI_ATTR VkResult VKAPI_CALL vkCreateWin32SurfaceKHR(
  40. VkInstance instance,
  41. const VkWin32SurfaceCreateInfoKHR* pCreateInfo,
  42. const VkAllocationCallbacks* pAllocator,
  43. VkSurfaceKHR* pSurface);
  44. VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceWin32PresentationSupportKHR(
  45. VkPhysicalDevice physicalDevice,
  46. uint32_t queueFamilyIndex);
  47. #endif
  48. #define VK_KHR_external_memory_win32 1
  49. #define VK_KHR_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1
  50. #define VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_KHR_external_memory_win32"
  51. typedef struct VkImportMemoryWin32HandleInfoKHR {
  52. VkStructureType sType;
  53. const void* pNext;
  54. VkExternalMemoryHandleTypeFlagBits handleType;
  55. HANDLE handle;
  56. LPCWSTR name;
  57. } VkImportMemoryWin32HandleInfoKHR;
  58. typedef struct VkExportMemoryWin32HandleInfoKHR {
  59. VkStructureType sType;
  60. const void* pNext;
  61. const SECURITY_ATTRIBUTES* pAttributes;
  62. DWORD dwAccess;
  63. LPCWSTR name;
  64. } VkExportMemoryWin32HandleInfoKHR;
  65. typedef struct VkMemoryWin32HandlePropertiesKHR {
  66. VkStructureType sType;
  67. void* pNext;
  68. uint32_t memoryTypeBits;
  69. } VkMemoryWin32HandlePropertiesKHR;
  70. typedef struct VkMemoryGetWin32HandleInfoKHR {
  71. VkStructureType sType;
  72. const void* pNext;
  73. VkDeviceMemory memory;
  74. VkExternalMemoryHandleTypeFlagBits handleType;
  75. } VkMemoryGetWin32HandleInfoKHR;
  76. typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandleKHR)(VkDevice device, const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle);
  77. typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandlePropertiesKHR)(VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, HANDLE handle, VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties);
  78. #ifndef VK_NO_PROTOTYPES
  79. VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandleKHR(
  80. VkDevice device,
  81. const VkMemoryGetWin32HandleInfoKHR* pGetWin32HandleInfo,
  82. HANDLE* pHandle);
  83. VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandlePropertiesKHR(
  84. VkDevice device,
  85. VkExternalMemoryHandleTypeFlagBits handleType,
  86. HANDLE handle,
  87. VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties);
  88. #endif
  89. #define VK_KHR_win32_keyed_mutex 1
  90. #define VK_KHR_WIN32_KEYED_MUTEX_SPEC_VERSION 1
  91. #define VK_KHR_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_KHR_win32_keyed_mutex"
  92. typedef struct VkWin32KeyedMutexAcquireReleaseInfoKHR {
  93. VkStructureType sType;
  94. const void* pNext;
  95. uint32_t acquireCount;
  96. const VkDeviceMemory* pAcquireSyncs;
  97. const uint64_t* pAcquireKeys;
  98. const uint32_t* pAcquireTimeouts;
  99. uint32_t releaseCount;
  100. const VkDeviceMemory* pReleaseSyncs;
  101. const uint64_t* pReleaseKeys;
  102. } VkWin32KeyedMutexAcquireReleaseInfoKHR;
  103. #define VK_KHR_external_semaphore_win32 1
  104. #define VK_KHR_EXTERNAL_SEMAPHORE_WIN32_SPEC_VERSION 1
  105. #define VK_KHR_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME "VK_KHR_external_semaphore_win32"
  106. typedef struct VkImportSemaphoreWin32HandleInfoKHR {
  107. VkStructureType sType;
  108. const void* pNext;
  109. VkSemaphore semaphore;
  110. VkSemaphoreImportFlags flags;
  111. VkExternalSemaphoreHandleTypeFlagBits handleType;
  112. HANDLE handle;
  113. LPCWSTR name;
  114. } VkImportSemaphoreWin32HandleInfoKHR;
  115. typedef struct VkExportSemaphoreWin32HandleInfoKHR {
  116. VkStructureType sType;
  117. const void* pNext;
  118. const SECURITY_ATTRIBUTES* pAttributes;
  119. DWORD dwAccess;
  120. LPCWSTR name;
  121. } VkExportSemaphoreWin32HandleInfoKHR;
  122. typedef struct VkD3D12FenceSubmitInfoKHR {
  123. VkStructureType sType;
  124. const void* pNext;
  125. uint32_t waitSemaphoreValuesCount;
  126. const uint64_t* pWaitSemaphoreValues;
  127. uint32_t signalSemaphoreValuesCount;
  128. const uint64_t* pSignalSemaphoreValues;
  129. } VkD3D12FenceSubmitInfoKHR;
  130. typedef struct VkSemaphoreGetWin32HandleInfoKHR {
  131. VkStructureType sType;
  132. const void* pNext;
  133. VkSemaphore semaphore;
  134. VkExternalSemaphoreHandleTypeFlagBits handleType;
  135. } VkSemaphoreGetWin32HandleInfoKHR;
  136. typedef VkResult (VKAPI_PTR *PFN_vkImportSemaphoreWin32HandleKHR)(VkDevice device, const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo);
  137. typedef VkResult (VKAPI_PTR *PFN_vkGetSemaphoreWin32HandleKHR)(VkDevice device, const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle);
  138. #ifndef VK_NO_PROTOTYPES
  139. VKAPI_ATTR VkResult VKAPI_CALL vkImportSemaphoreWin32HandleKHR(
  140. VkDevice device,
  141. const VkImportSemaphoreWin32HandleInfoKHR* pImportSemaphoreWin32HandleInfo);
  142. VKAPI_ATTR VkResult VKAPI_CALL vkGetSemaphoreWin32HandleKHR(
  143. VkDevice device,
  144. const VkSemaphoreGetWin32HandleInfoKHR* pGetWin32HandleInfo,
  145. HANDLE* pHandle);
  146. #endif
  147. #define VK_KHR_external_fence_win32 1
  148. #define VK_KHR_EXTERNAL_FENCE_WIN32_SPEC_VERSION 1
  149. #define VK_KHR_EXTERNAL_FENCE_WIN32_EXTENSION_NAME "VK_KHR_external_fence_win32"
  150. typedef struct VkImportFenceWin32HandleInfoKHR {
  151. VkStructureType sType;
  152. const void* pNext;
  153. VkFence fence;
  154. VkFenceImportFlags flags;
  155. VkExternalFenceHandleTypeFlagBits handleType;
  156. HANDLE handle;
  157. LPCWSTR name;
  158. } VkImportFenceWin32HandleInfoKHR;
  159. typedef struct VkExportFenceWin32HandleInfoKHR {
  160. VkStructureType sType;
  161. const void* pNext;
  162. const SECURITY_ATTRIBUTES* pAttributes;
  163. DWORD dwAccess;
  164. LPCWSTR name;
  165. } VkExportFenceWin32HandleInfoKHR;
  166. typedef struct VkFenceGetWin32HandleInfoKHR {
  167. VkStructureType sType;
  168. const void* pNext;
  169. VkFence fence;
  170. VkExternalFenceHandleTypeFlagBits handleType;
  171. } VkFenceGetWin32HandleInfoKHR;
  172. typedef VkResult (VKAPI_PTR *PFN_vkImportFenceWin32HandleKHR)(VkDevice device, const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo);
  173. typedef VkResult (VKAPI_PTR *PFN_vkGetFenceWin32HandleKHR)(VkDevice device, const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo, HANDLE* pHandle);
  174. #ifndef VK_NO_PROTOTYPES
  175. VKAPI_ATTR VkResult VKAPI_CALL vkImportFenceWin32HandleKHR(
  176. VkDevice device,
  177. const VkImportFenceWin32HandleInfoKHR* pImportFenceWin32HandleInfo);
  178. VKAPI_ATTR VkResult VKAPI_CALL vkGetFenceWin32HandleKHR(
  179. VkDevice device,
  180. const VkFenceGetWin32HandleInfoKHR* pGetWin32HandleInfo,
  181. HANDLE* pHandle);
  182. #endif
  183. #define VK_NV_external_memory_win32 1
  184. #define VK_NV_EXTERNAL_MEMORY_WIN32_SPEC_VERSION 1
  185. #define VK_NV_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME "VK_NV_external_memory_win32"
  186. typedef struct VkImportMemoryWin32HandleInfoNV {
  187. VkStructureType sType;
  188. const void* pNext;
  189. VkExternalMemoryHandleTypeFlagsNV handleType;
  190. HANDLE handle;
  191. } VkImportMemoryWin32HandleInfoNV;
  192. typedef struct VkExportMemoryWin32HandleInfoNV {
  193. VkStructureType sType;
  194. const void* pNext;
  195. const SECURITY_ATTRIBUTES* pAttributes;
  196. DWORD dwAccess;
  197. } VkExportMemoryWin32HandleInfoNV;
  198. typedef VkResult (VKAPI_PTR *PFN_vkGetMemoryWin32HandleNV)(VkDevice device, VkDeviceMemory memory, VkExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle);
  199. #ifndef VK_NO_PROTOTYPES
  200. VKAPI_ATTR VkResult VKAPI_CALL vkGetMemoryWin32HandleNV(
  201. VkDevice device,
  202. VkDeviceMemory memory,
  203. VkExternalMemoryHandleTypeFlagsNV handleType,
  204. HANDLE* pHandle);
  205. #endif
  206. #define VK_NV_win32_keyed_mutex 1
  207. #define VK_NV_WIN32_KEYED_MUTEX_SPEC_VERSION 1
  208. #define VK_NV_WIN32_KEYED_MUTEX_EXTENSION_NAME "VK_NV_win32_keyed_mutex"
  209. typedef struct VkWin32KeyedMutexAcquireReleaseInfoNV {
  210. VkStructureType sType;
  211. const void* pNext;
  212. uint32_t acquireCount;
  213. const VkDeviceMemory* pAcquireSyncs;
  214. const uint64_t* pAcquireKeys;
  215. const uint32_t* pAcquireTimeoutMilliseconds;
  216. uint32_t releaseCount;
  217. const VkDeviceMemory* pReleaseSyncs;
  218. const uint64_t* pReleaseKeys;
  219. } VkWin32KeyedMutexAcquireReleaseInfoNV;
  220. #ifdef __cplusplus
  221. }
  222. #endif
  223. #endif