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 GGP_stream_descriptor_surface;
22 enum NV_external_memory_win32;
23 enum NV_win32_keyed_mutex;
24 enum NN_vi_surface;
25 enum EXT_acquire_xlib_display;
26 enum MVK_ios_surface;
27 enum MVK_macos_surface;
28 enum ANDROID_external_memory_android_hardware_buffer;
29 enum GGP_frame_token;
30 enum FUCHSIA_imagepipe_surface;
31 enum EXT_metal_surface;
32 enum EXT_full_screen_exclusive;
33 
34 
35 /// extensions to a specific platform are grouped in these enum sequences
36 import std.meta : AliasSeq;
37 alias USE_PLATFORM_XLIB_KHR        = AliasSeq!( KHR_xlib_surface );
38 alias USE_PLATFORM_XCB_KHR         = AliasSeq!( KHR_xcb_surface );
39 alias USE_PLATFORM_WAYLAND_KHR     = AliasSeq!( KHR_wayland_surface );
40 alias USE_PLATFORM_ANDROID_KHR     = AliasSeq!( KHR_android_surface, ANDROID_external_memory_android_hardware_buffer );
41 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 );
42 alias USE_PLATFORM_GGP             = AliasSeq!( GGP_stream_descriptor_surface, GGP_frame_token );
43 alias USE_PLATFORM_VI_NN           = AliasSeq!( NN_vi_surface );
44 alias USE_PLATFORM_XLIB_XRANDR_EXT = AliasSeq!( EXT_acquire_xlib_display );
45 alias USE_PLATFORM_IOS_MVK         = AliasSeq!( MVK_ios_surface );
46 alias USE_PLATFORM_MACOS_MVK       = AliasSeq!( MVK_macos_surface );
47 alias USE_PLATFORM_FUCHSIA         = AliasSeq!( FUCHSIA_imagepipe_surface );
48 alias USE_PLATFORM_METAL_EXT       = AliasSeq!( EXT_metal_surface );
49 
50 
51 
52 /// instantiate platform and extension specific code with this mixin template
53 /// required types and data structures must be imported into the module where
54 /// this template is instantiated
55 mixin template Platform_Extensions( extensions... ) {
56 
57     // publicly import erupted package modules
58     public import erupted.types;
59     public import erupted.functions;
60     import erupted.dispatch_device;
61 
62     // mixin function linkage, nothrow and @nogc attributes for subsecuent functions
63     extern(System) nothrow @nogc:
64 
65     // remove duplicates from alias sequence
66     // this might happen if a platform extension collection AND a single extension, which is included in the collection, was specified
67     // e.g.: mixin Platform_Extensions!( VK_USE_PLATFORM_WIN32_KHR, VK_KHR_external_memory_win32 );
68     import std.meta : NoDuplicates;
69     alias noDuplicateExtensions = NoDuplicates!extensions;
70 
71     // 1. loop through alias sequence and mixin corresponding
72     // extension types, aliased function pointer type definitions and __gshared function pointer declarations
73     static foreach( extension; noDuplicateExtensions ) {
74 
75         // VK_KHR_xlib_surface : types and function pointer type aliases
76         static if( __traits( isSame, extension, KHR_xlib_surface )) {
77             enum VK_KHR_xlib_surface = 1;
78 
79             enum VK_KHR_XLIB_SURFACE_SPEC_VERSION = 6;
80             enum VK_KHR_XLIB_SURFACE_EXTENSION_NAME = "VK_KHR_xlib_surface";
81             
82             alias VkXlibSurfaceCreateFlagsKHR = VkFlags;
83             
84             struct VkXlibSurfaceCreateInfoKHR {
85                 VkStructureType              sType = VK_STRUCTURE_TYPE_XLIB_SURFACE_CREATE_INFO_KHR;
86                 const( void )*               pNext;
87                 VkXlibSurfaceCreateFlagsKHR  flags;
88                 Display*                     dpy;
89                 Window                       window;
90             }
91             
92             alias PFN_vkCreateXlibSurfaceKHR                                            = VkResult  function( VkInstance instance, const( VkXlibSurfaceCreateInfoKHR )* pCreateInfo, const( VkAllocationCallbacks )* pAllocator, VkSurfaceKHR* pSurface );
93             alias PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR                     = VkBool32  function( VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, Display* dpy, VisualID visualID );
94         }
95 
96         // VK_KHR_xcb_surface : types and function pointer type aliases
97         else static if( __traits( isSame, extension, KHR_xcb_surface )) {
98             enum VK_KHR_xcb_surface = 1;
99 
100             enum VK_KHR_XCB_SURFACE_SPEC_VERSION = 6;
101             enum VK_KHR_XCB_SURFACE_EXTENSION_NAME = "VK_KHR_xcb_surface";
102             
103             alias VkXcbSurfaceCreateFlagsKHR = VkFlags;
104             
105             struct VkXcbSurfaceCreateInfoKHR {
106                 VkStructureType             sType = VK_STRUCTURE_TYPE_XCB_SURFACE_CREATE_INFO_KHR;
107                 const( void )*              pNext;
108                 VkXcbSurfaceCreateFlagsKHR  flags;
109                 xcb_connection_t*           connection;
110                 xcb_window_t                window;
111             }
112             
113             alias PFN_vkCreateXcbSurfaceKHR                                             = VkResult  function( VkInstance instance, const( VkXcbSurfaceCreateInfoKHR )* pCreateInfo, const( VkAllocationCallbacks )* pAllocator, VkSurfaceKHR* pSurface );
114             alias PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR                      = VkBool32  function( VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, xcb_connection_t* connection, xcb_visualid_t visual_id );
115         }
116 
117         // VK_KHR_wayland_surface : types and function pointer type aliases
118         else static if( __traits( isSame, extension, KHR_wayland_surface )) {
119             enum VK_KHR_wayland_surface = 1;
120 
121             enum VK_KHR_WAYLAND_SURFACE_SPEC_VERSION = 6;
122             enum VK_KHR_WAYLAND_SURFACE_EXTENSION_NAME = "VK_KHR_wayland_surface";
123             
124             alias VkWaylandSurfaceCreateFlagsKHR = VkFlags;
125             
126             struct VkWaylandSurfaceCreateInfoKHR {
127                 VkStructureType                 sType = VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR;
128                 const( void )*                  pNext;
129                 VkWaylandSurfaceCreateFlagsKHR  flags;
130                 const( wl_display )*            display;
131                 const( wl_surface )*            surface;
132             }
133             
134             alias PFN_vkCreateWaylandSurfaceKHR                                         = VkResult  function( VkInstance instance, const( VkWaylandSurfaceCreateInfoKHR )* pCreateInfo, const( VkAllocationCallbacks )* pAllocator, VkSurfaceKHR* pSurface );
135             alias PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR                  = VkBool32  function( VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, const( wl_display )* display );
136         }
137 
138         // VK_KHR_android_surface : types and function pointer type aliases
139         else static if( __traits( isSame, extension, KHR_android_surface )) {
140             enum VK_KHR_android_surface = 1;
141 
142             enum VK_KHR_ANDROID_SURFACE_SPEC_VERSION = 6;
143             enum VK_KHR_ANDROID_SURFACE_EXTENSION_NAME = "VK_KHR_android_surface";
144             
145             alias VkAndroidSurfaceCreateFlagsKHR = VkFlags;
146             
147             struct VkAndroidSurfaceCreateInfoKHR {
148                 VkStructureType                 sType = VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR;
149                 const( void )*                  pNext;
150                 VkAndroidSurfaceCreateFlagsKHR  flags;
151                 const( ANativeWindow )*         window;
152             }
153             
154             alias PFN_vkCreateAndroidSurfaceKHR                                         = VkResult  function( VkInstance instance, const( VkAndroidSurfaceCreateInfoKHR )* pCreateInfo, const( VkAllocationCallbacks )* pAllocator, VkSurfaceKHR* pSurface );
155         }
156 
157         // VK_KHR_win32_surface : types and function pointer type aliases
158         else static if( __traits( isSame, extension, KHR_win32_surface )) {
159             enum VK_KHR_win32_surface = 1;
160 
161             enum VK_KHR_WIN32_SURFACE_SPEC_VERSION = 6;
162             enum VK_KHR_WIN32_SURFACE_EXTENSION_NAME = "VK_KHR_win32_surface";
163             
164             alias VkWin32SurfaceCreateFlagsKHR = VkFlags;
165             
166             struct VkWin32SurfaceCreateInfoKHR {
167                 VkStructureType               sType = VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR;
168                 const( void )*                pNext;
169                 VkWin32SurfaceCreateFlagsKHR  flags;
170                 HINSTANCE                     hinstance;
171                 HWND                          hwnd;
172             }
173             
174             alias PFN_vkCreateWin32SurfaceKHR                                           = VkResult  function( VkInstance instance, const( VkWin32SurfaceCreateInfoKHR )* pCreateInfo, const( VkAllocationCallbacks )* pAllocator, VkSurfaceKHR* pSurface );
175             alias PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR                    = VkBool32  function( VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex );
176         }
177 
178         // VK_KHR_external_memory_win32 : types and function pointer type aliases
179         else static if( __traits( isSame, extension, KHR_external_memory_win32 )) {
180             enum VK_KHR_external_memory_win32 = 1;
181 
182             enum VK_KHR_EXTERNAL_MEMORY_WIN32_SPEC_VERSION = 1;
183             enum VK_KHR_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME = "VK_KHR_external_memory_win32";
184             
185             struct VkImportMemoryWin32HandleInfoKHR {
186                 VkStructureType                     sType = VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR;
187                 const( void )*                      pNext;
188                 VkExternalMemoryHandleTypeFlagBits  handleType;
189                 HANDLE                              handle;
190                 LPCWSTR                             name;
191             }
192             
193             struct VkExportMemoryWin32HandleInfoKHR {
194                 VkStructureType                sType = VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_KHR;
195                 const( void )*                 pNext;
196                 const( SECURITY_ATTRIBUTES )*  pAttributes;
197                 DWORD                          dwAccess;
198                 LPCWSTR                        name;
199             }
200             
201             struct VkMemoryWin32HandlePropertiesKHR {
202                 VkStructureType  sType = VK_STRUCTURE_TYPE_MEMORY_WIN32_HANDLE_PROPERTIES_KHR;
203                 void*            pNext;
204                 uint32_t         memoryTypeBits;
205             }
206             
207             struct VkMemoryGetWin32HandleInfoKHR {
208                 VkStructureType                     sType = VK_STRUCTURE_TYPE_MEMORY_GET_WIN32_HANDLE_INFO_KHR;
209                 const( void )*                      pNext;
210                 VkDeviceMemory                      memory;
211                 VkExternalMemoryHandleTypeFlagBits  handleType;
212             }
213             
214             alias PFN_vkGetMemoryWin32HandleKHR                                         = VkResult  function( VkDevice device, const( VkMemoryGetWin32HandleInfoKHR )* pGetWin32HandleInfo, HANDLE* pHandle );
215             alias PFN_vkGetMemoryWin32HandlePropertiesKHR                               = VkResult  function( VkDevice device, VkExternalMemoryHandleTypeFlagBits handleType, HANDLE handle, VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties );
216         }
217 
218         // VK_KHR_win32_keyed_mutex : types and function pointer type aliases
219         else static if( __traits( isSame, extension, KHR_win32_keyed_mutex )) {
220             enum VK_KHR_win32_keyed_mutex = 1;
221 
222             enum VK_KHR_WIN32_KEYED_MUTEX_SPEC_VERSION = 1;
223             enum VK_KHR_WIN32_KEYED_MUTEX_EXTENSION_NAME = "VK_KHR_win32_keyed_mutex";
224             
225             struct VkWin32KeyedMutexAcquireReleaseInfoKHR {
226                 VkStructureType           sType = VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_KHR;
227                 const( void )*            pNext;
228                 uint32_t                  acquireCount;
229                 const( VkDeviceMemory )*  pAcquireSyncs;
230                 const( uint64_t )*        pAcquireKeys;
231                 const( uint32_t )*        pAcquireTimeouts;
232                 uint32_t                  releaseCount;
233                 const( VkDeviceMemory )*  pReleaseSyncs;
234                 const( uint64_t )*        pReleaseKeys;
235             }
236             
237         }
238 
239         // VK_KHR_external_semaphore_win32 : types and function pointer type aliases
240         else static if( __traits( isSame, extension, KHR_external_semaphore_win32 )) {
241             enum VK_KHR_external_semaphore_win32 = 1;
242 
243             enum VK_KHR_EXTERNAL_SEMAPHORE_WIN32_SPEC_VERSION = 1;
244             enum VK_KHR_EXTERNAL_SEMAPHORE_WIN32_EXTENSION_NAME = "VK_KHR_external_semaphore_win32";
245             
246             struct VkImportSemaphoreWin32HandleInfoKHR {
247                 VkStructureType                        sType = VK_STRUCTURE_TYPE_IMPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR;
248                 const( void )*                         pNext;
249                 VkSemaphore                            semaphore;
250                 VkSemaphoreImportFlags                 flags;
251                 VkExternalSemaphoreHandleTypeFlagBits  handleType;
252                 HANDLE                                 handle;
253                 LPCWSTR                                name;
254             }
255             
256             struct VkExportSemaphoreWin32HandleInfoKHR {
257                 VkStructureType                sType = VK_STRUCTURE_TYPE_EXPORT_SEMAPHORE_WIN32_HANDLE_INFO_KHR;
258                 const( void )*                 pNext;
259                 const( SECURITY_ATTRIBUTES )*  pAttributes;
260                 DWORD                          dwAccess;
261                 LPCWSTR                        name;
262             }
263             
264             struct VkD3D12FenceSubmitInfoKHR {
265                 VkStructureType     sType = VK_STRUCTURE_TYPE_D3D12_FENCE_SUBMIT_INFO_KHR;
266                 const( void )*      pNext;
267                 uint32_t            waitSemaphoreValuesCount;
268                 const( uint64_t )*  pWaitSemaphoreValues;
269                 uint32_t            signalSemaphoreValuesCount;
270                 const( uint64_t )*  pSignalSemaphoreValues;
271             }
272             
273             struct VkSemaphoreGetWin32HandleInfoKHR {
274                 VkStructureType                        sType = VK_STRUCTURE_TYPE_SEMAPHORE_GET_WIN32_HANDLE_INFO_KHR;
275                 const( void )*                         pNext;
276                 VkSemaphore                            semaphore;
277                 VkExternalSemaphoreHandleTypeFlagBits  handleType;
278             }
279             
280             alias PFN_vkImportSemaphoreWin32HandleKHR                                   = VkResult  function( VkDevice device, const( VkImportSemaphoreWin32HandleInfoKHR )* pImportSemaphoreWin32HandleInfo );
281             alias PFN_vkGetSemaphoreWin32HandleKHR                                      = VkResult  function( VkDevice device, const( VkSemaphoreGetWin32HandleInfoKHR )* pGetWin32HandleInfo, HANDLE* pHandle );
282         }
283 
284         // VK_KHR_external_fence_win32 : types and function pointer type aliases
285         else static if( __traits( isSame, extension, KHR_external_fence_win32 )) {
286             enum VK_KHR_external_fence_win32 = 1;
287 
288             enum VK_KHR_EXTERNAL_FENCE_WIN32_SPEC_VERSION = 1;
289             enum VK_KHR_EXTERNAL_FENCE_WIN32_EXTENSION_NAME = "VK_KHR_external_fence_win32";
290             
291             struct VkImportFenceWin32HandleInfoKHR {
292                 VkStructureType                    sType = VK_STRUCTURE_TYPE_IMPORT_FENCE_WIN32_HANDLE_INFO_KHR;
293                 const( void )*                     pNext;
294                 VkFence                            fence;
295                 VkFenceImportFlags                 flags;
296                 VkExternalFenceHandleTypeFlagBits  handleType;
297                 HANDLE                             handle;
298                 LPCWSTR                            name;
299             }
300             
301             struct VkExportFenceWin32HandleInfoKHR {
302                 VkStructureType                sType = VK_STRUCTURE_TYPE_EXPORT_FENCE_WIN32_HANDLE_INFO_KHR;
303                 const( void )*                 pNext;
304                 const( SECURITY_ATTRIBUTES )*  pAttributes;
305                 DWORD                          dwAccess;
306                 LPCWSTR                        name;
307             }
308             
309             struct VkFenceGetWin32HandleInfoKHR {
310                 VkStructureType                    sType = VK_STRUCTURE_TYPE_FENCE_GET_WIN32_HANDLE_INFO_KHR;
311                 const( void )*                     pNext;
312                 VkFence                            fence;
313                 VkExternalFenceHandleTypeFlagBits  handleType;
314             }
315             
316             alias PFN_vkImportFenceWin32HandleKHR                                       = VkResult  function( VkDevice device, const( VkImportFenceWin32HandleInfoKHR )* pImportFenceWin32HandleInfo );
317             alias PFN_vkGetFenceWin32HandleKHR                                          = VkResult  function( VkDevice device, const( VkFenceGetWin32HandleInfoKHR )* pGetWin32HandleInfo, HANDLE* pHandle );
318         }
319 
320         // VK_GGP_stream_descriptor_surface : types and function pointer type aliases
321         else static if( __traits( isSame, extension, GGP_stream_descriptor_surface )) {
322             enum VK_GGP_stream_descriptor_surface = 1;
323 
324             enum VK_GGP_STREAM_DESCRIPTOR_SURFACE_SPEC_VERSION = 1;
325             enum VK_GGP_STREAM_DESCRIPTOR_SURFACE_EXTENSION_NAME = "VK_GGP_stream_descriptor_surface";
326             
327             alias VkStreamDescriptorSurfaceCreateFlagsGGP = VkFlags;
328             
329             struct VkStreamDescriptorSurfaceCreateInfoGGP {
330                 VkStructureType                          sType = VK_STRUCTURE_TYPE_STREAM_DESCRIPTOR_SURFACE_CREATE_INFO_GGP;
331                 const( void )*                           pNext;
332                 VkStreamDescriptorSurfaceCreateFlagsGGP  flags;
333                 GgpStreamDescriptor                      streamDescriptor;
334             }
335             
336             alias PFN_vkCreateStreamDescriptorSurfaceGGP                                = VkResult  function( VkInstance instance, const( VkStreamDescriptorSurfaceCreateInfoGGP )* pCreateInfo, const( VkAllocationCallbacks )* pAllocator, VkSurfaceKHR* pSurface );
337         }
338 
339         // VK_NV_external_memory_win32 : types and function pointer type aliases
340         else static if( __traits( isSame, extension, NV_external_memory_win32 )) {
341             enum VK_NV_external_memory_win32 = 1;
342 
343             enum VK_NV_EXTERNAL_MEMORY_WIN32_SPEC_VERSION = 1;
344             enum VK_NV_EXTERNAL_MEMORY_WIN32_EXTENSION_NAME = "VK_NV_external_memory_win32";
345             
346             struct VkImportMemoryWin32HandleInfoNV {
347                 VkStructureType                    sType = VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_NV;
348                 const( void )*                     pNext;
349                 VkExternalMemoryHandleTypeFlagsNV  handleType;
350                 HANDLE                             handle;
351             }
352             
353             struct VkExportMemoryWin32HandleInfoNV {
354                 VkStructureType                sType = VK_STRUCTURE_TYPE_EXPORT_MEMORY_WIN32_HANDLE_INFO_NV;
355                 const( void )*                 pNext;
356                 const( SECURITY_ATTRIBUTES )*  pAttributes;
357                 DWORD                          dwAccess;
358             }
359             
360             alias PFN_vkGetMemoryWin32HandleNV                                          = VkResult  function( VkDevice device, VkDeviceMemory memory, VkExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle );
361         }
362 
363         // VK_NV_win32_keyed_mutex : types and function pointer type aliases
364         else static if( __traits( isSame, extension, NV_win32_keyed_mutex )) {
365             enum VK_NV_win32_keyed_mutex = 1;
366 
367             enum VK_NV_WIN32_KEYED_MUTEX_SPEC_VERSION = 1;
368             enum VK_NV_WIN32_KEYED_MUTEX_EXTENSION_NAME = "VK_NV_win32_keyed_mutex";
369             
370             struct VkWin32KeyedMutexAcquireReleaseInfoNV {
371                 VkStructureType           sType = VK_STRUCTURE_TYPE_WIN32_KEYED_MUTEX_ACQUIRE_RELEASE_INFO_NV;
372                 const( void )*            pNext;
373                 uint32_t                  acquireCount;
374                 const( VkDeviceMemory )*  pAcquireSyncs;
375                 const( uint64_t )*        pAcquireKeys;
376                 const( uint32_t )*        pAcquireTimeoutMilliseconds;
377                 uint32_t                  releaseCount;
378                 const( VkDeviceMemory )*  pReleaseSyncs;
379                 const( uint64_t )*        pReleaseKeys;
380             }
381             
382         }
383 
384         // VK_NN_vi_surface : types and function pointer type aliases
385         else static if( __traits( isSame, extension, NN_vi_surface )) {
386             enum VK_NN_vi_surface = 1;
387 
388             enum VK_NN_VI_SURFACE_SPEC_VERSION = 1;
389             enum VK_NN_VI_SURFACE_EXTENSION_NAME = "VK_NN_vi_surface";
390             
391             alias VkViSurfaceCreateFlagsNN = VkFlags;
392             
393             struct VkViSurfaceCreateInfoNN {
394                 VkStructureType           sType = VK_STRUCTURE_TYPE_VI_SURFACE_CREATE_INFO_NN;
395                 const( void )*            pNext;
396                 VkViSurfaceCreateFlagsNN  flags;
397                 void*                     window;
398             }
399             
400             alias PFN_vkCreateViSurfaceNN                                               = VkResult  function( VkInstance instance, const( VkViSurfaceCreateInfoNN )* pCreateInfo, const( VkAllocationCallbacks )* pAllocator, VkSurfaceKHR* pSurface );
401         }
402 
403         // VK_EXT_acquire_xlib_display : types and function pointer type aliases
404         else static if( __traits( isSame, extension, EXT_acquire_xlib_display )) {
405             enum VK_EXT_acquire_xlib_display = 1;
406 
407             enum VK_EXT_ACQUIRE_XLIB_DISPLAY_SPEC_VERSION = 1;
408             enum VK_EXT_ACQUIRE_XLIB_DISPLAY_EXTENSION_NAME = "VK_EXT_acquire_xlib_display";
409             
410             alias PFN_vkAcquireXlibDisplayEXT                                           = VkResult  function( VkPhysicalDevice physicalDevice, Display* dpy, VkDisplayKHR display );
411             alias PFN_vkGetRandROutputDisplayEXT                                        = VkResult  function( VkPhysicalDevice physicalDevice, Display* dpy, RROutput rrOutput, VkDisplayKHR* pDisplay );
412         }
413 
414         // VK_MVK_ios_surface : types and function pointer type aliases
415         else static if( __traits( isSame, extension, MVK_ios_surface )) {
416             enum VK_MVK_ios_surface = 1;
417 
418             enum VK_MVK_IOS_SURFACE_SPEC_VERSION = 2;
419             enum VK_MVK_IOS_SURFACE_EXTENSION_NAME = "VK_MVK_ios_surface";
420             
421             alias VkIOSSurfaceCreateFlagsMVK = VkFlags;
422             
423             struct VkIOSSurfaceCreateInfoMVK {
424                 VkStructureType             sType = VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK;
425                 const( void )*              pNext;
426                 VkIOSSurfaceCreateFlagsMVK  flags;
427                 const( void )*              pView;
428             }
429             
430             alias PFN_vkCreateIOSSurfaceMVK                                             = VkResult  function( VkInstance instance, const( VkIOSSurfaceCreateInfoMVK )* pCreateInfo, const( VkAllocationCallbacks )* pAllocator, VkSurfaceKHR* pSurface );
431         }
432 
433         // VK_MVK_macos_surface : types and function pointer type aliases
434         else static if( __traits( isSame, extension, MVK_macos_surface )) {
435             enum VK_MVK_macos_surface = 1;
436 
437             enum VK_MVK_MACOS_SURFACE_SPEC_VERSION = 2;
438             enum VK_MVK_MACOS_SURFACE_EXTENSION_NAME = "VK_MVK_macos_surface";
439             
440             alias VkMacOSSurfaceCreateFlagsMVK = VkFlags;
441             
442             struct VkMacOSSurfaceCreateInfoMVK {
443                 VkStructureType               sType = VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK;
444                 const( void )*                pNext;
445                 VkMacOSSurfaceCreateFlagsMVK  flags;
446                 const( void )*                pView;
447             }
448             
449             alias PFN_vkCreateMacOSSurfaceMVK                                           = VkResult  function( VkInstance instance, const( VkMacOSSurfaceCreateInfoMVK )* pCreateInfo, const( VkAllocationCallbacks )* pAllocator, VkSurfaceKHR* pSurface );
450         }
451 
452         // VK_ANDROID_external_memory_android_hardware_buffer : types and function pointer type aliases
453         else static if( __traits( isSame, extension, ANDROID_external_memory_android_hardware_buffer )) {
454             enum VK_ANDROID_external_memory_android_hardware_buffer = 1;
455 
456             enum VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_SPEC_VERSION = 3;
457             enum VK_ANDROID_EXTERNAL_MEMORY_ANDROID_HARDWARE_BUFFER_EXTENSION_NAME = "VK_ANDROID_external_memory_android_hardware_buffer";
458             
459             struct VkAndroidHardwareBufferUsageANDROID {
460                 VkStructureType  sType = VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_USAGE_ANDROID;
461                 void*            pNext;
462                 uint64_t         androidHardwareBufferUsage;
463             }
464             
465             struct VkAndroidHardwareBufferPropertiesANDROID {
466                 VkStructureType  sType = VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_PROPERTIES_ANDROID;
467                 void*            pNext;
468                 VkDeviceSize     allocationSize;
469                 uint32_t         memoryTypeBits;
470             }
471             
472             struct VkAndroidHardwareBufferFormatPropertiesANDROID {
473                 VkStructureType                sType = VK_STRUCTURE_TYPE_ANDROID_HARDWARE_BUFFER_FORMAT_PROPERTIES_ANDROID;
474                 void*                          pNext;
475                 VkFormat                       format;
476                 uint64_t                       externalFormat;
477                 VkFormatFeatureFlags           formatFeatures;
478                 VkComponentMapping             samplerYcbcrConversionComponents;
479                 VkSamplerYcbcrModelConversion  suggestedYcbcrModel;
480                 VkSamplerYcbcrRange            suggestedYcbcrRange;
481                 VkChromaLocation               suggestedXChromaOffset;
482                 VkChromaLocation               suggestedYChromaOffset;
483             }
484             
485             struct VkImportAndroidHardwareBufferInfoANDROID {
486                 VkStructureType            sType = VK_STRUCTURE_TYPE_IMPORT_ANDROID_HARDWARE_BUFFER_INFO_ANDROID;
487                 const( void )*             pNext;
488                 const( AHardwareBuffer )*  buffer;
489             }
490             
491             struct VkMemoryGetAndroidHardwareBufferInfoANDROID {
492                 VkStructureType  sType = VK_STRUCTURE_TYPE_MEMORY_GET_ANDROID_HARDWARE_BUFFER_INFO_ANDROID;
493                 const( void )*   pNext;
494                 VkDeviceMemory   memory;
495             }
496             
497             struct VkExternalFormatANDROID {
498                 VkStructureType  sType = VK_STRUCTURE_TYPE_EXTERNAL_FORMAT_ANDROID;
499                 void*            pNext;
500                 uint64_t         externalFormat;
501             }
502             
503             alias PFN_vkGetAndroidHardwareBufferPropertiesANDROID                       = VkResult  function( VkDevice device, const( AHardwareBuffer )* buffer, VkAndroidHardwareBufferPropertiesANDROID* pProperties );
504             alias PFN_vkGetMemoryAndroidHardwareBufferANDROID                           = VkResult  function( VkDevice device, const( VkMemoryGetAndroidHardwareBufferInfoANDROID )* pInfo, AHardwareBuffer pBuffer );
505         }
506 
507         // VK_GGP_frame_token : types and function pointer type aliases
508         else static if( __traits( isSame, extension, GGP_frame_token )) {
509             enum VK_GGP_frame_token = 1;
510 
511             enum VK_GGP_FRAME_TOKEN_SPEC_VERSION = 1;
512             enum VK_GGP_FRAME_TOKEN_EXTENSION_NAME = "VK_GGP_frame_token";
513             
514             struct VkPresentFrameTokenGGP {
515                 VkStructureType  sType = VK_STRUCTURE_TYPE_PRESENT_FRAME_TOKEN_GGP;
516                 const( void )*   pNext;
517                 GgpFrameToken    frameToken;
518             }
519             
520         }
521 
522         // VK_FUCHSIA_imagepipe_surface : types and function pointer type aliases
523         else static if( __traits( isSame, extension, FUCHSIA_imagepipe_surface )) {
524             enum VK_FUCHSIA_imagepipe_surface = 1;
525 
526             enum VK_FUCHSIA_IMAGEPIPE_SURFACE_SPEC_VERSION = 1;
527             enum VK_FUCHSIA_IMAGEPIPE_SURFACE_EXTENSION_NAME = "VK_FUCHSIA_imagepipe_surface";
528             
529             alias VkImagePipeSurfaceCreateFlagsFUCHSIA = VkFlags;
530             
531             struct VkImagePipeSurfaceCreateInfoFUCHSIA {
532                 VkStructureType                       sType = VK_STRUCTURE_TYPE_IMAGEPIPE_SURFACE_CREATE_INFO_FUCHSIA;
533                 const( void )*                        pNext;
534                 VkImagePipeSurfaceCreateFlagsFUCHSIA  flags;
535                 zx_handle_t                           imagePipeHandle;
536             }
537             
538             alias PFN_vkCreateImagePipeSurfaceFUCHSIA                                   = VkResult  function( VkInstance instance, const( VkImagePipeSurfaceCreateInfoFUCHSIA )* pCreateInfo, const( VkAllocationCallbacks )* pAllocator, VkSurfaceKHR* pSurface );
539         }
540 
541         // VK_EXT_metal_surface : types and function pointer type aliases
542         else static if( __traits( isSame, extension, EXT_metal_surface )) {
543             enum VK_EXT_metal_surface = 1;
544 
545             enum VK_EXT_METAL_SURFACE_SPEC_VERSION = 1;
546             enum VK_EXT_METAL_SURFACE_EXTENSION_NAME = "VK_EXT_metal_surface";
547             
548             alias VkMetalSurfaceCreateFlagsEXT = VkFlags;
549             
550             struct VkMetalSurfaceCreateInfoEXT {
551                 VkStructureType               sType = VK_STRUCTURE_TYPE_METAL_SURFACE_CREATE_INFO_EXT;
552                 const( void )*                pNext;
553                 VkMetalSurfaceCreateFlagsEXT  flags;
554                 const( CAMetalLayer )*        pLayer;
555             }
556             
557             alias PFN_vkCreateMetalSurfaceEXT                                           = VkResult  function( VkInstance instance, const( VkMetalSurfaceCreateInfoEXT )* pCreateInfo, const( VkAllocationCallbacks )* pAllocator, VkSurfaceKHR* pSurface );
558         }
559 
560         // VK_EXT_full_screen_exclusive : types and function pointer type aliases
561         else static if( __traits( isSame, extension, EXT_full_screen_exclusive )) {
562             enum VK_EXT_full_screen_exclusive = 1;
563 
564             enum VK_EXT_FULL_SCREEN_EXCLUSIVE_SPEC_VERSION = 3;
565             enum VK_EXT_FULL_SCREEN_EXCLUSIVE_EXTENSION_NAME = "VK_EXT_full_screen_exclusive";
566             
567             enum VkFullScreenExclusiveEXT {
568                 VK_FULL_SCREEN_EXCLUSIVE_DEFAULT_EXT                 = 0,
569                 VK_FULL_SCREEN_EXCLUSIVE_ALLOWED_EXT                 = 1,
570                 VK_FULL_SCREEN_EXCLUSIVE_DISALLOWED_EXT              = 2,
571                 VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT  = 3,
572                 VK_FULL_SCREEN_EXCLUSIVE_BEGIN_RANGE_EXT             = VK_FULL_SCREEN_EXCLUSIVE_DEFAULT_EXT,
573                 VK_FULL_SCREEN_EXCLUSIVE_END_RANGE_EXT               = VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT,
574                 VK_FULL_SCREEN_EXCLUSIVE_RANGE_SIZE_EXT              = VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT - VK_FULL_SCREEN_EXCLUSIVE_DEFAULT_EXT + 1,
575                 VK_FULL_SCREEN_EXCLUSIVE_MAX_ENUM_EXT                = 0x7FFFFFFF
576             }
577             
578             enum VK_FULL_SCREEN_EXCLUSIVE_DEFAULT_EXT                = VkFullScreenExclusiveEXT.VK_FULL_SCREEN_EXCLUSIVE_DEFAULT_EXT;
579             enum VK_FULL_SCREEN_EXCLUSIVE_ALLOWED_EXT                = VkFullScreenExclusiveEXT.VK_FULL_SCREEN_EXCLUSIVE_ALLOWED_EXT;
580             enum VK_FULL_SCREEN_EXCLUSIVE_DISALLOWED_EXT             = VkFullScreenExclusiveEXT.VK_FULL_SCREEN_EXCLUSIVE_DISALLOWED_EXT;
581             enum VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT = VkFullScreenExclusiveEXT.VK_FULL_SCREEN_EXCLUSIVE_APPLICATION_CONTROLLED_EXT;
582             enum VK_FULL_SCREEN_EXCLUSIVE_BEGIN_RANGE_EXT            = VkFullScreenExclusiveEXT.VK_FULL_SCREEN_EXCLUSIVE_BEGIN_RANGE_EXT;
583             enum VK_FULL_SCREEN_EXCLUSIVE_END_RANGE_EXT              = VkFullScreenExclusiveEXT.VK_FULL_SCREEN_EXCLUSIVE_END_RANGE_EXT;
584             enum VK_FULL_SCREEN_EXCLUSIVE_RANGE_SIZE_EXT             = VkFullScreenExclusiveEXT.VK_FULL_SCREEN_EXCLUSIVE_RANGE_SIZE_EXT;
585             enum VK_FULL_SCREEN_EXCLUSIVE_MAX_ENUM_EXT               = VkFullScreenExclusiveEXT.VK_FULL_SCREEN_EXCLUSIVE_MAX_ENUM_EXT;
586             
587             struct VkSurfaceFullScreenExclusiveInfoEXT {
588                 VkStructureType           sType = VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_INFO_EXT;
589                 void*                     pNext;
590                 VkFullScreenExclusiveEXT  fullScreenExclusive;
591             }
592             
593             struct VkSurfaceCapabilitiesFullScreenExclusiveEXT {
594                 VkStructureType  sType = VK_STRUCTURE_TYPE_SURFACE_CAPABILITIES_FULL_SCREEN_EXCLUSIVE_EXT;
595                 void*            pNext;
596                 VkBool32         fullScreenExclusiveSupported;
597             }
598             
599             struct VkSurfaceFullScreenExclusiveWin32InfoEXT {
600                 VkStructureType  sType = VK_STRUCTURE_TYPE_SURFACE_FULL_SCREEN_EXCLUSIVE_WIN32_INFO_EXT;
601                 const( void )*   pNext;
602                 HMONITOR         hmonitor;
603             }
604             
605             alias PFN_vkGetPhysicalDeviceSurfacePresentModes2EXT                        = VkResult  function( VkPhysicalDevice physicalDevice, const( VkPhysicalDeviceSurfaceInfo2KHR )* pSurfaceInfo, uint32_t* pPresentModeCount, VkPresentModeKHR* pPresentModes );
606             alias PFN_vkAcquireFullScreenExclusiveModeEXT                               = VkResult  function( VkDevice device, VkSwapchainKHR swapchain );
607             alias PFN_vkReleaseFullScreenExclusiveModeEXT                               = VkResult  function( VkDevice device, VkSwapchainKHR swapchain );
608             alias PFN_vkGetDeviceGroupSurfacePresentModes2EXT                           = VkResult  function( VkDevice device, const( VkPhysicalDeviceSurfaceInfo2KHR )* pSurfaceInfo, VkDeviceGroupPresentModeFlagsKHR* pModes );
609         }
610 
611         __gshared {
612 
613             // VK_KHR_xlib_surface : function pointer decelerations
614             static if( __traits( isSame, extension, KHR_xlib_surface )) {
615                 PFN_vkCreateXlibSurfaceKHR                                            vkCreateXlibSurfaceKHR;
616                 PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR                     vkGetPhysicalDeviceXlibPresentationSupportKHR;
617             }
618 
619             // VK_KHR_xcb_surface : function pointer decelerations
620             else static if( __traits( isSame, extension, KHR_xcb_surface )) {
621                 PFN_vkCreateXcbSurfaceKHR                                             vkCreateXcbSurfaceKHR;
622                 PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR                      vkGetPhysicalDeviceXcbPresentationSupportKHR;
623             }
624 
625             // VK_KHR_wayland_surface : function pointer decelerations
626             else static if( __traits( isSame, extension, KHR_wayland_surface )) {
627                 PFN_vkCreateWaylandSurfaceKHR                                         vkCreateWaylandSurfaceKHR;
628                 PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR                  vkGetPhysicalDeviceWaylandPresentationSupportKHR;
629             }
630 
631             // VK_KHR_android_surface : function pointer decelerations
632             else static if( __traits( isSame, extension, KHR_android_surface )) {
633                 PFN_vkCreateAndroidSurfaceKHR                                         vkCreateAndroidSurfaceKHR;
634             }
635 
636             // VK_KHR_win32_surface : function pointer decelerations
637             else static if( __traits( isSame, extension, KHR_win32_surface )) {
638                 PFN_vkCreateWin32SurfaceKHR                                           vkCreateWin32SurfaceKHR;
639                 PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR                    vkGetPhysicalDeviceWin32PresentationSupportKHR;
640             }
641 
642             // VK_KHR_external_memory_win32 : function pointer decelerations
643             else static if( __traits( isSame, extension, KHR_external_memory_win32 )) {
644                 PFN_vkGetMemoryWin32HandleKHR                                         vkGetMemoryWin32HandleKHR;
645                 PFN_vkGetMemoryWin32HandlePropertiesKHR                               vkGetMemoryWin32HandlePropertiesKHR;
646             }
647 
648             // VK_KHR_external_semaphore_win32 : function pointer decelerations
649             else static if( __traits( isSame, extension, KHR_external_semaphore_win32 )) {
650                 PFN_vkImportSemaphoreWin32HandleKHR                                   vkImportSemaphoreWin32HandleKHR;
651                 PFN_vkGetSemaphoreWin32HandleKHR                                      vkGetSemaphoreWin32HandleKHR;
652             }
653 
654             // VK_KHR_external_fence_win32 : function pointer decelerations
655             else static if( __traits( isSame, extension, KHR_external_fence_win32 )) {
656                 PFN_vkImportFenceWin32HandleKHR                                       vkImportFenceWin32HandleKHR;
657                 PFN_vkGetFenceWin32HandleKHR                                          vkGetFenceWin32HandleKHR;
658             }
659 
660             // VK_GGP_stream_descriptor_surface : function pointer decelerations
661             else static if( __traits( isSame, extension, GGP_stream_descriptor_surface )) {
662                 PFN_vkCreateStreamDescriptorSurfaceGGP                                vkCreateStreamDescriptorSurfaceGGP;
663             }
664 
665             // VK_NV_external_memory_win32 : function pointer decelerations
666             else static if( __traits( isSame, extension, NV_external_memory_win32 )) {
667                 PFN_vkGetMemoryWin32HandleNV                                          vkGetMemoryWin32HandleNV;
668             }
669 
670             // VK_NN_vi_surface : function pointer decelerations
671             else static if( __traits( isSame, extension, NN_vi_surface )) {
672                 PFN_vkCreateViSurfaceNN                                               vkCreateViSurfaceNN;
673             }
674 
675             // VK_EXT_acquire_xlib_display : function pointer decelerations
676             else static if( __traits( isSame, extension, EXT_acquire_xlib_display )) {
677                 PFN_vkAcquireXlibDisplayEXT                                           vkAcquireXlibDisplayEXT;
678                 PFN_vkGetRandROutputDisplayEXT                                        vkGetRandROutputDisplayEXT;
679             }
680 
681             // VK_MVK_ios_surface : function pointer decelerations
682             else static if( __traits( isSame, extension, MVK_ios_surface )) {
683                 PFN_vkCreateIOSSurfaceMVK                                             vkCreateIOSSurfaceMVK;
684             }
685 
686             // VK_MVK_macos_surface : function pointer decelerations
687             else static if( __traits( isSame, extension, MVK_macos_surface )) {
688                 PFN_vkCreateMacOSSurfaceMVK                                           vkCreateMacOSSurfaceMVK;
689             }
690 
691             // VK_ANDROID_external_memory_android_hardware_buffer : function pointer decelerations
692             else static if( __traits( isSame, extension, ANDROID_external_memory_android_hardware_buffer )) {
693                 PFN_vkGetAndroidHardwareBufferPropertiesANDROID                       vkGetAndroidHardwareBufferPropertiesANDROID;
694                 PFN_vkGetMemoryAndroidHardwareBufferANDROID                           vkGetMemoryAndroidHardwareBufferANDROID;
695             }
696 
697             // VK_FUCHSIA_imagepipe_surface : function pointer decelerations
698             else static if( __traits( isSame, extension, FUCHSIA_imagepipe_surface )) {
699                 PFN_vkCreateImagePipeSurfaceFUCHSIA                                   vkCreateImagePipeSurfaceFUCHSIA;
700             }
701 
702             // VK_EXT_metal_surface : function pointer decelerations
703             else static if( __traits( isSame, extension, EXT_metal_surface )) {
704                 PFN_vkCreateMetalSurfaceEXT                                           vkCreateMetalSurfaceEXT;
705             }
706 
707             // VK_EXT_full_screen_exclusive : function pointer decelerations
708             else static if( __traits( isSame, extension, EXT_full_screen_exclusive )) {
709                 PFN_vkGetPhysicalDeviceSurfacePresentModes2EXT                        vkGetPhysicalDeviceSurfacePresentModes2EXT;
710                 PFN_vkAcquireFullScreenExclusiveModeEXT                               vkAcquireFullScreenExclusiveModeEXT;
711                 PFN_vkReleaseFullScreenExclusiveModeEXT                               vkReleaseFullScreenExclusiveModeEXT;
712                 PFN_vkGetDeviceGroupSurfacePresentModes2EXT                           vkGetDeviceGroupSurfacePresentModes2EXT;
713             }
714         }
715     }
716 
717     // compose a new loadInstanceLevelFunctions function out of
718     // unextended original function and additional function pointers from extensions
719     void loadInstanceLevelFunctions( VkInstance instance ) {
720 
721         // first load all non platform related function pointers from implementation
722         erupted.functions.loadInstanceLevelFunctions( instance );
723 
724         // 2. loop through alias sequence and mixin corresponding
725         // instance level function pointer definitions
726         static foreach( extension; noDuplicateExtensions ) {
727 
728             // VK_KHR_xlib_surface : load instance level function definitions
729             static if( __traits( isSame, extension, KHR_xlib_surface )) {
730                 vkCreateXlibSurfaceKHR                                            = cast( PFN_vkCreateXlibSurfaceKHR                                            ) vkGetInstanceProcAddr( instance, "vkCreateXlibSurfaceKHR" );
731                 vkGetPhysicalDeviceXlibPresentationSupportKHR                     = cast( PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR                     ) vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceXlibPresentationSupportKHR" );
732             }
733 
734             // VK_KHR_xcb_surface : load instance level function definitions
735             else static if( __traits( isSame, extension, KHR_xcb_surface )) {
736                 vkCreateXcbSurfaceKHR                                             = cast( PFN_vkCreateXcbSurfaceKHR                                             ) vkGetInstanceProcAddr( instance, "vkCreateXcbSurfaceKHR" );
737                 vkGetPhysicalDeviceXcbPresentationSupportKHR                      = cast( PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR                      ) vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceXcbPresentationSupportKHR" );
738             }
739 
740             // VK_KHR_wayland_surface : load instance level function definitions
741             else static if( __traits( isSame, extension, KHR_wayland_surface )) {
742                 vkCreateWaylandSurfaceKHR                                         = cast( PFN_vkCreateWaylandSurfaceKHR                                         ) vkGetInstanceProcAddr( instance, "vkCreateWaylandSurfaceKHR" );
743                 vkGetPhysicalDeviceWaylandPresentationSupportKHR                  = cast( PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR                  ) vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceWaylandPresentationSupportKHR" );
744             }
745 
746             // VK_KHR_android_surface : load instance level function definitions
747             else static if( __traits( isSame, extension, KHR_android_surface )) {
748                 vkCreateAndroidSurfaceKHR                                         = cast( PFN_vkCreateAndroidSurfaceKHR                                         ) vkGetInstanceProcAddr( instance, "vkCreateAndroidSurfaceKHR" );
749             }
750 
751             // VK_KHR_win32_surface : load instance level function definitions
752             else static if( __traits( isSame, extension, KHR_win32_surface )) {
753                 vkCreateWin32SurfaceKHR                                           = cast( PFN_vkCreateWin32SurfaceKHR                                           ) vkGetInstanceProcAddr( instance, "vkCreateWin32SurfaceKHR" );
754                 vkGetPhysicalDeviceWin32PresentationSupportKHR                    = cast( PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR                    ) vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceWin32PresentationSupportKHR" );
755             }
756 
757             // VK_GGP_stream_descriptor_surface : load instance level function definitions
758             else static if( __traits( isSame, extension, GGP_stream_descriptor_surface )) {
759                 vkCreateStreamDescriptorSurfaceGGP                                = cast( PFN_vkCreateStreamDescriptorSurfaceGGP                                ) vkGetInstanceProcAddr( instance, "vkCreateStreamDescriptorSurfaceGGP" );
760             }
761 
762             // VK_NN_vi_surface : load instance level function definitions
763             else static if( __traits( isSame, extension, NN_vi_surface )) {
764                 vkCreateViSurfaceNN                                               = cast( PFN_vkCreateViSurfaceNN                                               ) vkGetInstanceProcAddr( instance, "vkCreateViSurfaceNN" );
765             }
766 
767             // VK_EXT_acquire_xlib_display : load instance level function definitions
768             else static if( __traits( isSame, extension, EXT_acquire_xlib_display )) {
769                 vkAcquireXlibDisplayEXT                                           = cast( PFN_vkAcquireXlibDisplayEXT                                           ) vkGetInstanceProcAddr( instance, "vkAcquireXlibDisplayEXT" );
770                 vkGetRandROutputDisplayEXT                                        = cast( PFN_vkGetRandROutputDisplayEXT                                        ) vkGetInstanceProcAddr( instance, "vkGetRandROutputDisplayEXT" );
771             }
772 
773             // VK_MVK_ios_surface : load instance level function definitions
774             else static if( __traits( isSame, extension, MVK_ios_surface )) {
775                 vkCreateIOSSurfaceMVK                                             = cast( PFN_vkCreateIOSSurfaceMVK                                             ) vkGetInstanceProcAddr( instance, "vkCreateIOSSurfaceMVK" );
776             }
777 
778             // VK_MVK_macos_surface : load instance level function definitions
779             else static if( __traits( isSame, extension, MVK_macos_surface )) {
780                 vkCreateMacOSSurfaceMVK                                           = cast( PFN_vkCreateMacOSSurfaceMVK                                           ) vkGetInstanceProcAddr( instance, "vkCreateMacOSSurfaceMVK" );
781             }
782 
783             // VK_FUCHSIA_imagepipe_surface : load instance level function definitions
784             else static if( __traits( isSame, extension, FUCHSIA_imagepipe_surface )) {
785                 vkCreateImagePipeSurfaceFUCHSIA                                   = cast( PFN_vkCreateImagePipeSurfaceFUCHSIA                                   ) vkGetInstanceProcAddr( instance, "vkCreateImagePipeSurfaceFUCHSIA" );
786             }
787 
788             // VK_EXT_metal_surface : load instance level function definitions
789             else static if( __traits( isSame, extension, EXT_metal_surface )) {
790                 vkCreateMetalSurfaceEXT                                           = cast( PFN_vkCreateMetalSurfaceEXT                                           ) vkGetInstanceProcAddr( instance, "vkCreateMetalSurfaceEXT" );
791             }
792 
793             // VK_EXT_full_screen_exclusive : load instance level function definitions
794             else static if( __traits( isSame, extension, EXT_full_screen_exclusive )) {
795                 vkGetPhysicalDeviceSurfacePresentModes2EXT                        = cast( PFN_vkGetPhysicalDeviceSurfacePresentModes2EXT                        ) vkGetInstanceProcAddr( instance, "vkGetPhysicalDeviceSurfacePresentModes2EXT" );
796             }
797         }
798     }
799 
800     // compose a new loadDeviceLevelFunctions function out of
801     // unextended original function and additional function pointers from extensions
802     void loadDeviceLevelFunctions( VkInstance instance ) {
803 
804         // first load all non platform related function pointers from implementation
805         erupted.functions.loadDeviceLevelFunctions( instance );
806 
807         // 3. loop through alias sequence and mixin corresponding
808         // instance based device level function pointer definitions
809         static foreach( extension; noDuplicateExtensions ) {
810 
811             // VK_KHR_external_memory_win32 : load instance based device level function definitions
812             static if( __traits( isSame, extension, KHR_external_memory_win32 )) {
813                 vkGetMemoryWin32HandleKHR                      = cast( PFN_vkGetMemoryWin32HandleKHR                      ) vkGetInstanceProcAddr( instance, "vkGetMemoryWin32HandleKHR" );
814                 vkGetMemoryWin32HandlePropertiesKHR            = cast( PFN_vkGetMemoryWin32HandlePropertiesKHR            ) vkGetInstanceProcAddr( instance, "vkGetMemoryWin32HandlePropertiesKHR" );
815             }
816 
817             // VK_KHR_external_semaphore_win32 : load instance based device level function definitions
818             else static if( __traits( isSame, extension, KHR_external_semaphore_win32 )) {
819                 vkImportSemaphoreWin32HandleKHR                = cast( PFN_vkImportSemaphoreWin32HandleKHR                ) vkGetInstanceProcAddr( instance, "vkImportSemaphoreWin32HandleKHR" );
820                 vkGetSemaphoreWin32HandleKHR                   = cast( PFN_vkGetSemaphoreWin32HandleKHR                   ) vkGetInstanceProcAddr( instance, "vkGetSemaphoreWin32HandleKHR" );
821             }
822 
823             // VK_KHR_external_fence_win32 : load instance based device level function definitions
824             else static if( __traits( isSame, extension, KHR_external_fence_win32 )) {
825                 vkImportFenceWin32HandleKHR                    = cast( PFN_vkImportFenceWin32HandleKHR                    ) vkGetInstanceProcAddr( instance, "vkImportFenceWin32HandleKHR" );
826                 vkGetFenceWin32HandleKHR                       = cast( PFN_vkGetFenceWin32HandleKHR                       ) vkGetInstanceProcAddr( instance, "vkGetFenceWin32HandleKHR" );
827             }
828 
829             // VK_NV_external_memory_win32 : load instance based device level function definitions
830             else static if( __traits( isSame, extension, NV_external_memory_win32 )) {
831                 vkGetMemoryWin32HandleNV                       = cast( PFN_vkGetMemoryWin32HandleNV                       ) vkGetInstanceProcAddr( instance, "vkGetMemoryWin32HandleNV" );
832             }
833 
834             // VK_ANDROID_external_memory_android_hardware_buffer : load instance based device level function definitions
835             else static if( __traits( isSame, extension, ANDROID_external_memory_android_hardware_buffer )) {
836                 vkGetAndroidHardwareBufferPropertiesANDROID    = cast( PFN_vkGetAndroidHardwareBufferPropertiesANDROID    ) vkGetInstanceProcAddr( instance, "vkGetAndroidHardwareBufferPropertiesANDROID" );
837                 vkGetMemoryAndroidHardwareBufferANDROID        = cast( PFN_vkGetMemoryAndroidHardwareBufferANDROID        ) vkGetInstanceProcAddr( instance, "vkGetMemoryAndroidHardwareBufferANDROID" );
838             }
839 
840             // VK_EXT_full_screen_exclusive : load instance based device level function definitions
841             else static if( __traits( isSame, extension, EXT_full_screen_exclusive )) {
842                 vkAcquireFullScreenExclusiveModeEXT            = cast( PFN_vkAcquireFullScreenExclusiveModeEXT            ) vkGetInstanceProcAddr( instance, "vkAcquireFullScreenExclusiveModeEXT" );
843                 vkReleaseFullScreenExclusiveModeEXT            = cast( PFN_vkReleaseFullScreenExclusiveModeEXT            ) vkGetInstanceProcAddr( instance, "vkReleaseFullScreenExclusiveModeEXT" );
844                 vkGetDeviceGroupSurfacePresentModes2EXT        = cast( PFN_vkGetDeviceGroupSurfacePresentModes2EXT        ) vkGetInstanceProcAddr( instance, "vkGetDeviceGroupSurfacePresentModes2EXT" );
845             }
846         }
847     }
848 
849     // compose a new device based loadDeviceLevelFunctions function
850     // out of unextended original and additional function pointers from extensions
851     void loadDeviceLevelFunctions( VkDevice device ) {
852 
853         // first load all non platform related function pointers from implementation
854         erupted.functions.loadDeviceLevelFunctions( device );
855 
856         // 4. loop through alias sequence and mixin corresponding
857         // device based device level function pointer definitions
858         static foreach( extension; noDuplicateExtensions ) {
859 
860             // VK_KHR_external_memory_win32 : load device based device level function definitions
861             static if( __traits( isSame, extension, KHR_external_memory_win32 )) {
862                 vkGetMemoryWin32HandleKHR                      = cast( PFN_vkGetMemoryWin32HandleKHR                      ) vkGetDeviceProcAddr( device, "vkGetMemoryWin32HandleKHR" );
863                 vkGetMemoryWin32HandlePropertiesKHR            = cast( PFN_vkGetMemoryWin32HandlePropertiesKHR            ) vkGetDeviceProcAddr( device, "vkGetMemoryWin32HandlePropertiesKHR" );
864             }
865 
866             // VK_KHR_external_semaphore_win32 : load device based device level function definitions
867             else static if( __traits( isSame, extension, KHR_external_semaphore_win32 )) {
868                 vkImportSemaphoreWin32HandleKHR                = cast( PFN_vkImportSemaphoreWin32HandleKHR                ) vkGetDeviceProcAddr( device, "vkImportSemaphoreWin32HandleKHR" );
869                 vkGetSemaphoreWin32HandleKHR                   = cast( PFN_vkGetSemaphoreWin32HandleKHR                   ) vkGetDeviceProcAddr( device, "vkGetSemaphoreWin32HandleKHR" );
870             }
871 
872             // VK_KHR_external_fence_win32 : load device based device level function definitions
873             else static if( __traits( isSame, extension, KHR_external_fence_win32 )) {
874                 vkImportFenceWin32HandleKHR                    = cast( PFN_vkImportFenceWin32HandleKHR                    ) vkGetDeviceProcAddr( device, "vkImportFenceWin32HandleKHR" );
875                 vkGetFenceWin32HandleKHR                       = cast( PFN_vkGetFenceWin32HandleKHR                       ) vkGetDeviceProcAddr( device, "vkGetFenceWin32HandleKHR" );
876             }
877 
878             // VK_NV_external_memory_win32 : load device based device level function definitions
879             else static if( __traits( isSame, extension, NV_external_memory_win32 )) {
880                 vkGetMemoryWin32HandleNV                       = cast( PFN_vkGetMemoryWin32HandleNV                       ) vkGetDeviceProcAddr( device, "vkGetMemoryWin32HandleNV" );
881             }
882 
883             // VK_ANDROID_external_memory_android_hardware_buffer : load device based device level function definitions
884             else static if( __traits( isSame, extension, ANDROID_external_memory_android_hardware_buffer )) {
885                 vkGetAndroidHardwareBufferPropertiesANDROID    = cast( PFN_vkGetAndroidHardwareBufferPropertiesANDROID    ) vkGetDeviceProcAddr( device, "vkGetAndroidHardwareBufferPropertiesANDROID" );
886                 vkGetMemoryAndroidHardwareBufferANDROID        = cast( PFN_vkGetMemoryAndroidHardwareBufferANDROID        ) vkGetDeviceProcAddr( device, "vkGetMemoryAndroidHardwareBufferANDROID" );
887             }
888 
889             // VK_EXT_full_screen_exclusive : load device based device level function definitions
890             else static if( __traits( isSame, extension, EXT_full_screen_exclusive )) {
891                 vkAcquireFullScreenExclusiveModeEXT            = cast( PFN_vkAcquireFullScreenExclusiveModeEXT            ) vkGetDeviceProcAddr( device, "vkAcquireFullScreenExclusiveModeEXT" );
892                 vkReleaseFullScreenExclusiveModeEXT            = cast( PFN_vkReleaseFullScreenExclusiveModeEXT            ) vkGetDeviceProcAddr( device, "vkReleaseFullScreenExclusiveModeEXT" );
893                 vkGetDeviceGroupSurfacePresentModes2EXT        = cast( PFN_vkGetDeviceGroupSurfacePresentModes2EXT        ) vkGetDeviceProcAddr( device, "vkGetDeviceGroupSurfacePresentModes2EXT" );
894             }
895         }
896     }
897 
898     // compose a new dispatch device out of unextended original dispatch device with
899     // extended device based loadDeviceLevelFunctions member function,
900     // device and command buffer based function pointer decelerations
901     struct DispatchDevice {
902 
903         // use unextended dispatch device from module erupted.functions as member and alias this
904         erupted.dispatch_device.DispatchDevice commonDispatchDevice;
905         alias commonDispatchDevice this;
906 
907         // Constructor forwards parameter 'device' to 'this.loadDeviceLevelFunctions'
908         this( VkDevice device ) {
909             this.loadDeviceLevelFunctions( device );
910         }
911 
912         // compose a new device based loadDeviceLevelFunctions member function
913         // out of unextended original and additional member function pointers from extensions
914         void loadDeviceLevelFunctions( VkDevice device ) {
915 
916             // first load all non platform related member function pointers of wrapped commonDispatchDevice
917             commonDispatchDevice.loadDeviceLevelFunctions( device );
918 
919             // 5. loop through alias sequence and mixin corresponding
920             // device level member function pointer definitions of this wrapping DispatchDevice
921             static foreach( extension; noDuplicateExtensions ) {
922 
923                 // VK_KHR_external_memory_win32 : load dispatch device member function definitions
924                 static if( __traits( isSame, extension, KHR_external_memory_win32 )) {
925                     vkGetMemoryWin32HandleKHR                      = cast( PFN_vkGetMemoryWin32HandleKHR                      ) vkGetDeviceProcAddr( device, "vkGetMemoryWin32HandleKHR" );
926                     vkGetMemoryWin32HandlePropertiesKHR            = cast( PFN_vkGetMemoryWin32HandlePropertiesKHR            ) vkGetDeviceProcAddr( device, "vkGetMemoryWin32HandlePropertiesKHR" );
927                 }
928 
929                 // VK_KHR_external_semaphore_win32 : load dispatch device member function definitions
930                 else static if( __traits( isSame, extension, KHR_external_semaphore_win32 )) {
931                     vkImportSemaphoreWin32HandleKHR                = cast( PFN_vkImportSemaphoreWin32HandleKHR                ) vkGetDeviceProcAddr( device, "vkImportSemaphoreWin32HandleKHR" );
932                     vkGetSemaphoreWin32HandleKHR                   = cast( PFN_vkGetSemaphoreWin32HandleKHR                   ) vkGetDeviceProcAddr( device, "vkGetSemaphoreWin32HandleKHR" );
933                 }
934 
935                 // VK_KHR_external_fence_win32 : load dispatch device member function definitions
936                 else static if( __traits( isSame, extension, KHR_external_fence_win32 )) {
937                     vkImportFenceWin32HandleKHR                    = cast( PFN_vkImportFenceWin32HandleKHR                    ) vkGetDeviceProcAddr( device, "vkImportFenceWin32HandleKHR" );
938                     vkGetFenceWin32HandleKHR                       = cast( PFN_vkGetFenceWin32HandleKHR                       ) vkGetDeviceProcAddr( device, "vkGetFenceWin32HandleKHR" );
939                 }
940 
941                 // VK_NV_external_memory_win32 : load dispatch device member function definitions
942                 else static if( __traits( isSame, extension, NV_external_memory_win32 )) {
943                     vkGetMemoryWin32HandleNV                       = cast( PFN_vkGetMemoryWin32HandleNV                       ) vkGetDeviceProcAddr( device, "vkGetMemoryWin32HandleNV" );
944                 }
945 
946                 // VK_ANDROID_external_memory_android_hardware_buffer : load dispatch device member function definitions
947                 else static if( __traits( isSame, extension, ANDROID_external_memory_android_hardware_buffer )) {
948                     vkGetAndroidHardwareBufferPropertiesANDROID    = cast( PFN_vkGetAndroidHardwareBufferPropertiesANDROID    ) vkGetDeviceProcAddr( device, "vkGetAndroidHardwareBufferPropertiesANDROID" );
949                     vkGetMemoryAndroidHardwareBufferANDROID        = cast( PFN_vkGetMemoryAndroidHardwareBufferANDROID        ) vkGetDeviceProcAddr( device, "vkGetMemoryAndroidHardwareBufferANDROID" );
950                 }
951 
952                 // VK_EXT_full_screen_exclusive : load dispatch device member function definitions
953                 else static if( __traits( isSame, extension, EXT_full_screen_exclusive )) {
954                     vkAcquireFullScreenExclusiveModeEXT            = cast( PFN_vkAcquireFullScreenExclusiveModeEXT            ) vkGetDeviceProcAddr( device, "vkAcquireFullScreenExclusiveModeEXT" );
955                     vkReleaseFullScreenExclusiveModeEXT            = cast( PFN_vkReleaseFullScreenExclusiveModeEXT            ) vkGetDeviceProcAddr( device, "vkReleaseFullScreenExclusiveModeEXT" );
956                     vkGetDeviceGroupSurfacePresentModes2EXT        = cast( PFN_vkGetDeviceGroupSurfacePresentModes2EXT        ) vkGetDeviceProcAddr( device, "vkGetDeviceGroupSurfacePresentModes2EXT" );
957                 }
958             }
959         }
960 
961         // 6. loop through alias sequence and mixin corresponding convenience member functions
962         // omitting device parameter of this wrapping DispatchDevice. Member vkDevice of commonDispatchDevice is used instead
963         static foreach( extension; noDuplicateExtensions ) {
964 
965             // VK_KHR_external_memory_win32 : dispatch device convenience member functions
966             static if( __traits( isSame, extension, KHR_external_memory_win32 )) {
967                 VkResult  GetMemoryWin32HandleKHR( const( VkMemoryGetWin32HandleInfoKHR )* pGetWin32HandleInfo, HANDLE* pHandle ) { return vkGetMemoryWin32HandleKHR( vkDevice, pGetWin32HandleInfo, pHandle ); }
968                 VkResult  GetMemoryWin32HandlePropertiesKHR( VkExternalMemoryHandleTypeFlagBits handleType, HANDLE handle, VkMemoryWin32HandlePropertiesKHR* pMemoryWin32HandleProperties ) { return vkGetMemoryWin32HandlePropertiesKHR( vkDevice, handleType, handle, pMemoryWin32HandleProperties ); }
969             }
970 
971             // VK_KHR_external_semaphore_win32 : dispatch device convenience member functions
972             else static if( __traits( isSame, extension, KHR_external_semaphore_win32 )) {
973                 VkResult  ImportSemaphoreWin32HandleKHR( const( VkImportSemaphoreWin32HandleInfoKHR )* pImportSemaphoreWin32HandleInfo ) { return vkImportSemaphoreWin32HandleKHR( vkDevice, pImportSemaphoreWin32HandleInfo ); }
974                 VkResult  GetSemaphoreWin32HandleKHR( const( VkSemaphoreGetWin32HandleInfoKHR )* pGetWin32HandleInfo, HANDLE* pHandle ) { return vkGetSemaphoreWin32HandleKHR( vkDevice, pGetWin32HandleInfo, pHandle ); }
975             }
976 
977             // VK_KHR_external_fence_win32 : dispatch device convenience member functions
978             else static if( __traits( isSame, extension, KHR_external_fence_win32 )) {
979                 VkResult  ImportFenceWin32HandleKHR( const( VkImportFenceWin32HandleInfoKHR )* pImportFenceWin32HandleInfo ) { return vkImportFenceWin32HandleKHR( vkDevice, pImportFenceWin32HandleInfo ); }
980                 VkResult  GetFenceWin32HandleKHR( const( VkFenceGetWin32HandleInfoKHR )* pGetWin32HandleInfo, HANDLE* pHandle ) { return vkGetFenceWin32HandleKHR( vkDevice, pGetWin32HandleInfo, pHandle ); }
981             }
982 
983             // VK_NV_external_memory_win32 : dispatch device convenience member functions
984             else static if( __traits( isSame, extension, NV_external_memory_win32 )) {
985                 VkResult  GetMemoryWin32HandleNV( VkDeviceMemory memory, VkExternalMemoryHandleTypeFlagsNV handleType, HANDLE* pHandle ) { return vkGetMemoryWin32HandleNV( vkDevice, memory, handleType, pHandle ); }
986             }
987 
988             // VK_ANDROID_external_memory_android_hardware_buffer : dispatch device convenience member functions
989             else static if( __traits( isSame, extension, ANDROID_external_memory_android_hardware_buffer )) {
990                 VkResult  GetAndroidHardwareBufferPropertiesANDROID( const( AHardwareBuffer )* buffer, VkAndroidHardwareBufferPropertiesANDROID* pProperties ) { return vkGetAndroidHardwareBufferPropertiesANDROID( vkDevice, buffer, pProperties ); }
991                 VkResult  GetMemoryAndroidHardwareBufferANDROID( const( VkMemoryGetAndroidHardwareBufferInfoANDROID )* pInfo, AHardwareBuffer pBuffer ) { return vkGetMemoryAndroidHardwareBufferANDROID( vkDevice, pInfo, pBuffer ); }
992             }
993 
994             // VK_EXT_full_screen_exclusive : dispatch device convenience member functions
995             else static if( __traits( isSame, extension, EXT_full_screen_exclusive )) {
996                 VkResult  AcquireFullScreenExclusiveModeEXT( VkSwapchainKHR swapchain ) { return vkAcquireFullScreenExclusiveModeEXT( vkDevice, swapchain ); }
997                 VkResult  ReleaseFullScreenExclusiveModeEXT( VkSwapchainKHR swapchain ) { return vkReleaseFullScreenExclusiveModeEXT( vkDevice, swapchain ); }
998                 VkResult  GetDeviceGroupSurfacePresentModes2EXT( const( VkPhysicalDeviceSurfaceInfo2KHR )* pSurfaceInfo, VkDeviceGroupPresentModeFlagsKHR* pModes ) { return vkGetDeviceGroupSurfacePresentModes2EXT( vkDevice, pSurfaceInfo, pModes ); }
999             }
1000         }
1001 
1002         // 7. loop last time through alias sequence and mixin corresponding function pointer declarations
1003         static foreach( extension; noDuplicateExtensions ) {
1004 
1005             // VK_KHR_xlib_surface : dispatch device member function pointer decelerations
1006             static if( __traits( isSame, extension, KHR_xlib_surface )) {
1007                 PFN_vkCreateXlibSurfaceKHR                                            vkCreateXlibSurfaceKHR;
1008                 PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR                     vkGetPhysicalDeviceXlibPresentationSupportKHR;
1009             }
1010 
1011             // VK_KHR_xcb_surface : dispatch device member function pointer decelerations
1012             else static if( __traits( isSame, extension, KHR_xcb_surface )) {
1013                 PFN_vkCreateXcbSurfaceKHR                                             vkCreateXcbSurfaceKHR;
1014                 PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR                      vkGetPhysicalDeviceXcbPresentationSupportKHR;
1015             }
1016 
1017             // VK_KHR_wayland_surface : dispatch device member function pointer decelerations
1018             else static if( __traits( isSame, extension, KHR_wayland_surface )) {
1019                 PFN_vkCreateWaylandSurfaceKHR                                         vkCreateWaylandSurfaceKHR;
1020                 PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR                  vkGetPhysicalDeviceWaylandPresentationSupportKHR;
1021             }
1022 
1023             // VK_KHR_android_surface : dispatch device member function pointer decelerations
1024             else static if( __traits( isSame, extension, KHR_android_surface )) {
1025                 PFN_vkCreateAndroidSurfaceKHR                                         vkCreateAndroidSurfaceKHR;
1026             }
1027 
1028             // VK_KHR_win32_surface : dispatch device member function pointer decelerations
1029             else static if( __traits( isSame, extension, KHR_win32_surface )) {
1030                 PFN_vkCreateWin32SurfaceKHR                                           vkCreateWin32SurfaceKHR;
1031                 PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR                    vkGetPhysicalDeviceWin32PresentationSupportKHR;
1032             }
1033 
1034             // VK_KHR_external_memory_win32 : dispatch device member function pointer decelerations
1035             else static if( __traits( isSame, extension, KHR_external_memory_win32 )) {
1036                 PFN_vkGetMemoryWin32HandleKHR                                         vkGetMemoryWin32HandleKHR;
1037                 PFN_vkGetMemoryWin32HandlePropertiesKHR                               vkGetMemoryWin32HandlePropertiesKHR;
1038             }
1039 
1040             // VK_KHR_external_semaphore_win32 : dispatch device member function pointer decelerations
1041             else static if( __traits( isSame, extension, KHR_external_semaphore_win32 )) {
1042                 PFN_vkImportSemaphoreWin32HandleKHR                                   vkImportSemaphoreWin32HandleKHR;
1043                 PFN_vkGetSemaphoreWin32HandleKHR                                      vkGetSemaphoreWin32HandleKHR;
1044             }
1045 
1046             // VK_KHR_external_fence_win32 : dispatch device member function pointer decelerations
1047             else static if( __traits( isSame, extension, KHR_external_fence_win32 )) {
1048                 PFN_vkImportFenceWin32HandleKHR                                       vkImportFenceWin32HandleKHR;
1049                 PFN_vkGetFenceWin32HandleKHR                                          vkGetFenceWin32HandleKHR;
1050             }
1051 
1052             // VK_GGP_stream_descriptor_surface : dispatch device member function pointer decelerations
1053             else static if( __traits( isSame, extension, GGP_stream_descriptor_surface )) {
1054                 PFN_vkCreateStreamDescriptorSurfaceGGP                                vkCreateStreamDescriptorSurfaceGGP;
1055             }
1056 
1057             // VK_NV_external_memory_win32 : dispatch device member function pointer decelerations
1058             else static if( __traits( isSame, extension, NV_external_memory_win32 )) {
1059                 PFN_vkGetMemoryWin32HandleNV                                          vkGetMemoryWin32HandleNV;
1060             }
1061 
1062             // VK_NN_vi_surface : dispatch device member function pointer decelerations
1063             else static if( __traits( isSame, extension, NN_vi_surface )) {
1064                 PFN_vkCreateViSurfaceNN                                               vkCreateViSurfaceNN;
1065             }
1066 
1067             // VK_EXT_acquire_xlib_display : dispatch device member function pointer decelerations
1068             else static if( __traits( isSame, extension, EXT_acquire_xlib_display )) {
1069                 PFN_vkAcquireXlibDisplayEXT                                           vkAcquireXlibDisplayEXT;
1070                 PFN_vkGetRandROutputDisplayEXT                                        vkGetRandROutputDisplayEXT;
1071             }
1072 
1073             // VK_MVK_ios_surface : dispatch device member function pointer decelerations
1074             else static if( __traits( isSame, extension, MVK_ios_surface )) {
1075                 PFN_vkCreateIOSSurfaceMVK                                             vkCreateIOSSurfaceMVK;
1076             }
1077 
1078             // VK_MVK_macos_surface : dispatch device member function pointer decelerations
1079             else static if( __traits( isSame, extension, MVK_macos_surface )) {
1080                 PFN_vkCreateMacOSSurfaceMVK                                           vkCreateMacOSSurfaceMVK;
1081             }
1082 
1083             // VK_ANDROID_external_memory_android_hardware_buffer : dispatch device member function pointer decelerations
1084             else static if( __traits( isSame, extension, ANDROID_external_memory_android_hardware_buffer )) {
1085                 PFN_vkGetAndroidHardwareBufferPropertiesANDROID                       vkGetAndroidHardwareBufferPropertiesANDROID;
1086                 PFN_vkGetMemoryAndroidHardwareBufferANDROID                           vkGetMemoryAndroidHardwareBufferANDROID;
1087             }
1088 
1089             // VK_FUCHSIA_imagepipe_surface : dispatch device member function pointer decelerations
1090             else static if( __traits( isSame, extension, FUCHSIA_imagepipe_surface )) {
1091                 PFN_vkCreateImagePipeSurfaceFUCHSIA                                   vkCreateImagePipeSurfaceFUCHSIA;
1092             }
1093 
1094             // VK_EXT_metal_surface : dispatch device member function pointer decelerations
1095             else static if( __traits( isSame, extension, EXT_metal_surface )) {
1096                 PFN_vkCreateMetalSurfaceEXT                                           vkCreateMetalSurfaceEXT;
1097             }
1098 
1099             // VK_EXT_full_screen_exclusive : dispatch device member function pointer decelerations
1100             else static if( __traits( isSame, extension, EXT_full_screen_exclusive )) {
1101                 PFN_vkGetPhysicalDeviceSurfacePresentModes2EXT                        vkGetPhysicalDeviceSurfacePresentModes2EXT;
1102                 PFN_vkAcquireFullScreenExclusiveModeEXT                               vkAcquireFullScreenExclusiveModeEXT;
1103                 PFN_vkReleaseFullScreenExclusiveModeEXT                               vkReleaseFullScreenExclusiveModeEXT;
1104                 PFN_vkGetDeviceGroupSurfacePresentModes2EXT                           vkGetDeviceGroupSurfacePresentModes2EXT;
1105             }
1106         }
1107     }
1108 }