Jesse Hall | d02edcb | 2015-09-08 07:44:48 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2015 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 17 | #ifndef LIBVULKAN_LOADER_H |
| 18 | #define LIBVULKAN_LOADER_H 1 |
| 19 | |
| 20 | #define VK_PROTOTYPES |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 21 | #define VK_USE_PLATFORM_ANDROID_KHR |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 22 | #include <vulkan/vulkan.h> |
Jesse Hall | b1352bc | 2015-09-04 16:12:33 -0700 | [diff] [blame] | 23 | #include <vulkan/vk_ext_android_native_buffer.h> |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 24 | |
| 25 | namespace vulkan { |
| 26 | |
Jesse Hall | b1352bc | 2015-09-04 16:12:33 -0700 | [diff] [blame] | 27 | // TODO(jessehall): The InstanceVtbl and DeviceVtbl both have a set of |
| 28 | // functions used in the app->layers/loader interface, and a different set of |
| 29 | // functions used only in the loader->driver interface. We should probably |
| 30 | // split them into two structures: one used for dispatch of application calls, |
| 31 | // and one to hold the driver entry points. |
| 32 | |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 33 | struct InstanceVtbl { |
| 34 | // clang-format off |
| 35 | VkInstance instance; |
| 36 | |
| 37 | PFN_vkCreateInstance CreateInstance; |
| 38 | PFN_vkDestroyInstance DestroyInstance; |
| 39 | PFN_vkGetInstanceProcAddr GetInstanceProcAddr; |
| 40 | PFN_vkEnumeratePhysicalDevices EnumeratePhysicalDevices; |
| 41 | |
| 42 | PFN_vkGetPhysicalDeviceFeatures GetPhysicalDeviceFeatures; |
| 43 | PFN_vkGetPhysicalDeviceFormatProperties GetPhysicalDeviceFormatProperties; |
| 44 | PFN_vkGetPhysicalDeviceImageFormatProperties GetPhysicalDeviceImageFormatProperties; |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 45 | PFN_vkGetPhysicalDeviceProperties GetPhysicalDeviceProperties; |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 46 | PFN_vkGetPhysicalDeviceQueueFamilyProperties GetPhysicalDeviceQueueFamilyProperties; |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 47 | PFN_vkGetPhysicalDeviceMemoryProperties GetPhysicalDeviceMemoryProperties; |
| 48 | PFN_vkCreateDevice CreateDevice; |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 49 | PFN_vkEnumerateDeviceExtensionProperties EnumerateDeviceExtensionProperties; |
| 50 | PFN_vkEnumerateDeviceLayerProperties EnumerateDeviceLayerProperties; |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 51 | PFN_vkGetPhysicalDeviceSparseImageFormatProperties GetPhysicalDeviceSparseImageFormatProperties; |
Jesse Hall | b1352bc | 2015-09-04 16:12:33 -0700 | [diff] [blame] | 52 | |
| 53 | // Layers and loader only, not implemented by drivers |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame^] | 54 | PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR GetPhysicalDeviceSurfaceCapabilitiesKHR; |
| 55 | PFN_vkGetPhysicalDeviceSurfaceFormatsKHR GetPhysicalDeviceSurfaceFormatsKHR; |
| 56 | PFN_vkGetPhysicalDeviceSurfacePresentModesKHR GetPhysicalDeviceSurfacePresentModesKHR; |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 57 | PFN_vkCreateAndroidSurfaceKHR CreateAndroidSurfaceKHR; |
| 58 | PFN_vkDestroySurfaceKHR DestroySurfaceKHR; |
Jesse Hall | b1352bc | 2015-09-04 16:12:33 -0700 | [diff] [blame] | 59 | PFN_vkGetPhysicalDeviceSurfaceSupportKHR GetPhysicalDeviceSurfaceSupportKHR; |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 60 | // clang-format on |
| 61 | }; |
| 62 | |
| 63 | struct DeviceVtbl { |
| 64 | void* device; |
| 65 | |
| 66 | PFN_vkGetDeviceProcAddr GetDeviceProcAddr; |
| 67 | PFN_vkDestroyDevice DestroyDevice; |
| 68 | PFN_vkGetDeviceQueue GetDeviceQueue; |
| 69 | PFN_vkDeviceWaitIdle DeviceWaitIdle; |
| 70 | PFN_vkAllocMemory AllocMemory; |
| 71 | PFN_vkFreeMemory FreeMemory; |
| 72 | PFN_vkMapMemory MapMemory; |
| 73 | PFN_vkUnmapMemory UnmapMemory; |
| 74 | PFN_vkFlushMappedMemoryRanges FlushMappedMemoryRanges; |
| 75 | PFN_vkInvalidateMappedMemoryRanges InvalidateMappedMemoryRanges; |
| 76 | PFN_vkGetDeviceMemoryCommitment GetDeviceMemoryCommitment; |
| 77 | PFN_vkBindBufferMemory BindBufferMemory; |
| 78 | PFN_vkBindImageMemory BindImageMemory; |
| 79 | PFN_vkGetBufferMemoryRequirements GetBufferMemoryRequirements; |
| 80 | PFN_vkGetImageMemoryRequirements GetImageMemoryRequirements; |
| 81 | PFN_vkGetImageSparseMemoryRequirements GetImageSparseMemoryRequirements; |
| 82 | PFN_vkCreateFence CreateFence; |
| 83 | PFN_vkDestroyFence DestroyFence; |
| 84 | PFN_vkResetFences ResetFences; |
| 85 | PFN_vkGetFenceStatus GetFenceStatus; |
| 86 | PFN_vkWaitForFences WaitForFences; |
| 87 | PFN_vkCreateSemaphore CreateSemaphore; |
| 88 | PFN_vkDestroySemaphore DestroySemaphore; |
| 89 | PFN_vkCreateEvent CreateEvent; |
| 90 | PFN_vkDestroyEvent DestroyEvent; |
| 91 | PFN_vkGetEventStatus GetEventStatus; |
| 92 | PFN_vkSetEvent SetEvent; |
| 93 | PFN_vkResetEvent ResetEvent; |
| 94 | PFN_vkCreateQueryPool CreateQueryPool; |
| 95 | PFN_vkDestroyQueryPool DestroyQueryPool; |
| 96 | PFN_vkGetQueryPoolResults GetQueryPoolResults; |
| 97 | PFN_vkCreateBuffer CreateBuffer; |
| 98 | PFN_vkDestroyBuffer DestroyBuffer; |
| 99 | PFN_vkCreateBufferView CreateBufferView; |
| 100 | PFN_vkDestroyBufferView DestroyBufferView; |
| 101 | PFN_vkCreateImage CreateImage; |
| 102 | PFN_vkDestroyImage DestroyImage; |
| 103 | PFN_vkGetImageSubresourceLayout GetImageSubresourceLayout; |
| 104 | PFN_vkCreateImageView CreateImageView; |
| 105 | PFN_vkDestroyImageView DestroyImageView; |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 106 | PFN_vkCreateShaderModule CreateShaderModule; |
| 107 | PFN_vkDestroyShaderModule DestroyShaderModule; |
| 108 | PFN_vkCreateShader CreateShader; |
| 109 | PFN_vkDestroyShader DestroyShader; |
| 110 | PFN_vkCreatePipelineCache CreatePipelineCache; |
| 111 | PFN_vkDestroyPipelineCache DestroyPipelineCache; |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 112 | PFN_vkGetPipelineCacheData GetPipelineCacheData; |
| 113 | PFN_vkMergePipelineCaches MergePipelineCaches; |
| 114 | PFN_vkCreateGraphicsPipelines CreateGraphicsPipelines; |
| 115 | PFN_vkCreateComputePipelines CreateComputePipelines; |
| 116 | PFN_vkDestroyPipeline DestroyPipeline; |
| 117 | PFN_vkCreatePipelineLayout CreatePipelineLayout; |
| 118 | PFN_vkDestroyPipelineLayout DestroyPipelineLayout; |
| 119 | PFN_vkCreateSampler CreateSampler; |
| 120 | PFN_vkDestroySampler DestroySampler; |
| 121 | PFN_vkCreateDescriptorSetLayout CreateDescriptorSetLayout; |
| 122 | PFN_vkDestroyDescriptorSetLayout DestroyDescriptorSetLayout; |
| 123 | PFN_vkCreateDescriptorPool CreateDescriptorPool; |
| 124 | PFN_vkDestroyDescriptorPool DestroyDescriptorPool; |
| 125 | PFN_vkResetDescriptorPool ResetDescriptorPool; |
| 126 | PFN_vkAllocDescriptorSets AllocDescriptorSets; |
| 127 | PFN_vkFreeDescriptorSets FreeDescriptorSets; |
| 128 | PFN_vkUpdateDescriptorSets UpdateDescriptorSets; |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 129 | PFN_vkCreateFramebuffer CreateFramebuffer; |
| 130 | PFN_vkDestroyFramebuffer DestroyFramebuffer; |
| 131 | PFN_vkCreateRenderPass CreateRenderPass; |
| 132 | PFN_vkDestroyRenderPass DestroyRenderPass; |
| 133 | PFN_vkGetRenderAreaGranularity GetRenderAreaGranularity; |
| 134 | PFN_vkCreateCommandPool CreateCommandPool; |
| 135 | PFN_vkDestroyCommandPool DestroyCommandPool; |
| 136 | PFN_vkResetCommandPool ResetCommandPool; |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 137 | PFN_vkAllocCommandBuffers AllocCommandBuffers; |
| 138 | PFN_vkFreeCommandBuffers FreeCommandBuffers; |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 139 | |
| 140 | PFN_vkQueueSubmit QueueSubmit; |
| 141 | PFN_vkQueueWaitIdle QueueWaitIdle; |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 142 | PFN_vkQueueBindSparse QueueBindSparse; |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 143 | |
| 144 | PFN_vkBeginCommandBuffer BeginCommandBuffer; |
| 145 | PFN_vkEndCommandBuffer EndCommandBuffer; |
| 146 | PFN_vkResetCommandBuffer ResetCommandBuffer; |
| 147 | PFN_vkCmdBindPipeline CmdBindPipeline; |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 148 | PFN_vkCmdSetViewport CmdSetViewport; |
| 149 | PFN_vkCmdSetScissor CmdSetScissor; |
| 150 | PFN_vkCmdSetLineWidth CmdSetLineWidth; |
| 151 | PFN_vkCmdSetDepthBias CmdSetDepthBias; |
| 152 | PFN_vkCmdSetBlendConstants CmdSetBlendConstants; |
| 153 | PFN_vkCmdSetDepthBounds CmdSetDepthBounds; |
| 154 | PFN_vkCmdSetStencilCompareMask CmdSetStencilCompareMask; |
| 155 | PFN_vkCmdSetStencilWriteMask CmdSetStencilWriteMask; |
| 156 | PFN_vkCmdSetStencilReference CmdSetStencilReference; |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 157 | PFN_vkCmdBindDescriptorSets CmdBindDescriptorSets; |
| 158 | PFN_vkCmdBindIndexBuffer CmdBindIndexBuffer; |
| 159 | PFN_vkCmdBindVertexBuffers CmdBindVertexBuffers; |
| 160 | PFN_vkCmdDraw CmdDraw; |
| 161 | PFN_vkCmdDrawIndexed CmdDrawIndexed; |
| 162 | PFN_vkCmdDrawIndirect CmdDrawIndirect; |
| 163 | PFN_vkCmdDrawIndexedIndirect CmdDrawIndexedIndirect; |
| 164 | PFN_vkCmdDispatch CmdDispatch; |
| 165 | PFN_vkCmdDispatchIndirect CmdDispatchIndirect; |
| 166 | PFN_vkCmdCopyBuffer CmdCopyBuffer; |
| 167 | PFN_vkCmdCopyImage CmdCopyImage; |
| 168 | PFN_vkCmdBlitImage CmdBlitImage; |
| 169 | PFN_vkCmdCopyBufferToImage CmdCopyBufferToImage; |
| 170 | PFN_vkCmdCopyImageToBuffer CmdCopyImageToBuffer; |
| 171 | PFN_vkCmdUpdateBuffer CmdUpdateBuffer; |
| 172 | PFN_vkCmdFillBuffer CmdFillBuffer; |
| 173 | PFN_vkCmdClearColorImage CmdClearColorImage; |
| 174 | PFN_vkCmdClearDepthStencilImage CmdClearDepthStencilImage; |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 175 | PFN_vkCmdClearAttachments CmdClearAttachments; |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 176 | PFN_vkCmdResolveImage CmdResolveImage; |
| 177 | PFN_vkCmdSetEvent CmdSetEvent; |
| 178 | PFN_vkCmdResetEvent CmdResetEvent; |
| 179 | PFN_vkCmdWaitEvents CmdWaitEvents; |
| 180 | PFN_vkCmdPipelineBarrier CmdPipelineBarrier; |
| 181 | PFN_vkCmdBeginQuery CmdBeginQuery; |
| 182 | PFN_vkCmdEndQuery CmdEndQuery; |
| 183 | PFN_vkCmdResetQueryPool CmdResetQueryPool; |
| 184 | PFN_vkCmdWriteTimestamp CmdWriteTimestamp; |
| 185 | PFN_vkCmdCopyQueryPoolResults CmdCopyQueryPoolResults; |
| 186 | PFN_vkCmdPushConstants CmdPushConstants; |
| 187 | PFN_vkCmdBeginRenderPass CmdBeginRenderPass; |
| 188 | PFN_vkCmdNextSubpass CmdNextSubpass; |
| 189 | PFN_vkCmdEndRenderPass CmdEndRenderPass; |
| 190 | PFN_vkCmdExecuteCommands CmdExecuteCommands; |
Jesse Hall | b1352bc | 2015-09-04 16:12:33 -0700 | [diff] [blame] | 191 | |
| 192 | // Layers and loader only, not implemented by drivers |
Jesse Hall | b1352bc | 2015-09-04 16:12:33 -0700 | [diff] [blame] | 193 | PFN_vkCreateSwapchainKHR CreateSwapchainKHR; |
| 194 | PFN_vkDestroySwapchainKHR DestroySwapchainKHR; |
| 195 | PFN_vkGetSwapchainImagesKHR GetSwapchainImagesKHR; |
| 196 | PFN_vkAcquireNextImageKHR AcquireNextImageKHR; |
| 197 | PFN_vkQueuePresentKHR QueuePresentKHR; |
| 198 | |
| 199 | // Implemented only by drivers, not by layers or the loader |
Jesse Hall | 70f9335 | 2015-11-04 09:41:31 -0800 | [diff] [blame] | 200 | PFN_vkGetSwapchainGrallocUsageANDROID GetSwapchainGrallocUsageANDROID; |
Jesse Hall | ab9aeef | 2015-11-04 10:56:20 -0800 | [diff] [blame] | 201 | PFN_vkAcquireImageANDROID AcquireImageANDROID; |
| 202 | PFN_vkQueueSignalReleaseImageANDROID QueueSignalReleaseImageANDROID; |
Jesse Hall | b1352bc | 2015-09-04 16:12:33 -0700 | [diff] [blame] | 203 | PFN_vkImportNativeFenceANDROID ImportNativeFenceANDROID; |
| 204 | PFN_vkQueueSignalNativeFenceANDROID QueueSignalNativeFenceANDROID; |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 205 | }; |
| 206 | |
| 207 | // ----------------------------------------------------------------------------- |
| 208 | // loader.cpp |
| 209 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 210 | VkResult EnumerateInstanceExtensionProperties( |
| 211 | const char* layer_name, |
| 212 | uint32_t* count, |
| 213 | VkExtensionProperties* properties); |
| 214 | VkResult EnumerateInstanceLayerProperties(uint32_t* count, |
| 215 | VkLayerProperties* properties); |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 216 | VkResult CreateInstance(const VkInstanceCreateInfo* create_info, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 217 | const VkAllocCallbacks* pAllocator, |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 218 | VkInstance* instance); |
| 219 | PFN_vkVoidFunction GetInstanceProcAddr(VkInstance instance, const char* name); |
| 220 | PFN_vkVoidFunction GetDeviceProcAddr(VkDevice drv_device, const char* name); |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 221 | void GetDeviceQueue(VkDevice drv_device, |
| 222 | uint32_t family, |
| 223 | uint32_t index, |
| 224 | VkQueue* out_queue); |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 225 | VkResult AllocCommandBuffers(VkDevice device, |
| 226 | const VkCmdBufferAllocInfo* alloc_info, |
| 227 | VkCmdBuffer* cmdbuffers); |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 228 | VkResult DestroyDevice(VkDevice drv_device, const VkAllocCallbacks* pAllocator); |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 229 | |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 230 | void* AllocMem(VkInstance instance, |
| 231 | size_t size, |
| 232 | size_t align, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 233 | VkSystemAllocScope scope); |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 234 | void FreeMem(VkInstance instance, void* ptr); |
| 235 | void* AllocMem(VkDevice device, |
| 236 | size_t size, |
| 237 | size_t align, |
Jesse Hall | 03b6fe1 | 2015-11-24 12:44:21 -0800 | [diff] [blame] | 238 | VkSystemAllocScope scope); |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 239 | void FreeMem(VkDevice device, void* ptr); |
Jesse Hall | d7b994a | 2015-09-07 14:17:37 -0700 | [diff] [blame] | 240 | const DeviceVtbl& GetDriverVtbl(VkDevice device); |
| 241 | const DeviceVtbl& GetDriverVtbl(VkQueue queue); |
| 242 | |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 243 | // ----------------------------------------------------------------------------- |
| 244 | // get_proc_addr.cpp |
| 245 | |
| 246 | PFN_vkVoidFunction GetGlobalInstanceProcAddr(const char* name); |
| 247 | PFN_vkVoidFunction GetGlobalDeviceProcAddr(const char* name); |
| 248 | PFN_vkVoidFunction GetSpecificInstanceProcAddr(const InstanceVtbl* vtbl, |
| 249 | const char* name); |
| 250 | PFN_vkVoidFunction GetSpecificDeviceProcAddr(const DeviceVtbl* vtbl, |
| 251 | const char* name); |
| 252 | |
| 253 | bool LoadInstanceVtbl(VkInstance instance, |
Michael Lentine | 03c64b0 | 2015-08-26 18:27:26 -0500 | [diff] [blame] | 254 | VkInstance next_instance, |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 255 | PFN_vkGetInstanceProcAddr get_proc_addr, |
| 256 | InstanceVtbl& vtbl); |
| 257 | bool LoadDeviceVtbl(VkDevice device, |
Michael Lentine | 03c64b0 | 2015-08-26 18:27:26 -0500 | [diff] [blame] | 258 | VkDevice next_device, |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 259 | PFN_vkGetDeviceProcAddr get_proc_addr, |
| 260 | DeviceVtbl& vtbl); |
| 261 | |
Jesse Hall | b1352bc | 2015-09-04 16:12:33 -0700 | [diff] [blame] | 262 | // ----------------------------------------------------------------------------- |
| 263 | // swapchain.cpp |
| 264 | |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 265 | VkResult CreateAndroidSurfaceKHR(VkInstance instance, |
| 266 | ANativeWindow* window, |
| 267 | VkSurfaceKHR* surface); |
| 268 | void DestroySurfaceKHR(VkInstance instance, VkSurfaceKHR surface); |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 269 | VkResult GetPhysicalDeviceSurfaceSupportKHR(VkPhysicalDevice pdev, |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 270 | uint32_t queue_family, |
Jesse Hall | b00daad | 2015-11-29 19:46:20 -0800 | [diff] [blame^] | 271 | VkSurfaceKHR surface, |
| 272 | VkBool32* pSupported); |
| 273 | VkResult GetPhysicalDeviceSurfaceCapabilitiesKHR( |
| 274 | VkPhysicalDevice pdev, |
| 275 | VkSurfaceKHR surface, |
| 276 | VkSurfaceCapabilitiesKHR* capabilities); |
| 277 | VkResult GetPhysicalDeviceSurfaceFormatsKHR(VkPhysicalDevice pdev, |
| 278 | VkSurfaceKHR surface, |
| 279 | uint32_t* count, |
| 280 | VkSurfaceFormatKHR* formats); |
| 281 | VkResult GetPhysicalDeviceSurfacePresentModesKHR(VkPhysicalDevice pdev, |
| 282 | VkSurfaceKHR surface, |
| 283 | uint32_t* count, |
| 284 | VkPresentModeKHR* modes); |
Jesse Hall | b1352bc | 2015-09-04 16:12:33 -0700 | [diff] [blame] | 285 | VkResult CreateSwapchainKHR(VkDevice device, |
| 286 | const VkSwapchainCreateInfoKHR* create_info, |
Jesse Hall | d7b994a | 2015-09-07 14:17:37 -0700 | [diff] [blame] | 287 | VkSwapchainKHR* swapchain_handle); |
| 288 | VkResult DestroySwapchainKHR(VkDevice device, VkSwapchainKHR swapchain_handle); |
Jesse Hall | b1352bc | 2015-09-04 16:12:33 -0700 | [diff] [blame] | 289 | VkResult GetSwapchainImagesKHR(VkDevice device, |
Jesse Hall | d7b994a | 2015-09-07 14:17:37 -0700 | [diff] [blame] | 290 | VkSwapchainKHR swapchain_handle, |
Jesse Hall | b1352bc | 2015-09-04 16:12:33 -0700 | [diff] [blame] | 291 | uint32_t* count, |
Jesse Hall | d7b994a | 2015-09-07 14:17:37 -0700 | [diff] [blame] | 292 | VkImage* images); |
Jesse Hall | b1352bc | 2015-09-04 16:12:33 -0700 | [diff] [blame] | 293 | VkResult AcquireNextImageKHR(VkDevice device, |
Jesse Hall | d7b994a | 2015-09-07 14:17:37 -0700 | [diff] [blame] | 294 | VkSwapchainKHR swapchain_handle, |
Jesse Hall | b1352bc | 2015-09-04 16:12:33 -0700 | [diff] [blame] | 295 | uint64_t timeout, |
| 296 | VkSemaphore semaphore, |
| 297 | uint32_t* image_index); |
| 298 | VkResult QueuePresentKHR(VkQueue queue, VkPresentInfoKHR* present_info); |
| 299 | |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 300 | } // namespace vulkan |
| 301 | |
| 302 | #endif // LIBVULKAN_LOADER_H |