annotate semicongine/rendering/vulkan/platform/win32.nim @ 1207:804ff842d377 compiletime-tests

fix: problems with include-structure on windows
author sam@sambook-windows.localdomain
date Tue, 16 Jul 2024 15:56:55 +0700
parents ba1af13233ee
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1199
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
1 type
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
2 VkWin32SurfaceCreateInfoKHR* = object
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
3 sType*: VkStructureType
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
4 pNext*: pointer
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
5 flags*: VkWin32SurfaceCreateFlagsKHR
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
6 hinstance*: HINSTANCE
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
7 hwnd*: HWND
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
8 VkImportMemoryWin32HandleInfoNV* = object
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
9 sType*: VkStructureType
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
10 pNext*: pointer
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
11 handleType*: VkExternalMemoryHandleTypeFlagsNV
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
12 handle*: HANDLE
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
13 VkExportMemoryWin32HandleInfoNV* = object
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
14 sType*: VkStructureType
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
15 pNext*: pointer
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
16 pAttributes*: ptr SECURITY_ATTRIBUTES
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
17 dwAccess*: DWORD
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
18 VkWin32KeyedMutexAcquireReleaseInfoNV* = object
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
19 sType*: VkStructureType
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
20 pNext*: pointer
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
21 acquireCount*: uint32
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
22 pAcquireSyncs*: ptr VkDeviceMemory
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
23 pAcquireKeys*: ptr uint64
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
24 pAcquireTimeoutMilliseconds*: ptr uint32
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
25 releaseCount*: uint32
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
26 pReleaseSyncs*: ptr VkDeviceMemory
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
27 pReleaseKeys*: ptr uint64
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
28 VkImportMemoryWin32HandleInfoKHR* = object
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
29 sType*: VkStructureType
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
30 pNext*: pointer
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
31 handleType*: VkExternalMemoryHandleTypeFlagBits
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
32 handle*: HANDLE
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
33 name*: LPCWSTR
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
34 VkExportMemoryWin32HandleInfoKHR* = object
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
35 sType*: VkStructureType
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
36 pNext*: pointer
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
37 pAttributes*: ptr SECURITY_ATTRIBUTES
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
38 dwAccess*: DWORD
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
39 name*: LPCWSTR
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
40 VkMemoryWin32HandlePropertiesKHR* = object
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
41 sType*: VkStructureType
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
42 pNext*: pointer
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
43 memoryTypeBits*: uint32
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
44 VkMemoryGetWin32HandleInfoKHR* = object
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
45 sType*: VkStructureType
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
46 pNext*: pointer
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
47 memory*: VkDeviceMemory
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
48 handleType*: VkExternalMemoryHandleTypeFlagBits
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
49 VkWin32KeyedMutexAcquireReleaseInfoKHR* = object
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
50 sType*: VkStructureType
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
51 pNext*: pointer
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
52 acquireCount*: uint32
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
53 pAcquireSyncs*: ptr VkDeviceMemory
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
54 pAcquireKeys*: ptr uint64
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
55 pAcquireTimeouts*: ptr uint32
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
56 releaseCount*: uint32
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
57 pReleaseSyncs*: ptr VkDeviceMemory
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
58 pReleaseKeys*: ptr uint64
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
59 VkImportSemaphoreWin32HandleInfoKHR* = object
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
60 sType*: VkStructureType
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
61 pNext*: pointer
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
62 semaphore*: VkSemaphore
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
63 flags*: VkSemaphoreImportFlags
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
64 handleType*: VkExternalSemaphoreHandleTypeFlagBits
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
65 handle*: HANDLE
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
66 name*: LPCWSTR
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
67 VkExportSemaphoreWin32HandleInfoKHR* = object
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
68 sType*: VkStructureType
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
69 pNext*: pointer
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
70 pAttributes*: ptr SECURITY_ATTRIBUTES
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
71 dwAccess*: DWORD
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
72 name*: LPCWSTR
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
73 VkD3D12FenceSubmitInfoKHR* = object
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
74 sType*: VkStructureType
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
75 pNext*: pointer
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
76 waitSemaphoreValuesCount*: uint32
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
77 pWaitSemaphoreValues*: ptr uint64
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
78 signalSemaphoreValuesCount*: uint32
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
79 pSignalSemaphoreValues*: ptr uint64
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
80 VkSemaphoreGetWin32HandleInfoKHR* = object
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
81 sType*: VkStructureType
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
82 pNext*: pointer
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
83 semaphore*: VkSemaphore
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
84 handleType*: VkExternalSemaphoreHandleTypeFlagBits
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
85 VkImportFenceWin32HandleInfoKHR* = object
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
86 sType*: VkStructureType
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
87 pNext*: pointer
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
88 fence*: VkFence
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
89 flags*: VkFenceImportFlags
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
90 handleType*: VkExternalFenceHandleTypeFlagBits
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
91 handle*: HANDLE
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
92 name*: LPCWSTR
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
93 VkExportFenceWin32HandleInfoKHR* = object
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
94 sType*: VkStructureType
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
95 pNext*: pointer
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
96 pAttributes*: ptr SECURITY_ATTRIBUTES
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
97 dwAccess*: DWORD
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
98 name*: LPCWSTR
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
99 VkFenceGetWin32HandleInfoKHR* = object
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
100 sType*: VkStructureType
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
101 pNext*: pointer
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
102 fence*: VkFence
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
103 handleType*: VkExternalFenceHandleTypeFlagBits
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
104 VkSurfaceFullScreenExclusiveInfoEXT* = object
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
105 sType*: VkStructureType
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
106 pNext*: pointer
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
107 fullScreenExclusive*: VkFullScreenExclusiveEXT
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
108 VkSurfaceFullScreenExclusiveWin32InfoEXT* = object
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
109 sType*: VkStructureType
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
110 pNext*: pointer
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
111 hmonitor*: HMONITOR
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
112 VkSurfaceCapabilitiesFullScreenExclusiveEXT* = object
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
113 sType*: VkStructureType
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
114 pNext*: pointer
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
115 fullScreenExclusiveSupported*: VkBool32
1207
804ff842d377 fix: problems with include-structure on windows
sam@sambook-windows.localdomain
parents: 1199
diff changeset
116 HINSTANCE {.header: "windows.h".} = int
804ff842d377 fix: problems with include-structure on windows
sam@sambook-windows.localdomain
parents: 1199
diff changeset
117 HWND {.header: "windows.h".} = int
804ff842d377 fix: problems with include-structure on windows
sam@sambook-windows.localdomain
parents: 1199
diff changeset
118 HMONITOR {.header: "windows.h".} = int
804ff842d377 fix: problems with include-structure on windows
sam@sambook-windows.localdomain
parents: 1199
diff changeset
119 HANDLE {.header: "windows.h".} = int
804ff842d377 fix: problems with include-structure on windows
sam@sambook-windows.localdomain
parents: 1199
diff changeset
120 SECURITY_ATTRIBUTES {.header: "windows.h".} = object
804ff842d377 fix: problems with include-structure on windows
sam@sambook-windows.localdomain
parents: 1199
diff changeset
121 DWORD {.header: "windows.h".} = int32
804ff842d377 fix: problems with include-structure on windows
sam@sambook-windows.localdomain
parents: 1199
diff changeset
122 LPCWSTR {.header: "windows.h".} = ptr uint16
1199
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
123 # extension VK_KHR_external_semaphore_win32
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
124 var
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
125 vkImportSemaphoreWin32HandleKHR*: proc(device: VkDevice, pImportSemaphoreWin32HandleInfo: ptr VkImportSemaphoreWin32HandleInfoKHR): VkResult {.stdcall.}
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
126 vkGetSemaphoreWin32HandleKHR*: proc(device: VkDevice, pGetWin32HandleInfo: ptr VkSemaphoreGetWin32HandleInfoKHR, pHandle: ptr HANDLE): VkResult {.stdcall.}
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
127 proc loadVK_KHR_external_semaphore_win32*(instance: VkInstance) =
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
128 loadVK_VERSION_1_1(instance)
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
129 vkImportSemaphoreWin32HandleKHR = cast[proc(device: VkDevice, pImportSemaphoreWin32HandleInfo: ptr VkImportSemaphoreWin32HandleInfoKHR): VkResult {.stdcall.}](vkGetInstanceProcAddr(instance, "vkImportSemaphoreWin32HandleKHR"))
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
130 vkGetSemaphoreWin32HandleKHR = cast[proc(device: VkDevice, pGetWin32HandleInfo: ptr VkSemaphoreGetWin32HandleInfoKHR, pHandle: ptr HANDLE): VkResult {.stdcall.}](vkGetInstanceProcAddr(instance, "vkGetSemaphoreWin32HandleKHR"))
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
131
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
132 # extension VK_KHR_external_memory_win32
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
133 var
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
134 vkGetMemoryWin32HandleKHR*: proc(device: VkDevice, pGetWin32HandleInfo: ptr VkMemoryGetWin32HandleInfoKHR, pHandle: ptr HANDLE): VkResult {.stdcall.}
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
135 vkGetMemoryWin32HandlePropertiesKHR*: proc(device: VkDevice, handleType: VkExternalMemoryHandleTypeFlagBits, handle: HANDLE, pMemoryWin32HandleProperties: ptr VkMemoryWin32HandlePropertiesKHR): VkResult {.stdcall.}
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
136 proc loadVK_KHR_external_memory_win32*(instance: VkInstance) =
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
137 loadVK_VERSION_1_1(instance)
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
138 vkGetMemoryWin32HandleKHR = cast[proc(device: VkDevice, pGetWin32HandleInfo: ptr VkMemoryGetWin32HandleInfoKHR, pHandle: ptr HANDLE): VkResult {.stdcall.}](vkGetInstanceProcAddr(instance, "vkGetMemoryWin32HandleKHR"))
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
139 vkGetMemoryWin32HandlePropertiesKHR = cast[proc(device: VkDevice, handleType: VkExternalMemoryHandleTypeFlagBits, handle: HANDLE, pMemoryWin32HandleProperties: ptr VkMemoryWin32HandlePropertiesKHR): VkResult {.stdcall.}](vkGetInstanceProcAddr(instance, "vkGetMemoryWin32HandlePropertiesKHR"))
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
140
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
141 # extension VK_KHR_external_fence_win32
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
142 var
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
143 vkImportFenceWin32HandleKHR*: proc(device: VkDevice, pImportFenceWin32HandleInfo: ptr VkImportFenceWin32HandleInfoKHR): VkResult {.stdcall.}
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
144 vkGetFenceWin32HandleKHR*: proc(device: VkDevice, pGetWin32HandleInfo: ptr VkFenceGetWin32HandleInfoKHR, pHandle: ptr HANDLE): VkResult {.stdcall.}
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
145 proc loadVK_KHR_external_fence_win32*(instance: VkInstance) =
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
146 loadVK_VERSION_1_1(instance)
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
147 vkImportFenceWin32HandleKHR = cast[proc(device: VkDevice, pImportFenceWin32HandleInfo: ptr VkImportFenceWin32HandleInfoKHR): VkResult {.stdcall.}](vkGetInstanceProcAddr(instance, "vkImportFenceWin32HandleKHR"))
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
148 vkGetFenceWin32HandleKHR = cast[proc(device: VkDevice, pGetWin32HandleInfo: ptr VkFenceGetWin32HandleInfoKHR, pHandle: ptr HANDLE): VkResult {.stdcall.}](vkGetInstanceProcAddr(instance, "vkGetFenceWin32HandleKHR"))
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
149
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
150 proc loadVK_KHR_win32_keyed_mutex*(instance: VkInstance) =
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
151 loadVK_KHR_external_memory_win32(instance)
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
152
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
153 # extension VK_NV_external_memory_win32
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
154 var
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
155 vkGetMemoryWin32HandleNV*: proc(device: VkDevice, memory: VkDeviceMemory, handleType: VkExternalMemoryHandleTypeFlagsNV, pHandle: ptr HANDLE): VkResult {.stdcall.}
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
156 proc loadVK_NV_external_memory_win32*(instance: VkInstance) =
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
157 loadVK_NV_external_memory(instance)
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
158 vkGetMemoryWin32HandleNV = cast[proc(device: VkDevice, memory: VkDeviceMemory, handleType: VkExternalMemoryHandleTypeFlagsNV, pHandle: ptr HANDLE): VkResult {.stdcall.}](vkGetInstanceProcAddr(instance, "vkGetMemoryWin32HandleNV"))
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
159
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
160 # extension VK_EXT_full_screen_exclusive
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
161 var
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
162 vkGetPhysicalDeviceSurfacePresentModes2EXT*: proc(physicalDevice: VkPhysicalDevice, pSurfaceInfo: ptr VkPhysicalDeviceSurfaceInfo2KHR, pPresentModeCount: ptr uint32, pPresentModes: ptr VkPresentModeKHR): VkResult {.stdcall.}
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
163 vkAcquireFullScreenExclusiveModeEXT*: proc(device: VkDevice, swapchain: VkSwapchainKHR): VkResult {.stdcall.}
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
164 vkReleaseFullScreenExclusiveModeEXT*: proc(device: VkDevice, swapchain: VkSwapchainKHR): VkResult {.stdcall.}
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
165 vkGetDeviceGroupSurfacePresentModes2EXT*: proc(device: VkDevice, pSurfaceInfo: ptr VkPhysicalDeviceSurfaceInfo2KHR, pModes: ptr VkDeviceGroupPresentModeFlagsKHR): VkResult {.stdcall.}
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
166 proc loadVK_EXT_full_screen_exclusive*(instance: VkInstance) =
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
167 loadVK_VERSION_1_1(instance)
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
168 loadVK_KHR_surface(instance)
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
169 loadVK_KHR_get_surface_capabilities2(instance)
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
170 loadVK_KHR_swapchain(instance)
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
171 vkGetPhysicalDeviceSurfacePresentModes2EXT = cast[proc(physicalDevice: VkPhysicalDevice, pSurfaceInfo: ptr VkPhysicalDeviceSurfaceInfo2KHR, pPresentModeCount: ptr uint32, pPresentModes: ptr VkPresentModeKHR): VkResult {.stdcall.}](vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceSurfacePresentModes2EXT"))
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
172 vkAcquireFullScreenExclusiveModeEXT = cast[proc(device: VkDevice, swapchain: VkSwapchainKHR): VkResult {.stdcall.}](vkGetInstanceProcAddr(instance, "vkAcquireFullScreenExclusiveModeEXT"))
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
173 vkReleaseFullScreenExclusiveModeEXT = cast[proc(device: VkDevice, swapchain: VkSwapchainKHR): VkResult {.stdcall.}](vkGetInstanceProcAddr(instance, "vkReleaseFullScreenExclusiveModeEXT"))
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
174 vkGetDeviceGroupSurfacePresentModes2EXT = cast[proc(device: VkDevice, pSurfaceInfo: ptr VkPhysicalDeviceSurfaceInfo2KHR, pModes: ptr VkDeviceGroupPresentModeFlagsKHR): VkResult {.stdcall.}](vkGetInstanceProcAddr(instance, "vkGetDeviceGroupSurfacePresentModes2EXT"))
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
175 vkGetDeviceGroupSurfacePresentModes2EXT = cast[proc(device: VkDevice, pSurfaceInfo: ptr VkPhysicalDeviceSurfaceInfo2KHR, pModes: ptr VkDeviceGroupPresentModeFlagsKHR): VkResult {.stdcall.}](vkGetInstanceProcAddr(instance, "vkGetDeviceGroupSurfacePresentModes2EXT"))
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
176
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
177 # extension VK_KHR_win32_surface
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
178 var
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
179 vkCreateWin32SurfaceKHR*: proc(instance: VkInstance, pCreateInfo: ptr VkWin32SurfaceCreateInfoKHR, pAllocator: ptr VkAllocationCallbacks, pSurface: ptr VkSurfaceKHR): VkResult {.stdcall.}
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
180 vkGetPhysicalDeviceWin32PresentationSupportKHR*: proc(physicalDevice: VkPhysicalDevice, queueFamilyIndex: uint32): VkBool32 {.stdcall.}
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
181 proc loadVK_KHR_win32_surface*(instance: VkInstance) =
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
182 loadVK_KHR_surface(instance)
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
183 vkCreateWin32SurfaceKHR = cast[proc(instance: VkInstance, pCreateInfo: ptr VkWin32SurfaceCreateInfoKHR, pAllocator: ptr VkAllocationCallbacks, pSurface: ptr VkSurfaceKHR): VkResult {.stdcall.}](vkGetInstanceProcAddr(instance, "vkCreateWin32SurfaceKHR"))
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
184 vkGetPhysicalDeviceWin32PresentationSupportKHR = cast[proc(physicalDevice: VkPhysicalDevice, queueFamilyIndex: uint32): VkBool32 {.stdcall.}](vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceWin32PresentationSupportKHR"))
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
185
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
186 # extension VK_NV_acquire_winrt_display
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
187 var
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
188 vkAcquireWinrtDisplayNV*: proc(physicalDevice: VkPhysicalDevice, display: VkDisplayKHR): VkResult {.stdcall.}
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
189 vkGetWinrtDisplayNV*: proc(physicalDevice: VkPhysicalDevice, deviceRelativeId: uint32, pDisplay: ptr VkDisplayKHR): VkResult {.stdcall.}
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
190 proc loadVK_NV_acquire_winrt_display*(instance: VkInstance) =
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
191 loadVK_EXT_direct_mode_display(instance)
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
192 vkAcquireWinrtDisplayNV = cast[proc(physicalDevice: VkPhysicalDevice, display: VkDisplayKHR): VkResult {.stdcall.}](vkGetInstanceProcAddr(instance, "vkAcquireWinrtDisplayNV"))
ba1af13233ee add: working main-renderloop
sam <sam@basx.dev>
parents:
diff changeset
193 vkGetWinrtDisplayNV = cast[proc(physicalDevice: VkPhysicalDevice, deviceRelativeId: uint32, pDisplay: ptr VkDisplayKHR): VkResult {.stdcall.}](vkGetInstanceProcAddr(instance, "vkGetWinrtDisplayNV"))