SDL_gpu_vulkan_vkfuncs.h 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179
  1. /*
  2. Simple DirectMedia Layer
  3. Copyright (C) 1997-2026 Sam Lantinga <slouken@libsdl.org>
  4. This software is provided 'as-is', without any express or implied
  5. warranty. In no event will the authors be held liable for any damages
  6. arising from the use of this software.
  7. Permission is granted to anyone to use this software for any purpose,
  8. including commercial applications, and to alter it and redistribute it
  9. freely, subject to the following restrictions:
  10. 1. The origin of this software must not be misrepresented; you must not
  11. claim that you wrote the original software. If you use this software
  12. in a product, an acknowledgment in the product documentation would be
  13. appreciated but is not required.
  14. 2. Altered source versions must be plainly marked as such, and must not be
  15. misrepresented as being the original software.
  16. 3. This notice may not be removed or altered from any source distribution.
  17. */
  18. /*
  19. * Global functions from the Vulkan Loader
  20. */
  21. #ifndef VULKAN_GLOBAL_FUNCTION
  22. #define VULKAN_GLOBAL_FUNCTION(name)
  23. #endif
  24. VULKAN_GLOBAL_FUNCTION(vkCreateInstance)
  25. VULKAN_GLOBAL_FUNCTION(vkEnumerateInstanceExtensionProperties)
  26. VULKAN_GLOBAL_FUNCTION(vkEnumerateInstanceLayerProperties)
  27. /*
  28. * vkInstance, created by global vkCreateInstance function
  29. */
  30. #ifndef VULKAN_INSTANCE_FUNCTION
  31. #define VULKAN_INSTANCE_FUNCTION(name)
  32. #endif
  33. // Vulkan 1.0
  34. VULKAN_INSTANCE_FUNCTION(vkGetDeviceProcAddr)
  35. VULKAN_INSTANCE_FUNCTION(vkCreateDevice)
  36. VULKAN_INSTANCE_FUNCTION(vkDestroyInstance)
  37. VULKAN_INSTANCE_FUNCTION(vkEnumerateDeviceExtensionProperties)
  38. VULKAN_INSTANCE_FUNCTION(vkEnumeratePhysicalDevices)
  39. VULKAN_INSTANCE_FUNCTION(vkGetPhysicalDeviceFeatures)
  40. VULKAN_INSTANCE_FUNCTION(vkGetPhysicalDeviceQueueFamilyProperties)
  41. VULKAN_INSTANCE_FUNCTION(vkGetPhysicalDeviceFormatProperties)
  42. VULKAN_INSTANCE_FUNCTION(vkGetPhysicalDeviceImageFormatProperties)
  43. VULKAN_INSTANCE_FUNCTION(vkGetPhysicalDeviceMemoryProperties)
  44. VULKAN_INSTANCE_FUNCTION(vkGetPhysicalDeviceProperties)
  45. // Vulkan 1.1 (Needed for opt-in feature checks)
  46. VULKAN_INSTANCE_FUNCTION(vkGetPhysicalDeviceFeatures2)
  47. // VK_KHR_get_physical_device_properties2, needed for KHR_driver_properties
  48. VULKAN_INSTANCE_FUNCTION(vkGetPhysicalDeviceProperties2KHR)
  49. // VK_KHR_surface
  50. VULKAN_INSTANCE_FUNCTION(vkDestroySurfaceKHR)
  51. VULKAN_INSTANCE_FUNCTION(vkGetPhysicalDeviceSurfaceCapabilitiesKHR)
  52. VULKAN_INSTANCE_FUNCTION(vkGetPhysicalDeviceSurfaceFormatsKHR)
  53. VULKAN_INSTANCE_FUNCTION(vkGetPhysicalDeviceSurfacePresentModesKHR)
  54. VULKAN_INSTANCE_FUNCTION(vkGetPhysicalDeviceSurfaceSupportKHR)
  55. // VK_EXT_debug_utils
  56. VULKAN_INSTANCE_FUNCTION(vkCmdBeginDebugUtilsLabelEXT)
  57. VULKAN_INSTANCE_FUNCTION(vkSetDebugUtilsObjectNameEXT)
  58. VULKAN_INSTANCE_FUNCTION(vkCmdEndDebugUtilsLabelEXT)
  59. VULKAN_INSTANCE_FUNCTION(vkCmdInsertDebugUtilsLabelEXT)
  60. /*
  61. * vkDevice, created by a vkInstance
  62. */
  63. #ifndef VULKAN_DEVICE_FUNCTION
  64. #define VULKAN_DEVICE_FUNCTION(name)
  65. #endif
  66. // Vulkan 1.0
  67. VULKAN_DEVICE_FUNCTION(vkAllocateCommandBuffers)
  68. VULKAN_DEVICE_FUNCTION(vkAllocateDescriptorSets)
  69. VULKAN_DEVICE_FUNCTION(vkAllocateMemory)
  70. VULKAN_DEVICE_FUNCTION(vkBeginCommandBuffer)
  71. VULKAN_DEVICE_FUNCTION(vkBindBufferMemory)
  72. VULKAN_DEVICE_FUNCTION(vkBindImageMemory)
  73. VULKAN_DEVICE_FUNCTION(vkCmdBeginRenderPass)
  74. VULKAN_DEVICE_FUNCTION(vkCmdBindDescriptorSets)
  75. VULKAN_DEVICE_FUNCTION(vkCmdBindIndexBuffer)
  76. VULKAN_DEVICE_FUNCTION(vkCmdBindPipeline)
  77. VULKAN_DEVICE_FUNCTION(vkCmdBindVertexBuffers)
  78. VULKAN_DEVICE_FUNCTION(vkCmdBlitImage)
  79. VULKAN_DEVICE_FUNCTION(vkCmdClearAttachments)
  80. VULKAN_DEVICE_FUNCTION(vkCmdClearColorImage)
  81. VULKAN_DEVICE_FUNCTION(vkCmdClearDepthStencilImage)
  82. VULKAN_DEVICE_FUNCTION(vkCmdCopyBuffer)
  83. VULKAN_DEVICE_FUNCTION(vkCmdCopyImage)
  84. VULKAN_DEVICE_FUNCTION(vkCmdCopyBufferToImage)
  85. VULKAN_DEVICE_FUNCTION(vkCmdCopyImageToBuffer)
  86. VULKAN_DEVICE_FUNCTION(vkCmdDispatch)
  87. VULKAN_DEVICE_FUNCTION(vkCmdDispatchIndirect)
  88. VULKAN_DEVICE_FUNCTION(vkCmdDraw)
  89. VULKAN_DEVICE_FUNCTION(vkCmdDrawIndexed)
  90. VULKAN_DEVICE_FUNCTION(vkCmdDrawIndexedIndirect)
  91. VULKAN_DEVICE_FUNCTION(vkCmdDrawIndirect)
  92. VULKAN_DEVICE_FUNCTION(vkCmdEndRenderPass)
  93. VULKAN_DEVICE_FUNCTION(vkCmdPipelineBarrier)
  94. VULKAN_DEVICE_FUNCTION(vkCmdResolveImage)
  95. VULKAN_DEVICE_FUNCTION(vkCmdSetBlendConstants)
  96. VULKAN_DEVICE_FUNCTION(vkCmdSetDepthBias)
  97. VULKAN_DEVICE_FUNCTION(vkCmdSetScissor)
  98. VULKAN_DEVICE_FUNCTION(vkCmdSetStencilReference)
  99. VULKAN_DEVICE_FUNCTION(vkCmdSetViewport)
  100. VULKAN_DEVICE_FUNCTION(vkCreateBuffer)
  101. VULKAN_DEVICE_FUNCTION(vkCreateCommandPool)
  102. VULKAN_DEVICE_FUNCTION(vkCreateDescriptorPool)
  103. VULKAN_DEVICE_FUNCTION(vkCreateDescriptorSetLayout)
  104. VULKAN_DEVICE_FUNCTION(vkCreateFence)
  105. VULKAN_DEVICE_FUNCTION(vkCreateFramebuffer)
  106. VULKAN_DEVICE_FUNCTION(vkCreateComputePipelines)
  107. VULKAN_DEVICE_FUNCTION(vkCreateGraphicsPipelines)
  108. VULKAN_DEVICE_FUNCTION(vkCreateImage)
  109. VULKAN_DEVICE_FUNCTION(vkCreateImageView)
  110. VULKAN_DEVICE_FUNCTION(vkCreatePipelineCache)
  111. VULKAN_DEVICE_FUNCTION(vkCreatePipelineLayout)
  112. VULKAN_DEVICE_FUNCTION(vkCreateRenderPass)
  113. VULKAN_DEVICE_FUNCTION(vkCreateSampler)
  114. VULKAN_DEVICE_FUNCTION(vkCreateSemaphore)
  115. VULKAN_DEVICE_FUNCTION(vkCreateShaderModule)
  116. VULKAN_DEVICE_FUNCTION(vkDestroyBuffer)
  117. VULKAN_DEVICE_FUNCTION(vkDestroyCommandPool)
  118. VULKAN_DEVICE_FUNCTION(vkDestroyDescriptorPool)
  119. VULKAN_DEVICE_FUNCTION(vkDestroyDescriptorSetLayout)
  120. VULKAN_DEVICE_FUNCTION(vkDestroyDevice)
  121. VULKAN_DEVICE_FUNCTION(vkDestroyFence)
  122. VULKAN_DEVICE_FUNCTION(vkDestroyFramebuffer)
  123. VULKAN_DEVICE_FUNCTION(vkDestroyImage)
  124. VULKAN_DEVICE_FUNCTION(vkDestroyImageView)
  125. VULKAN_DEVICE_FUNCTION(vkDestroyPipeline)
  126. VULKAN_DEVICE_FUNCTION(vkDestroyPipelineCache)
  127. VULKAN_DEVICE_FUNCTION(vkDestroyPipelineLayout)
  128. VULKAN_DEVICE_FUNCTION(vkDestroyRenderPass)
  129. VULKAN_DEVICE_FUNCTION(vkDestroySampler)
  130. VULKAN_DEVICE_FUNCTION(vkDestroySemaphore)
  131. VULKAN_DEVICE_FUNCTION(vkDestroyShaderModule)
  132. VULKAN_DEVICE_FUNCTION(vkDeviceWaitIdle)
  133. VULKAN_DEVICE_FUNCTION(vkEndCommandBuffer)
  134. VULKAN_DEVICE_FUNCTION(vkFreeCommandBuffers)
  135. VULKAN_DEVICE_FUNCTION(vkFreeMemory)
  136. VULKAN_DEVICE_FUNCTION(vkGetDeviceQueue)
  137. VULKAN_DEVICE_FUNCTION(vkGetPipelineCacheData)
  138. VULKAN_DEVICE_FUNCTION(vkGetFenceStatus)
  139. VULKAN_DEVICE_FUNCTION(vkGetBufferMemoryRequirements)
  140. VULKAN_DEVICE_FUNCTION(vkGetImageMemoryRequirements)
  141. VULKAN_DEVICE_FUNCTION(vkMapMemory)
  142. VULKAN_DEVICE_FUNCTION(vkQueueSubmit)
  143. VULKAN_DEVICE_FUNCTION(vkQueueWaitIdle)
  144. VULKAN_DEVICE_FUNCTION(vkResetCommandBuffer)
  145. VULKAN_DEVICE_FUNCTION(vkResetCommandPool)
  146. VULKAN_DEVICE_FUNCTION(vkResetDescriptorPool)
  147. VULKAN_DEVICE_FUNCTION(vkResetFences)
  148. VULKAN_DEVICE_FUNCTION(vkUnmapMemory)
  149. VULKAN_DEVICE_FUNCTION(vkUpdateDescriptorSets)
  150. VULKAN_DEVICE_FUNCTION(vkWaitForFences)
  151. // VK_KHR_swapchain
  152. VULKAN_DEVICE_FUNCTION(vkAcquireNextImageKHR)
  153. VULKAN_DEVICE_FUNCTION(vkCreateSwapchainKHR)
  154. VULKAN_DEVICE_FUNCTION(vkDestroySwapchainKHR)
  155. VULKAN_DEVICE_FUNCTION(vkQueuePresentKHR)
  156. VULKAN_DEVICE_FUNCTION(vkGetSwapchainImagesKHR)
  157. /*
  158. * Redefine these every time you include this header!
  159. */
  160. #undef VULKAN_GLOBAL_FUNCTION
  161. #undef VULKAN_INSTANCE_FUNCTION
  162. #undef VULKAN_DEVICE_FUNCTION