1 /** 2 * Dlang vulkan platform specific types and functions as mixin template 3 * 4 * Copyright: Copyright 2015-2016 The Khronos Group Inc.; Copyright 2016 Alex Parrill, Peter Particle. 5 * License: $(https://opensource.org/licenses/MIT, MIT License). 6 * Authors: Copyright 2016 Alex Parrill, Peter Particle 7 */ 8 module erupted.platform_extensions; 9 10 /// define platform extension names as enums 11 /// these enums can be used directly in Platform_Extensions mixin template 12 enum KHR_xlib_surface; 13 enum KHR_xcb_surface; 14 enum KHR_wayland_surface; 15 enum KHR_android_surface; 16 enum KHR_win32_surface; 17 enum KHR_external_memory_win32; 18 enum KHR_win32_keyed_mutex; 19 enum KHR_external_semaphore_win32; 20 enum KHR_external_fence_win32; 21 enum KHR_portability_subset; 22 enum KHR_video_encode_queue; 23 enum EXT_video_encode_h264; 24 enum EXT_video_encode_h265; 25 enum GGP_stream_descriptor_surface; 26 enum NV_external_memory_win32; 27 enum NV_win32_keyed_mutex; 28 enum NN_vi_surface; 29 enum EXT_acquire_xlib_display; 30 enum MVK_ios_surface; 31 enum MVK_macos_surface; 32 enum ANDROID_external_memory_android_hardware_buffer; 33 enum GGP_frame_token; 34 enum FUCHSIA_imagepipe_surface; 35 enum EXT_metal_surface; 36 enum EXT_full_screen_exclusive; 37 enum EXT_metal_objects; 38 enum NV_acquire_winrt_display; 39 enum EXT_directfb_surface; 40 enum FUCHSIA_external_memory; 41 enum FUCHSIA_external_semaphore; 42 enum FUCHSIA_buffer_collection; 43 enum QNX_screen_surface; 44 enum NV_displacement_micromap; 45 46 47 /// extensions to a specific platform are grouped in these enum sequences 48 import std.meta : AliasSeq; 49 alias USE_PLATFORM_XLIB_KHR = AliasSeq!( KHR_xlib_surface ); 50 alias USE_PLATFORM_XCB_KHR = AliasSeq!( KHR_xcb_surface ); 51 alias USE_PLATFORM_WAYLAND_KHR = AliasSeq!( KHR_wayland_surface ); 52 alias USE_PLATFORM_ANDROID_KHR = AliasSeq!( KHR_android_surface, ANDROID_external_memory_android_hardware_buffer ); 53 alias USE_PLATFORM_WIN32_KHR = AliasSeq!( KHR_win32_surface, KHR_external_memory_win32, KHR_win32_keyed_mutex, KHR_external_semaphore_win32, KHR_external_fence_win32, NV_external_memory_win32, NV_win32_keyed_mutex, EXT_full_screen_exclusive, NV_acquire_winrt_display ); 54 alias ENABLE_BETA_EXTENSIONS = AliasSeq!( KHR_portability_subset, KHR_video_encode_queue, EXT_video_encode_h264, EXT_video_encode_h265, NV_displacement_micromap ); 55 alias USE_PLATFORM_GGP = AliasSeq!( GGP_stream_descriptor_surface, GGP_frame_token ); 56 alias USE_PLATFORM_VI_NN = AliasSeq!( NN_vi_surface ); 57 alias USE_PLATFORM_XLIB_XRANDR_EXT = AliasSeq!( EXT_acquire_xlib_display ); 58 alias USE_PLATFORM_IOS_MVK = AliasSeq!( MVK_ios_surface ); 59 alias USE_PLATFORM_MACOS_MVK = AliasSeq!( MVK_macos_surface ); 60 alias USE_PLATFORM_FUCHSIA = AliasSeq!( FUCHSIA_imagepipe_surface, FUCHSIA_external_memory, FUCHSIA_external_semaphore, FUCHSIA_buffer_collection ); 61 alias USE_PLATFORM_METAL_EXT = AliasSeq!( EXT_metal_surface, EXT_metal_objects ); 62 alias USE_PLATFORM_DIRECTFB_EXT = AliasSeq!( EXT_directfb_surface ); 63 alias USE_PLATFORM_SCREEN_QNX = AliasSeq!( QNX_screen_surface ); 64 65 66 67 /// instantiate platform and extension specific code with this mixin template 68 /// required types and data structures must be imported into the module where 69 /// this template is instantiated 70 mixin template Platform_Extensions( extensions... ) { 71 72 // publicly import erupted package modules 73 public import erupted.types; 74 public import erupted.functions; 75 import erupted.dispatch_device; 76 77 // mixin function linkage, nothrow and @nogc attributes for subsecuent functions 78 extern(System) nothrow @nogc: 79 80 // remove duplicates from alias sequence 81 // this might happen if a platform extension collection AND a single extension, which is included in the collection, was specified 82 // e.g.: mixin Platform_Extensions!( VK_USE_PLATFORM_WIN32_KHR, VK_KHR_external_memory_win32 ); 83 import std.meta : NoDuplicates; 84 alias noDuplicateExtensions = NoDuplicates!extensions; 85 86 // 1. loop through alias sequence and mixin corresponding 87 // extension types, aliased function pointer type definitions and __gshared function pointer declarations 88 static foreach( extension; noDuplicateExtensions ) { 89 90 // VK_KHR_xlib_surface : types and function pointer type aliases 91 static if( __traits( isSame, extension, KHR_xlib_surface )) { 92 enum VK_KHR_xlib_surface = 1; 93 94 enum VK_KHR_XLIB_SURFACE_SPEC_VERSION = 6; 95 enum const( char )* VK_KHR_XLIB_SURFACE_EXTENSION_NAME = "VK_KHR_xlib_surface"; 96 97 alias VkXlibSurfaceCreateFlagsKHR = VkFlags; 98 99 struct VkXlibSurfaceCreateInfoKHR { 100 VkStructureType sType = VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR; 101 const( void )* pNext; 102 VkXlibSurfaceCreateFlagsKHR flags; 103 Display* dpy; 104 Window window; 105 } 106 107 alias PFN_vkCreateXlibSurfaceKHR = VkResult function( VkInstance instance, const( VkXlibSurfaceCreateInfoKHR )* pCreateInfo, const( VkAllocationCallbacks )* pAllocator, VkSurfaceKHR* pSurface ); 108 alias PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR = VkBool32 function( VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, Display* dpy, VisualID visualID ); 109 } 110 111 // VK_KHR_xcb_surface : types and function pointer type aliases 112 else static if( __traits( isSame, extension, KHR_xcb_surface )) { 113 enum VK_KHR_xcb_surface = 1; 114 115 enum VK_KHR_XCB_SURFACE_SPEC_VERSION = 6; 116 enum const( char )* VK_KHR_XCB_SURFACE_EXTENSION_NAME = "VK_KHR_xcb_surface"; 117 118 alias VkXcbSurfaceCreateFlagsKHR = VkFlags; 119 120 struct VkXcbSurfaceCreateInfoKHR { 121 VkStructureType sType = VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR; 122 const( void )* pNext; 123 VkXcbSurfaceCreateFlagsKHR flags; 124 xcb_connection_t* connection; 125 xcb_window_t window; 126 } 127 128 alias PFN_vkCreateXcbSurfaceKHR = VkResult function( VkInstance instance, const( VkXcbSurfaceCreateInfoKHR )* pCreateInfo, const( VkAllocationCallbacks )* pAllocator, VkSurfaceKHR* pSurface ); 129 alias PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR = VkBool32 function( VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, xcb_connection_t* connection, xcb_visualid_t visual_id ); 130 } 131 132 // VK_KHR_wayland_surface : types and function pointer type aliases 133 else static if( __traits( isSame, extension, KHR_wayland_surface )) { 134 enum VK_KHR_wayland_surface = 1; 135 136 enum VK_KHR_WAYLAND_SURFACE_SPEC_VERSION = 6; 137 enum const( char )* VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME = "VK_KHR_wayland_surface"; 138 139 alias VkWaylandSurfaceCreateFlagsKHR = VkFlags; 140 141 struct VkWaylandSurfaceCreateInfoKHR { 142 VkStructureType sType = VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR; 143 const( void )* pNext; 144 VkWaylandSurfaceCreateFlagsKHR flags; 145 const( wl_display )* display; 146 const( wl_surface )* surface; 147 } 148 149 alias PFN_vkCreateWaylandSurfaceKHR = VkResult function( VkInstance instance, const( VkWaylandSurfaceCreateInfoKHR )* pCreateInfo, const( VkAllocationCallbacks )* pAllocator, VkSurfaceKHR* pSurface ); 150 alias PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR = VkBool32 function( VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, const( wl_display )* display ); 151 } 152 153 // VK_KHR_android_surface : types and function pointer type aliases 154 else static if( __traits( isSame, extension, KHR_android_surface )) { 155 enum VK_KHR_android_surface = 1; 156 157 enum VK_KHR_ANDROID_SURFACE_SPEC_VERSION = 6; 158 enum const( char )* VK_KHR_ANDROID_SURFACE_EXTENSION_NAME = "VK_KHR_android_surface"; 159 160 alias VkAndroidSurfaceCreateFlagsKHR = VkFlags; 161 162 struct VkAndroidSurfaceCreateInfoKHR { 163 VkStructureType sType = VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR; 164 const( void )* pNext; 165 VkAndroidSurfaceCreateFlagsKHR flags; 166 const( ANativeWindow )* window; 167 } 168 169 alias PFN_vkCreateAndroidSurfaceKHR = VkResult function( VkInstance instance, const( VkAndroidSurfaceCreateInfoKHR )* pCreateInfo, const( VkAllocationCallbacks )* pAllocator, VkSurfaceKHR* pSurface ); 170 } 171 172 // VK_KHR_win32_surface : types and function pointer type aliases 173 else static if( __traits( isSame, extension, KHR_win32_surface )) { 174 enum VK_KHR_win32_surface = 1; 175 176 enum VK_KHR_WIN32_SURFACE_SPEC_VERSION = 6; 177 enum const( char )* VK_KHR_WIN32_SURFACE_EXTENSION_NAME = "VK_KHR_win32_surface"; 178 179 alias VkWin32SurfaceCreateFlagsKHR = VkFlags; 180 181 struct VkWin32SurfaceCreateInfoKHR { 182 VkStructureType sType = VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR; 183 const( void )* pNext; 184 VkWin32SurfaceCreateFlagsKHR flags; 185 HINSTANCE hinstance; 186 HWND hwnd; 187 } 188 189 alias PFN_vkCreateWin32SurfaceKHR = VkResult function( VkInstance instance, const( VkWin32SurfaceCreateInfoKHR )* pCreateInfo, const( VkAllocationCallbacks )* pAllocator, VkSurfaceKHR* pSurface ); 190 alias PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR = VkBool32 function( VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex ); 191 } 192 193 // VK_KHR_external_memory_win32 : types and function pointer type aliases 194 else static if( __traits( isSame, extension, KHR_external_memory_win32 )) { 195 enum VK_KHR_external_memory_win32 = 1; 196 197 enum VK_KHR_EXTERNAL_MEMORY_WIN32_SPEC_VERSION = 1; 198 enum const( char )* VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME = "VK_KHR_external_memory_win32"; 199 200 struct VkImportMemoryWin32HandleInfoKHR { 201 VkStructureType sType = VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR; 202 const( void )* pNext; 203 VkExternalMemoryHandleTypeFlagBits handleType; 204 HANDLE handle; 205 LPCWSTR name; 206 } 207 208 struct VkExportMemoryWin32HandleInfoKHR { 209 VkStructureType sType = VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR; 210 const( void )* pNext; 211 const( SECURITY_ATTRIBUTES )* pAttributes; 212 DWORD dwAccess; 213 LPCWSTR name; 214 } 215 216 struct VkMemoryWin32HandlePropertiesKHR { 217 VkStructureType sType = VK_STRUCTURE_TYPE_MEMORY_WIN32_HANDLE_PROPERTIES_KHR; 218 void* pNext; 219 uint32_t memoryTypeBits; 220 } 221 222 struct VkMemoryGetWin32HandleInfoKHR { 223 VkStructureType sType = VK_STRUCTURE_TYPE_MEMORY_GET_WIN32_HANDLE_INFO_KHR; 224 const( void )* pNext; 225 VkDeviceMemory memory; 226 VkExternalMemoryHandleTypeFlagBits handleType; 227 } 228 229 alias PFN_vkGetMemoryWin32HandleKHR = VkResult function( VkDevice device, const( VkMemoryGetWin32HandleInfoKHR )* pGetWin32HandleInfo, HANDLE* pHandle ); 230 alias PFN_vkGetMemoryWin32HandlePropertiesKHR = VkResult function( VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, HANDLE handle, VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties ); 231 } 232 233 // VK_KHR_win32_keyed_mutex : types and function pointer type aliases 234 else static if( __traits( isSame, extension, KHR_win32_keyed_mutex )) { 235 enum VK_KHR_win32_keyed_mutex = 1; 236 237 enum VK_KHR_WIN32_KEYED_MUTEX_SPEC_VERSION = 1; 238 enum const( char )* VK_KHR_WIN32_KEYED_MUTEX_EXTENSION_NAME = "VK_KHR_win32_keyed_mutex"; 239 240 struct VkWin32KeyedMutexAcquireReleaseInfoKHR { 241 VkStructureType sType = VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHR; 242 const( void )* pNext; 243 uint32_t acquireCount; 244 const( VkDeviceMemory )* pAcquireSyncs; 245 const( uint64_t )* pAcquireKeys; 246 const( uint32_t )* pAcquireTimeouts; 247 uint32_t releaseCount; 248 const( VkDeviceMemory )* pReleaseSyncs; 249 const( uint64_t )* pReleaseKeys; 250 } 251 252 } 253 254 // VK_KHR_external_semaphore_win32 : types and function pointer type aliases 255 else static if( __traits( isSame, extension, KHR_external_semaphore_win32 )) { 256 enum VK_KHR_external_semaphore_win32 = 1; 257 258 enum VK_KHR_EXTERNAL_SEMAPHORE_WIN32_SPEC_VERSION = 1; 259 enum const( char )* VK_KHR_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME = "VK_KHR_external_semaphore_win32"; 260 261 struct VkImportSemaphoreWin32HandleInfoKHR { 262 VkStructureType sType = VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR; 263 const( void )* pNext; 264 VkSemaphore semaphore; 265 VkSemaphoreImportFlags flags; 266 VkExternalSemaphoreHandleTypeFlagBits handleType; 267 HANDLE handle; 268 LPCWSTR name; 269 } 270 271 struct VkExportSemaphoreWin32HandleInfoKHR { 272 VkStructureType sType = VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR; 273 const( void )* pNext; 274 const( SECURITY_ATTRIBUTES )* pAttributes; 275 DWORD dwAccess; 276 LPCWSTR name; 277 } 278 279 struct VkD3D12FenceSubmitInfoKHR { 280 VkStructureType sType = VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHR; 281 const( void )* pNext; 282 uint32_t waitSemaphoreValuesCount; 283 const( uint64_t )* pWaitSemaphoreValues; 284 uint32_t signalSemaphoreValuesCount; 285 const( uint64_t )* pSignalSemaphoreValues; 286 } 287 288 struct VkSemaphoreGetWin32HandleInfoKHR { 289 VkStructureType sType = VK_STRUCTURE_TYPE_SEMAPHORE_GET_WIN32_HANDLE_INFO_KHR; 290 const( void )* pNext; 291 VkSemaphore semaphore; 292 VkExternalSemaphoreHandleTypeFlagBits handleType; 293 } 294 295 alias PFN_vkImportSemaphoreWin32HandleKHR = VkResult function( VkDevice device, const( VkImportSemaphoreWin32HandleInfoKHR )* pImportSemaphoreWin32HandleInfo ); 296 alias PFN_vkGetSemaphoreWin32HandleKHR = VkResult function( VkDevice device, const( VkSemaphoreGetWin32HandleInfoKHR )* pGetWin32HandleInfo, HANDLE* pHandle ); 297 } 298 299 // VK_KHR_external_fence_win32 : types and function pointer type aliases 300 else static if( __traits( isSame, extension, KHR_external_fence_win32 )) { 301 enum VK_KHR_external_fence_win32 = 1; 302 303 enum VK_KHR_EXTERNAL_FENCE_WIN32_SPEC_VERSION = 1; 304 enum const( char )* VK_KHR_EXTERNAL_FENCE_WIN32_EXTENSION_NAME = "VK_KHR_external_fence_win32"; 305 306 struct VkImportFenceWin32HandleInfoKHR { 307 VkStructureType sType = VK_STRUCTURE_TYPE_IMPORT_FENCE_WIN32_HANDLE_INFO_KHR; 308 const( void )* pNext; 309 VkFence fence; 310 VkFenceImportFlags flags; 311 VkExternalFenceHandleTypeFlagBits handleType; 312 HANDLE handle; 313 LPCWSTR name; 314 } 315 316 struct VkExportFenceWin32HandleInfoKHR { 317 VkStructureType sType = VK_STRUCTURE_TYPE_EXPORT_FENCE_WIN32_HANDLE_INFO_KHR; 318 const( void )* pNext; 319 const( SECURITY_ATTRIBUTES )* pAttributes; 320 DWORD dwAccess; 321 LPCWSTR name; 322 } 323 324 struct VkFenceGetWin32HandleInfoKHR { 325 VkStructureType sType = VK_STRUCTURE_TYPE_FENCE_GET_WIN32_HANDLE_INFO_KHR; 326 const( void )* pNext; 327 VkFence fence; 328 VkExternalFenceHandleTypeFlagBits handleType; 329 } 330 331 alias PFN_vkImportFenceWin32HandleKHR = VkResult function( VkDevice device, const( VkImportFenceWin32HandleInfoKHR )* pImportFenceWin32HandleInfo ); 332 alias PFN_vkGetFenceWin32HandleKHR = VkResult function( VkDevice device, const( VkFenceGetWin32HandleInfoKHR )* pGetWin32HandleInfo, HANDLE* pHandle ); 333 } 334 335 // VK_KHR_portability_subset : types and function pointer type aliases 336 else static if( __traits( isSame, extension, KHR_portability_subset )) { 337 enum VK_KHR_portability_subset = 1; 338 339 enum VK_KHR_PORTABILITY_SUBSET_SPEC_VERSION = 1; 340 enum const( char )* VK_KHR_PORTABILITY_SUBSET_EXTENSION_NAME = "VK_KHR_portability_subset"; 341 342 struct VkPhysicalDevicePortabilitySubsetFeaturesKHR { 343 VkStructureType sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PORTABILITY_SUBSET_FEATURES_KHR; 344 void* pNext; 345 VkBool32 constantAlphaColorBlendFactors; 346 VkBool32 events; 347 VkBool32 imageViewFormatReinterpretation; 348 VkBool32 imageViewFormatSwizzle; 349 VkBool32 imageView2DOn3DImage; 350 VkBool32 multisampleArrayImage; 351 VkBool32 mutableComparisonSamplers; 352 VkBool32 pointPolygons; 353 VkBool32 samplerMipLodBias; 354 VkBool32 separateStencilMaskRef; 355 VkBool32 shaderSampleRateInterpolationFunctions; 356 VkBool32 tessellationIsolines; 357 VkBool32 tessellationPointMode; 358 VkBool32 triangleFans; 359 VkBool32 vertexAttributeAccessBeyondStride; 360 } 361 362 struct VkPhysicalDevicePortabilitySubsetPropertiesKHR { 363 VkStructureType sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PORTABILITY_SUBSET_PROPERTIES_KHR; 364 void* pNext; 365 uint32_t minVertexInputBindingStrideAlignment; 366 } 367 368 } 369 370 // VK_KHR_video_encode_queue : types and function pointer type aliases 371 else static if( __traits( isSame, extension, KHR_video_encode_queue )) { 372 enum VK_KHR_video_encode_queue = 1; 373 374 enum VK_KHR_VIDEO_ENCODE_QUEUE_SPEC_VERSION = 8; 375 enum const( char )* VK_KHR_VIDEO_ENCODE_QUEUE_EXTENSION_NAME = "VK_KHR_video_encode_queue"; 376 377 enum VkVideoEncodeTuningModeKHR { 378 VK_VIDEO_ENCODE_TUNING_MODE_DEFAULT_KHR = 0, 379 VK_VIDEO_ENCODE_TUNING_MODE_HIGH_QUALITY_KHR = 1, 380 VK_VIDEO_ENCODE_TUNING_MODE_LOW_LATENCY_KHR = 2, 381 VK_VIDEO_ENCODE_TUNING_MODE_ULTRA_LOW_LATENCY_KHR = 3, 382 VK_VIDEO_ENCODE_TUNING_MODE_LOSSLESS_KHR = 4, 383 VK_VIDEO_ENCODE_TUNING_MODE_MAX_ENUM_KHR = 0x7FFFFFFF 384 } 385 386 enum VK_VIDEO_ENCODE_TUNING_MODE_DEFAULT_KHR = VkVideoEncodeTuningModeKHR.VK_VIDEO_ENCODE_TUNING_MODE_DEFAULT_KHR; 387 enum VK_VIDEO_ENCODE_TUNING_MODE_HIGH_QUALITY_KHR = VkVideoEncodeTuningModeKHR.VK_VIDEO_ENCODE_TUNING_MODE_HIGH_QUALITY_KHR; 388 enum VK_VIDEO_ENCODE_TUNING_MODE_LOW_LATENCY_KHR = VkVideoEncodeTuningModeKHR.VK_VIDEO_ENCODE_TUNING_MODE_LOW_LATENCY_KHR; 389 enum VK_VIDEO_ENCODE_TUNING_MODE_ULTRA_LOW_LATENCY_KHR = VkVideoEncodeTuningModeKHR.VK_VIDEO_ENCODE_TUNING_MODE_ULTRA_LOW_LATENCY_KHR; 390 enum VK_VIDEO_ENCODE_TUNING_MODE_LOSSLESS_KHR = VkVideoEncodeTuningModeKHR.VK_VIDEO_ENCODE_TUNING_MODE_LOSSLESS_KHR; 391 enum VK_VIDEO_ENCODE_TUNING_MODE_MAX_ENUM_KHR = VkVideoEncodeTuningModeKHR.VK_VIDEO_ENCODE_TUNING_MODE_MAX_ENUM_KHR; 392 393 alias VkVideoEncodeFlagsKHR = VkFlags; 394 395 alias VkVideoEncodeCapabilityFlagsKHR = VkFlags; 396 enum VkVideoEncodeCapabilityFlagBitsKHR : VkVideoEncodeCapabilityFlagsKHR { 397 VK_VIDEO_ENCODE_CAPABILITY_PRECEDING_EXTERNALLY_ENCODED_BYTES_BIT_KHR = 0x00000001, 398 VK_VIDEO_ENCODE_CAPABILITY_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF 399 } 400 401 enum VK_VIDEO_ENCODE_CAPABILITY_PRECEDING_EXTERNALLY_ENCODED_BYTES_BIT_KHR = VkVideoEncodeCapabilityFlagBitsKHR.VK_VIDEO_ENCODE_CAPABILITY_PRECEDING_EXTERNALLY_ENCODED_BYTES_BIT_KHR; 402 enum VK_VIDEO_ENCODE_CAPABILITY_FLAG_BITS_MAX_ENUM_KHR = VkVideoEncodeCapabilityFlagBitsKHR.VK_VIDEO_ENCODE_CAPABILITY_FLAG_BITS_MAX_ENUM_KHR; 403 404 alias VkVideoEncodeRateControlModeFlagsKHR = VkFlags; 405 enum VkVideoEncodeRateControlModeFlagBitsKHR : VkVideoEncodeRateControlModeFlagsKHR { 406 VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DEFAULT_KHR = 0, 407 VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR = 0x00000001, 408 VK_VIDEO_ENCODE_RATE_CONTROL_MODE_CBR_BIT_KHR = 0x00000002, 409 VK_VIDEO_ENCODE_RATE_CONTROL_MODE_VBR_BIT_KHR = 0x00000004, 410 VK_VIDEO_ENCODE_RATE_CONTROL_MODE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF 411 } 412 413 enum VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DEFAULT_KHR = VkVideoEncodeRateControlModeFlagBitsKHR.VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DEFAULT_KHR; 414 enum VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR = VkVideoEncodeRateControlModeFlagBitsKHR.VK_VIDEO_ENCODE_RATE_CONTROL_MODE_DISABLED_BIT_KHR; 415 enum VK_VIDEO_ENCODE_RATE_CONTROL_MODE_CBR_BIT_KHR = VkVideoEncodeRateControlModeFlagBitsKHR.VK_VIDEO_ENCODE_RATE_CONTROL_MODE_CBR_BIT_KHR; 416 enum VK_VIDEO_ENCODE_RATE_CONTROL_MODE_VBR_BIT_KHR = VkVideoEncodeRateControlModeFlagBitsKHR.VK_VIDEO_ENCODE_RATE_CONTROL_MODE_VBR_BIT_KHR; 417 enum VK_VIDEO_ENCODE_RATE_CONTROL_MODE_FLAG_BITS_MAX_ENUM_KHR = VkVideoEncodeRateControlModeFlagBitsKHR.VK_VIDEO_ENCODE_RATE_CONTROL_MODE_FLAG_BITS_MAX_ENUM_KHR; 418 419 alias VkVideoEncodeFeedbackFlagsKHR = VkFlags; 420 enum VkVideoEncodeFeedbackFlagBitsKHR : VkVideoEncodeFeedbackFlagsKHR { 421 VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_BUFFER_OFFSET_BIT_KHR = 0x00000001, 422 VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_BYTES_WRITTEN_BIT_KHR = 0x00000002, 423 VK_VIDEO_ENCODE_FEEDBACK_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF 424 } 425 426 enum VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_BUFFER_OFFSET_BIT_KHR = VkVideoEncodeFeedbackFlagBitsKHR.VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_BUFFER_OFFSET_BIT_KHR; 427 enum VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_BYTES_WRITTEN_BIT_KHR = VkVideoEncodeFeedbackFlagBitsKHR.VK_VIDEO_ENCODE_FEEDBACK_BITSTREAM_BYTES_WRITTEN_BIT_KHR; 428 enum VK_VIDEO_ENCODE_FEEDBACK_FLAG_BITS_MAX_ENUM_KHR = VkVideoEncodeFeedbackFlagBitsKHR.VK_VIDEO_ENCODE_FEEDBACK_FLAG_BITS_MAX_ENUM_KHR; 429 430 alias VkVideoEncodeUsageFlagsKHR = VkFlags; 431 enum VkVideoEncodeUsageFlagBitsKHR : VkVideoEncodeUsageFlagsKHR { 432 VK_VIDEO_ENCODE_USAGE_DEFAULT_KHR = 0, 433 VK_VIDEO_ENCODE_USAGE_TRANSCODING_BIT_KHR = 0x00000001, 434 VK_VIDEO_ENCODE_USAGE_STREAMING_BIT_KHR = 0x00000002, 435 VK_VIDEO_ENCODE_USAGE_RECORDING_BIT_KHR = 0x00000004, 436 VK_VIDEO_ENCODE_USAGE_CONFERENCING_BIT_KHR = 0x00000008, 437 VK_VIDEO_ENCODE_USAGE_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF 438 } 439 440 enum VK_VIDEO_ENCODE_USAGE_DEFAULT_KHR = VkVideoEncodeUsageFlagBitsKHR.VK_VIDEO_ENCODE_USAGE_DEFAULT_KHR; 441 enum VK_VIDEO_ENCODE_USAGE_TRANSCODING_BIT_KHR = VkVideoEncodeUsageFlagBitsKHR.VK_VIDEO_ENCODE_USAGE_TRANSCODING_BIT_KHR; 442 enum VK_VIDEO_ENCODE_USAGE_STREAMING_BIT_KHR = VkVideoEncodeUsageFlagBitsKHR.VK_VIDEO_ENCODE_USAGE_STREAMING_BIT_KHR; 443 enum VK_VIDEO_ENCODE_USAGE_RECORDING_BIT_KHR = VkVideoEncodeUsageFlagBitsKHR.VK_VIDEO_ENCODE_USAGE_RECORDING_BIT_KHR; 444 enum VK_VIDEO_ENCODE_USAGE_CONFERENCING_BIT_KHR = VkVideoEncodeUsageFlagBitsKHR.VK_VIDEO_ENCODE_USAGE_CONFERENCING_BIT_KHR; 445 enum VK_VIDEO_ENCODE_USAGE_FLAG_BITS_MAX_ENUM_KHR = VkVideoEncodeUsageFlagBitsKHR.VK_VIDEO_ENCODE_USAGE_FLAG_BITS_MAX_ENUM_KHR; 446 447 alias VkVideoEncodeContentFlagsKHR = VkFlags; 448 enum VkVideoEncodeContentFlagBitsKHR : VkVideoEncodeContentFlagsKHR { 449 VK_VIDEO_ENCODE_CONTENT_DEFAULT_KHR = 0, 450 VK_VIDEO_ENCODE_CONTENT_CAMERA_BIT_KHR = 0x00000001, 451 VK_VIDEO_ENCODE_CONTENT_DESKTOP_BIT_KHR = 0x00000002, 452 VK_VIDEO_ENCODE_CONTENT_RENDERED_BIT_KHR = 0x00000004, 453 VK_VIDEO_ENCODE_CONTENT_FLAG_BITS_MAX_ENUM_KHR = 0x7FFFFFFF 454 } 455 456 enum VK_VIDEO_ENCODE_CONTENT_DEFAULT_KHR = VkVideoEncodeContentFlagBitsKHR.VK_VIDEO_ENCODE_CONTENT_DEFAULT_KHR; 457 enum VK_VIDEO_ENCODE_CONTENT_CAMERA_BIT_KHR = VkVideoEncodeContentFlagBitsKHR.VK_VIDEO_ENCODE_CONTENT_CAMERA_BIT_KHR; 458 enum VK_VIDEO_ENCODE_CONTENT_DESKTOP_BIT_KHR = VkVideoEncodeContentFlagBitsKHR.VK_VIDEO_ENCODE_CONTENT_DESKTOP_BIT_KHR; 459 enum VK_VIDEO_ENCODE_CONTENT_RENDERED_BIT_KHR = VkVideoEncodeContentFlagBitsKHR.VK_VIDEO_ENCODE_CONTENT_RENDERED_BIT_KHR; 460 enum VK_VIDEO_ENCODE_CONTENT_FLAG_BITS_MAX_ENUM_KHR = VkVideoEncodeContentFlagBitsKHR.VK_VIDEO_ENCODE_CONTENT_FLAG_BITS_MAX_ENUM_KHR; 461 alias VkVideoEncodeRateControlFlagsKHR = VkFlags; 462 463 struct VkVideoEncodeInfoKHR { 464 VkStructureType sType = VK_STRUCTURE_TYPE_VIDEO_ENCODE_INFO_KHR; 465 const( void )* pNext; 466 VkVideoEncodeFlagsKHR flags; 467 uint32_t qualityLevel; 468 VkBuffer dstBuffer; 469 VkDeviceSize dstBufferOffset; 470 VkDeviceSize dstBufferRange; 471 VkVideoPictureResourceInfoKHR srcPictureResource; 472 const( VkVideoReferenceSlotInfoKHR )* pSetupReferenceSlot; 473 uint32_t referenceSlotCount; 474 const( VkVideoReferenceSlotInfoKHR )* pReferenceSlots; 475 uint32_t precedingExternallyEncodedBytes; 476 } 477 478 struct VkVideoEncodeCapabilitiesKHR { 479 VkStructureType sType = VK_STRUCTURE_TYPE_VIDEO_ENCODE_CAPABILITIES_KHR; 480 void* pNext; 481 VkVideoEncodeCapabilityFlagsKHR flags; 482 VkVideoEncodeRateControlModeFlagsKHR rateControlModes; 483 uint32_t maxRateControlLayers; 484 uint32_t maxQualityLevels; 485 VkExtent2D inputImageDataFillAlignment; 486 VkVideoEncodeFeedbackFlagsKHR supportedEncodeFeedbackFlags; 487 } 488 489 struct VkQueryPoolVideoEncodeFeedbackCreateInfoKHR { 490 VkStructureType sType = VK_STRUCTURE_TYPE_QUERY_POOL_VIDEO_ENCODE_FEEDBACK_CREATE_INFO_KHR; 491 const( void )* pNext; 492 VkVideoEncodeFeedbackFlagsKHR encodeFeedbackFlags; 493 } 494 495 struct VkVideoEncodeUsageInfoKHR { 496 VkStructureType sType = VK_STRUCTURE_TYPE_VIDEO_ENCODE_USAGE_INFO_KHR; 497 const( void )* pNext; 498 VkVideoEncodeUsageFlagsKHR videoUsageHints; 499 VkVideoEncodeContentFlagsKHR videoContentHints; 500 VkVideoEncodeTuningModeKHR tuningMode; 501 } 502 503 struct VkVideoEncodeRateControlLayerInfoKHR { 504 VkStructureType sType = VK_STRUCTURE_TYPE_VIDEO_ENCODE_RATE_CONTROL_LAYER_INFO_KHR; 505 const( void )* pNext; 506 uint64_t averageBitrate; 507 uint64_t maxBitrate; 508 uint32_t frameRateNumerator; 509 uint32_t frameRateDenominator; 510 uint32_t virtualBufferSizeInMs; 511 uint32_t initialVirtualBufferSizeInMs; 512 } 513 514 struct VkVideoEncodeRateControlInfoKHR { 515 VkStructureType sType = VK_STRUCTURE_TYPE_VIDEO_ENCODE_RATE_CONTROL_INFO_KHR; 516 const( void )* pNext; 517 VkVideoEncodeRateControlFlagsKHR flags; 518 VkVideoEncodeRateControlModeFlagBitsKHR rateControlMode; 519 uint32_t layerCount; 520 const( VkVideoEncodeRateControlLayerInfoKHR )* pLayers; 521 } 522 523 alias PFN_vkCmdEncodeVideoKHR = void function( VkCommandBuffer commandBuffer, const( VkVideoEncodeInfoKHR )* pEncodeInfo ); 524 } 525 526 // VK_EXT_video_encode_h264 : types and function pointer type aliases 527 else static if( __traits( isSame, extension, EXT_video_encode_h264 )) { 528 enum VK_EXT_video_encode_h264 = 1; 529 530 enum VK_EXT_VIDEO_ENCODE_H264_SPEC_VERSION = 10; 531 enum const( char )* VK_EXT_VIDEO_ENCODE_H264_EXTENSION_NAME = "VK_EXT_video_encode_h264"; 532 533 enum VkVideoEncodeH264RateControlStructureEXT { 534 VK_VIDEO_ENCODE_H264_RATE_CONTROL_STRUCTURE_UNKNOWN_EXT = 0, 535 VK_VIDEO_ENCODE_H264_RATE_CONTROL_STRUCTURE_FLAT_EXT = 1, 536 VK_VIDEO_ENCODE_H264_RATE_CONTROL_STRUCTURE_DYADIC_EXT = 2, 537 VK_VIDEO_ENCODE_H2_64_RATE_CONTROL_STRUCTURE_MAX_ENUM_EXT = 0x7FFFFFFF 538 } 539 540 enum VK_VIDEO_ENCODE_H264_RATE_CONTROL_STRUCTURE_UNKNOWN_EXT = VkVideoEncodeH264RateControlStructureEXT.VK_VIDEO_ENCODE_H264_RATE_CONTROL_STRUCTURE_UNKNOWN_EXT; 541 enum VK_VIDEO_ENCODE_H264_RATE_CONTROL_STRUCTURE_FLAT_EXT = VkVideoEncodeH264RateControlStructureEXT.VK_VIDEO_ENCODE_H264_RATE_CONTROL_STRUCTURE_FLAT_EXT; 542 enum VK_VIDEO_ENCODE_H264_RATE_CONTROL_STRUCTURE_DYADIC_EXT = VkVideoEncodeH264RateControlStructureEXT.VK_VIDEO_ENCODE_H264_RATE_CONTROL_STRUCTURE_DYADIC_EXT; 543 enum VK_VIDEO_ENCODE_H2_64_RATE_CONTROL_STRUCTURE_MAX_ENUM_EXT = VkVideoEncodeH264RateControlStructureEXT.VK_VIDEO_ENCODE_H2_64_RATE_CONTROL_STRUCTURE_MAX_ENUM_EXT; 544 545 alias VkVideoEncodeH264CapabilityFlagsEXT = VkFlags; 546 enum VkVideoEncodeH264CapabilityFlagBitsEXT : VkVideoEncodeH264CapabilityFlagsEXT { 547 VK_VIDEO_ENCODE_H264_CAPABILITY_DIRECT_8X8_INFERENCE_ENABLED_BIT_EXT = 0x00000001, 548 VK_VIDEO_ENCODE_H264_CAPABILITY_DIRECT_8X8_INFERENCE_DISABLED_BIT_EXT = 0x00000002, 549 VK_VIDEO_ENCODE_H264_CAPABILITY_SEPARATE_COLOUR_PLANE_BIT_EXT = 0x00000004, 550 VK_VIDEO_ENCODE_H264_CAPABILITY_QPPRIME_Y_ZERO_TRANSFORM_BYPASS_BIT_EXT = 0x00000008, 551 VK_VIDEO_ENCODE_H264_CAPABILITY_SCALING_LISTS_BIT_EXT = 0x00000010, 552 VK_VIDEO_ENCODE_H264_CAPABILITY_HRD_COMPLIANCE_BIT_EXT = 0x00000020, 553 VK_VIDEO_ENCODE_H264_CAPABILITY_CHROMA_QP_OFFSET_BIT_EXT = 0x00000040, 554 VK_VIDEO_ENCODE_H264_CAPABILITY_SECOND_CHROMA_QP_OFFSET_BIT_EXT = 0x00000080, 555 VK_VIDEO_ENCODE_H264_CAPABILITY_PIC_INIT_QP_MINUS26_BIT_EXT = 0x00000100, 556 VK_VIDEO_ENCODE_H264_CAPABILITY_WEIGHTED_PRED_BIT_EXT = 0x00000200, 557 VK_VIDEO_ENCODE_H264_CAPABILITY_WEIGHTED_BIPRED_EXPLICIT_BIT_EXT = 0x00000400, 558 VK_VIDEO_ENCODE_H264_CAPABILITY_WEIGHTED_BIPRED_IMPLICIT_BIT_EXT = 0x00000800, 559 VK_VIDEO_ENCODE_H264_CAPABILITY_WEIGHTED_PRED_NO_TABLE_BIT_EXT = 0x00001000, 560 VK_VIDEO_ENCODE_H264_CAPABILITY_TRANSFORM_8X8_BIT_EXT = 0x00002000, 561 VK_VIDEO_ENCODE_H264_CAPABILITY_CABAC_BIT_EXT = 0x00004000, 562 VK_VIDEO_ENCODE_H264_CAPABILITY_CAVLC_BIT_EXT = 0x00008000, 563 VK_VIDEO_ENCODE_H264_CAPABILITY_DEBLOCKING_FILTER_DISABLED_BIT_EXT = 0x00010000, 564 VK_VIDEO_ENCODE_H264_CAPABILITY_DEBLOCKING_FILTER_ENABLED_BIT_EXT = 0x00020000, 565 VK_VIDEO_ENCODE_H264_CAPABILITY_DEBLOCKING_FILTER_PARTIAL_BIT_EXT = 0x00040000, 566 VK_VIDEO_ENCODE_H264_CAPABILITY_DISABLE_DIRECT_SPATIAL_MV_PRED_BIT_EXT = 0x00080000, 567 VK_VIDEO_ENCODE_H264_CAPABILITY_MULTIPLE_SLICE_PER_FRAME_BIT_EXT = 0x00100000, 568 VK_VIDEO_ENCODE_H264_CAPABILITY_SLICE_MB_COUNT_BIT_EXT = 0x00200000, 569 VK_VIDEO_ENCODE_H264_CAPABILITY_ROW_UNALIGNED_SLICE_BIT_EXT = 0x00400000, 570 VK_VIDEO_ENCODE_H264_CAPABILITY_DIFFERENT_SLICE_TYPE_BIT_EXT = 0x00800000, 571 VK_VIDEO_ENCODE_H264_CAPABILITY_B_FRAME_IN_L1_LIST_BIT_EXT = 0x01000000, 572 VK_VIDEO_ENCODE_H264_CAPABILITY_DIFFERENT_REFERENCE_FINAL_LISTS_BIT_EXT = 0x02000000, 573 VK_VIDEO_ENCODE_H2_64_CAPABILITY_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF 574 } 575 576 enum VK_VIDEO_ENCODE_H264_CAPABILITY_DIRECT_8X8_INFERENCE_ENABLED_BIT_EXT = VkVideoEncodeH264CapabilityFlagBitsEXT.VK_VIDEO_ENCODE_H264_CAPABILITY_DIRECT_8X8_INFERENCE_ENABLED_BIT_EXT; 577 enum VK_VIDEO_ENCODE_H264_CAPABILITY_DIRECT_8X8_INFERENCE_DISABLED_BIT_EXT = VkVideoEncodeH264CapabilityFlagBitsEXT.VK_VIDEO_ENCODE_H264_CAPABILITY_DIRECT_8X8_INFERENCE_DISABLED_BIT_EXT; 578 enum VK_VIDEO_ENCODE_H264_CAPABILITY_SEPARATE_COLOUR_PLANE_BIT_EXT = VkVideoEncodeH264CapabilityFlagBitsEXT.VK_VIDEO_ENCODE_H264_CAPABILITY_SEPARATE_COLOUR_PLANE_BIT_EXT; 579 enum VK_VIDEO_ENCODE_H264_CAPABILITY_QPPRIME_Y_ZERO_TRANSFORM_BYPASS_BIT_EXT = VkVideoEncodeH264CapabilityFlagBitsEXT.VK_VIDEO_ENCODE_H264_CAPABILITY_QPPRIME_Y_ZERO_TRANSFORM_BYPASS_BIT_EXT; 580 enum VK_VIDEO_ENCODE_H264_CAPABILITY_SCALING_LISTS_BIT_EXT = VkVideoEncodeH264CapabilityFlagBitsEXT.VK_VIDEO_ENCODE_H264_CAPABILITY_SCALING_LISTS_BIT_EXT; 581 enum VK_VIDEO_ENCODE_H264_CAPABILITY_HRD_COMPLIANCE_BIT_EXT = VkVideoEncodeH264CapabilityFlagBitsEXT.VK_VIDEO_ENCODE_H264_CAPABILITY_HRD_COMPLIANCE_BIT_EXT; 582 enum VK_VIDEO_ENCODE_H264_CAPABILITY_CHROMA_QP_OFFSET_BIT_EXT = VkVideoEncodeH264CapabilityFlagBitsEXT.VK_VIDEO_ENCODE_H264_CAPABILITY_CHROMA_QP_OFFSET_BIT_EXT; 583 enum VK_VIDEO_ENCODE_H264_CAPABILITY_SECOND_CHROMA_QP_OFFSET_BIT_EXT = VkVideoEncodeH264CapabilityFlagBitsEXT.VK_VIDEO_ENCODE_H264_CAPABILITY_SECOND_CHROMA_QP_OFFSET_BIT_EXT; 584 enum VK_VIDEO_ENCODE_H264_CAPABILITY_PIC_INIT_QP_MINUS26_BIT_EXT = VkVideoEncodeH264CapabilityFlagBitsEXT.VK_VIDEO_ENCODE_H264_CAPABILITY_PIC_INIT_QP_MINUS26_BIT_EXT; 585 enum VK_VIDEO_ENCODE_H264_CAPABILITY_WEIGHTED_PRED_BIT_EXT = VkVideoEncodeH264CapabilityFlagBitsEXT.VK_VIDEO_ENCODE_H264_CAPABILITY_WEIGHTED_PRED_BIT_EXT; 586 enum VK_VIDEO_ENCODE_H264_CAPABILITY_WEIGHTED_BIPRED_EXPLICIT_BIT_EXT = VkVideoEncodeH264CapabilityFlagBitsEXT.VK_VIDEO_ENCODE_H264_CAPABILITY_WEIGHTED_BIPRED_EXPLICIT_BIT_EXT; 587 enum VK_VIDEO_ENCODE_H264_CAPABILITY_WEIGHTED_BIPRED_IMPLICIT_BIT_EXT = VkVideoEncodeH264CapabilityFlagBitsEXT.VK_VIDEO_ENCODE_H264_CAPABILITY_WEIGHTED_BIPRED_IMPLICIT_BIT_EXT; 588 enum VK_VIDEO_ENCODE_H264_CAPABILITY_WEIGHTED_PRED_NO_TABLE_BIT_EXT = VkVideoEncodeH264CapabilityFlagBitsEXT.VK_VIDEO_ENCODE_H264_CAPABILITY_WEIGHTED_PRED_NO_TABLE_BIT_EXT; 589 enum VK_VIDEO_ENCODE_H264_CAPABILITY_TRANSFORM_8X8_BIT_EXT = VkVideoEncodeH264CapabilityFlagBitsEXT.VK_VIDEO_ENCODE_H264_CAPABILITY_TRANSFORM_8X8_BIT_EXT; 590 enum VK_VIDEO_ENCODE_H264_CAPABILITY_CABAC_BIT_EXT = VkVideoEncodeH264CapabilityFlagBitsEXT.VK_VIDEO_ENCODE_H264_CAPABILITY_CABAC_BIT_EXT; 591 enum VK_VIDEO_ENCODE_H264_CAPABILITY_CAVLC_BIT_EXT = VkVideoEncodeH264CapabilityFlagBitsEXT.VK_VIDEO_ENCODE_H264_CAPABILITY_CAVLC_BIT_EXT; 592 enum VK_VIDEO_ENCODE_H264_CAPABILITY_DEBLOCKING_FILTER_DISABLED_BIT_EXT = VkVideoEncodeH264CapabilityFlagBitsEXT.VK_VIDEO_ENCODE_H264_CAPABILITY_DEBLOCKING_FILTER_DISABLED_BIT_EXT; 593 enum VK_VIDEO_ENCODE_H264_CAPABILITY_DEBLOCKING_FILTER_ENABLED_BIT_EXT = VkVideoEncodeH264CapabilityFlagBitsEXT.VK_VIDEO_ENCODE_H264_CAPABILITY_DEBLOCKING_FILTER_ENABLED_BIT_EXT; 594 enum VK_VIDEO_ENCODE_H264_CAPABILITY_DEBLOCKING_FILTER_PARTIAL_BIT_EXT = VkVideoEncodeH264CapabilityFlagBitsEXT.VK_VIDEO_ENCODE_H264_CAPABILITY_DEBLOCKING_FILTER_PARTIAL_BIT_EXT; 595 enum VK_VIDEO_ENCODE_H264_CAPABILITY_DISABLE_DIRECT_SPATIAL_MV_PRED_BIT_EXT = VkVideoEncodeH264CapabilityFlagBitsEXT.VK_VIDEO_ENCODE_H264_CAPABILITY_DISABLE_DIRECT_SPATIAL_MV_PRED_BIT_EXT; 596 enum VK_VIDEO_ENCODE_H264_CAPABILITY_MULTIPLE_SLICE_PER_FRAME_BIT_EXT = VkVideoEncodeH264CapabilityFlagBitsEXT.VK_VIDEO_ENCODE_H264_CAPABILITY_MULTIPLE_SLICE_PER_FRAME_BIT_EXT; 597 enum VK_VIDEO_ENCODE_H264_CAPABILITY_SLICE_MB_COUNT_BIT_EXT = VkVideoEncodeH264CapabilityFlagBitsEXT.VK_VIDEO_ENCODE_H264_CAPABILITY_SLICE_MB_COUNT_BIT_EXT; 598 enum VK_VIDEO_ENCODE_H264_CAPABILITY_ROW_UNALIGNED_SLICE_BIT_EXT = VkVideoEncodeH264CapabilityFlagBitsEXT.VK_VIDEO_ENCODE_H264_CAPABILITY_ROW_UNALIGNED_SLICE_BIT_EXT; 599 enum VK_VIDEO_ENCODE_H264_CAPABILITY_DIFFERENT_SLICE_TYPE_BIT_EXT = VkVideoEncodeH264CapabilityFlagBitsEXT.VK_VIDEO_ENCODE_H264_CAPABILITY_DIFFERENT_SLICE_TYPE_BIT_EXT; 600 enum VK_VIDEO_ENCODE_H264_CAPABILITY_B_FRAME_IN_L1_LIST_BIT_EXT = VkVideoEncodeH264CapabilityFlagBitsEXT.VK_VIDEO_ENCODE_H264_CAPABILITY_B_FRAME_IN_L1_LIST_BIT_EXT; 601 enum VK_VIDEO_ENCODE_H264_CAPABILITY_DIFFERENT_REFERENCE_FINAL_LISTS_BIT_EXT = VkVideoEncodeH264CapabilityFlagBitsEXT.VK_VIDEO_ENCODE_H264_CAPABILITY_DIFFERENT_REFERENCE_FINAL_LISTS_BIT_EXT; 602 enum VK_VIDEO_ENCODE_H2_64_CAPABILITY_FLAG_BITS_MAX_ENUM_EXT = VkVideoEncodeH264CapabilityFlagBitsEXT.VK_VIDEO_ENCODE_H2_64_CAPABILITY_FLAG_BITS_MAX_ENUM_EXT; 603 604 struct VkVideoEncodeH264CapabilitiesEXT { 605 VkStructureType sType = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_CAPABILITIES_EXT; 606 void* pNext; 607 VkVideoEncodeH264CapabilityFlagsEXT flags; 608 uint32_t maxPPictureL0ReferenceCount; 609 uint32_t maxBPictureL0ReferenceCount; 610 uint32_t maxL1ReferenceCount; 611 VkBool32 motionVectorsOverPicBoundariesFlag; 612 uint32_t maxBytesPerPicDenom; 613 uint32_t maxBitsPerMbDenom; 614 uint32_t log2MaxMvLengthHorizontal; 615 uint32_t log2MaxMvLengthVertical; 616 } 617 618 struct VkVideoEncodeH264SessionParametersAddInfoEXT { 619 VkStructureType sType = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_PARAMETERS_ADD_INFO_EXT; 620 const( void )* pNext; 621 uint32_t stdSPSCount; 622 const( StdVideoH264SequenceParameterSet )* pStdSPSs; 623 uint32_t stdPPSCount; 624 const( StdVideoH264PictureParameterSet )* pStdPPSs; 625 } 626 627 struct VkVideoEncodeH264SessionParametersCreateInfoEXT { 628 VkStructureType sType = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_SESSION_PARAMETERS_CREATE_INFO_EXT; 629 const( void )* pNext; 630 uint32_t maxStdSPSCount; 631 uint32_t maxStdPPSCount; 632 const( VkVideoEncodeH264SessionParametersAddInfoEXT )* pParametersAddInfo; 633 } 634 635 struct VkVideoEncodeH264NaluSliceInfoEXT { 636 VkStructureType sType = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_NALU_SLICE_INFO_EXT; 637 const( void )* pNext; 638 uint32_t mbCount; 639 const( StdVideoEncodeH264ReferenceListsInfo )* pStdReferenceFinalLists; 640 const( StdVideoEncodeH264SliceHeader )* pStdSliceHeader; 641 } 642 643 struct VkVideoEncodeH264VclFrameInfoEXT { 644 VkStructureType sType = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_VCL_FRAME_INFO_EXT; 645 const( void )* pNext; 646 const( StdVideoEncodeH264ReferenceListsInfo )* pStdReferenceFinalLists; 647 uint32_t naluSliceEntryCount; 648 const( VkVideoEncodeH264NaluSliceInfoEXT )* pNaluSliceEntries; 649 const( StdVideoEncodeH264PictureInfo )* pStdPictureInfo; 650 } 651 652 struct VkVideoEncodeH264DpbSlotInfoEXT { 653 VkStructureType sType = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_DPB_SLOT_INFO_EXT; 654 const( void )* pNext; 655 const( StdVideoEncodeH264ReferenceInfo )* pStdReferenceInfo; 656 } 657 658 struct VkVideoEncodeH264ProfileInfoEXT { 659 VkStructureType sType = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_PROFILE_INFO_EXT; 660 const( void )* pNext; 661 StdVideoH264ProfileIdc stdProfileIdc; 662 } 663 664 struct VkVideoEncodeH264RateControlInfoEXT { 665 VkStructureType sType = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_RATE_CONTROL_INFO_EXT; 666 const( void )* pNext; 667 uint32_t gopFrameCount; 668 uint32_t idrPeriod; 669 uint32_t consecutiveBFrameCount; 670 VkVideoEncodeH264RateControlStructureEXT rateControlStructure; 671 uint32_t temporalLayerCount; 672 } 673 674 struct VkVideoEncodeH264QpEXT { 675 int32_t qpI; 676 int32_t qpP; 677 int32_t qpB; 678 } 679 680 struct VkVideoEncodeH264FrameSizeEXT { 681 uint32_t frameISize; 682 uint32_t framePSize; 683 uint32_t frameBSize; 684 } 685 686 struct VkVideoEncodeH264RateControlLayerInfoEXT { 687 VkStructureType sType = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H264_RATE_CONTROL_LAYER_INFO_EXT; 688 const( void )* pNext; 689 uint32_t temporalLayerId; 690 VkBool32 useInitialRcQp; 691 VkVideoEncodeH264QpEXT initialRcQp; 692 VkBool32 useMinQp; 693 VkVideoEncodeH264QpEXT minQp; 694 VkBool32 useMaxQp; 695 VkVideoEncodeH264QpEXT maxQp; 696 VkBool32 useMaxFrameSize; 697 VkVideoEncodeH264FrameSizeEXT maxFrameSize; 698 } 699 700 } 701 702 // VK_EXT_video_encode_h265 : types and function pointer type aliases 703 else static if( __traits( isSame, extension, EXT_video_encode_h265 )) { 704 enum VK_EXT_video_encode_h265 = 1; 705 706 enum VK_EXT_VIDEO_ENCODE_H265_SPEC_VERSION = 10; 707 enum const( char )* VK_EXT_VIDEO_ENCODE_H265_EXTENSION_NAME = "VK_EXT_video_encode_h265"; 708 709 enum VkVideoEncodeH265RateControlStructureEXT { 710 VK_VIDEO_ENCODE_H265_RATE_CONTROL_STRUCTURE_UNKNOWN_EXT = 0, 711 VK_VIDEO_ENCODE_H265_RATE_CONTROL_STRUCTURE_FLAT_EXT = 1, 712 VK_VIDEO_ENCODE_H265_RATE_CONTROL_STRUCTURE_DYADIC_EXT = 2, 713 VK_VIDEO_ENCODE_H2_65_RATE_CONTROL_STRUCTURE_MAX_ENUM_EXT = 0x7FFFFFFF 714 } 715 716 enum VK_VIDEO_ENCODE_H265_RATE_CONTROL_STRUCTURE_UNKNOWN_EXT = VkVideoEncodeH265RateControlStructureEXT.VK_VIDEO_ENCODE_H265_RATE_CONTROL_STRUCTURE_UNKNOWN_EXT; 717 enum VK_VIDEO_ENCODE_H265_RATE_CONTROL_STRUCTURE_FLAT_EXT = VkVideoEncodeH265RateControlStructureEXT.VK_VIDEO_ENCODE_H265_RATE_CONTROL_STRUCTURE_FLAT_EXT; 718 enum VK_VIDEO_ENCODE_H265_RATE_CONTROL_STRUCTURE_DYADIC_EXT = VkVideoEncodeH265RateControlStructureEXT.VK_VIDEO_ENCODE_H265_RATE_CONTROL_STRUCTURE_DYADIC_EXT; 719 enum VK_VIDEO_ENCODE_H2_65_RATE_CONTROL_STRUCTURE_MAX_ENUM_EXT = VkVideoEncodeH265RateControlStructureEXT.VK_VIDEO_ENCODE_H2_65_RATE_CONTROL_STRUCTURE_MAX_ENUM_EXT; 720 721 alias VkVideoEncodeH265CapabilityFlagsEXT = VkFlags; 722 enum VkVideoEncodeH265CapabilityFlagBitsEXT : VkVideoEncodeH265CapabilityFlagsEXT { 723 VK_VIDEO_ENCODE_H265_CAPABILITY_SEPARATE_COLOUR_PLANE_BIT_EXT = 0x00000001, 724 VK_VIDEO_ENCODE_H265_CAPABILITY_SCALING_LISTS_BIT_EXT = 0x00000002, 725 VK_VIDEO_ENCODE_H265_CAPABILITY_SAMPLE_ADAPTIVE_OFFSET_ENABLED_BIT_EXT = 0x00000004, 726 VK_VIDEO_ENCODE_H265_CAPABILITY_PCM_ENABLE_BIT_EXT = 0x00000008, 727 VK_VIDEO_ENCODE_H265_CAPABILITY_SPS_TEMPORAL_MVP_ENABLED_BIT_EXT = 0x00000010, 728 VK_VIDEO_ENCODE_H265_CAPABILITY_HRD_COMPLIANCE_BIT_EXT = 0x00000020, 729 VK_VIDEO_ENCODE_H265_CAPABILITY_INIT_QP_MINUS26_BIT_EXT = 0x00000040, 730 VK_VIDEO_ENCODE_H265_CAPABILITY_LOG2_PARALLEL_MERGE_LEVEL_MINUS2_BIT_EXT = 0x00000080, 731 VK_VIDEO_ENCODE_H265_CAPABILITY_SIGN_DATA_HIDING_ENABLED_BIT_EXT = 0x00000100, 732 VK_VIDEO_ENCODE_H265_CAPABILITY_TRANSFORM_SKIP_ENABLED_BIT_EXT = 0x00000200, 733 VK_VIDEO_ENCODE_H265_CAPABILITY_TRANSFORM_SKIP_DISABLED_BIT_EXT = 0x00000400, 734 VK_VIDEO_ENCODE_H265_CAPABILITY_PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT_BIT_EXT = 0x00000800, 735 VK_VIDEO_ENCODE_H265_CAPABILITY_WEIGHTED_PRED_BIT_EXT = 0x00001000, 736 VK_VIDEO_ENCODE_H265_CAPABILITY_WEIGHTED_BIPRED_BIT_EXT = 0x00002000, 737 VK_VIDEO_ENCODE_H265_CAPABILITY_WEIGHTED_PRED_NO_TABLE_BIT_EXT = 0x00004000, 738 VK_VIDEO_ENCODE_H265_CAPABILITY_TRANSQUANT_BYPASS_ENABLED_BIT_EXT = 0x00008000, 739 VK_VIDEO_ENCODE_H265_CAPABILITY_ENTROPY_CODING_SYNC_ENABLED_BIT_EXT = 0x00010000, 740 VK_VIDEO_ENCODE_H265_CAPABILITY_DEBLOCKING_FILTER_OVERRIDE_ENABLED_BIT_EXT = 0x00020000, 741 VK_VIDEO_ENCODE_H265_CAPABILITY_MULTIPLE_TILE_PER_FRAME_BIT_EXT = 0x00040000, 742 VK_VIDEO_ENCODE_H265_CAPABILITY_MULTIPLE_SLICE_PER_TILE_BIT_EXT = 0x00080000, 743 VK_VIDEO_ENCODE_H265_CAPABILITY_MULTIPLE_TILE_PER_SLICE_BIT_EXT = 0x00100000, 744 VK_VIDEO_ENCODE_H265_CAPABILITY_SLICE_SEGMENT_CTB_COUNT_BIT_EXT = 0x00200000, 745 VK_VIDEO_ENCODE_H265_CAPABILITY_ROW_UNALIGNED_SLICE_SEGMENT_BIT_EXT = 0x00400000, 746 VK_VIDEO_ENCODE_H265_CAPABILITY_DEPENDENT_SLICE_SEGMENT_BIT_EXT = 0x00800000, 747 VK_VIDEO_ENCODE_H265_CAPABILITY_DIFFERENT_SLICE_TYPE_BIT_EXT = 0x01000000, 748 VK_VIDEO_ENCODE_H265_CAPABILITY_B_FRAME_IN_L1_LIST_BIT_EXT = 0x02000000, 749 VK_VIDEO_ENCODE_H265_CAPABILITY_DIFFERENT_REFERENCE_FINAL_LISTS_BIT_EXT = 0x04000000, 750 VK_VIDEO_ENCODE_H2_65_CAPABILITY_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF 751 } 752 753 enum VK_VIDEO_ENCODE_H265_CAPABILITY_SEPARATE_COLOUR_PLANE_BIT_EXT = VkVideoEncodeH265CapabilityFlagBitsEXT.VK_VIDEO_ENCODE_H265_CAPABILITY_SEPARATE_COLOUR_PLANE_BIT_EXT; 754 enum VK_VIDEO_ENCODE_H265_CAPABILITY_SCALING_LISTS_BIT_EXT = VkVideoEncodeH265CapabilityFlagBitsEXT.VK_VIDEO_ENCODE_H265_CAPABILITY_SCALING_LISTS_BIT_EXT; 755 enum VK_VIDEO_ENCODE_H265_CAPABILITY_SAMPLE_ADAPTIVE_OFFSET_ENABLED_BIT_EXT = VkVideoEncodeH265CapabilityFlagBitsEXT.VK_VIDEO_ENCODE_H265_CAPABILITY_SAMPLE_ADAPTIVE_OFFSET_ENABLED_BIT_EXT; 756 enum VK_VIDEO_ENCODE_H265_CAPABILITY_PCM_ENABLE_BIT_EXT = VkVideoEncodeH265CapabilityFlagBitsEXT.VK_VIDEO_ENCODE_H265_CAPABILITY_PCM_ENABLE_BIT_EXT; 757 enum VK_VIDEO_ENCODE_H265_CAPABILITY_SPS_TEMPORAL_MVP_ENABLED_BIT_EXT = VkVideoEncodeH265CapabilityFlagBitsEXT.VK_VIDEO_ENCODE_H265_CAPABILITY_SPS_TEMPORAL_MVP_ENABLED_BIT_EXT; 758 enum VK_VIDEO_ENCODE_H265_CAPABILITY_HRD_COMPLIANCE_BIT_EXT = VkVideoEncodeH265CapabilityFlagBitsEXT.VK_VIDEO_ENCODE_H265_CAPABILITY_HRD_COMPLIANCE_BIT_EXT; 759 enum VK_VIDEO_ENCODE_H265_CAPABILITY_INIT_QP_MINUS26_BIT_EXT = VkVideoEncodeH265CapabilityFlagBitsEXT.VK_VIDEO_ENCODE_H265_CAPABILITY_INIT_QP_MINUS26_BIT_EXT; 760 enum VK_VIDEO_ENCODE_H265_CAPABILITY_LOG2_PARALLEL_MERGE_LEVEL_MINUS2_BIT_EXT = VkVideoEncodeH265CapabilityFlagBitsEXT.VK_VIDEO_ENCODE_H265_CAPABILITY_LOG2_PARALLEL_MERGE_LEVEL_MINUS2_BIT_EXT; 761 enum VK_VIDEO_ENCODE_H265_CAPABILITY_SIGN_DATA_HIDING_ENABLED_BIT_EXT = VkVideoEncodeH265CapabilityFlagBitsEXT.VK_VIDEO_ENCODE_H265_CAPABILITY_SIGN_DATA_HIDING_ENABLED_BIT_EXT; 762 enum VK_VIDEO_ENCODE_H265_CAPABILITY_TRANSFORM_SKIP_ENABLED_BIT_EXT = VkVideoEncodeH265CapabilityFlagBitsEXT.VK_VIDEO_ENCODE_H265_CAPABILITY_TRANSFORM_SKIP_ENABLED_BIT_EXT; 763 enum VK_VIDEO_ENCODE_H265_CAPABILITY_TRANSFORM_SKIP_DISABLED_BIT_EXT = VkVideoEncodeH265CapabilityFlagBitsEXT.VK_VIDEO_ENCODE_H265_CAPABILITY_TRANSFORM_SKIP_DISABLED_BIT_EXT; 764 enum VK_VIDEO_ENCODE_H265_CAPABILITY_PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT_BIT_EXT = VkVideoEncodeH265CapabilityFlagBitsEXT.VK_VIDEO_ENCODE_H265_CAPABILITY_PPS_SLICE_CHROMA_QP_OFFSETS_PRESENT_BIT_EXT; 765 enum VK_VIDEO_ENCODE_H265_CAPABILITY_WEIGHTED_PRED_BIT_EXT = VkVideoEncodeH265CapabilityFlagBitsEXT.VK_VIDEO_ENCODE_H265_CAPABILITY_WEIGHTED_PRED_BIT_EXT; 766 enum VK_VIDEO_ENCODE_H265_CAPABILITY_WEIGHTED_BIPRED_BIT_EXT = VkVideoEncodeH265CapabilityFlagBitsEXT.VK_VIDEO_ENCODE_H265_CAPABILITY_WEIGHTED_BIPRED_BIT_EXT; 767 enum VK_VIDEO_ENCODE_H265_CAPABILITY_WEIGHTED_PRED_NO_TABLE_BIT_EXT = VkVideoEncodeH265CapabilityFlagBitsEXT.VK_VIDEO_ENCODE_H265_CAPABILITY_WEIGHTED_PRED_NO_TABLE_BIT_EXT; 768 enum VK_VIDEO_ENCODE_H265_CAPABILITY_TRANSQUANT_BYPASS_ENABLED_BIT_EXT = VkVideoEncodeH265CapabilityFlagBitsEXT.VK_VIDEO_ENCODE_H265_CAPABILITY_TRANSQUANT_BYPASS_ENABLED_BIT_EXT; 769 enum VK_VIDEO_ENCODE_H265_CAPABILITY_ENTROPY_CODING_SYNC_ENABLED_BIT_EXT = VkVideoEncodeH265CapabilityFlagBitsEXT.VK_VIDEO_ENCODE_H265_CAPABILITY_ENTROPY_CODING_SYNC_ENABLED_BIT_EXT; 770 enum VK_VIDEO_ENCODE_H265_CAPABILITY_DEBLOCKING_FILTER_OVERRIDE_ENABLED_BIT_EXT = VkVideoEncodeH265CapabilityFlagBitsEXT.VK_VIDEO_ENCODE_H265_CAPABILITY_DEBLOCKING_FILTER_OVERRIDE_ENABLED_BIT_EXT; 771 enum VK_VIDEO_ENCODE_H265_CAPABILITY_MULTIPLE_TILE_PER_FRAME_BIT_EXT = VkVideoEncodeH265CapabilityFlagBitsEXT.VK_VIDEO_ENCODE_H265_CAPABILITY_MULTIPLE_TILE_PER_FRAME_BIT_EXT; 772 enum VK_VIDEO_ENCODE_H265_CAPABILITY_MULTIPLE_SLICE_PER_TILE_BIT_EXT = VkVideoEncodeH265CapabilityFlagBitsEXT.VK_VIDEO_ENCODE_H265_CAPABILITY_MULTIPLE_SLICE_PER_TILE_BIT_EXT; 773 enum VK_VIDEO_ENCODE_H265_CAPABILITY_MULTIPLE_TILE_PER_SLICE_BIT_EXT = VkVideoEncodeH265CapabilityFlagBitsEXT.VK_VIDEO_ENCODE_H265_CAPABILITY_MULTIPLE_TILE_PER_SLICE_BIT_EXT; 774 enum VK_VIDEO_ENCODE_H265_CAPABILITY_SLICE_SEGMENT_CTB_COUNT_BIT_EXT = VkVideoEncodeH265CapabilityFlagBitsEXT.VK_VIDEO_ENCODE_H265_CAPABILITY_SLICE_SEGMENT_CTB_COUNT_BIT_EXT; 775 enum VK_VIDEO_ENCODE_H265_CAPABILITY_ROW_UNALIGNED_SLICE_SEGMENT_BIT_EXT = VkVideoEncodeH265CapabilityFlagBitsEXT.VK_VIDEO_ENCODE_H265_CAPABILITY_ROW_UNALIGNED_SLICE_SEGMENT_BIT_EXT; 776 enum VK_VIDEO_ENCODE_H265_CAPABILITY_DEPENDENT_SLICE_SEGMENT_BIT_EXT = VkVideoEncodeH265CapabilityFlagBitsEXT.VK_VIDEO_ENCODE_H265_CAPABILITY_DEPENDENT_SLICE_SEGMENT_BIT_EXT; 777 enum VK_VIDEO_ENCODE_H265_CAPABILITY_DIFFERENT_SLICE_TYPE_BIT_EXT = VkVideoEncodeH265CapabilityFlagBitsEXT.VK_VIDEO_ENCODE_H265_CAPABILITY_DIFFERENT_SLICE_TYPE_BIT_EXT; 778 enum VK_VIDEO_ENCODE_H265_CAPABILITY_B_FRAME_IN_L1_LIST_BIT_EXT = VkVideoEncodeH265CapabilityFlagBitsEXT.VK_VIDEO_ENCODE_H265_CAPABILITY_B_FRAME_IN_L1_LIST_BIT_EXT; 779 enum VK_VIDEO_ENCODE_H265_CAPABILITY_DIFFERENT_REFERENCE_FINAL_LISTS_BIT_EXT = VkVideoEncodeH265CapabilityFlagBitsEXT.VK_VIDEO_ENCODE_H265_CAPABILITY_DIFFERENT_REFERENCE_FINAL_LISTS_BIT_EXT; 780 enum VK_VIDEO_ENCODE_H2_65_CAPABILITY_FLAG_BITS_MAX_ENUM_EXT = VkVideoEncodeH265CapabilityFlagBitsEXT.VK_VIDEO_ENCODE_H2_65_CAPABILITY_FLAG_BITS_MAX_ENUM_EXT; 781 782 alias VkVideoEncodeH265CtbSizeFlagsEXT = VkFlags; 783 enum VkVideoEncodeH265CtbSizeFlagBitsEXT : VkVideoEncodeH265CtbSizeFlagsEXT { 784 VK_VIDEO_ENCODE_H265_CTB_SIZE_16_BIT_EXT = 0x00000001, 785 VK_VIDEO_ENCODE_H265_CTB_SIZE_32_BIT_EXT = 0x00000002, 786 VK_VIDEO_ENCODE_H265_CTB_SIZE_64_BIT_EXT = 0x00000004, 787 VK_VIDEO_ENCODE_H2_65_CTB_SIZE_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF 788 } 789 790 enum VK_VIDEO_ENCODE_H265_CTB_SIZE_16_BIT_EXT = VkVideoEncodeH265CtbSizeFlagBitsEXT.VK_VIDEO_ENCODE_H265_CTB_SIZE_16_BIT_EXT; 791 enum VK_VIDEO_ENCODE_H265_CTB_SIZE_32_BIT_EXT = VkVideoEncodeH265CtbSizeFlagBitsEXT.VK_VIDEO_ENCODE_H265_CTB_SIZE_32_BIT_EXT; 792 enum VK_VIDEO_ENCODE_H265_CTB_SIZE_64_BIT_EXT = VkVideoEncodeH265CtbSizeFlagBitsEXT.VK_VIDEO_ENCODE_H265_CTB_SIZE_64_BIT_EXT; 793 enum VK_VIDEO_ENCODE_H2_65_CTB_SIZE_FLAG_BITS_MAX_ENUM_EXT = VkVideoEncodeH265CtbSizeFlagBitsEXT.VK_VIDEO_ENCODE_H2_65_CTB_SIZE_FLAG_BITS_MAX_ENUM_EXT; 794 795 alias VkVideoEncodeH265TransformBlockSizeFlagsEXT = VkFlags; 796 enum VkVideoEncodeH265TransformBlockSizeFlagBitsEXT : VkVideoEncodeH265TransformBlockSizeFlagsEXT { 797 VK_VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_4_BIT_EXT = 0x00000001, 798 VK_VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_8_BIT_EXT = 0x00000002, 799 VK_VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_16_BIT_EXT = 0x00000004, 800 VK_VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_32_BIT_EXT = 0x00000008, 801 VK_VIDEO_ENCODE_H2_65_TRANSFORM_BLOCK_SIZE_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF 802 } 803 804 enum VK_VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_4_BIT_EXT = VkVideoEncodeH265TransformBlockSizeFlagBitsEXT.VK_VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_4_BIT_EXT; 805 enum VK_VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_8_BIT_EXT = VkVideoEncodeH265TransformBlockSizeFlagBitsEXT.VK_VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_8_BIT_EXT; 806 enum VK_VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_16_BIT_EXT = VkVideoEncodeH265TransformBlockSizeFlagBitsEXT.VK_VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_16_BIT_EXT; 807 enum VK_VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_32_BIT_EXT = VkVideoEncodeH265TransformBlockSizeFlagBitsEXT.VK_VIDEO_ENCODE_H265_TRANSFORM_BLOCK_SIZE_32_BIT_EXT; 808 enum VK_VIDEO_ENCODE_H2_65_TRANSFORM_BLOCK_SIZE_FLAG_BITS_MAX_ENUM_EXT = VkVideoEncodeH265TransformBlockSizeFlagBitsEXT.VK_VIDEO_ENCODE_H2_65_TRANSFORM_BLOCK_SIZE_FLAG_BITS_MAX_ENUM_EXT; 809 810 struct VkVideoEncodeH265CapabilitiesEXT { 811 VkStructureType sType = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_CAPABILITIES_EXT; 812 void* pNext; 813 VkVideoEncodeH265CapabilityFlagsEXT flags; 814 VkVideoEncodeH265CtbSizeFlagsEXT ctbSizes; 815 VkVideoEncodeH265TransformBlockSizeFlagsEXT transformBlockSizes; 816 uint32_t maxPPictureL0ReferenceCount; 817 uint32_t maxBPictureL0ReferenceCount; 818 uint32_t maxL1ReferenceCount; 819 uint32_t maxSubLayersCount; 820 uint32_t minLog2MinLumaCodingBlockSizeMinus3; 821 uint32_t maxLog2MinLumaCodingBlockSizeMinus3; 822 uint32_t minLog2MinLumaTransformBlockSizeMinus2; 823 uint32_t maxLog2MinLumaTransformBlockSizeMinus2; 824 uint32_t minMaxTransformHierarchyDepthInter; 825 uint32_t maxMaxTransformHierarchyDepthInter; 826 uint32_t minMaxTransformHierarchyDepthIntra; 827 uint32_t maxMaxTransformHierarchyDepthIntra; 828 uint32_t maxDiffCuQpDeltaDepth; 829 uint32_t minMaxNumMergeCand; 830 uint32_t maxMaxNumMergeCand; 831 } 832 833 struct VkVideoEncodeH265SessionParametersAddInfoEXT { 834 VkStructureType sType = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_PARAMETERS_ADD_INFO_EXT; 835 const( void )* pNext; 836 uint32_t stdVPSCount; 837 const( StdVideoH265VideoParameterSet )* pStdVPSs; 838 uint32_t stdSPSCount; 839 const( StdVideoH265SequenceParameterSet )* pStdSPSs; 840 uint32_t stdPPSCount; 841 const( StdVideoH265PictureParameterSet )* pStdPPSs; 842 } 843 844 struct VkVideoEncodeH265SessionParametersCreateInfoEXT { 845 VkStructureType sType = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_SESSION_PARAMETERS_CREATE_INFO_EXT; 846 const( void )* pNext; 847 uint32_t maxStdVPSCount; 848 uint32_t maxStdSPSCount; 849 uint32_t maxStdPPSCount; 850 const( VkVideoEncodeH265SessionParametersAddInfoEXT )* pParametersAddInfo; 851 } 852 853 struct VkVideoEncodeH265NaluSliceSegmentInfoEXT { 854 VkStructureType sType = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_NALU_SLICE_SEGMENT_INFO_EXT; 855 const( void )* pNext; 856 uint32_t ctbCount; 857 const( StdVideoEncodeH265ReferenceListsInfo )* pStdReferenceFinalLists; 858 const( StdVideoEncodeH265SliceSegmentHeader )* pStdSliceSegmentHeader; 859 } 860 861 struct VkVideoEncodeH265VclFrameInfoEXT { 862 VkStructureType sType = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_VCL_FRAME_INFO_EXT; 863 const( void )* pNext; 864 const( StdVideoEncodeH265ReferenceListsInfo )* pStdReferenceFinalLists; 865 uint32_t naluSliceSegmentEntryCount; 866 const( VkVideoEncodeH265NaluSliceSegmentInfoEXT )* pNaluSliceSegmentEntries; 867 const( StdVideoEncodeH265PictureInfo )* pStdPictureInfo; 868 } 869 870 struct VkVideoEncodeH265DpbSlotInfoEXT { 871 VkStructureType sType = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_DPB_SLOT_INFO_EXT; 872 const( void )* pNext; 873 const( StdVideoEncodeH265ReferenceInfo )* pStdReferenceInfo; 874 } 875 876 struct VkVideoEncodeH265ProfileInfoEXT { 877 VkStructureType sType = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_PROFILE_INFO_EXT; 878 const( void )* pNext; 879 StdVideoH265ProfileIdc stdProfileIdc; 880 } 881 882 struct VkVideoEncodeH265RateControlInfoEXT { 883 VkStructureType sType = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_RATE_CONTROL_INFO_EXT; 884 const( void )* pNext; 885 uint32_t gopFrameCount; 886 uint32_t idrPeriod; 887 uint32_t consecutiveBFrameCount; 888 VkVideoEncodeH265RateControlStructureEXT rateControlStructure; 889 uint32_t subLayerCount; 890 } 891 892 struct VkVideoEncodeH265QpEXT { 893 int32_t qpI; 894 int32_t qpP; 895 int32_t qpB; 896 } 897 898 struct VkVideoEncodeH265FrameSizeEXT { 899 uint32_t frameISize; 900 uint32_t framePSize; 901 uint32_t frameBSize; 902 } 903 904 struct VkVideoEncodeH265RateControlLayerInfoEXT { 905 VkStructureType sType = VK_STRUCTURE_TYPE_VIDEO_ENCODE_H265_RATE_CONTROL_LAYER_INFO_EXT; 906 const( void )* pNext; 907 uint32_t temporalId; 908 VkBool32 useInitialRcQp; 909 VkVideoEncodeH265QpEXT initialRcQp; 910 VkBool32 useMinQp; 911 VkVideoEncodeH265QpEXT minQp; 912 VkBool32 useMaxQp; 913 VkVideoEncodeH265QpEXT maxQp; 914 VkBool32 useMaxFrameSize; 915 VkVideoEncodeH265FrameSizeEXT maxFrameSize; 916 } 917 918 } 919 920 // VK_GGP_stream_descriptor_surface : types and function pointer type aliases 921 else static if( __traits( isSame, extension, GGP_stream_descriptor_surface )) { 922 enum VK_GGP_stream_descriptor_surface = 1; 923 924 enum VK_GGP_STREAM_DESCRIPTOR_SURFACE_SPEC_VERSION = 1; 925 enum const( char )* VK_GGP_STREAM_DESCRIPTOR_SURFACE_EXTENSION_NAME = "VK_GGP_stream_descriptor_surface"; 926 927 alias VkStreamDescriptorSurfaceCreateFlagsGGP = VkFlags; 928 929 struct VkStreamDescriptorSurfaceCreateInfoGGP { 930 VkStructureType sType = VK_STRUCTURE_TYPE_STREAM_DESCRIPTOR_SURFACE_CREATE_INFO_GGP; 931 const( void )* pNext; 932 VkStreamDescriptorSurfaceCreateFlagsGGP flags; 933 GgpStreamDescriptor streamDescriptor; 934 } 935 936 alias PFN_vkCreateStreamDescriptorSurfaceGGP = VkResult function( VkInstance instance, const( VkStreamDescriptorSurfaceCreateInfoGGP )* pCreateInfo, const( VkAllocationCallbacks )* pAllocator, VkSurfaceKHR* pSurface ); 937 } 938 939 // VK_NV_external_memory_win32 : types and function pointer type aliases 940 else static if( __traits( isSame, extension, NV_external_memory_win32 )) { 941 enum VK_NV_external_memory_win32 = 1; 942 943 enum VK_NV_EXTERNAL_MEMORY_WIN32_SPEC_VERSION = 1; 944 enum const( char )* VK_NV_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME = "VK_NV_external_memory_win32"; 945 946 struct VkImportMemoryWin32HandleInfoNV { 947 VkStructureType sType = VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV; 948 const( void )* pNext; 949 VkExternalMemoryHandleTypeFlagsNV handleType; 950 HANDLE handle; 951 } 952 953 struct VkExportMemoryWin32HandleInfoNV { 954 VkStructureType sType = VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV; 955 const( void )* pNext; 956 const( SECURITY_ATTRIBUTES )* pAttributes; 957 DWORD dwAccess; 958 } 959 960 alias PFN_vkGetMemoryWin32HandleNV = VkResult function( VkDevice device, VkDeviceMemory memory, VkExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle ); 961 } 962 963 // VK_NV_win32_keyed_mutex : types and function pointer type aliases 964 else static if( __traits( isSame, extension, NV_win32_keyed_mutex )) { 965 enum VK_NV_win32_keyed_mutex = 1; 966 967 enum VK_NV_WIN32_KEYED_MUTEX_SPEC_VERSION = 2; 968 enum const( char )* VK_NV_WIN32_KEYED_MUTEX_EXTENSION_NAME = "VK_NV_win32_keyed_mutex"; 969 970 struct VkWin32KeyedMutexAcquireReleaseInfoNV { 971 VkStructureType sType = VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV; 972 const( void )* pNext; 973 uint32_t acquireCount; 974 const( VkDeviceMemory )* pAcquireSyncs; 975 const( uint64_t )* pAcquireKeys; 976 const( uint32_t )* pAcquireTimeoutMilliseconds; 977 uint32_t releaseCount; 978 const( VkDeviceMemory )* pReleaseSyncs; 979 const( uint64_t )* pReleaseKeys; 980 } 981 982 } 983 984 // VK_NN_vi_surface : types and function pointer type aliases 985 else static if( __traits( isSame, extension, NN_vi_surface )) { 986 enum VK_NN_vi_surface = 1; 987 988 enum VK_NN_VI_SURFACE_SPEC_VERSION = 1; 989 enum const( char )* VK_NN_VI_SURFACE_EXTENSION_NAME = "VK_NN_vi_surface"; 990 991 alias VkViSurfaceCreateFlagsNN = VkFlags; 992 993 struct VkViSurfaceCreateInfoNN { 994 VkStructureType sType = VK_STRUCTURE_TYPE_VI_SURFACE_CREATE_INFO_NN; 995 const( void )* pNext; 996 VkViSurfaceCreateFlagsNN flags; 997 void* window; 998 } 999 1000 alias PFN_vkCreateViSurfaceNN = VkResult function( VkInstance instance, const( VkViSurfaceCreateInfoNN )* pCreateInfo, const( VkAllocationCallbacks )* pAllocator, VkSurfaceKHR* pSurface ); 1001 } 1002 1003 // VK_EXT_acquire_xlib_display : types and function pointer type aliases 1004 else static if( __traits( isSame, extension, EXT_acquire_xlib_display )) { 1005 enum VK_EXT_acquire_xlib_display = 1; 1006 1007 enum VK_EXT_ACQUIRE_XLIB_DISPLAY_SPEC_VERSION = 1; 1008 enum const( char )* VK_EXT_ACQUIRE_XLIB_DISPLAY_EXTENSION_NAME = "VK_EXT_acquire_xlib_display"; 1009 1010 alias PFN_vkAcquireXlibDisplayEXT = VkResult function( VkPhysicalDevice physicalDevice, Display* dpy, VkDisplayKHR display ); 1011 alias PFN_vkGetRandROutputDisplayEXT = VkResult function( VkPhysicalDevice physicalDevice, Display* dpy, RROutput rrOutput, VkDisplayKHR* pDisplay ); 1012 } 1013 1014 // VK_MVK_ios_surface : types and function pointer type aliases 1015 else static if( __traits( isSame, extension, MVK_ios_surface )) { 1016 enum VK_MVK_ios_surface = 1; 1017 1018 enum VK_MVK_IOS_SURFACE_SPEC_VERSION = 3; 1019 enum const( char )* VK_MVK_IOS_SURFACE_EXTENSION_NAME = "VK_MVK_ios_surface"; 1020 1021 alias VkIOSSurfaceCreateFlagsMVK = VkFlags; 1022 1023 struct VkIOSSurfaceCreateInfoMVK { 1024 VkStructureType sType = VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK; 1025 const( void )* pNext; 1026 VkIOSSurfaceCreateFlagsMVK flags; 1027 const( void )* pView; 1028 } 1029 1030 alias PFN_vkCreateIOSSurfaceMVK = VkResult function( VkInstance instance, const( VkIOSSurfaceCreateInfoMVK )* pCreateInfo, const( VkAllocationCallbacks )* pAllocator, VkSurfaceKHR* pSurface ); 1031 } 1032 1033 // VK_MVK_macos_surface : types and function pointer type aliases 1034 else static if( __traits( isSame, extension, MVK_macos_surface )) { 1035 enum VK_MVK_macos_surface = 1; 1036 1037 enum VK_MVK_MACOS_SURFACE_SPEC_VERSION = 3; 1038 enum const( char )* VK_MVK_MACOS_SURFACE_EXTENSION_NAME = "VK_MVK_macos_surface"; 1039 1040 alias VkMacOSSurfaceCreateFlagsMVK = VkFlags; 1041 1042 struct VkMacOSSurfaceCreateInfoMVK { 1043 VkStructureType sType = VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK; 1044 const( void )* pNext; 1045 VkMacOSSurfaceCreateFlagsMVK flags; 1046 const( void )* pView; 1047 } 1048 1049 alias PFN_vkCreateMacOSSurfaceMVK = VkResult function( VkInstance instance, const( VkMacOSSurfaceCreateInfoMVK )* pCreateInfo, const( VkAllocationCallbacks )* pAllocator, VkSurfaceKHR* pSurface ); 1050 } 1051 1052 // VK_ANDROID_external_memory_android_hardware_buffer : types and function pointer type aliases 1053 else static if( __traits( isSame, extension, ANDROID_external_memory_android_hardware_buffer )) { 1054 enum VK_ANDROID_external_memory_android_hardware_buffer = 1; 1055 1056 enum VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_SPEC_VERSION = 5; 1057 enum const( char )* VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_EXTENSION_NAME = "VK_ANDROID_external_memory_android_hardware_buffer"; 1058 1059 struct VkAndroidHardwareBufferUsageANDROID { 1060 VkStructureType sType = VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_USAGE_ANDROID; 1061 void* pNext; 1062 uint64_t androidHardwareBufferUsage; 1063 } 1064 1065 struct VkAndroidHardwareBufferPropertiesANDROID { 1066 VkStructureType sType = VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_PROPERTIES_ANDROID; 1067 void* pNext; 1068 VkDeviceSize allocationSize; 1069 uint32_t memoryTypeBits; 1070 } 1071 1072 struct VkAndroidHardwareBufferFormatPropertiesANDROID { 1073 VkStructureType sType = VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_ANDROID; 1074 void* pNext; 1075 VkFormat format; 1076 uint64_t externalFormat; 1077 VkFormatFeatureFlags formatFeatures; 1078 VkComponentMapping samplerYcbcrConversionComponents; 1079 VkSamplerYcbcrModelConversion suggestedYcbcrModel; 1080 VkSamplerYcbcrRange suggestedYcbcrRange; 1081 VkChromaLocation suggestedXChromaOffset; 1082 VkChromaLocation suggestedYChromaOffset; 1083 } 1084 1085 struct VkImportAndroidHardwareBufferInfoANDROID { 1086 VkStructureType sType = VK_STRUCTURE_TYPE_IMPORT_ANDROID_HARDWARE_BUFFER_INFO_ANDROID; 1087 const( void )* pNext; 1088 const( AHardwareBuffer )* buffer; 1089 } 1090 1091 struct VkMemoryGetAndroidHardwareBufferInfoANDROID { 1092 VkStructureType sType = VK_STRUCTURE_TYPE_MEMORY_GET_ANDROID_HARDWARE_BUFFER_INFO_ANDROID; 1093 const( void )* pNext; 1094 VkDeviceMemory memory; 1095 } 1096 1097 struct VkExternalFormatANDROID { 1098 VkStructureType sType = VK_STRUCTURE_TYPE_EXTERNAL_FORMAT_ANDROID; 1099 void* pNext; 1100 uint64_t externalFormat; 1101 } 1102 1103 struct VkAndroidHardwareBufferFormatProperties2ANDROID { 1104 VkStructureType sType = VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_2_ANDROID; 1105 void* pNext; 1106 VkFormat format; 1107 uint64_t externalFormat; 1108 VkFormatFeatureFlags2 formatFeatures; 1109 VkComponentMapping samplerYcbcrConversionComponents; 1110 VkSamplerYcbcrModelConversion suggestedYcbcrModel; 1111 VkSamplerYcbcrRange suggestedYcbcrRange; 1112 VkChromaLocation suggestedXChromaOffset; 1113 VkChromaLocation suggestedYChromaOffset; 1114 } 1115 1116 alias PFN_vkGetAndroidHardwareBufferPropertiesANDROID = VkResult function( VkDevice device, const( AHardwareBuffer )* buffer, VkAndroidHardwareBufferPropertiesANDROID* pProperties ); 1117 alias PFN_vkGetMemoryAndroidHardwareBufferANDROID = VkResult function( VkDevice device, const( VkMemoryGetAndroidHardwareBufferInfoANDROID )* pInfo, AHardwareBuffer pBuffer ); 1118 } 1119 1120 // VK_GGP_frame_token : types and function pointer type aliases 1121 else static if( __traits( isSame, extension, GGP_frame_token )) { 1122 enum VK_GGP_frame_token = 1; 1123 1124 enum VK_GGP_FRAME_TOKEN_SPEC_VERSION = 1; 1125 enum const( char )* VK_GGP_FRAME_TOKEN_EXTENSION_NAME = "VK_GGP_frame_token"; 1126 1127 struct VkPresentFrameTokenGGP { 1128 VkStructureType sType = VK_STRUCTURE_TYPE_PRESENT_FRAME_TOKEN_GGP; 1129 const( void )* pNext; 1130 GgpFrameToken frameToken; 1131 } 1132 1133 } 1134 1135 // VK_FUCHSIA_imagepipe_surface : types and function pointer type aliases 1136 else static if( __traits( isSame, extension, FUCHSIA_imagepipe_surface )) { 1137 enum VK_FUCHSIA_imagepipe_surface = 1; 1138 1139 enum VK_FUCHSIA_IMAGEPIPE_SURFACE_SPEC_VERSION = 1; 1140 enum const( char )* VK_FUCHSIA_IMAGEPIPE_SURFACE_EXTENSION_NAME = "VK_FUCHSIA_imagepipe_surface"; 1141 1142 alias VkImagePipeSurfaceCreateFlagsFUCHSIA = VkFlags; 1143 1144 struct VkImagePipeSurfaceCreateInfoFUCHSIA { 1145 VkStructureType sType = VK_STRUCTURE_TYPE_IMAGEPIPE_SURFACE_CREATE_INFO_FUCHSIA; 1146 const( void )* pNext; 1147 VkImagePipeSurfaceCreateFlagsFUCHSIA flags; 1148 zx_handle_t imagePipeHandle; 1149 } 1150 1151 alias PFN_vkCreateImagePipeSurfaceFUCHSIA = VkResult function( VkInstance instance, const( VkImagePipeSurfaceCreateInfoFUCHSIA )* pCreateInfo, const( VkAllocationCallbacks )* pAllocator, VkSurfaceKHR* pSurface ); 1152 } 1153 1154 // VK_EXT_metal_surface : types and function pointer type aliases 1155 else static if( __traits( isSame, extension, EXT_metal_surface )) { 1156 enum VK_EXT_metal_surface = 1; 1157 1158 enum VK_EXT_METAL_SURFACE_SPEC_VERSION = 1; 1159 enum const( char )* VK_EXT_METAL_SURFACE_EXTENSION_NAME = "VK_EXT_metal_surface"; 1160 1161 alias VkMetalSurfaceCreateFlagsEXT = VkFlags; 1162 1163 struct VkMetalSurfaceCreateInfoEXT { 1164 VkStructureType sType = VK_STRUCTURE_TYPE_METAL_SURFACE_CREATE_INFO_EXT; 1165 const( void )* pNext; 1166 VkMetalSurfaceCreateFlagsEXT flags; 1167 const( CAMetalLayer )* pLayer; 1168 } 1169 1170 alias PFN_vkCreateMetalSurfaceEXT = VkResult function( VkInstance instance, const( VkMetalSurfaceCreateInfoEXT )* pCreateInfo, const( VkAllocationCallbacks )* pAllocator, VkSurfaceKHR* pSurface ); 1171 } 1172 1173 // VK_EXT_full_screen_exclusive : types and function pointer type aliases 1174 else static if( __traits( isSame, extension, EXT_full_screen_exclusive )) { 1175 enum VK_EXT_full_screen_exclusive = 1; 1176 1177 enum VK_EXT_FULL_SCREEN_EXCLUSIVE_SPEC_VERSION = 4; 1178 enum const( char )* VK_EXT_FULL_SCREEN_EXCLUSIVE_EXTENSION_NAME = "VK_EXT_full_screen_exclusive"; 1179 1180 enum VkFullScreenExclusiveEXT { 1181 VK_FULL_SCREEN_EXCLUSIVE_DEFAULT_EXT = 0, 1182 VK_FULL_SCREEN_EXCLUSIVE_ALLOWED_EXT = 1, 1183 VK_FULL_SCREEN_EXCLUSIVE_DISALLOWED_EXT = 2, 1184 VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT = 3, 1185 VK_FULL_SCREEN_EXCLUSIVE_MAX_ENUM_EXT = 0x7FFFFFFF 1186 } 1187 1188 enum VK_FULL_SCREEN_EXCLUSIVE_DEFAULT_EXT = VkFullScreenExclusiveEXT.VK_FULL_SCREEN_EXCLUSIVE_DEFAULT_EXT; 1189 enum VK_FULL_SCREEN_EXCLUSIVE_ALLOWED_EXT = VkFullScreenExclusiveEXT.VK_FULL_SCREEN_EXCLUSIVE_ALLOWED_EXT; 1190 enum VK_FULL_SCREEN_EXCLUSIVE_DISALLOWED_EXT = VkFullScreenExclusiveEXT.VK_FULL_SCREEN_EXCLUSIVE_DISALLOWED_EXT; 1191 enum VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT = VkFullScreenExclusiveEXT.VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT; 1192 enum VK_FULL_SCREEN_EXCLUSIVE_MAX_ENUM_EXT = VkFullScreenExclusiveEXT.VK_FULL_SCREEN_EXCLUSIVE_MAX_ENUM_EXT; 1193 1194 struct VkSurfaceFullScreenExclusiveInfoEXT { 1195 VkStructureType sType = VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_INFO_EXT; 1196 void* pNext; 1197 VkFullScreenExclusiveEXT fullScreenExclusive; 1198 } 1199 1200 struct VkSurfaceCapabilitiesFullScreenExclusiveEXT { 1201 VkStructureType sType = VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_FULL_SCREEN_EXCLUSIVE_EXT; 1202 void* pNext; 1203 VkBool32 fullScreenExclusiveSupported; 1204 } 1205 1206 struct VkSurfaceFullScreenExclusiveWin32InfoEXT { 1207 VkStructureType sType = VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_WIN32_INFO_EXT; 1208 const( void )* pNext; 1209 HMONITOR hmonitor; 1210 } 1211 1212 alias PFN_vkGetPhysicalDeviceSurfacePresentModes2EXT = VkResult function( VkPhysicalDevice physicalDevice, const( VkPhysicalDeviceSurfaceInfo2KHR )* pSurfaceInfo, uint32_t* pPresentModeCount, VkPresentModeKHR* pPresentModes ); 1213 alias PFN_vkAcquireFullScreenExclusiveModeEXT = VkResult function( VkDevice device, VkSwapchainKHR swapchain ); 1214 alias PFN_vkReleaseFullScreenExclusiveModeEXT = VkResult function( VkDevice device, VkSwapchainKHR swapchain ); 1215 alias PFN_vkGetDeviceGroupSurfacePresentModes2EXT = VkResult function( VkDevice device, const( VkPhysicalDeviceSurfaceInfo2KHR )* pSurfaceInfo, VkDeviceGroupPresentModeFlagsKHR* pModes ); 1216 } 1217 1218 // VK_EXT_metal_objects : types and function pointer type aliases 1219 else static if( __traits( isSame, extension, EXT_metal_objects )) { 1220 enum VK_EXT_metal_objects = 1; 1221 1222 enum VK_EXT_METAL_OBJECTS_SPEC_VERSION = 1; 1223 enum const( char )* VK_EXT_METAL_OBJECTS_EXTENSION_NAME = "VK_EXT_metal_objects"; 1224 1225 alias VkExportMetalObjectTypeFlagsEXT = VkFlags; 1226 enum VkExportMetalObjectTypeFlagBitsEXT : VkExportMetalObjectTypeFlagsEXT { 1227 VK_EXPORT_METAL_OBJECT_TYPE_METAL_DEVICE_BIT_EXT = 0x00000001, 1228 VK_EXPORT_METAL_OBJECT_TYPE_METAL_COMMAND_QUEUE_BIT_EXT = 0x00000002, 1229 VK_EXPORT_METAL_OBJECT_TYPE_METAL_BUFFER_BIT_EXT = 0x00000004, 1230 VK_EXPORT_METAL_OBJECT_TYPE_METAL_TEXTURE_BIT_EXT = 0x00000008, 1231 VK_EXPORT_METAL_OBJECT_TYPE_METAL_IOSURFACE_BIT_EXT = 0x00000010, 1232 VK_EXPORT_METAL_OBJECT_TYPE_METAL_SHARED_EVENT_BIT_EXT = 0x00000020, 1233 VK_EXPORT_METAL_OBJECT_TYPE_FLAG_BITS_MAX_ENUM_EXT = 0x7FFFFFFF 1234 } 1235 1236 enum VK_EXPORT_METAL_OBJECT_TYPE_METAL_DEVICE_BIT_EXT = VkExportMetalObjectTypeFlagBitsEXT.VK_EXPORT_METAL_OBJECT_TYPE_METAL_DEVICE_BIT_EXT; 1237 enum VK_EXPORT_METAL_OBJECT_TYPE_METAL_COMMAND_QUEUE_BIT_EXT = VkExportMetalObjectTypeFlagBitsEXT.VK_EXPORT_METAL_OBJECT_TYPE_METAL_COMMAND_QUEUE_BIT_EXT; 1238 enum VK_EXPORT_METAL_OBJECT_TYPE_METAL_BUFFER_BIT_EXT = VkExportMetalObjectTypeFlagBitsEXT.VK_EXPORT_METAL_OBJECT_TYPE_METAL_BUFFER_BIT_EXT; 1239 enum VK_EXPORT_METAL_OBJECT_TYPE_METAL_TEXTURE_BIT_EXT = VkExportMetalObjectTypeFlagBitsEXT.VK_EXPORT_METAL_OBJECT_TYPE_METAL_TEXTURE_BIT_EXT; 1240 enum VK_EXPORT_METAL_OBJECT_TYPE_METAL_IOSURFACE_BIT_EXT = VkExportMetalObjectTypeFlagBitsEXT.VK_EXPORT_METAL_OBJECT_TYPE_METAL_IOSURFACE_BIT_EXT; 1241 enum VK_EXPORT_METAL_OBJECT_TYPE_METAL_SHARED_EVENT_BIT_EXT = VkExportMetalObjectTypeFlagBitsEXT.VK_EXPORT_METAL_OBJECT_TYPE_METAL_SHARED_EVENT_BIT_EXT; 1242 enum VK_EXPORT_METAL_OBJECT_TYPE_FLAG_BITS_MAX_ENUM_EXT = VkExportMetalObjectTypeFlagBitsEXT.VK_EXPORT_METAL_OBJECT_TYPE_FLAG_BITS_MAX_ENUM_EXT; 1243 1244 struct VkExportMetalObjectCreateInfoEXT { 1245 VkStructureType sType = VK_STRUCTURE_TYPE_EXPORT_METAL_OBJECT_CREATE_INFO_EXT; 1246 const( void )* pNext; 1247 VkExportMetalObjectTypeFlagBitsEXT exportObjectType; 1248 } 1249 1250 struct VkExportMetalObjectsInfoEXT { 1251 VkStructureType sType = VK_STRUCTURE_TYPE_EXPORT_METAL_OBJECTS_INFO_EXT; 1252 const( void )* pNext; 1253 } 1254 1255 struct VkExportMetalDeviceInfoEXT { 1256 VkStructureType sType = VK_STRUCTURE_TYPE_EXPORT_METAL_DEVICE_INFO_EXT; 1257 const( void )* pNext; 1258 MTLDevice_id mtlDevice; 1259 } 1260 1261 struct VkExportMetalCommandQueueInfoEXT { 1262 VkStructureType sType = VK_STRUCTURE_TYPE_EXPORT_METAL_COMMAND_QUEUE_INFO_EXT; 1263 const( void )* pNext; 1264 VkQueue queue; 1265 MTLCommandQueue_id mtlCommandQueue; 1266 } 1267 1268 struct VkExportMetalBufferInfoEXT { 1269 VkStructureType sType = VK_STRUCTURE_TYPE_EXPORT_METAL_BUFFER_INFO_EXT; 1270 const( void )* pNext; 1271 VkDeviceMemory memory; 1272 MTLBuffer_id mtlBuffer; 1273 } 1274 1275 struct VkImportMetalBufferInfoEXT { 1276 VkStructureType sType = VK_STRUCTURE_TYPE_IMPORT_METAL_BUFFER_INFO_EXT; 1277 const( void )* pNext; 1278 MTLBuffer_id mtlBuffer; 1279 } 1280 1281 struct VkExportMetalTextureInfoEXT { 1282 VkStructureType sType = VK_STRUCTURE_TYPE_EXPORT_METAL_TEXTURE_INFO_EXT; 1283 const( void )* pNext; 1284 VkImage image; 1285 VkImageView imageView; 1286 VkBufferView bufferView; 1287 VkImageAspectFlagBits plane; 1288 MTLTexture_id mtlTexture; 1289 } 1290 1291 struct VkImportMetalTextureInfoEXT { 1292 VkStructureType sType = VK_STRUCTURE_TYPE_IMPORT_METAL_TEXTURE_INFO_EXT; 1293 const( void )* pNext; 1294 VkImageAspectFlagBits plane; 1295 MTLTexture_id mtlTexture; 1296 } 1297 1298 struct VkExportMetalIOSurfaceInfoEXT { 1299 VkStructureType sType = VK_STRUCTURE_TYPE_EXPORT_METAL_IO_SURFACE_INFO_EXT; 1300 const( void )* pNext; 1301 VkImage image; 1302 IOSurfaceRef ioSurface; 1303 } 1304 1305 struct VkImportMetalIOSurfaceInfoEXT { 1306 VkStructureType sType = VK_STRUCTURE_TYPE_IMPORT_METAL_IO_SURFACE_INFO_EXT; 1307 const( void )* pNext; 1308 IOSurfaceRef ioSurface; 1309 } 1310 1311 struct VkExportMetalSharedEventInfoEXT { 1312 VkStructureType sType = VK_STRUCTURE_TYPE_EXPORT_METAL_SHARED_EVENT_INFO_EXT; 1313 const( void )* pNext; 1314 VkSemaphore semaphore; 1315 VkEvent event; 1316 MTLSharedEvent_id mtlSharedEvent; 1317 } 1318 1319 struct VkImportMetalSharedEventInfoEXT { 1320 VkStructureType sType = VK_STRUCTURE_TYPE_IMPORT_METAL_SHARED_EVENT_INFO_EXT; 1321 const( void )* pNext; 1322 MTLSharedEvent_id mtlSharedEvent; 1323 } 1324 1325 alias PFN_vkExportMetalObjectsEXT = void function( VkDevice device, VkExportMetalObjectsInfoEXT* pMetalObjectsInfo ); 1326 } 1327 1328 // VK_NV_acquire_winrt_display : types and function pointer type aliases 1329 else static if( __traits( isSame, extension, NV_acquire_winrt_display )) { 1330 enum VK_NV_acquire_winrt_display = 1; 1331 1332 enum VK_NV_ACQUIRE_WINRT_DISPLAY_SPEC_VERSION = 1; 1333 enum const( char )* VK_NV_ACQUIRE_WINRT_DISPLAY_EXTENSION_NAME = "VK_NV_acquire_winrt_display"; 1334 1335 alias PFN_vkAcquireWinrtDisplayNV = VkResult function( VkPhysicalDevice physicalDevice, VkDisplayKHR display ); 1336 alias PFN_vkGetWinrtDisplayNV = VkResult function( VkPhysicalDevice physicalDevice, uint32_t deviceRelativeId, VkDisplayKHR* pDisplay ); 1337 } 1338 1339 // VK_EXT_directfb_surface : types and function pointer type aliases 1340 else static if( __traits( isSame, extension, EXT_directfb_surface )) { 1341 enum VK_EXT_directfb_surface = 1; 1342 1343 enum VK_EXT_DIRECTFB_SURFACE_SPEC_VERSION = 1; 1344 enum const( char )* VK_EXT_DIRECTFB_SURFACE_EXTENSION_NAME = "VK_EXT_directfb_surface"; 1345 1346 alias VkDirectFBSurfaceCreateFlagsEXT = VkFlags; 1347 1348 struct VkDirectFBSurfaceCreateInfoEXT { 1349 VkStructureType sType = VK_STRUCTURE_TYPE_DIRECTFB_SURFACE_CREATE_INFO_EXT; 1350 const( void )* pNext; 1351 VkDirectFBSurfaceCreateFlagsEXT flags; 1352 IDirectFB* dfb; 1353 IDirectFBSurface* surface; 1354 } 1355 1356 alias PFN_vkCreateDirectFBSurfaceEXT = VkResult function( VkInstance instance, const( VkDirectFBSurfaceCreateInfoEXT )* pCreateInfo, const( VkAllocationCallbacks )* pAllocator, VkSurfaceKHR* pSurface ); 1357 alias PFN_vkGetPhysicalDeviceDirectFBPresentationSupportEXT = VkBool32 function( VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, IDirectFB* dfb ); 1358 } 1359 1360 // VK_FUCHSIA_external_memory : types and function pointer type aliases 1361 else static if( __traits( isSame, extension, FUCHSIA_external_memory )) { 1362 enum VK_FUCHSIA_external_memory = 1; 1363 1364 enum VK_FUCHSIA_EXTERNAL_MEMORY_SPEC_VERSION = 1; 1365 enum const( char )* VK_FUCHSIA_EXTERNAL_MEMORY_EXTENSION_NAME = "VK_FUCHSIA_external_memory"; 1366 1367 struct VkImportMemoryZirconHandleInfoFUCHSIA { 1368 VkStructureType sType = VK_STRUCTURE_TYPE_IMPORT_MEMORY_ZIRCON_HANDLE_INFO_FUCHSIA; 1369 const( void )* pNext; 1370 VkExternalMemoryHandleTypeFlagBits handleType; 1371 zx_handle_t handle; 1372 } 1373 1374 struct VkMemoryZirconHandlePropertiesFUCHSIA { 1375 VkStructureType sType = VK_STRUCTURE_TYPE_MEMORY_ZIRCON_HANDLE_PROPERTIES_FUCHSIA; 1376 void* pNext; 1377 uint32_t memoryTypeBits; 1378 } 1379 1380 struct VkMemoryGetZirconHandleInfoFUCHSIA { 1381 VkStructureType sType = VK_STRUCTURE_TYPE_MEMORY_GET_ZIRCON_HANDLE_INFO_FUCHSIA; 1382 const( void )* pNext; 1383 VkDeviceMemory memory; 1384 VkExternalMemoryHandleTypeFlagBits handleType; 1385 } 1386 1387 alias PFN_vkGetMemoryZirconHandleFUCHSIA = VkResult function( VkDevice device, const( VkMemoryGetZirconHandleInfoFUCHSIA )* pGetZirconHandleInfo, zx_handle_t* pZirconHandle ); 1388 alias PFN_vkGetMemoryZirconHandlePropertiesFUCHSIA = VkResult function( VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, zx_handle_t zirconHandle, VkMemoryZirconHandlePropertiesFUCHSIA* pMemoryZirconHandleProperties ); 1389 } 1390 1391 // VK_FUCHSIA_external_semaphore : types and function pointer type aliases 1392 else static if( __traits( isSame, extension, FUCHSIA_external_semaphore )) { 1393 enum VK_FUCHSIA_external_semaphore = 1; 1394 1395 enum VK_FUCHSIA_EXTERNAL_SEMAPHORE_SPEC_VERSION = 1; 1396 enum const( char )* VK_FUCHSIA_EXTERNAL_SEMAPHORE_EXTENSION_NAME = "VK_FUCHSIA_external_semaphore"; 1397 1398 struct VkImportSemaphoreZirconHandleInfoFUCHSIA { 1399 VkStructureType sType = VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_ZIRCON_HANDLE_INFO_FUCHSIA; 1400 const( void )* pNext; 1401 VkSemaphore semaphore; 1402 VkSemaphoreImportFlags flags; 1403 VkExternalSemaphoreHandleTypeFlagBits handleType; 1404 zx_handle_t zirconHandle; 1405 } 1406 1407 struct VkSemaphoreGetZirconHandleInfoFUCHSIA { 1408 VkStructureType sType = VK_STRUCTURE_TYPE_SEMAPHORE_GET_ZIRCON_HANDLE_INFO_FUCHSIA; 1409 const( void )* pNext; 1410 VkSemaphore semaphore; 1411 VkExternalSemaphoreHandleTypeFlagBits handleType; 1412 } 1413 1414 alias PFN_vkImportSemaphoreZirconHandleFUCHSIA = VkResult function( VkDevice device, const( VkImportSemaphoreZirconHandleInfoFUCHSIA )* pImportSemaphoreZirconHandleInfo ); 1415 alias PFN_vkGetSemaphoreZirconHandleFUCHSIA = VkResult function( VkDevice device, const( VkSemaphoreGetZirconHandleInfoFUCHSIA )* pGetZirconHandleInfo, zx_handle_t* pZirconHandle ); 1416 } 1417 1418 // VK_FUCHSIA_buffer_collection : types and function pointer type aliases 1419 else static if( __traits( isSame, extension, FUCHSIA_buffer_collection )) { 1420 enum VK_FUCHSIA_buffer_collection = 1; 1421 1422 mixin( VK_DEFINE_NON_DISPATCHABLE_HANDLE!q{VkBufferCollectionFUCHSIA} ); 1423 1424 enum VK_FUCHSIA_BUFFER_COLLECTION_SPEC_VERSION = 2; 1425 enum const( char )* VK_FUCHSIA_BUFFER_COLLECTION_EXTENSION_NAME = "VK_FUCHSIA_buffer_collection"; 1426 1427 alias VkImageFormatConstraintsFlagsFUCHSIA = VkFlags; 1428 1429 alias VkImageConstraintsInfoFlagsFUCHSIA = VkFlags; 1430 enum VkImageConstraintsInfoFlagBitsFUCHSIA : VkImageConstraintsInfoFlagsFUCHSIA { 1431 VK_IMAGE_CONSTRAINTS_INFO_CPU_READ_RARELY_FUCHSIA = 0x00000001, 1432 VK_IMAGE_CONSTRAINTS_INFO_CPU_READ_OFTEN_FUCHSIA = 0x00000002, 1433 VK_IMAGE_CONSTRAINTS_INFO_CPU_WRITE_RARELY_FUCHSIA = 0x00000004, 1434 VK_IMAGE_CONSTRAINTS_INFO_CPU_WRITE_OFTEN_FUCHSIA = 0x00000008, 1435 VK_IMAGE_CONSTRAINTS_INFO_PROTECTED_OPTIONAL_FUCHSIA = 0x00000010, 1436 VK_IMAGE_CONSTRAINTS_INFO_FLAG_BITS_MAX_ENUM_FUCHSIA = 0x7FFFFFFF 1437 } 1438 1439 enum VK_IMAGE_CONSTRAINTS_INFO_CPU_READ_RARELY_FUCHSIA = VkImageConstraintsInfoFlagBitsFUCHSIA.VK_IMAGE_CONSTRAINTS_INFO_CPU_READ_RARELY_FUCHSIA; 1440 enum VK_IMAGE_CONSTRAINTS_INFO_CPU_READ_OFTEN_FUCHSIA = VkImageConstraintsInfoFlagBitsFUCHSIA.VK_IMAGE_CONSTRAINTS_INFO_CPU_READ_OFTEN_FUCHSIA; 1441 enum VK_IMAGE_CONSTRAINTS_INFO_CPU_WRITE_RARELY_FUCHSIA = VkImageConstraintsInfoFlagBitsFUCHSIA.VK_IMAGE_CONSTRAINTS_INFO_CPU_WRITE_RARELY_FUCHSIA; 1442 enum VK_IMAGE_CONSTRAINTS_INFO_CPU_WRITE_OFTEN_FUCHSIA = VkImageConstraintsInfoFlagBitsFUCHSIA.VK_IMAGE_CONSTRAINTS_INFO_CPU_WRITE_OFTEN_FUCHSIA; 1443 enum VK_IMAGE_CONSTRAINTS_INFO_PROTECTED_OPTIONAL_FUCHSIA = VkImageConstraintsInfoFlagBitsFUCHSIA.VK_IMAGE_CONSTRAINTS_INFO_PROTECTED_OPTIONAL_FUCHSIA; 1444 enum VK_IMAGE_CONSTRAINTS_INFO_FLAG_BITS_MAX_ENUM_FUCHSIA = VkImageConstraintsInfoFlagBitsFUCHSIA.VK_IMAGE_CONSTRAINTS_INFO_FLAG_BITS_MAX_ENUM_FUCHSIA; 1445 1446 struct VkBufferCollectionCreateInfoFUCHSIA { 1447 VkStructureType sType = VK_STRUCTURE_TYPE_BUFFER_COLLECTION_CREATE_INFO_FUCHSIA; 1448 const( void )* pNext; 1449 zx_handle_t collectionToken; 1450 } 1451 1452 struct VkImportMemoryBufferCollectionFUCHSIA { 1453 VkStructureType sType = VK_STRUCTURE_TYPE_IMPORT_MEMORY_BUFFER_COLLECTION_FUCHSIA; 1454 const( void )* pNext; 1455 VkBufferCollectionFUCHSIA collection; 1456 uint32_t index; 1457 } 1458 1459 struct VkBufferCollectionImageCreateInfoFUCHSIA { 1460 VkStructureType sType = VK_STRUCTURE_TYPE_BUFFER_COLLECTION_IMAGE_CREATE_INFO_FUCHSIA; 1461 const( void )* pNext; 1462 VkBufferCollectionFUCHSIA collection; 1463 uint32_t index; 1464 } 1465 1466 struct VkBufferCollectionConstraintsInfoFUCHSIA { 1467 VkStructureType sType = VK_STRUCTURE_TYPE_BUFFER_COLLECTION_CONSTRAINTS_INFO_FUCHSIA; 1468 const( void )* pNext; 1469 uint32_t minBufferCount; 1470 uint32_t maxBufferCount; 1471 uint32_t minBufferCountForCamping; 1472 uint32_t minBufferCountForDedicatedSlack; 1473 uint32_t minBufferCountForSharedSlack; 1474 } 1475 1476 struct VkBufferConstraintsInfoFUCHSIA { 1477 VkStructureType sType = VK_STRUCTURE_TYPE_BUFFER_CONSTRAINTS_INFO_FUCHSIA; 1478 const( void )* pNext; 1479 VkBufferCreateInfo createInfo; 1480 VkFormatFeatureFlags requiredFormatFeatures; 1481 VkBufferCollectionConstraintsInfoFUCHSIA bufferCollectionConstraints; 1482 } 1483 1484 struct VkBufferCollectionBufferCreateInfoFUCHSIA { 1485 VkStructureType sType = VK_STRUCTURE_TYPE_BUFFER_COLLECTION_BUFFER_CREATE_INFO_FUCHSIA; 1486 const( void )* pNext; 1487 VkBufferCollectionFUCHSIA collection; 1488 uint32_t index; 1489 } 1490 1491 struct VkSysmemColorSpaceFUCHSIA { 1492 VkStructureType sType = VK_STRUCTURE_TYPE_SYSMEM_COLOR_SPACE_FUCHSIA; 1493 const( void )* pNext; 1494 uint32_t colorSpace; 1495 } 1496 1497 struct VkBufferCollectionPropertiesFUCHSIA { 1498 VkStructureType sType = VK_STRUCTURE_TYPE_BUFFER_COLLECTION_PROPERTIES_FUCHSIA; 1499 void* pNext; 1500 uint32_t memoryTypeBits; 1501 uint32_t bufferCount; 1502 uint32_t createInfoIndex; 1503 uint64_t sysmemPixelFormat; 1504 VkFormatFeatureFlags formatFeatures; 1505 VkSysmemColorSpaceFUCHSIA sysmemColorSpaceIndex; 1506 VkComponentMapping samplerYcbcrConversionComponents; 1507 VkSamplerYcbcrModelConversion suggestedYcbcrModel; 1508 VkSamplerYcbcrRange suggestedYcbcrRange; 1509 VkChromaLocation suggestedXChromaOffset; 1510 VkChromaLocation suggestedYChromaOffset; 1511 } 1512 1513 struct VkImageFormatConstraintsInfoFUCHSIA { 1514 VkStructureType sType = VK_STRUCTURE_TYPE_IMAGE_FORMAT_CONSTRAINTS_INFO_FUCHSIA; 1515 const( void )* pNext; 1516 VkImageCreateInfo imageCreateInfo; 1517 VkFormatFeatureFlags requiredFormatFeatures; 1518 VkImageFormatConstraintsFlagsFUCHSIA flags; 1519 uint64_t sysmemPixelFormat; 1520 uint32_t colorSpaceCount; 1521 const( VkSysmemColorSpaceFUCHSIA )* pColorSpaces; 1522 } 1523 1524 struct VkImageConstraintsInfoFUCHSIA { 1525 VkStructureType sType = VK_STRUCTURE_TYPE_IMAGE_CONSTRAINTS_INFO_FUCHSIA; 1526 const( void )* pNext; 1527 uint32_t formatConstraintsCount; 1528 const( VkImageFormatConstraintsInfoFUCHSIA )* pFormatConstraints; 1529 VkBufferCollectionConstraintsInfoFUCHSIA bufferCollectionConstraints; 1530 VkImageConstraintsInfoFlagsFUCHSIA flags; 1531 } 1532 1533 alias PFN_vkCreateBufferCollectionFUCHSIA = VkResult function( VkDevice device, const( VkBufferCollectionCreateInfoFUCHSIA )* pCreateInfo, const( VkAllocationCallbacks )* pAllocator, VkBufferCollectionFUCHSIA* pCollection ); 1534 alias PFN_vkSetBufferCollectionImageConstraintsFUCHSIA = VkResult function( VkDevice device, VkBufferCollectionFUCHSIA collection, const( VkImageConstraintsInfoFUCHSIA )* pImageConstraintsInfo ); 1535 alias PFN_vkSetBufferCollectionBufferConstraintsFUCHSIA = VkResult function( VkDevice device, VkBufferCollectionFUCHSIA collection, const( VkBufferConstraintsInfoFUCHSIA )* pBufferConstraintsInfo ); 1536 alias PFN_vkDestroyBufferCollectionFUCHSIA = void function( VkDevice device, VkBufferCollectionFUCHSIA collection, const( VkAllocationCallbacks )* pAllocator ); 1537 alias PFN_vkGetBufferCollectionPropertiesFUCHSIA = VkResult function( VkDevice device, VkBufferCollectionFUCHSIA collection, VkBufferCollectionPropertiesFUCHSIA* pProperties ); 1538 } 1539 1540 // VK_QNX_screen_surface : types and function pointer type aliases 1541 else static if( __traits( isSame, extension, QNX_screen_surface )) { 1542 enum VK_QNX_screen_surface = 1; 1543 1544 enum VK_QNX_SCREEN_SURFACE_SPEC_VERSION = 1; 1545 enum const( char )* VK_QNX_SCREEN_SURFACE_EXTENSION_NAME = "VK_QNX_screen_surface"; 1546 1547 alias VkScreenSurfaceCreateFlagsQNX = VkFlags; 1548 1549 struct VkScreenSurfaceCreateInfoQNX { 1550 VkStructureType sType = VK_STRUCTURE_TYPE_SCREEN_SURFACE_CREATE_INFO_QNX; 1551 const( void )* pNext; 1552 VkScreenSurfaceCreateFlagsQNX flags; 1553 const( _screen_context )* context; 1554 const( _screen_window )* window; 1555 } 1556 1557 alias PFN_vkCreateScreenSurfaceQNX = VkResult function( VkInstance instance, const( VkScreenSurfaceCreateInfoQNX )* pCreateInfo, const( VkAllocationCallbacks )* pAllocator, VkSurfaceKHR* pSurface ); 1558 alias PFN_vkGetPhysicalDeviceScreenPresentationSupportQNX = VkBool32 function( VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, const( _screen_window )* window ); 1559 } 1560 1561 // VK_NV_displacement_micromap : types and function pointer type aliases 1562 else static if( __traits( isSame, extension, NV_displacement_micromap )) { 1563 enum VK_NV_displacement_micromap = 1; 1564 1565 enum VK_NV_DISPLACEMENT_MICROMAP_SPEC_VERSION = 1; 1566 enum const( char )* VK_NV_DISPLACEMENT_MICROMAP_EXTENSION_NAME = "VK_NV_displacement_micromap"; 1567 1568 enum VkDisplacementMicromapFormatNV { 1569 VK_DISPLACEMENT_MICROMAP_FORMAT_64_TRIANGLES_64_BYTES_NV = 1, 1570 VK_DISPLACEMENT_MICROMAP_FORMAT_256_TRIANGLES_128_BYTES_NV = 2, 1571 VK_DISPLACEMENT_MICROMAP_FORMAT_1024_TRIANGLES_128_BYTES_NV = 3, 1572 VK_DISPLACEMENT_MICROMAP_FORMAT_MAX_ENUM_NV = 0x7FFFFFFF 1573 } 1574 1575 enum VK_DISPLACEMENT_MICROMAP_FORMAT_64_TRIANGLES_64_BYTES_NV = VkDisplacementMicromapFormatNV.VK_DISPLACEMENT_MICROMAP_FORMAT_64_TRIANGLES_64_BYTES_NV; 1576 enum VK_DISPLACEMENT_MICROMAP_FORMAT_256_TRIANGLES_128_BYTES_NV = VkDisplacementMicromapFormatNV.VK_DISPLACEMENT_MICROMAP_FORMAT_256_TRIANGLES_128_BYTES_NV; 1577 enum VK_DISPLACEMENT_MICROMAP_FORMAT_1024_TRIANGLES_128_BYTES_NV = VkDisplacementMicromapFormatNV.VK_DISPLACEMENT_MICROMAP_FORMAT_1024_TRIANGLES_128_BYTES_NV; 1578 enum VK_DISPLACEMENT_MICROMAP_FORMAT_MAX_ENUM_NV = VkDisplacementMicromapFormatNV.VK_DISPLACEMENT_MICROMAP_FORMAT_MAX_ENUM_NV; 1579 1580 struct VkPhysicalDeviceDisplacementMicromapFeaturesNV { 1581 VkStructureType sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISPLACEMENT_MICROMAP_FEATURES_NV; 1582 void* pNext; 1583 VkBool32 displacementMicromap; 1584 } 1585 1586 struct VkPhysicalDeviceDisplacementMicromapPropertiesNV { 1587 VkStructureType sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DISPLACEMENT_MICROMAP_PROPERTIES_NV; 1588 void* pNext; 1589 uint32_t maxDisplacementMicromapSubdivisionLevel; 1590 } 1591 1592 struct VkAccelerationStructureTrianglesDisplacementMicromapNV { 1593 VkStructureType sType = VK_STRUCTURE_TYPE_ACCELERATION_STRUCTURE_TRIANGLES_DISPLACEMENT_MICROMAP_NV; 1594 void* pNext; 1595 VkFormat displacementBiasAndScaleFormat; 1596 VkFormat displacementVectorFormat; 1597 VkDeviceOrHostAddressConstKHR displacementBiasAndScaleBuffer; 1598 VkDeviceSize displacementBiasAndScaleStride; 1599 VkDeviceOrHostAddressConstKHR displacementVectorBuffer; 1600 VkDeviceSize displacementVectorStride; 1601 VkDeviceOrHostAddressConstKHR displacedMicromapPrimitiveFlags; 1602 VkDeviceSize displacedMicromapPrimitiveFlagsStride; 1603 VkIndexType indexType; 1604 VkDeviceOrHostAddressConstKHR indexBuffer; 1605 VkDeviceSize indexStride; 1606 uint32_t baseTriangle; 1607 uint32_t usageCountsCount; 1608 const( VkMicromapUsageEXT )* pUsageCounts; 1609 const( VkMicromapUsageEXT* )* ppUsageCounts; 1610 VkMicromapEXT micromap; 1611 } 1612 1613 } 1614 1615 __gshared { 1616 1617 // VK_KHR_xlib_surface : function pointer decelerations 1618 static if( __traits( isSame, extension, KHR_xlib_surface )) { 1619 PFN_vkCreateXlibSurfaceKHR vkCreateXlibSurfaceKHR; 1620 PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR vkGetPhysicalDeviceXlibPresentationSupportKHR; 1621 } 1622 1623 // VK_KHR_xcb_surface : function pointer decelerations 1624 else static if( __traits( isSame, extension, KHR_xcb_surface )) { 1625 PFN_vkCreateXcbSurfaceKHR vkCreateXcbSurfaceKHR; 1626 PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR vkGetPhysicalDeviceXcbPresentationSupportKHR; 1627 } 1628 1629 // VK_KHR_wayland_surface : function pointer decelerations 1630 else static if( __traits( isSame, extension, KHR_wayland_surface )) { 1631 PFN_vkCreateWaylandSurfaceKHR vkCreateWaylandSurfaceKHR; 1632 PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR vkGetPhysicalDeviceWaylandPresentationSupportKHR; 1633 } 1634 1635 // VK_KHR_android_surface : function pointer decelerations 1636 else static if( __traits( isSame, extension, KHR_android_surface )) { 1637 PFN_vkCreateAndroidSurfaceKHR vkCreateAndroidSurfaceKHR; 1638 } 1639 1640 // VK_KHR_win32_surface : function pointer decelerations 1641 else static if( __traits( isSame, extension, KHR_win32_surface )) { 1642 PFN_vkCreateWin32SurfaceKHR vkCreateWin32SurfaceKHR; 1643 PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR vkGetPhysicalDeviceWin32PresentationSupportKHR; 1644 } 1645 1646 // VK_KHR_external_memory_win32 : function pointer decelerations 1647 else static if( __traits( isSame, extension, KHR_external_memory_win32 )) { 1648 PFN_vkGetMemoryWin32HandleKHR vkGetMemoryWin32HandleKHR; 1649 PFN_vkGetMemoryWin32HandlePropertiesKHR vkGetMemoryWin32HandlePropertiesKHR; 1650 } 1651 1652 // VK_KHR_external_semaphore_win32 : function pointer decelerations 1653 else static if( __traits( isSame, extension, KHR_external_semaphore_win32 )) { 1654 PFN_vkImportSemaphoreWin32HandleKHR vkImportSemaphoreWin32HandleKHR; 1655 PFN_vkGetSemaphoreWin32HandleKHR vkGetSemaphoreWin32HandleKHR; 1656 } 1657 1658 // VK_KHR_external_fence_win32 : function pointer decelerations 1659 else static if( __traits( isSame, extension, KHR_external_fence_win32 )) { 1660 PFN_vkImportFenceWin32HandleKHR vkImportFenceWin32HandleKHR; 1661 PFN_vkGetFenceWin32HandleKHR vkGetFenceWin32HandleKHR; 1662 } 1663 1664 // VK_KHR_video_encode_queue : function pointer decelerations 1665 else static if( __traits( isSame, extension, KHR_video_encode_queue )) { 1666 PFN_vkCmdEncodeVideoKHR vkCmdEncodeVideoKHR; 1667 } 1668 1669 // VK_GGP_stream_descriptor_surface : function pointer decelerations 1670 else static if( __traits( isSame, extension, GGP_stream_descriptor_surface )) { 1671 PFN_vkCreateStreamDescriptorSurfaceGGP vkCreateStreamDescriptorSurfaceGGP; 1672 } 1673 1674 // VK_NV_external_memory_win32 : function pointer decelerations 1675 else static if( __traits( isSame, extension, NV_external_memory_win32 )) { 1676 PFN_vkGetMemoryWin32HandleNV vkGetMemoryWin32HandleNV; 1677 } 1678 1679 // VK_NN_vi_surface : function pointer decelerations 1680 else static if( __traits( isSame, extension, NN_vi_surface )) { 1681 PFN_vkCreateViSurfaceNN vkCreateViSurfaceNN; 1682 } 1683 1684 // VK_EXT_acquire_xlib_display : function pointer decelerations 1685 else static if( __traits( isSame, extension, EXT_acquire_xlib_display )) { 1686 PFN_vkAcquireXlibDisplayEXT vkAcquireXlibDisplayEXT; 1687 PFN_vkGetRandROutputDisplayEXT vkGetRandROutputDisplayEXT; 1688 } 1689 1690 // VK_MVK_ios_surface : function pointer decelerations 1691 else static if( __traits( isSame, extension, MVK_ios_surface )) { 1692 PFN_vkCreateIOSSurfaceMVK vkCreateIOSSurfaceMVK; 1693 } 1694 1695 // VK_MVK_macos_surface : function pointer decelerations 1696 else static if( __traits( isSame, extension, MVK_macos_surface )) { 1697 PFN_vkCreateMacOSSurfaceMVK vkCreateMacOSSurfaceMVK; 1698 } 1699 1700 // VK_ANDROID_external_memory_android_hardware_buffer : function pointer decelerations 1701 else static if( __traits( isSame, extension, ANDROID_external_memory_android_hardware_buffer )) { 1702 PFN_vkGetAndroidHardwareBufferPropertiesANDROID vkGetAndroidHardwareBufferPropertiesANDROID; 1703 PFN_vkGetMemoryAndroidHardwareBufferANDROID vkGetMemoryAndroidHardwareBufferANDROID; 1704 } 1705 1706 // VK_FUCHSIA_imagepipe_surface : function pointer decelerations 1707 else static if( __traits( isSame, extension, FUCHSIA_imagepipe_surface )) { 1708 PFN_vkCreateImagePipeSurfaceFUCHSIA vkCreateImagePipeSurfaceFUCHSIA; 1709 } 1710 1711 // VK_EXT_metal_surface : function pointer decelerations 1712 else static if( __traits( isSame, extension, EXT_metal_surface )) { 1713 PFN_vkCreateMetalSurfaceEXT vkCreateMetalSurfaceEXT; 1714 } 1715 1716 // VK_EXT_full_screen_exclusive : function pointer decelerations 1717 else static if( __traits( isSame, extension, EXT_full_screen_exclusive )) { 1718 PFN_vkGetPhysicalDeviceSurfacePresentModes2EXT vkGetPhysicalDeviceSurfacePresentModes2EXT; 1719 PFN_vkAcquireFullScreenExclusiveModeEXT vkAcquireFullScreenExclusiveModeEXT; 1720 PFN_vkReleaseFullScreenExclusiveModeEXT vkReleaseFullScreenExclusiveModeEXT; 1721 PFN_vkGetDeviceGroupSurfacePresentModes2EXT vkGetDeviceGroupSurfacePresentModes2EXT; 1722 } 1723 1724 // VK_EXT_metal_objects : function pointer decelerations 1725 else static if( __traits( isSame, extension, EXT_metal_objects )) { 1726 PFN_vkExportMetalObjectsEXT vkExportMetalObjectsEXT; 1727 } 1728 1729 // VK_NV_acquire_winrt_display : function pointer decelerations 1730 else static if( __traits( isSame, extension, NV_acquire_winrt_display )) { 1731 PFN_vkAcquireWinrtDisplayNV vkAcquireWinrtDisplayNV; 1732 PFN_vkGetWinrtDisplayNV vkGetWinrtDisplayNV; 1733 } 1734 1735 // VK_EXT_directfb_surface : function pointer decelerations 1736 else static if( __traits( isSame, extension, EXT_directfb_surface )) { 1737 PFN_vkCreateDirectFBSurfaceEXT vkCreateDirectFBSurfaceEXT; 1738 PFN_vkGetPhysicalDeviceDirectFBPresentationSupportEXT vkGetPhysicalDeviceDirectFBPresentationSupportEXT; 1739 } 1740 1741 // VK_FUCHSIA_external_memory : function pointer decelerations 1742 else static if( __traits( isSame, extension, FUCHSIA_external_memory )) { 1743 PFN_vkGetMemoryZirconHandleFUCHSIA vkGetMemoryZirconHandleFUCHSIA; 1744 PFN_vkGetMemoryZirconHandlePropertiesFUCHSIA vkGetMemoryZirconHandlePropertiesFUCHSIA; 1745 } 1746 1747 // VK_FUCHSIA_external_semaphore : function pointer decelerations 1748 else static if( __traits( isSame, extension, FUCHSIA_external_semaphore )) { 1749 PFN_vkImportSemaphoreZirconHandleFUCHSIA vkImportSemaphoreZirconHandleFUCHSIA; 1750 PFN_vkGetSemaphoreZirconHandleFUCHSIA vkGetSemaphoreZirconHandleFUCHSIA; 1751 } 1752 1753 // VK_FUCHSIA_buffer_collection : function pointer decelerations 1754 else static if( __traits( isSame, extension, FUCHSIA_buffer_collection )) { 1755 PFN_vkCreateBufferCollectionFUCHSIA vkCreateBufferCollectionFUCHSIA; 1756 PFN_vkSetBufferCollectionImageConstraintsFUCHSIA vkSetBufferCollectionImageConstraintsFUCHSIA; 1757 PFN_vkSetBufferCollectionBufferConstraintsFUCHSIA vkSetBufferCollectionBufferConstraintsFUCHSIA; 1758 PFN_vkDestroyBufferCollectionFUCHSIA vkDestroyBufferCollectionFUCHSIA; 1759 PFN_vkGetBufferCollectionPropertiesFUCHSIA vkGetBufferCollectionPropertiesFUCHSIA; 1760 } 1761 1762 // VK_QNX_screen_surface : function pointer decelerations 1763 else static if( __traits( isSame, extension, QNX_screen_surface )) { 1764 PFN_vkCreateScreenSurfaceQNX vkCreateScreenSurfaceQNX; 1765 PFN_vkGetPhysicalDeviceScreenPresentationSupportQNX vkGetPhysicalDeviceScreenPresentationSupportQNX; 1766 } 1767 } 1768 } 1769 1770 // workaround for not being able to mixin two overloads with the same symbol name 1771 alias loadDeviceLevelFunctionsExt = loadDeviceLevelFunctionsExtI; 1772 alias loadDeviceLevelFunctionsExt = loadDeviceLevelFunctionsExtD; 1773 1774 // backwards compatibility aliases 1775 alias loadInstanceLevelFunctions = loadInstanceLevelFunctionsExt; 1776 alias loadDeviceLevelFunctions = loadDeviceLevelFunctionsExt; 1777 alias DispatchDevice = DispatchDeviceExt; 1778 1779 // compose loadInstanceLevelFunctionsExt function out of unextended 1780 // loadInstanceLevelFunctions and additional function pointers from extensions 1781 void loadInstanceLevelFunctionsExt( VkInstance instance ) { 1782 1783 // first load all non platform related function pointers from implementation 1784 erupted.functions.loadInstanceLevelFunctions( instance ); 1785 1786 // 2. loop through alias sequence and mixin corresponding 1787 // instance level function pointer definitions 1788 static foreach( extension; noDuplicateExtensions ) { 1789 1790 // VK_KHR_xlib_surface : load instance level function definitions 1791 static if( __traits( isSame, extension, KHR_xlib_surface )) { 1792 vkCreateXlibSurfaceKHR = cast( PFN_vkCreateXlibSurfaceKHR ) vkGetInstanceProcAddr( instance, "vkCreateXlibSurfaceKHR" ); 1793 vkGetPhysicalDeviceXlibPresentationSupportKHR = cast( PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR ) vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceXlibPresentationSupportKHR" ); 1794 } 1795 1796 // VK_KHR_xcb_surface : load instance level function definitions 1797 else static if( __traits( isSame, extension, KHR_xcb_surface )) { 1798 vkCreateXcbSurfaceKHR = cast( PFN_vkCreateXcbSurfaceKHR ) vkGetInstanceProcAddr( instance, "vkCreateXcbSurfaceKHR" ); 1799 vkGetPhysicalDeviceXcbPresentationSupportKHR = cast( PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR ) vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceXcbPresentationSupportKHR" ); 1800 } 1801 1802 // VK_KHR_wayland_surface : load instance level function definitions 1803 else static if( __traits( isSame, extension, KHR_wayland_surface )) { 1804 vkCreateWaylandSurfaceKHR = cast( PFN_vkCreateWaylandSurfaceKHR ) vkGetInstanceProcAddr( instance, "vkCreateWaylandSurfaceKHR" ); 1805 vkGetPhysicalDeviceWaylandPresentationSupportKHR = cast( PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR ) vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceWaylandPresentationSupportKHR" ); 1806 } 1807 1808 // VK_KHR_android_surface : load instance level function definitions 1809 else static if( __traits( isSame, extension, KHR_android_surface )) { 1810 vkCreateAndroidSurfaceKHR = cast( PFN_vkCreateAndroidSurfaceKHR ) vkGetInstanceProcAddr( instance, "vkCreateAndroidSurfaceKHR" ); 1811 } 1812 1813 // VK_KHR_win32_surface : load instance level function definitions 1814 else static if( __traits( isSame, extension, KHR_win32_surface )) { 1815 vkCreateWin32SurfaceKHR = cast( PFN_vkCreateWin32SurfaceKHR ) vkGetInstanceProcAddr( instance, "vkCreateWin32SurfaceKHR" ); 1816 vkGetPhysicalDeviceWin32PresentationSupportKHR = cast( PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR ) vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceWin32PresentationSupportKHR" ); 1817 } 1818 1819 // VK_GGP_stream_descriptor_surface : load instance level function definitions 1820 else static if( __traits( isSame, extension, GGP_stream_descriptor_surface )) { 1821 vkCreateStreamDescriptorSurfaceGGP = cast( PFN_vkCreateStreamDescriptorSurfaceGGP ) vkGetInstanceProcAddr( instance, "vkCreateStreamDescriptorSurfaceGGP" ); 1822 } 1823 1824 // VK_NN_vi_surface : load instance level function definitions 1825 else static if( __traits( isSame, extension, NN_vi_surface )) { 1826 vkCreateViSurfaceNN = cast( PFN_vkCreateViSurfaceNN ) vkGetInstanceProcAddr( instance, "vkCreateViSurfaceNN" ); 1827 } 1828 1829 // VK_EXT_acquire_xlib_display : load instance level function definitions 1830 else static if( __traits( isSame, extension, EXT_acquire_xlib_display )) { 1831 vkAcquireXlibDisplayEXT = cast( PFN_vkAcquireXlibDisplayEXT ) vkGetInstanceProcAddr( instance, "vkAcquireXlibDisplayEXT" ); 1832 vkGetRandROutputDisplayEXT = cast( PFN_vkGetRandROutputDisplayEXT ) vkGetInstanceProcAddr( instance, "vkGetRandROutputDisplayEXT" ); 1833 } 1834 1835 // VK_MVK_ios_surface : load instance level function definitions 1836 else static if( __traits( isSame, extension, MVK_ios_surface )) { 1837 vkCreateIOSSurfaceMVK = cast( PFN_vkCreateIOSSurfaceMVK ) vkGetInstanceProcAddr( instance, "vkCreateIOSSurfaceMVK" ); 1838 } 1839 1840 // VK_MVK_macos_surface : load instance level function definitions 1841 else static if( __traits( isSame, extension, MVK_macos_surface )) { 1842 vkCreateMacOSSurfaceMVK = cast( PFN_vkCreateMacOSSurfaceMVK ) vkGetInstanceProcAddr( instance, "vkCreateMacOSSurfaceMVK" ); 1843 } 1844 1845 // VK_FUCHSIA_imagepipe_surface : load instance level function definitions 1846 else static if( __traits( isSame, extension, FUCHSIA_imagepipe_surface )) { 1847 vkCreateImagePipeSurfaceFUCHSIA = cast( PFN_vkCreateImagePipeSurfaceFUCHSIA ) vkGetInstanceProcAddr( instance, "vkCreateImagePipeSurfaceFUCHSIA" ); 1848 } 1849 1850 // VK_EXT_metal_surface : load instance level function definitions 1851 else static if( __traits( isSame, extension, EXT_metal_surface )) { 1852 vkCreateMetalSurfaceEXT = cast( PFN_vkCreateMetalSurfaceEXT ) vkGetInstanceProcAddr( instance, "vkCreateMetalSurfaceEXT" ); 1853 } 1854 1855 // VK_EXT_full_screen_exclusive : load instance level function definitions 1856 else static if( __traits( isSame, extension, EXT_full_screen_exclusive )) { 1857 vkGetPhysicalDeviceSurfacePresentModes2EXT = cast( PFN_vkGetPhysicalDeviceSurfacePresentModes2EXT ) vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSurfacePresentModes2EXT" ); 1858 } 1859 1860 // VK_NV_acquire_winrt_display : load instance level function definitions 1861 else static if( __traits( isSame, extension, NV_acquire_winrt_display )) { 1862 vkAcquireWinrtDisplayNV = cast( PFN_vkAcquireWinrtDisplayNV ) vkGetInstanceProcAddr( instance, "vkAcquireWinrtDisplayNV" ); 1863 vkGetWinrtDisplayNV = cast( PFN_vkGetWinrtDisplayNV ) vkGetInstanceProcAddr( instance, "vkGetWinrtDisplayNV" ); 1864 } 1865 1866 // VK_EXT_directfb_surface : load instance level function definitions 1867 else static if( __traits( isSame, extension, EXT_directfb_surface )) { 1868 vkCreateDirectFBSurfaceEXT = cast( PFN_vkCreateDirectFBSurfaceEXT ) vkGetInstanceProcAddr( instance, "vkCreateDirectFBSurfaceEXT" ); 1869 vkGetPhysicalDeviceDirectFBPresentationSupportEXT = cast( PFN_vkGetPhysicalDeviceDirectFBPresentationSupportEXT ) vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceDirectFBPresentationSupportEXT" ); 1870 } 1871 1872 // VK_QNX_screen_surface : load instance level function definitions 1873 else static if( __traits( isSame, extension, QNX_screen_surface )) { 1874 vkCreateScreenSurfaceQNX = cast( PFN_vkCreateScreenSurfaceQNX ) vkGetInstanceProcAddr( instance, "vkCreateScreenSurfaceQNX" ); 1875 vkGetPhysicalDeviceScreenPresentationSupportQNX = cast( PFN_vkGetPhysicalDeviceScreenPresentationSupportQNX ) vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceScreenPresentationSupportQNX" ); 1876 } 1877 } 1878 } 1879 1880 // compose instance based loadDeviceLevelFunctionsExtI function out of unextended 1881 // loadDeviceLevelFunctions and additional function pointers from extensions 1882 // suffix I is required, as we cannot mixin mixin two overloads with the same symbol name (any more!) 1883 void loadDeviceLevelFunctionsExtI( VkInstance instance ) { 1884 1885 // first load all non platform related function pointers from implementation 1886 erupted.functions.loadDeviceLevelFunctions( instance ); 1887 1888 // 3. loop through alias sequence and mixin corresponding 1889 // instance based device level function pointer definitions 1890 static foreach( extension; noDuplicateExtensions ) { 1891 1892 // VK_KHR_external_memory_win32 : load instance based device level function definitions 1893 static if( __traits( isSame, extension, KHR_external_memory_win32 )) { 1894 vkGetMemoryWin32HandleKHR = cast( PFN_vkGetMemoryWin32HandleKHR ) vkGetInstanceProcAddr( instance, "vkGetMemoryWin32HandleKHR" ); 1895 vkGetMemoryWin32HandlePropertiesKHR = cast( PFN_vkGetMemoryWin32HandlePropertiesKHR ) vkGetInstanceProcAddr( instance, "vkGetMemoryWin32HandlePropertiesKHR" ); 1896 } 1897 1898 // VK_KHR_external_semaphore_win32 : load instance based device level function definitions 1899 else static if( __traits( isSame, extension, KHR_external_semaphore_win32 )) { 1900 vkImportSemaphoreWin32HandleKHR = cast( PFN_vkImportSemaphoreWin32HandleKHR ) vkGetInstanceProcAddr( instance, "vkImportSemaphoreWin32HandleKHR" ); 1901 vkGetSemaphoreWin32HandleKHR = cast( PFN_vkGetSemaphoreWin32HandleKHR ) vkGetInstanceProcAddr( instance, "vkGetSemaphoreWin32HandleKHR" ); 1902 } 1903 1904 // VK_KHR_external_fence_win32 : load instance based device level function definitions 1905 else static if( __traits( isSame, extension, KHR_external_fence_win32 )) { 1906 vkImportFenceWin32HandleKHR = cast( PFN_vkImportFenceWin32HandleKHR ) vkGetInstanceProcAddr( instance, "vkImportFenceWin32HandleKHR" ); 1907 vkGetFenceWin32HandleKHR = cast( PFN_vkGetFenceWin32HandleKHR ) vkGetInstanceProcAddr( instance, "vkGetFenceWin32HandleKHR" ); 1908 } 1909 1910 // VK_KHR_video_encode_queue : load instance based device level function definitions 1911 else static if( __traits( isSame, extension, KHR_video_encode_queue )) { 1912 vkCmdEncodeVideoKHR = cast( PFN_vkCmdEncodeVideoKHR ) vkGetInstanceProcAddr( instance, "vkCmdEncodeVideoKHR" ); 1913 } 1914 1915 // VK_NV_external_memory_win32 : load instance based device level function definitions 1916 else static if( __traits( isSame, extension, NV_external_memory_win32 )) { 1917 vkGetMemoryWin32HandleNV = cast( PFN_vkGetMemoryWin32HandleNV ) vkGetInstanceProcAddr( instance, "vkGetMemoryWin32HandleNV" ); 1918 } 1919 1920 // VK_ANDROID_external_memory_android_hardware_buffer : load instance based device level function definitions 1921 else static if( __traits( isSame, extension, ANDROID_external_memory_android_hardware_buffer )) { 1922 vkGetAndroidHardwareBufferPropertiesANDROID = cast( PFN_vkGetAndroidHardwareBufferPropertiesANDROID ) vkGetInstanceProcAddr( instance, "vkGetAndroidHardwareBufferPropertiesANDROID" ); 1923 vkGetMemoryAndroidHardwareBufferANDROID = cast( PFN_vkGetMemoryAndroidHardwareBufferANDROID ) vkGetInstanceProcAddr( instance, "vkGetMemoryAndroidHardwareBufferANDROID" ); 1924 } 1925 1926 // VK_EXT_full_screen_exclusive : load instance based device level function definitions 1927 else static if( __traits( isSame, extension, EXT_full_screen_exclusive )) { 1928 vkAcquireFullScreenExclusiveModeEXT = cast( PFN_vkAcquireFullScreenExclusiveModeEXT ) vkGetInstanceProcAddr( instance, "vkAcquireFullScreenExclusiveModeEXT" ); 1929 vkReleaseFullScreenExclusiveModeEXT = cast( PFN_vkReleaseFullScreenExclusiveModeEXT ) vkGetInstanceProcAddr( instance, "vkReleaseFullScreenExclusiveModeEXT" ); 1930 vkGetDeviceGroupSurfacePresentModes2EXT = cast( PFN_vkGetDeviceGroupSurfacePresentModes2EXT ) vkGetInstanceProcAddr( instance, "vkGetDeviceGroupSurfacePresentModes2EXT" ); 1931 } 1932 1933 // VK_EXT_metal_objects : load instance based device level function definitions 1934 else static if( __traits( isSame, extension, EXT_metal_objects )) { 1935 vkExportMetalObjectsEXT = cast( PFN_vkExportMetalObjectsEXT ) vkGetInstanceProcAddr( instance, "vkExportMetalObjectsEXT" ); 1936 } 1937 1938 // VK_FUCHSIA_external_memory : load instance based device level function definitions 1939 else static if( __traits( isSame, extension, FUCHSIA_external_memory )) { 1940 vkGetMemoryZirconHandleFUCHSIA = cast( PFN_vkGetMemoryZirconHandleFUCHSIA ) vkGetInstanceProcAddr( instance, "vkGetMemoryZirconHandleFUCHSIA" ); 1941 vkGetMemoryZirconHandlePropertiesFUCHSIA = cast( PFN_vkGetMemoryZirconHandlePropertiesFUCHSIA ) vkGetInstanceProcAddr( instance, "vkGetMemoryZirconHandlePropertiesFUCHSIA" ); 1942 } 1943 1944 // VK_FUCHSIA_external_semaphore : load instance based device level function definitions 1945 else static if( __traits( isSame, extension, FUCHSIA_external_semaphore )) { 1946 vkImportSemaphoreZirconHandleFUCHSIA = cast( PFN_vkImportSemaphoreZirconHandleFUCHSIA ) vkGetInstanceProcAddr( instance, "vkImportSemaphoreZirconHandleFUCHSIA" ); 1947 vkGetSemaphoreZirconHandleFUCHSIA = cast( PFN_vkGetSemaphoreZirconHandleFUCHSIA ) vkGetInstanceProcAddr( instance, "vkGetSemaphoreZirconHandleFUCHSIA" ); 1948 } 1949 1950 // VK_FUCHSIA_buffer_collection : load instance based device level function definitions 1951 else static if( __traits( isSame, extension, FUCHSIA_buffer_collection )) { 1952 vkCreateBufferCollectionFUCHSIA = cast( PFN_vkCreateBufferCollectionFUCHSIA ) vkGetInstanceProcAddr( instance, "vkCreateBufferCollectionFUCHSIA" ); 1953 vkSetBufferCollectionImageConstraintsFUCHSIA = cast( PFN_vkSetBufferCollectionImageConstraintsFUCHSIA ) vkGetInstanceProcAddr( instance, "vkSetBufferCollectionImageConstraintsFUCHSIA" ); 1954 vkSetBufferCollectionBufferConstraintsFUCHSIA = cast( PFN_vkSetBufferCollectionBufferConstraintsFUCHSIA ) vkGetInstanceProcAddr( instance, "vkSetBufferCollectionBufferConstraintsFUCHSIA" ); 1955 vkDestroyBufferCollectionFUCHSIA = cast( PFN_vkDestroyBufferCollectionFUCHSIA ) vkGetInstanceProcAddr( instance, "vkDestroyBufferCollectionFUCHSIA" ); 1956 vkGetBufferCollectionPropertiesFUCHSIA = cast( PFN_vkGetBufferCollectionPropertiesFUCHSIA ) vkGetInstanceProcAddr( instance, "vkGetBufferCollectionPropertiesFUCHSIA" ); 1957 } 1958 } 1959 } 1960 1961 // compose device based loadDeviceLevelFunctionsExtD function out of unextended 1962 // loadDeviceLevelFunctions and additional function pointers from extensions 1963 // suffix D is required as, we cannot mixin mixin two overloads with the same symbol name (any more!) 1964 void loadDeviceLevelFunctionsExtD( VkDevice device ) { 1965 1966 // first load all non platform related function pointers from implementation 1967 erupted.functions.loadDeviceLevelFunctions( device ); 1968 1969 // 4. loop through alias sequence and mixin corresponding 1970 // device based device level function pointer definitions 1971 static foreach( extension; noDuplicateExtensions ) { 1972 1973 // VK_KHR_external_memory_win32 : load device based device level function definitions 1974 static if( __traits( isSame, extension, KHR_external_memory_win32 )) { 1975 vkGetMemoryWin32HandleKHR = cast( PFN_vkGetMemoryWin32HandleKHR ) vkGetDeviceProcAddr( device, "vkGetMemoryWin32HandleKHR" ); 1976 vkGetMemoryWin32HandlePropertiesKHR = cast( PFN_vkGetMemoryWin32HandlePropertiesKHR ) vkGetDeviceProcAddr( device, "vkGetMemoryWin32HandlePropertiesKHR" ); 1977 } 1978 1979 // VK_KHR_external_semaphore_win32 : load device based device level function definitions 1980 else static if( __traits( isSame, extension, KHR_external_semaphore_win32 )) { 1981 vkImportSemaphoreWin32HandleKHR = cast( PFN_vkImportSemaphoreWin32HandleKHR ) vkGetDeviceProcAddr( device, "vkImportSemaphoreWin32HandleKHR" ); 1982 vkGetSemaphoreWin32HandleKHR = cast( PFN_vkGetSemaphoreWin32HandleKHR ) vkGetDeviceProcAddr( device, "vkGetSemaphoreWin32HandleKHR" ); 1983 } 1984 1985 // VK_KHR_external_fence_win32 : load device based device level function definitions 1986 else static if( __traits( isSame, extension, KHR_external_fence_win32 )) { 1987 vkImportFenceWin32HandleKHR = cast( PFN_vkImportFenceWin32HandleKHR ) vkGetDeviceProcAddr( device, "vkImportFenceWin32HandleKHR" ); 1988 vkGetFenceWin32HandleKHR = cast( PFN_vkGetFenceWin32HandleKHR ) vkGetDeviceProcAddr( device, "vkGetFenceWin32HandleKHR" ); 1989 } 1990 1991 // VK_KHR_video_encode_queue : load device based device level function definitions 1992 else static if( __traits( isSame, extension, KHR_video_encode_queue )) { 1993 vkCmdEncodeVideoKHR = cast( PFN_vkCmdEncodeVideoKHR ) vkGetDeviceProcAddr( device, "vkCmdEncodeVideoKHR" ); 1994 } 1995 1996 // VK_NV_external_memory_win32 : load device based device level function definitions 1997 else static if( __traits( isSame, extension, NV_external_memory_win32 )) { 1998 vkGetMemoryWin32HandleNV = cast( PFN_vkGetMemoryWin32HandleNV ) vkGetDeviceProcAddr( device, "vkGetMemoryWin32HandleNV" ); 1999 } 2000 2001 // VK_ANDROID_external_memory_android_hardware_buffer : load device based device level function definitions 2002 else static if( __traits( isSame, extension, ANDROID_external_memory_android_hardware_buffer )) { 2003 vkGetAndroidHardwareBufferPropertiesANDROID = cast( PFN_vkGetAndroidHardwareBufferPropertiesANDROID ) vkGetDeviceProcAddr( device, "vkGetAndroidHardwareBufferPropertiesANDROID" ); 2004 vkGetMemoryAndroidHardwareBufferANDROID = cast( PFN_vkGetMemoryAndroidHardwareBufferANDROID ) vkGetDeviceProcAddr( device, "vkGetMemoryAndroidHardwareBufferANDROID" ); 2005 } 2006 2007 // VK_EXT_full_screen_exclusive : load device based device level function definitions 2008 else static if( __traits( isSame, extension, EXT_full_screen_exclusive )) { 2009 vkAcquireFullScreenExclusiveModeEXT = cast( PFN_vkAcquireFullScreenExclusiveModeEXT ) vkGetDeviceProcAddr( device, "vkAcquireFullScreenExclusiveModeEXT" ); 2010 vkReleaseFullScreenExclusiveModeEXT = cast( PFN_vkReleaseFullScreenExclusiveModeEXT ) vkGetDeviceProcAddr( device, "vkReleaseFullScreenExclusiveModeEXT" ); 2011 vkGetDeviceGroupSurfacePresentModes2EXT = cast( PFN_vkGetDeviceGroupSurfacePresentModes2EXT ) vkGetDeviceProcAddr( device, "vkGetDeviceGroupSurfacePresentModes2EXT" ); 2012 } 2013 2014 // VK_EXT_metal_objects : load device based device level function definitions 2015 else static if( __traits( isSame, extension, EXT_metal_objects )) { 2016 vkExportMetalObjectsEXT = cast( PFN_vkExportMetalObjectsEXT ) vkGetDeviceProcAddr( device, "vkExportMetalObjectsEXT" ); 2017 } 2018 2019 // VK_FUCHSIA_external_memory : load device based device level function definitions 2020 else static if( __traits( isSame, extension, FUCHSIA_external_memory )) { 2021 vkGetMemoryZirconHandleFUCHSIA = cast( PFN_vkGetMemoryZirconHandleFUCHSIA ) vkGetDeviceProcAddr( device, "vkGetMemoryZirconHandleFUCHSIA" ); 2022 vkGetMemoryZirconHandlePropertiesFUCHSIA = cast( PFN_vkGetMemoryZirconHandlePropertiesFUCHSIA ) vkGetDeviceProcAddr( device, "vkGetMemoryZirconHandlePropertiesFUCHSIA" ); 2023 } 2024 2025 // VK_FUCHSIA_external_semaphore : load device based device level function definitions 2026 else static if( __traits( isSame, extension, FUCHSIA_external_semaphore )) { 2027 vkImportSemaphoreZirconHandleFUCHSIA = cast( PFN_vkImportSemaphoreZirconHandleFUCHSIA ) vkGetDeviceProcAddr( device, "vkImportSemaphoreZirconHandleFUCHSIA" ); 2028 vkGetSemaphoreZirconHandleFUCHSIA = cast( PFN_vkGetSemaphoreZirconHandleFUCHSIA ) vkGetDeviceProcAddr( device, "vkGetSemaphoreZirconHandleFUCHSIA" ); 2029 } 2030 2031 // VK_FUCHSIA_buffer_collection : load device based device level function definitions 2032 else static if( __traits( isSame, extension, FUCHSIA_buffer_collection )) { 2033 vkCreateBufferCollectionFUCHSIA = cast( PFN_vkCreateBufferCollectionFUCHSIA ) vkGetDeviceProcAddr( device, "vkCreateBufferCollectionFUCHSIA" ); 2034 vkSetBufferCollectionImageConstraintsFUCHSIA = cast( PFN_vkSetBufferCollectionImageConstraintsFUCHSIA ) vkGetDeviceProcAddr( device, "vkSetBufferCollectionImageConstraintsFUCHSIA" ); 2035 vkSetBufferCollectionBufferConstraintsFUCHSIA = cast( PFN_vkSetBufferCollectionBufferConstraintsFUCHSIA ) vkGetDeviceProcAddr( device, "vkSetBufferCollectionBufferConstraintsFUCHSIA" ); 2036 vkDestroyBufferCollectionFUCHSIA = cast( PFN_vkDestroyBufferCollectionFUCHSIA ) vkGetDeviceProcAddr( device, "vkDestroyBufferCollectionFUCHSIA" ); 2037 vkGetBufferCollectionPropertiesFUCHSIA = cast( PFN_vkGetBufferCollectionPropertiesFUCHSIA ) vkGetDeviceProcAddr( device, "vkGetBufferCollectionPropertiesFUCHSIA" ); 2038 } 2039 } 2040 } 2041 2042 // compose extended dispatch device out of unextended original dispatch device with 2043 // extended, device based loadDeviceLevelFunctionsExt member function, 2044 // device and command buffer based function pointer decelerations 2045 struct DispatchDeviceExt { 2046 2047 // use unextended dispatch device from module erupted.functions as member and alias this 2048 erupted.dispatch_device.DispatchDevice commonDispatchDevice; 2049 alias commonDispatchDevice this; 2050 2051 // Constructor forwards parameter 'device' to 'loadDeviceLevelFunctionsExt' 2052 this( VkDevice device ) { 2053 loadDeviceLevelFunctionsExt( device ); 2054 } 2055 2056 // backwards compatibility alias 2057 alias loadDeviceLevelFunctions = loadDeviceLevelFunctionsExt; 2058 2059 // compose device based loadDeviceLevelFunctionsExt member function out of unextended 2060 // loadDeviceLevelFunctions and additional member function pointers from extensions 2061 void loadDeviceLevelFunctionsExt( VkDevice device ) { 2062 2063 // first load all non platform related member function pointers of wrapped commonDispatchDevice 2064 commonDispatchDevice.loadDeviceLevelFunctions( device ); 2065 2066 // 5. loop through alias sequence and mixin corresponding 2067 // device level member function pointer definitions of this wrapping DispatchDevice 2068 static foreach( extension; noDuplicateExtensions ) { 2069 2070 // VK_KHR_external_memory_win32 : load dispatch device member function definitions 2071 static if( __traits( isSame, extension, KHR_external_memory_win32 )) { 2072 vkGetMemoryWin32HandleKHR = cast( PFN_vkGetMemoryWin32HandleKHR ) vkGetDeviceProcAddr( device, "vkGetMemoryWin32HandleKHR" ); 2073 vkGetMemoryWin32HandlePropertiesKHR = cast( PFN_vkGetMemoryWin32HandlePropertiesKHR ) vkGetDeviceProcAddr( device, "vkGetMemoryWin32HandlePropertiesKHR" ); 2074 } 2075 2076 // VK_KHR_external_semaphore_win32 : load dispatch device member function definitions 2077 else static if( __traits( isSame, extension, KHR_external_semaphore_win32 )) { 2078 vkImportSemaphoreWin32HandleKHR = cast( PFN_vkImportSemaphoreWin32HandleKHR ) vkGetDeviceProcAddr( device, "vkImportSemaphoreWin32HandleKHR" ); 2079 vkGetSemaphoreWin32HandleKHR = cast( PFN_vkGetSemaphoreWin32HandleKHR ) vkGetDeviceProcAddr( device, "vkGetSemaphoreWin32HandleKHR" ); 2080 } 2081 2082 // VK_KHR_external_fence_win32 : load dispatch device member function definitions 2083 else static if( __traits( isSame, extension, KHR_external_fence_win32 )) { 2084 vkImportFenceWin32HandleKHR = cast( PFN_vkImportFenceWin32HandleKHR ) vkGetDeviceProcAddr( device, "vkImportFenceWin32HandleKHR" ); 2085 vkGetFenceWin32HandleKHR = cast( PFN_vkGetFenceWin32HandleKHR ) vkGetDeviceProcAddr( device, "vkGetFenceWin32HandleKHR" ); 2086 } 2087 2088 // VK_KHR_video_encode_queue : load dispatch device member function definitions 2089 else static if( __traits( isSame, extension, KHR_video_encode_queue )) { 2090 vkCmdEncodeVideoKHR = cast( PFN_vkCmdEncodeVideoKHR ) vkGetDeviceProcAddr( device, "vkCmdEncodeVideoKHR" ); 2091 } 2092 2093 // VK_NV_external_memory_win32 : load dispatch device member function definitions 2094 else static if( __traits( isSame, extension, NV_external_memory_win32 )) { 2095 vkGetMemoryWin32HandleNV = cast( PFN_vkGetMemoryWin32HandleNV ) vkGetDeviceProcAddr( device, "vkGetMemoryWin32HandleNV" ); 2096 } 2097 2098 // VK_ANDROID_external_memory_android_hardware_buffer : load dispatch device member function definitions 2099 else static if( __traits( isSame, extension, ANDROID_external_memory_android_hardware_buffer )) { 2100 vkGetAndroidHardwareBufferPropertiesANDROID = cast( PFN_vkGetAndroidHardwareBufferPropertiesANDROID ) vkGetDeviceProcAddr( device, "vkGetAndroidHardwareBufferPropertiesANDROID" ); 2101 vkGetMemoryAndroidHardwareBufferANDROID = cast( PFN_vkGetMemoryAndroidHardwareBufferANDROID ) vkGetDeviceProcAddr( device, "vkGetMemoryAndroidHardwareBufferANDROID" ); 2102 } 2103 2104 // VK_EXT_full_screen_exclusive : load dispatch device member function definitions 2105 else static if( __traits( isSame, extension, EXT_full_screen_exclusive )) { 2106 vkAcquireFullScreenExclusiveModeEXT = cast( PFN_vkAcquireFullScreenExclusiveModeEXT ) vkGetDeviceProcAddr( device, "vkAcquireFullScreenExclusiveModeEXT" ); 2107 vkReleaseFullScreenExclusiveModeEXT = cast( PFN_vkReleaseFullScreenExclusiveModeEXT ) vkGetDeviceProcAddr( device, "vkReleaseFullScreenExclusiveModeEXT" ); 2108 vkGetDeviceGroupSurfacePresentModes2EXT = cast( PFN_vkGetDeviceGroupSurfacePresentModes2EXT ) vkGetDeviceProcAddr( device, "vkGetDeviceGroupSurfacePresentModes2EXT" ); 2109 } 2110 2111 // VK_EXT_metal_objects : load dispatch device member function definitions 2112 else static if( __traits( isSame, extension, EXT_metal_objects )) { 2113 vkExportMetalObjectsEXT = cast( PFN_vkExportMetalObjectsEXT ) vkGetDeviceProcAddr( device, "vkExportMetalObjectsEXT" ); 2114 } 2115 2116 // VK_FUCHSIA_external_memory : load dispatch device member function definitions 2117 else static if( __traits( isSame, extension, FUCHSIA_external_memory )) { 2118 vkGetMemoryZirconHandleFUCHSIA = cast( PFN_vkGetMemoryZirconHandleFUCHSIA ) vkGetDeviceProcAddr( device, "vkGetMemoryZirconHandleFUCHSIA" ); 2119 vkGetMemoryZirconHandlePropertiesFUCHSIA = cast( PFN_vkGetMemoryZirconHandlePropertiesFUCHSIA ) vkGetDeviceProcAddr( device, "vkGetMemoryZirconHandlePropertiesFUCHSIA" ); 2120 } 2121 2122 // VK_FUCHSIA_external_semaphore : load dispatch device member function definitions 2123 else static if( __traits( isSame, extension, FUCHSIA_external_semaphore )) { 2124 vkImportSemaphoreZirconHandleFUCHSIA = cast( PFN_vkImportSemaphoreZirconHandleFUCHSIA ) vkGetDeviceProcAddr( device, "vkImportSemaphoreZirconHandleFUCHSIA" ); 2125 vkGetSemaphoreZirconHandleFUCHSIA = cast( PFN_vkGetSemaphoreZirconHandleFUCHSIA ) vkGetDeviceProcAddr( device, "vkGetSemaphoreZirconHandleFUCHSIA" ); 2126 } 2127 2128 // VK_FUCHSIA_buffer_collection : load dispatch device member function definitions 2129 else static if( __traits( isSame, extension, FUCHSIA_buffer_collection )) { 2130 vkCreateBufferCollectionFUCHSIA = cast( PFN_vkCreateBufferCollectionFUCHSIA ) vkGetDeviceProcAddr( device, "vkCreateBufferCollectionFUCHSIA" ); 2131 vkSetBufferCollectionImageConstraintsFUCHSIA = cast( PFN_vkSetBufferCollectionImageConstraintsFUCHSIA ) vkGetDeviceProcAddr( device, "vkSetBufferCollectionImageConstraintsFUCHSIA" ); 2132 vkSetBufferCollectionBufferConstraintsFUCHSIA = cast( PFN_vkSetBufferCollectionBufferConstraintsFUCHSIA ) vkGetDeviceProcAddr( device, "vkSetBufferCollectionBufferConstraintsFUCHSIA" ); 2133 vkDestroyBufferCollectionFUCHSIA = cast( PFN_vkDestroyBufferCollectionFUCHSIA ) vkGetDeviceProcAddr( device, "vkDestroyBufferCollectionFUCHSIA" ); 2134 vkGetBufferCollectionPropertiesFUCHSIA = cast( PFN_vkGetBufferCollectionPropertiesFUCHSIA ) vkGetDeviceProcAddr( device, "vkGetBufferCollectionPropertiesFUCHSIA" ); 2135 } 2136 } 2137 } 2138 2139 // 6. loop through alias sequence and mixin corresponding convenience member functions 2140 // omitting device parameter of this wrapping DispatchDevice. Member vkDevice of commonDispatchDevice is used instead 2141 static foreach( extension; noDuplicateExtensions ) { 2142 2143 // VK_KHR_external_memory_win32 : dispatch device convenience member functions 2144 static if( __traits( isSame, extension, KHR_external_memory_win32 )) { 2145 VkResult GetMemoryWin32HandleKHR( const( VkMemoryGetWin32HandleInfoKHR )* pGetWin32HandleInfo, HANDLE* pHandle ) { return vkGetMemoryWin32HandleKHR( vkDevice, pGetWin32HandleInfo, pHandle ); } 2146 VkResult GetMemoryWin32HandlePropertiesKHR( VkExternalMemoryHandleTypeFlagBits handleType, HANDLE handle, VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties ) { return vkGetMemoryWin32HandlePropertiesKHR( vkDevice, handleType, handle, pMemoryWin32HandleProperties ); } 2147 } 2148 2149 // VK_KHR_external_semaphore_win32 : dispatch device convenience member functions 2150 else static if( __traits( isSame, extension, KHR_external_semaphore_win32 )) { 2151 VkResult ImportSemaphoreWin32HandleKHR( const( VkImportSemaphoreWin32HandleInfoKHR )* pImportSemaphoreWin32HandleInfo ) { return vkImportSemaphoreWin32HandleKHR( vkDevice, pImportSemaphoreWin32HandleInfo ); } 2152 VkResult GetSemaphoreWin32HandleKHR( const( VkSemaphoreGetWin32HandleInfoKHR )* pGetWin32HandleInfo, HANDLE* pHandle ) { return vkGetSemaphoreWin32HandleKHR( vkDevice, pGetWin32HandleInfo, pHandle ); } 2153 } 2154 2155 // VK_KHR_external_fence_win32 : dispatch device convenience member functions 2156 else static if( __traits( isSame, extension, KHR_external_fence_win32 )) { 2157 VkResult ImportFenceWin32HandleKHR( const( VkImportFenceWin32HandleInfoKHR )* pImportFenceWin32HandleInfo ) { return vkImportFenceWin32HandleKHR( vkDevice, pImportFenceWin32HandleInfo ); } 2158 VkResult GetFenceWin32HandleKHR( const( VkFenceGetWin32HandleInfoKHR )* pGetWin32HandleInfo, HANDLE* pHandle ) { return vkGetFenceWin32HandleKHR( vkDevice, pGetWin32HandleInfo, pHandle ); } 2159 } 2160 2161 // VK_KHR_video_encode_queue : dispatch device convenience member functions 2162 else static if( __traits( isSame, extension, KHR_video_encode_queue )) { 2163 void CmdEncodeVideoKHR( const( VkVideoEncodeInfoKHR )* pEncodeInfo ) { vkCmdEncodeVideoKHR( commandBuffer, pEncodeInfo ); } 2164 } 2165 2166 // VK_NV_external_memory_win32 : dispatch device convenience member functions 2167 else static if( __traits( isSame, extension, NV_external_memory_win32 )) { 2168 VkResult GetMemoryWin32HandleNV( VkDeviceMemory memory, VkExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle ) { return vkGetMemoryWin32HandleNV( vkDevice, memory, handleType, pHandle ); } 2169 } 2170 2171 // VK_ANDROID_external_memory_android_hardware_buffer : dispatch device convenience member functions 2172 else static if( __traits( isSame, extension, ANDROID_external_memory_android_hardware_buffer )) { 2173 VkResult GetAndroidHardwareBufferPropertiesANDROID( const( AHardwareBuffer )* buffer, VkAndroidHardwareBufferPropertiesANDROID* pProperties ) { return vkGetAndroidHardwareBufferPropertiesANDROID( vkDevice, buffer, pProperties ); } 2174 VkResult GetMemoryAndroidHardwareBufferANDROID( const( VkMemoryGetAndroidHardwareBufferInfoANDROID )* pInfo, AHardwareBuffer pBuffer ) { return vkGetMemoryAndroidHardwareBufferANDROID( vkDevice, pInfo, pBuffer ); } 2175 } 2176 2177 // VK_EXT_full_screen_exclusive : dispatch device convenience member functions 2178 else static if( __traits( isSame, extension, EXT_full_screen_exclusive )) { 2179 VkResult AcquireFullScreenExclusiveModeEXT( VkSwapchainKHR swapchain ) { return vkAcquireFullScreenExclusiveModeEXT( vkDevice, swapchain ); } 2180 VkResult ReleaseFullScreenExclusiveModeEXT( VkSwapchainKHR swapchain ) { return vkReleaseFullScreenExclusiveModeEXT( vkDevice, swapchain ); } 2181 VkResult GetDeviceGroupSurfacePresentModes2EXT( const( VkPhysicalDeviceSurfaceInfo2KHR )* pSurfaceInfo, VkDeviceGroupPresentModeFlagsKHR* pModes ) { return vkGetDeviceGroupSurfacePresentModes2EXT( vkDevice, pSurfaceInfo, pModes ); } 2182 } 2183 2184 // VK_EXT_metal_objects : dispatch device convenience member functions 2185 else static if( __traits( isSame, extension, EXT_metal_objects )) { 2186 void ExportMetalObjectsEXT( VkExportMetalObjectsInfoEXT* pMetalObjectsInfo ) { vkExportMetalObjectsEXT( vkDevice, pMetalObjectsInfo ); } 2187 } 2188 2189 // VK_FUCHSIA_external_memory : dispatch device convenience member functions 2190 else static if( __traits( isSame, extension, FUCHSIA_external_memory )) { 2191 VkResult GetMemoryZirconHandleFUCHSIA( const( VkMemoryGetZirconHandleInfoFUCHSIA )* pGetZirconHandleInfo, zx_handle_t* pZirconHandle ) { return vkGetMemoryZirconHandleFUCHSIA( vkDevice, pGetZirconHandleInfo, pZirconHandle ); } 2192 VkResult GetMemoryZirconHandlePropertiesFUCHSIA( VkExternalMemoryHandleTypeFlagBits handleType, zx_handle_t zirconHandle, VkMemoryZirconHandlePropertiesFUCHSIA* pMemoryZirconHandleProperties ) { return vkGetMemoryZirconHandlePropertiesFUCHSIA( vkDevice, handleType, zirconHandle, pMemoryZirconHandleProperties ); } 2193 } 2194 2195 // VK_FUCHSIA_external_semaphore : dispatch device convenience member functions 2196 else static if( __traits( isSame, extension, FUCHSIA_external_semaphore )) { 2197 VkResult ImportSemaphoreZirconHandleFUCHSIA( const( VkImportSemaphoreZirconHandleInfoFUCHSIA )* pImportSemaphoreZirconHandleInfo ) { return vkImportSemaphoreZirconHandleFUCHSIA( vkDevice, pImportSemaphoreZirconHandleInfo ); } 2198 VkResult GetSemaphoreZirconHandleFUCHSIA( const( VkSemaphoreGetZirconHandleInfoFUCHSIA )* pGetZirconHandleInfo, zx_handle_t* pZirconHandle ) { return vkGetSemaphoreZirconHandleFUCHSIA( vkDevice, pGetZirconHandleInfo, pZirconHandle ); } 2199 } 2200 2201 // VK_FUCHSIA_buffer_collection : dispatch device convenience member functions 2202 else static if( __traits( isSame, extension, FUCHSIA_buffer_collection )) { 2203 VkResult CreateBufferCollectionFUCHSIA( const( VkBufferCollectionCreateInfoFUCHSIA )* pCreateInfo, VkBufferCollectionFUCHSIA* pCollection ) { return vkCreateBufferCollectionFUCHSIA( vkDevice, pCreateInfo, pAllocator, pCollection ); } 2204 VkResult SetBufferCollectionImageConstraintsFUCHSIA( VkBufferCollectionFUCHSIA collection, const( VkImageConstraintsInfoFUCHSIA )* pImageConstraintsInfo ) { return vkSetBufferCollectionImageConstraintsFUCHSIA( vkDevice, collection, pImageConstraintsInfo ); } 2205 VkResult SetBufferCollectionBufferConstraintsFUCHSIA( VkBufferCollectionFUCHSIA collection, const( VkBufferConstraintsInfoFUCHSIA )* pBufferConstraintsInfo ) { return vkSetBufferCollectionBufferConstraintsFUCHSIA( vkDevice, collection, pBufferConstraintsInfo ); } 2206 void DestroyBufferCollectionFUCHSIA( VkBufferCollectionFUCHSIA collection ) { vkDestroyBufferCollectionFUCHSIA( vkDevice, collection, pAllocator ); } 2207 VkResult GetBufferCollectionPropertiesFUCHSIA( VkBufferCollectionFUCHSIA collection, VkBufferCollectionPropertiesFUCHSIA* pProperties ) { return vkGetBufferCollectionPropertiesFUCHSIA( vkDevice, collection, pProperties ); } 2208 } 2209 } 2210 2211 // 7. loop last time through alias sequence and mixin corresponding function pointer declarations 2212 static foreach( extension; noDuplicateExtensions ) { 2213 2214 // VK_KHR_xlib_surface : dispatch device member function pointer decelerations 2215 static if( __traits( isSame, extension, KHR_xlib_surface )) { 2216 PFN_vkCreateXlibSurfaceKHR vkCreateXlibSurfaceKHR; 2217 PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR vkGetPhysicalDeviceXlibPresentationSupportKHR; 2218 } 2219 2220 // VK_KHR_xcb_surface : dispatch device member function pointer decelerations 2221 else static if( __traits( isSame, extension, KHR_xcb_surface )) { 2222 PFN_vkCreateXcbSurfaceKHR vkCreateXcbSurfaceKHR; 2223 PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR vkGetPhysicalDeviceXcbPresentationSupportKHR; 2224 } 2225 2226 // VK_KHR_wayland_surface : dispatch device member function pointer decelerations 2227 else static if( __traits( isSame, extension, KHR_wayland_surface )) { 2228 PFN_vkCreateWaylandSurfaceKHR vkCreateWaylandSurfaceKHR; 2229 PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR vkGetPhysicalDeviceWaylandPresentationSupportKHR; 2230 } 2231 2232 // VK_KHR_android_surface : dispatch device member function pointer decelerations 2233 else static if( __traits( isSame, extension, KHR_android_surface )) { 2234 PFN_vkCreateAndroidSurfaceKHR vkCreateAndroidSurfaceKHR; 2235 } 2236 2237 // VK_KHR_win32_surface : dispatch device member function pointer decelerations 2238 else static if( __traits( isSame, extension, KHR_win32_surface )) { 2239 PFN_vkCreateWin32SurfaceKHR vkCreateWin32SurfaceKHR; 2240 PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR vkGetPhysicalDeviceWin32PresentationSupportKHR; 2241 } 2242 2243 // VK_KHR_external_memory_win32 : dispatch device member function pointer decelerations 2244 else static if( __traits( isSame, extension, KHR_external_memory_win32 )) { 2245 PFN_vkGetMemoryWin32HandleKHR vkGetMemoryWin32HandleKHR; 2246 PFN_vkGetMemoryWin32HandlePropertiesKHR vkGetMemoryWin32HandlePropertiesKHR; 2247 } 2248 2249 // VK_KHR_external_semaphore_win32 : dispatch device member function pointer decelerations 2250 else static if( __traits( isSame, extension, KHR_external_semaphore_win32 )) { 2251 PFN_vkImportSemaphoreWin32HandleKHR vkImportSemaphoreWin32HandleKHR; 2252 PFN_vkGetSemaphoreWin32HandleKHR vkGetSemaphoreWin32HandleKHR; 2253 } 2254 2255 // VK_KHR_external_fence_win32 : dispatch device member function pointer decelerations 2256 else static if( __traits( isSame, extension, KHR_external_fence_win32 )) { 2257 PFN_vkImportFenceWin32HandleKHR vkImportFenceWin32HandleKHR; 2258 PFN_vkGetFenceWin32HandleKHR vkGetFenceWin32HandleKHR; 2259 } 2260 2261 // VK_KHR_video_encode_queue : dispatch device member function pointer decelerations 2262 else static if( __traits( isSame, extension, KHR_video_encode_queue )) { 2263 PFN_vkCmdEncodeVideoKHR vkCmdEncodeVideoKHR; 2264 } 2265 2266 // VK_GGP_stream_descriptor_surface : dispatch device member function pointer decelerations 2267 else static if( __traits( isSame, extension, GGP_stream_descriptor_surface )) { 2268 PFN_vkCreateStreamDescriptorSurfaceGGP vkCreateStreamDescriptorSurfaceGGP; 2269 } 2270 2271 // VK_NV_external_memory_win32 : dispatch device member function pointer decelerations 2272 else static if( __traits( isSame, extension, NV_external_memory_win32 )) { 2273 PFN_vkGetMemoryWin32HandleNV vkGetMemoryWin32HandleNV; 2274 } 2275 2276 // VK_NN_vi_surface : dispatch device member function pointer decelerations 2277 else static if( __traits( isSame, extension, NN_vi_surface )) { 2278 PFN_vkCreateViSurfaceNN vkCreateViSurfaceNN; 2279 } 2280 2281 // VK_EXT_acquire_xlib_display : dispatch device member function pointer decelerations 2282 else static if( __traits( isSame, extension, EXT_acquire_xlib_display )) { 2283 PFN_vkAcquireXlibDisplayEXT vkAcquireXlibDisplayEXT; 2284 PFN_vkGetRandROutputDisplayEXT vkGetRandROutputDisplayEXT; 2285 } 2286 2287 // VK_MVK_ios_surface : dispatch device member function pointer decelerations 2288 else static if( __traits( isSame, extension, MVK_ios_surface )) { 2289 PFN_vkCreateIOSSurfaceMVK vkCreateIOSSurfaceMVK; 2290 } 2291 2292 // VK_MVK_macos_surface : dispatch device member function pointer decelerations 2293 else static if( __traits( isSame, extension, MVK_macos_surface )) { 2294 PFN_vkCreateMacOSSurfaceMVK vkCreateMacOSSurfaceMVK; 2295 } 2296 2297 // VK_ANDROID_external_memory_android_hardware_buffer : dispatch device member function pointer decelerations 2298 else static if( __traits( isSame, extension, ANDROID_external_memory_android_hardware_buffer )) { 2299 PFN_vkGetAndroidHardwareBufferPropertiesANDROID vkGetAndroidHardwareBufferPropertiesANDROID; 2300 PFN_vkGetMemoryAndroidHardwareBufferANDROID vkGetMemoryAndroidHardwareBufferANDROID; 2301 } 2302 2303 // VK_FUCHSIA_imagepipe_surface : dispatch device member function pointer decelerations 2304 else static if( __traits( isSame, extension, FUCHSIA_imagepipe_surface )) { 2305 PFN_vkCreateImagePipeSurfaceFUCHSIA vkCreateImagePipeSurfaceFUCHSIA; 2306 } 2307 2308 // VK_EXT_metal_surface : dispatch device member function pointer decelerations 2309 else static if( __traits( isSame, extension, EXT_metal_surface )) { 2310 PFN_vkCreateMetalSurfaceEXT vkCreateMetalSurfaceEXT; 2311 } 2312 2313 // VK_EXT_full_screen_exclusive : dispatch device member function pointer decelerations 2314 else static if( __traits( isSame, extension, EXT_full_screen_exclusive )) { 2315 PFN_vkGetPhysicalDeviceSurfacePresentModes2EXT vkGetPhysicalDeviceSurfacePresentModes2EXT; 2316 PFN_vkAcquireFullScreenExclusiveModeEXT vkAcquireFullScreenExclusiveModeEXT; 2317 PFN_vkReleaseFullScreenExclusiveModeEXT vkReleaseFullScreenExclusiveModeEXT; 2318 PFN_vkGetDeviceGroupSurfacePresentModes2EXT vkGetDeviceGroupSurfacePresentModes2EXT; 2319 } 2320 2321 // VK_EXT_metal_objects : dispatch device member function pointer decelerations 2322 else static if( __traits( isSame, extension, EXT_metal_objects )) { 2323 PFN_vkExportMetalObjectsEXT vkExportMetalObjectsEXT; 2324 } 2325 2326 // VK_NV_acquire_winrt_display : dispatch device member function pointer decelerations 2327 else static if( __traits( isSame, extension, NV_acquire_winrt_display )) { 2328 PFN_vkAcquireWinrtDisplayNV vkAcquireWinrtDisplayNV; 2329 PFN_vkGetWinrtDisplayNV vkGetWinrtDisplayNV; 2330 } 2331 2332 // VK_EXT_directfb_surface : dispatch device member function pointer decelerations 2333 else static if( __traits( isSame, extension, EXT_directfb_surface )) { 2334 PFN_vkCreateDirectFBSurfaceEXT vkCreateDirectFBSurfaceEXT; 2335 PFN_vkGetPhysicalDeviceDirectFBPresentationSupportEXT vkGetPhysicalDeviceDirectFBPresentationSupportEXT; 2336 } 2337 2338 // VK_FUCHSIA_external_memory : dispatch device member function pointer decelerations 2339 else static if( __traits( isSame, extension, FUCHSIA_external_memory )) { 2340 PFN_vkGetMemoryZirconHandleFUCHSIA vkGetMemoryZirconHandleFUCHSIA; 2341 PFN_vkGetMemoryZirconHandlePropertiesFUCHSIA vkGetMemoryZirconHandlePropertiesFUCHSIA; 2342 } 2343 2344 // VK_FUCHSIA_external_semaphore : dispatch device member function pointer decelerations 2345 else static if( __traits( isSame, extension, FUCHSIA_external_semaphore )) { 2346 PFN_vkImportSemaphoreZirconHandleFUCHSIA vkImportSemaphoreZirconHandleFUCHSIA; 2347 PFN_vkGetSemaphoreZirconHandleFUCHSIA vkGetSemaphoreZirconHandleFUCHSIA; 2348 } 2349 2350 // VK_FUCHSIA_buffer_collection : dispatch device member function pointer decelerations 2351 else static if( __traits( isSame, extension, FUCHSIA_buffer_collection )) { 2352 PFN_vkCreateBufferCollectionFUCHSIA vkCreateBufferCollectionFUCHSIA; 2353 PFN_vkSetBufferCollectionImageConstraintsFUCHSIA vkSetBufferCollectionImageConstraintsFUCHSIA; 2354 PFN_vkSetBufferCollectionBufferConstraintsFUCHSIA vkSetBufferCollectionBufferConstraintsFUCHSIA; 2355 PFN_vkDestroyBufferCollectionFUCHSIA vkDestroyBufferCollectionFUCHSIA; 2356 PFN_vkGetBufferCollectionPropertiesFUCHSIA vkGetBufferCollectionPropertiesFUCHSIA; 2357 } 2358 2359 // VK_QNX_screen_surface : dispatch device member function pointer decelerations 2360 else static if( __traits( isSame, extension, QNX_screen_surface )) { 2361 PFN_vkCreateScreenSurfaceQNX vkCreateScreenSurfaceQNX; 2362 PFN_vkGetPhysicalDeviceScreenPresentationSupportQNX vkGetPhysicalDeviceScreenPresentationSupportQNX; 2363 } 2364 } 2365 } 2366 }