1
1

vulkan.d 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319
  1. /*
  2. Boost Software License - Version 1.0 - August 17th, 2003
  3. Permission is hereby granted, free of charge, to any person or organization
  4. obtaining a copy of the software and accompanying documentation covered by
  5. this license (the "Software") to use, reproduce, display, distribute,
  6. execute, and transmit the Software, and to prepare derivative works of the
  7. Software, and to permit third-parties to whom the Software is furnished to
  8. do so, all subject to the following:
  9. The copyright notices in the Software and this entire statement, including
  10. the above license grant, this restriction and the following disclaimer,
  11. must be included in all copies of the Software, in whole or in part, and
  12. all derivative works of the Software, unless such copies or derivative
  13. works are solely in the form of machine-executable object code generated by
  14. a source language processor.
  15. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  16. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  17. FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
  18. SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
  19. FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
  20. ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
  21. DEALINGS IN THE SOFTWARE.
  22. */
  23. module derelict.vulkan.vulkan;
  24. public
  25. {
  26. import derelict.vulkan.vk;
  27. import derelict.vulkan.functions;
  28. }
  29. private
  30. {
  31. import derelict.util.loader;
  32. import derelict.util.system;
  33. static if(Derelict_OS_Windows)
  34. enum libNames = "vulkan.dll";
  35. //~ else static if(Derelict_OS_Mac)
  36. //~ enum libNames = "libglfw.3.dylib";
  37. //~ else static if(Derelict_OS_Posix)
  38. //~ enum libNames = "libglfw3.so,libglfw.so.3,/usr/local/lib/libglfw3.so,/usr/local/lib/libglfw.so.3";
  39. else
  40. static assert(0, "Need to implement vulkan libNames for this operating system.");
  41. }
  42. class DerelictVulkanLoader : SharedLibLoader
  43. {
  44. protected
  45. {
  46. override void loadSymbols()
  47. {
  48. bindFunc(cast(void**)&vkAllocationFunction, "vkAllocationFunction");
  49. bindFunc(cast(void**)&vkReallocationFunction, "vkReallocationFunction");
  50. bindFunc(cast(void**)&vkFreeFunction, "vkFreeFunction");
  51. bindFunc(cast(void**)&vkInternalAllocationNotification, "vkInternalAllocationNotification");
  52. bindFunc(cast(void**)&vkInternalFreeNotification, "vkInternalFreeNotification");
  53. bindFunc(cast(void**)&vkVoidFunction, "vkVoidFunction");
  54. bindFunc(cast(void**)&vkCreateInstance, "vkCreateInstance");
  55. bindFunc(cast(void**)&vkDestroyInstance, "vkDestroyInstance");
  56. bindFunc(cast(void**)&vkEnumeratePhysicalDevices, "vkEnumeratePhysicalDevices");
  57. bindFunc(cast(void**)&vkGetPhysicalDeviceFeatures, "vkGetPhysicalDeviceFeatures");
  58. bindFunc(cast(void**)&vkGetPhysicalDeviceFormatProperties, "vkGetPhysicalDeviceFormatProperties");
  59. bindFunc(cast(void**)&vkGetPhysicalDeviceImageFormatProperties, "vkGetPhysicalDeviceImageFormatProperties");
  60. bindFunc(cast(void**)&vkGetPhysicalDeviceProperties, "vkGetPhysicalDeviceProperties");
  61. bindFunc(cast(void**)&vkGetPhysicalDeviceQueueFamilyProperties, "vkGetPhysicalDeviceQueueFamilyProperties");
  62. bindFunc(cast(void**)&vkGetPhysicalDeviceMemoryProperties, "vkGetPhysicalDeviceMemoryProperties");
  63. bindFunc(cast(void**)&vkGetInstanceProcAddr, "vkGetInstanceProcAddr");
  64. bindFunc(cast(void**)&vkGetDeviceProcAddr, "vkGetDeviceProcAddr");
  65. bindFunc(cast(void**)&vkCreateDevice, "vkCreateDevice");
  66. bindFunc(cast(void**)&vkDestroyDevice, "vkDestroyDevice");
  67. bindFunc(cast(void**)&vkEnumerateInstanceExtensionProperties, "vkEnumerateInstanceExtensionProperties");
  68. bindFunc(cast(void**)&vkEnumerateDeviceExtensionProperties, "vkEnumerateDeviceExtensionProperties");
  69. bindFunc(cast(void**)&vkEnumerateInstanceLayerProperties, "vkEnumerateInstanceLayerProperties");
  70. bindFunc(cast(void**)&vkEnumerateDeviceLayerProperties, "vkEnumerateDeviceLayerProperties");
  71. bindFunc(cast(void**)&vkGetDeviceQueue, "vkGetDeviceQueue");
  72. bindFunc(cast(void**)&vkQueueSubmit, "vkQueueSubmit");
  73. bindFunc(cast(void**)&vkQueueWaitIdle, "vkQueueWaitIdle");
  74. bindFunc(cast(void**)&vkDeviceWaitIdle, "vkDeviceWaitIdle");
  75. bindFunc(cast(void**)&vkAllocateMemory, "vkAllocateMemory");
  76. bindFunc(cast(void**)&vkFreeMemory, "vkFreeMemory");
  77. bindFunc(cast(void**)&vkMapMemory, "vkMapMemory");
  78. bindFunc(cast(void**)&vkUnmapMemory, "vkUnmapMemory");
  79. bindFunc(cast(void**)&vkFlushMappedMemoryRanges, "vkFlushMappedMemoryRanges");
  80. bindFunc(cast(void**)&vkInvalidateMappedMemoryRanges, "vkInvalidateMappedMemoryRanges");
  81. bindFunc(cast(void**)&vkGetDeviceMemoryCommitment, "vkGetDeviceMemoryCommitment");
  82. bindFunc(cast(void**)&vkBindBufferMemory, "vkBindBufferMemory");
  83. bindFunc(cast(void**)&vkBindImageMemory, "vkBindImageMemory");
  84. bindFunc(cast(void**)&vkGetBufferMemoryRequirements, "vkGetBufferMemoryRequirements");
  85. bindFunc(cast(void**)&vkGetImageMemoryRequirements, "vkGetImageMemoryRequirements");
  86. bindFunc(cast(void**)&vkGetImageSparseMemoryRequirements, "vkGetImageSparseMemoryRequirements");
  87. bindFunc(cast(void**)&vkGetPhysicalDeviceSparseImageFormatProperties, "vkGetPhysicalDeviceSparseImageFormatProperties");
  88. bindFunc(cast(void**)&vkQueueBindSparse, "vkQueueBindSparse");
  89. bindFunc(cast(void**)&vkCreateFence, "vkCreateFence");
  90. bindFunc(cast(void**)&vkDestroyFence, "vkDestroyFence");
  91. bindFunc(cast(void**)&vkResetFences, "vkResetFences");
  92. bindFunc(cast(void**)&vkGetFenceStatus, "vkGetFenceStatus");
  93. bindFunc(cast(void**)&vkWaitForFences, "vkWaitForFences");
  94. bindFunc(cast(void**)&vkCreateSemaphore, "vkCreateSemaphore");
  95. bindFunc(cast(void**)&vkDestroySemaphore, "vkDestroySemaphore");
  96. bindFunc(cast(void**)&vkCreateEvent, "vkCreateEvent");
  97. bindFunc(cast(void**)&vkDestroyEvent, "vkDestroyEvent");
  98. bindFunc(cast(void**)&vkGetEventStatus, "vkGetEventStatus");
  99. bindFunc(cast(void**)&vkSetEvent, "vkSetEvent");
  100. bindFunc(cast(void**)&vkAllocationFunction, "vkAllocationFunction");
  101. bindFunc(cast(void**)&vkReallocationFunction, "vkReallocationFunction");
  102. bindFunc(cast(void**)&vkFreeFunction, "vkFreeFunction");
  103. bindFunc(cast(void**)&vkInternalAllocationNotification, "vkInternalAllocationNotification");
  104. bindFunc(cast(void**)&vkInternalFreeNotification, "vkInternalFreeNotification");
  105. bindFunc(cast(void**)&vkVoidFunction, "vkVoidFunction");
  106. bindFunc(cast(void**)&vkCreateInstance, "vkCreateInstance");
  107. bindFunc(cast(void**)&vkDestroyInstance, "vkDestroyInstance");
  108. bindFunc(cast(void**)&vkEnumeratePhysicalDevices, "vkEnumeratePhysicalDevices");
  109. bindFunc(cast(void**)&vkGetPhysicalDeviceFeatures, "vkGetPhysicalDeviceFeatures");
  110. bindFunc(cast(void**)&vkGetPhysicalDeviceFormatProperties, "vkGetPhysicalDeviceFormatProperties");
  111. bindFunc(cast(void**)&vkGetPhysicalDeviceImageFormatProperties, "vkGetPhysicalDeviceImageFormatProperties");
  112. bindFunc(cast(void**)&vkGetPhysicalDeviceProperties, "vkGetPhysicalDeviceProperties");
  113. bindFunc(cast(void**)&vkGetPhysicalDeviceQueueFamilyProperties, "vkGetPhysicalDeviceQueueFamilyProperties");
  114. bindFunc(cast(void**)&vkGetPhysicalDeviceMemoryProperties, "vkGetPhysicalDeviceMemoryProperties");
  115. bindFunc(cast(void**)&vkGetInstanceProcAddr, "vkGetInstanceProcAddr");
  116. bindFunc(cast(void**)&vkGetDeviceProcAddr, "vkGetDeviceProcAddr");
  117. bindFunc(cast(void**)&vkCreateDevice, "vkCreateDevice");
  118. bindFunc(cast(void**)&vkDestroyDevice, "vkDestroyDevice");
  119. bindFunc(cast(void**)&vkEnumerateInstanceExtensionProperties, "vkEnumerateInstanceExtensionProperties");
  120. bindFunc(cast(void**)&vkEnumerateDeviceExtensionProperties, "vkEnumerateDeviceExtensionProperties");
  121. bindFunc(cast(void**)&vkEnumerateInstanceLayerProperties, "vkEnumerateInstanceLayerProperties");
  122. bindFunc(cast(void**)&vkEnumerateDeviceLayerProperties, "vkEnumerateDeviceLayerProperties");
  123. bindFunc(cast(void**)&vkGetDeviceQueue, "vkGetDeviceQueue");
  124. bindFunc(cast(void**)&vkQueueSubmit, "vkQueueSubmit");
  125. bindFunc(cast(void**)&vkQueueWaitIdle, "vkQueueWaitIdle");
  126. bindFunc(cast(void**)&vkDeviceWaitIdle, "vkDeviceWaitIdle");
  127. bindFunc(cast(void**)&vkAllocateMemory, "vkAllocateMemory");
  128. bindFunc(cast(void**)&vkFreeMemory, "vkFreeMemory");
  129. bindFunc(cast(void**)&vkMapMemory, "vkMapMemory");
  130. bindFunc(cast(void**)&vkUnmapMemory, "vkUnmapMemory");
  131. bindFunc(cast(void**)&vkFlushMappedMemoryRanges, "vkFlushMappedMemoryRanges");
  132. bindFunc(cast(void**)&vkInvalidateMappedMemoryRanges, "vkInvalidateMappedMemoryRanges");
  133. bindFunc(cast(void**)&vkGetDeviceMemoryCommitment, "vkGetDeviceMemoryCommitment");
  134. bindFunc(cast(void**)&vkBindBufferMemory, "vkBindBufferMemory");
  135. bindFunc(cast(void**)&vkBindImageMemory, "vkBindImageMemory");
  136. bindFunc(cast(void**)&vkGetBufferMemoryRequirements, "vkGetBufferMemoryRequirements");
  137. bindFunc(cast(void**)&vkGetImageMemoryRequirements, "vkGetImageMemoryRequirements");
  138. bindFunc(cast(void**)&vkGetImageSparseMemoryRequirements, "vkGetImageSparseMemoryRequirements");
  139. bindFunc(cast(void**)&vkGetPhysicalDeviceSparseImageFormatProperties, "vkGetPhysicalDeviceSparseImageFormatProperties");
  140. bindFunc(cast(void**)&vkQueueBindSparse, "vkQueueBindSparse");
  141. bindFunc(cast(void**)&vkCreateFence, "vkCreateFence");
  142. bindFunc(cast(void**)&vkDestroyFence, "vkDestroyFence");
  143. bindFunc(cast(void**)&vkResetFences, "vkResetFences");
  144. bindFunc(cast(void**)&vkGetFenceStatus, "vkGetFenceStatus");
  145. bindFunc(cast(void**)&vkWaitForFences, "vkWaitForFences");
  146. bindFunc(cast(void**)&vkCreateSemaphore, "vkCreateSemaphore");
  147. bindFunc(cast(void**)&vkDestroySemaphore, "vkDestroySemaphore");
  148. bindFunc(cast(void**)&vkCreateEvent, "vkCreateEvent");
  149. bindFunc(cast(void**)&vkDestroyEvent, "vkDestroyEvent");
  150. bindFunc(cast(void**)&vkGetEventStatus, "vkGetEventStatus");
  151. bindFunc(cast(void**)&vkSetEvent, "vkSetEvent");
  152. bindFunc(cast(void**)&vkResetEvent, "vkResetEvent");
  153. bindFunc(cast(void**)&vkCreateQueryPool, "vkCreateQueryPool");
  154. bindFunc(cast(void**)&vkDestroyQueryPool, "vkDestroyQueryPool");
  155. bindFunc(cast(void**)&vkGetQueryPoolResults, "vkGetQueryPoolResults");
  156. bindFunc(cast(void**)&vkCreateBuffer, "vkCreateBuffer");
  157. bindFunc(cast(void**)&vkDestroyBuffer, "vkDestroyBuffer");
  158. bindFunc(cast(void**)&vkCreateBufferView, "vkCreateBufferView");
  159. bindFunc(cast(void**)&vkDestroyBufferView, "vkDestroyBufferView");
  160. bindFunc(cast(void**)&vkCreateImage, "vkCreateImage");
  161. bindFunc(cast(void**)&vkDestroyImage, "vkDestroyImage");
  162. bindFunc(cast(void**)&vkGetImageSubresourceLayout, "vkGetImageSubresourceLayout");
  163. bindFunc(cast(void**)&vkCreateImageView, "vkCreateImageView");
  164. bindFunc(cast(void**)&vkDestroyImageView, "vkDestroyImageView");
  165. bindFunc(cast(void**)&vkCreateShaderModule, "vkCreateShaderModule");
  166. bindFunc(cast(void**)&vkDestroyShaderModule, "vkDestroyShaderModule");
  167. bindFunc(cast(void**)&vkCreatePipelineCache, "vkCreatePipelineCache");
  168. bindFunc(cast(void**)&vkDestroyPipelineCache, "vkDestroyPipelineCache");
  169. bindFunc(cast(void**)&vkGetPipelineCacheData, "vkGetPipelineCacheData");
  170. bindFunc(cast(void**)&vkMergePipelineCaches, "vkMergePipelineCaches");
  171. bindFunc(cast(void**)&vkCreateGraphicsPipelines, "vkCreateGraphicsPipelines");
  172. bindFunc(cast(void**)&vkCreateComputePipelines, "vkCreateComputePipelines");
  173. bindFunc(cast(void**)&vkDestroyPipeline, "vkDestroyPipeline");
  174. bindFunc(cast(void**)&vkCreatePipelineLayout, "vkCreatePipelineLayout");
  175. bindFunc(cast(void**)&vkDestroyPipelineLayout, "vkDestroyPipelineLayout");
  176. bindFunc(cast(void**)&vkCreateSampler, "vkCreateSampler");
  177. bindFunc(cast(void**)&vkDestroySampler, "vkDestroySampler");
  178. bindFunc(cast(void**)&vkCreateDescriptorSetLayout, "vkCreateDescriptorSetLayout");
  179. bindFunc(cast(void**)&vkDestroyDescriptorSetLayout, "vkDestroyDescriptorSetLayout");
  180. bindFunc(cast(void**)&vkCreateDescriptorPool, "vkCreateDescriptorPool");
  181. bindFunc(cast(void**)&vkDestroyDescriptorPool, "vkDestroyDescriptorPool");
  182. bindFunc(cast(void**)&vkResetDescriptorPool, "vkResetDescriptorPool");
  183. bindFunc(cast(void**)&vkAllocateDescriptorSets, "vkAllocateDescriptorSets");
  184. bindFunc(cast(void**)&vkFreeDescriptorSets, "vkFreeDescriptorSets");
  185. bindFunc(cast(void**)&vkUpdateDescriptorSets, "vkUpdateDescriptorSets");
  186. bindFunc(cast(void**)&vkCreateFramebuffer, "vkCreateFramebuffer");
  187. bindFunc(cast(void**)&vkDestroyFramebuffer, "vkDestroyFramebuffer");
  188. bindFunc(cast(void**)&vkCreateRenderPass, "vkCreateRenderPass");
  189. bindFunc(cast(void**)&vkDestroyRenderPass, "vkDestroyRenderPass");
  190. bindFunc(cast(void**)&vkGetRenderAreaGranularity, "vkGetRenderAreaGranularity");
  191. bindFunc(cast(void**)&vkCreateCommandPool, "vkCreateCommandPool");
  192. bindFunc(cast(void**)&vkDestroyCommandPool, "vkDestroyCommandPool");
  193. bindFunc(cast(void**)&vkResetCommandPool, "vkResetCommandPool");
  194. bindFunc(cast(void**)&vkAllocateCommandBuffers, "vkAllocateCommandBuffers");
  195. bindFunc(cast(void**)&vkFreeCommandBuffers, "vkFreeCommandBuffers");
  196. bindFunc(cast(void**)&vkBeginCommandBuffer, "vkBeginCommandBuffer");
  197. bindFunc(cast(void**)&vkEndCommandBuffer, "vkEndCommandBuffer");
  198. bindFunc(cast(void**)&vkResetCommandBuffer, "vkResetCommandBuffer");
  199. bindFunc(cast(void**)&vkCmdBindPipeline, "vkCmdBindPipeline");
  200. bindFunc(cast(void**)&vkCmdSetViewport, "vkCmdSetViewport");
  201. bindFunc(cast(void**)&vkCmdSetScissor, "vkCmdSetScissor");
  202. bindFunc(cast(void**)&vkCmdSetLineWidth, "vkCmdSetLineWidth");
  203. bindFunc(cast(void**)&vkCmdSetDepthBias, "vkCmdSetDepthBias");
  204. bindFunc(cast(void**)&vkCmdSetBlendConstants, "vkCmdSetBlendConstants");
  205. bindFunc(cast(void**)&vkCmdSetDepthBounds, "vkCmdSetDepthBounds");
  206. bindFunc(cast(void**)&vkCmdSetStencilCompareMask, "vkCmdSetStencilCompareMask");
  207. bindFunc(cast(void**)&vkCmdSetStencilWriteMask, "vkCmdSetStencilWriteMask");
  208. bindFunc(cast(void**)&vkCmdSetStencilReference, "vkCmdSetStencilReference");
  209. bindFunc(cast(void**)&vkCmdBindDescriptorSets, "vkCmdBindDescriptorSets");
  210. bindFunc(cast(void**)&vkCmdBindIndexBuffer, "vkCmdBindIndexBuffer");
  211. bindFunc(cast(void**)&vkCmdBindVertexBuffers, "vkCmdBindVertexBuffers");
  212. bindFunc(cast(void**)&vkCmdDraw, "vkCmdDraw");
  213. bindFunc(cast(void**)&vkCmdDrawIndexed, "vkCmdDrawIndexed");
  214. bindFunc(cast(void**)&vkCmdDrawIndirect, "vkCmdDrawIndirect");
  215. bindFunc(cast(void**)&vkCmdDrawIndexedIndirect, "vkCmdDrawIndexedIndirect");
  216. bindFunc(cast(void**)&vkCmdDispatch, "vkCmdDispatch");
  217. bindFunc(cast(void**)&vkCmdDispatchIndirect, "vkCmdDispatchIndirect");
  218. bindFunc(cast(void**)&vkCmdCopyBuffer, "vkCmdCopyBuffer");
  219. bindFunc(cast(void**)&vkCmdCopyImage, "vkCmdCopyImage");
  220. bindFunc(cast(void**)&vkCmdBlitImage, "vkCmdBlitImage");
  221. bindFunc(cast(void**)&vkCmdCopyBufferToImage, "vkCmdCopyBufferToImage");
  222. bindFunc(cast(void**)&vkCmdCopyImageToBuffer, "vkCmdCopyImageToBuffer");
  223. bindFunc(cast(void**)&vkCmdUpdateBuffer, "vkCmdUpdateBuffer");
  224. bindFunc(cast(void**)&vkCmdFillBuffer, "vkCmdFillBuffer");
  225. bindFunc(cast(void**)&vkCmdClearColorImage, "vkCmdClearColorImage");
  226. bindFunc(cast(void**)&vkCmdClearDepthStencilImage, "vkCmdClearDepthStencilImage");
  227. bindFunc(cast(void**)&vkCmdClearAttachments, "vkCmdClearAttachments");
  228. bindFunc(cast(void**)&vkCmdResolveImage, "vkCmdResolveImage");
  229. bindFunc(cast(void**)&vkCmdSetEvent, "vkCmdSetEvent");
  230. bindFunc(cast(void**)&vkCmdResetEvent, "vkCmdResetEvent");
  231. bindFunc(cast(void**)&vkCmdWaitEvents, "vkCmdWaitEvents");
  232. bindFunc(cast(void**)&vkCmdPipelineBarrier, "vkCmdPipelineBarrier");
  233. bindFunc(cast(void**)&vkCmdBeginQuery, "vkCmdBeginQuery");
  234. bindFunc(cast(void**)&vkCmdEndQuery, "vkCmdEndQuery");
  235. bindFunc(cast(void**)&vkCmdResetQueryPool, "vkCmdResetQueryPool");
  236. bindFunc(cast(void**)&vkCmdWriteTimestamp, "vkCmdWriteTimestamp");
  237. bindFunc(cast(void**)&vkCmdCopyQueryPoolResults, "vkCmdCopyQueryPoolResults");
  238. bindFunc(cast(void**)&vkCmdPushConstants, "vkCmdPushConstants");
  239. bindFunc(cast(void**)&vkCmdBeginRenderPass, "vkCmdBeginRenderPass");
  240. bindFunc(cast(void**)&vkCmdNextSubpass, "vkCmdNextSubpass");
  241. bindFunc(cast(void**)&vkCmdEndRenderPass, "vkCmdEndRenderPass");
  242. bindFunc(cast(void**)&vkCmdExecuteCommands, "vkCmdExecuteCommands");
  243. bindFunc(cast(void**)&vkDestroySurfaceKHR, "vkDestroySurfaceKHR");
  244. bindFunc(cast(void**)&vkGetPhysicalDeviceSurfaceSupportKHR, "vkGetPhysicalDeviceSurfaceSupportKHR");
  245. bindFunc(cast(void**)&vkGetPhysicalDeviceSurfaceCapabilitiesKHR, "vkGetPhysicalDeviceSurfaceCapabilitiesKHR");
  246. bindFunc(cast(void**)&vkGetPhysicalDeviceSurfaceFormatsKHR, "vkGetPhysicalDeviceSurfaceFormatsKHR");
  247. bindFunc(cast(void**)&vkGetPhysicalDeviceSurfacePresentModesKHR, "vkGetPhysicalDeviceSurfacePresentModesKHR");
  248. bindFunc(cast(void**)&vkCreateSwapchainKHR, "vkCreateSwapchainKHR");
  249. bindFunc(cast(void**)&vkDestroySwapchainKHR, "vkDestroySwapchainKHR");
  250. bindFunc(cast(void**)&vkGetSwapchainImagesKHR, "vkGetSwapchainImagesKHR");
  251. bindFunc(cast(void**)&vkAcquireNextImageKHR, "vkAcquireNextImageKHR");
  252. bindFunc(cast(void**)&vkQueuePresentKHR, "vkQueuePresentKHR");
  253. bindFunc(cast(void**)&vkGetPhysicalDeviceDisplayPropertiesKHR, "vkGetPhysicalDeviceDisplayPropertiesKHR");
  254. bindFunc(cast(void**)&vkGetPhysicalDeviceDisplayPlanePropertiesKHR, "vkGetPhysicalDeviceDisplayPlanePropertiesKHR");
  255. bindFunc(cast(void**)&vkGetDisplayPlaneSupportedDisplaysKHR, "vkGetDisplayPlaneSupportedDisplaysKHR");
  256. bindFunc(cast(void**)&vkGetDisplayModePropertiesKHR, "vkGetDisplayModePropertiesKHR");
  257. bindFunc(cast(void**)&vkCreateDisplayModeKHR, "vkCreateDisplayModeKHR");
  258. bindFunc(cast(void**)&vkGetDisplayPlaneCapabilitiesKHR, "vkGetDisplayPlaneCapabilitiesKHR");
  259. bindFunc(cast(void**)&vkCreateDisplayPlaneSurfaceKHR, "vkCreateDisplayPlaneSurfaceKHR");
  260. bindFunc(cast(void**)&vkCreateSharedSwapchainsKHR, "vkCreateSharedSwapchainsKHR");
  261. version(VK_USE_PLATFORM_XLIB_KHR) {
  262. bindFunc(cast(void**)&vkCreateXlibSurfaceKHR, "vkCreateXlibSurfaceKHR");
  263. bindFunc(cast(void**)&vkGetPhysicalDeviceXlibPresentationSupportKHR, "vkGetPhysicalDeviceXlibPresentationSupportKHR");
  264. }
  265. version(VK_USE_PLATFORM_XCB_KHR) {
  266. bindFunc(cast(void**)&vkCreateXcbSurfaceKHR, "vkCreateXcbSurfaceKHR");
  267. bindFunc(cast(void**)&vkGetPhysicalDeviceXcbPresentationSupportKHR, "vkGetPhysicalDeviceXcbPresentationSupportKHR");
  268. }
  269. version(VK_USE_PLATFORM_WAYLAND_KHR) {
  270. bindFunc(cast(void**)&vkCreateWaylandSurfaceKHR, "vkCreateWaylandSurfaceKHR");
  271. bindFunc(cast(void**)&vkGetPhysicalDeviceWaylandPresentationSupportKHR, "vkGetPhysicalDeviceWaylandPresentationSupportKHR");
  272. }
  273. version(VK_USE_PLATFORM_MIR_KHR) {
  274. bindFunc(cast(void**)&vkCreateMirSurfaceKHR, "vkCreateMirSurfaceKHR");
  275. bindFunc(cast(void**)&vkGetPhysicalDeviceMirPresentationSupportKHR, "vkGetPhysicalDeviceMirPresentationSupportKHR");
  276. }
  277. version(VK_USE_PLATFORM_ANDROID_KHR) {
  278. bindFunc(cast(void**)&vkCreateAndroidSurfaceKHR, "vkCreateAndroidSurfaceKHR");
  279. }
  280. version(VK_USE_PLATFORM_WIN32_KHR) {
  281. bindFunc(cast(void**)&vkCreateWin32SurfaceKHR, "vkCreateWin32SurfaceKHR");
  282. bindFunc(cast(void**)&vkGetPhysicalDeviceWin32PresentationSupportKHR, "vkGetPhysicalDeviceWin32PresentationSupportKHR");
  283. }
  284. bindFunc(cast(void**)&vkDebugReportCallbackEXT, "vkDebugReportCallbackEXT");
  285. bindFunc(cast(void**)&vkCreateDebugReportCallbackEXT, "vkCreateDebugReportCallbackEXT");
  286. bindFunc(cast(void**)&vkDestroyDebugReportCallbackEXT, "vkDestroyDebugReportCallbackEXT");
  287. bindFunc(cast(void**)&vkDebugReportMessageEXT, "vkDebugReportMessageEXT");
  288. }
  289. }
  290. public
  291. {
  292. this()
  293. {
  294. super(libNames);
  295. }
  296. }
  297. }
  298. __gshared DerelictVulkanLoader DerelictVulkan;
  299. shared static this()
  300. {
  301. DerelictVulkan = new DerelictVulkanLoader();
  302. }
  303. shared static ~this()
  304. {
  305. DerelictVulkan.unload();
  306. }