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 | 3e0dc8f | 2015-11-30 00:42:57 -0800 | [diff] [blame] | 23 | #include <vulkan/vk_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; |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 70 | PFN_vkAllocateMemory AllocateMemory; |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 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; |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 108 | PFN_vkCreatePipelineCache CreatePipelineCache; |
| 109 | PFN_vkDestroyPipelineCache DestroyPipelineCache; |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 110 | PFN_vkGetPipelineCacheData GetPipelineCacheData; |
| 111 | PFN_vkMergePipelineCaches MergePipelineCaches; |
| 112 | PFN_vkCreateGraphicsPipelines CreateGraphicsPipelines; |
| 113 | PFN_vkCreateComputePipelines CreateComputePipelines; |
| 114 | PFN_vkDestroyPipeline DestroyPipeline; |
| 115 | PFN_vkCreatePipelineLayout CreatePipelineLayout; |
| 116 | PFN_vkDestroyPipelineLayout DestroyPipelineLayout; |
| 117 | PFN_vkCreateSampler CreateSampler; |
| 118 | PFN_vkDestroySampler DestroySampler; |
| 119 | PFN_vkCreateDescriptorSetLayout CreateDescriptorSetLayout; |
| 120 | PFN_vkDestroyDescriptorSetLayout DestroyDescriptorSetLayout; |
| 121 | PFN_vkCreateDescriptorPool CreateDescriptorPool; |
| 122 | PFN_vkDestroyDescriptorPool DestroyDescriptorPool; |
| 123 | PFN_vkResetDescriptorPool ResetDescriptorPool; |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 124 | PFN_vkAllocateDescriptorSets AllocateDescriptorSets; |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 125 | PFN_vkFreeDescriptorSets FreeDescriptorSets; |
| 126 | PFN_vkUpdateDescriptorSets UpdateDescriptorSets; |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 127 | PFN_vkCreateFramebuffer CreateFramebuffer; |
| 128 | PFN_vkDestroyFramebuffer DestroyFramebuffer; |
| 129 | PFN_vkCreateRenderPass CreateRenderPass; |
| 130 | PFN_vkDestroyRenderPass DestroyRenderPass; |
| 131 | PFN_vkGetRenderAreaGranularity GetRenderAreaGranularity; |
| 132 | PFN_vkCreateCommandPool CreateCommandPool; |
| 133 | PFN_vkDestroyCommandPool DestroyCommandPool; |
| 134 | PFN_vkResetCommandPool ResetCommandPool; |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 135 | PFN_vkAllocateCommandBuffers AllocateCommandBuffers; |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 136 | PFN_vkFreeCommandBuffers FreeCommandBuffers; |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 137 | |
| 138 | PFN_vkQueueSubmit QueueSubmit; |
| 139 | PFN_vkQueueWaitIdle QueueWaitIdle; |
Jesse Hall | a642925 | 2015-11-29 18:59:42 -0800 | [diff] [blame] | 140 | PFN_vkQueueBindSparse QueueBindSparse; |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 141 | |
| 142 | PFN_vkBeginCommandBuffer BeginCommandBuffer; |
| 143 | PFN_vkEndCommandBuffer EndCommandBuffer; |
| 144 | PFN_vkResetCommandBuffer ResetCommandBuffer; |
| 145 | PFN_vkCmdBindPipeline CmdBindPipeline; |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 146 | PFN_vkCmdSetViewport CmdSetViewport; |
| 147 | PFN_vkCmdSetScissor CmdSetScissor; |
| 148 | PFN_vkCmdSetLineWidth CmdSetLineWidth; |
| 149 | PFN_vkCmdSetDepthBias CmdSetDepthBias; |
| 150 | PFN_vkCmdSetBlendConstants CmdSetBlendConstants; |
| 151 | PFN_vkCmdSetDepthBounds CmdSetDepthBounds; |
| 152 | PFN_vkCmdSetStencilCompareMask CmdSetStencilCompareMask; |
| 153 | PFN_vkCmdSetStencilWriteMask CmdSetStencilWriteMask; |
| 154 | PFN_vkCmdSetStencilReference CmdSetStencilReference; |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 155 | PFN_vkCmdBindDescriptorSets CmdBindDescriptorSets; |
| 156 | PFN_vkCmdBindIndexBuffer CmdBindIndexBuffer; |
| 157 | PFN_vkCmdBindVertexBuffers CmdBindVertexBuffers; |
| 158 | PFN_vkCmdDraw CmdDraw; |
| 159 | PFN_vkCmdDrawIndexed CmdDrawIndexed; |
| 160 | PFN_vkCmdDrawIndirect CmdDrawIndirect; |
| 161 | PFN_vkCmdDrawIndexedIndirect CmdDrawIndexedIndirect; |
| 162 | PFN_vkCmdDispatch CmdDispatch; |
| 163 | PFN_vkCmdDispatchIndirect CmdDispatchIndirect; |
| 164 | PFN_vkCmdCopyBuffer CmdCopyBuffer; |
| 165 | PFN_vkCmdCopyImage CmdCopyImage; |
| 166 | PFN_vkCmdBlitImage CmdBlitImage; |
| 167 | PFN_vkCmdCopyBufferToImage CmdCopyBufferToImage; |
| 168 | PFN_vkCmdCopyImageToBuffer CmdCopyImageToBuffer; |
| 169 | PFN_vkCmdUpdateBuffer CmdUpdateBuffer; |
| 170 | PFN_vkCmdFillBuffer CmdFillBuffer; |
| 171 | PFN_vkCmdClearColorImage CmdClearColorImage; |
| 172 | PFN_vkCmdClearDepthStencilImage CmdClearDepthStencilImage; |
Jesse Hall | ae38f73 | 2015-11-19 21:32:50 -0800 | [diff] [blame] | 173 | PFN_vkCmdClearAttachments CmdClearAttachments; |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 174 | PFN_vkCmdResolveImage CmdResolveImage; |
| 175 | PFN_vkCmdSetEvent CmdSetEvent; |
| 176 | PFN_vkCmdResetEvent CmdResetEvent; |
| 177 | PFN_vkCmdWaitEvents CmdWaitEvents; |
| 178 | PFN_vkCmdPipelineBarrier CmdPipelineBarrier; |
| 179 | PFN_vkCmdBeginQuery CmdBeginQuery; |
| 180 | PFN_vkCmdEndQuery CmdEndQuery; |
| 181 | PFN_vkCmdResetQueryPool CmdResetQueryPool; |
| 182 | PFN_vkCmdWriteTimestamp CmdWriteTimestamp; |
| 183 | PFN_vkCmdCopyQueryPoolResults CmdCopyQueryPoolResults; |
| 184 | PFN_vkCmdPushConstants CmdPushConstants; |
| 185 | PFN_vkCmdBeginRenderPass CmdBeginRenderPass; |
| 186 | PFN_vkCmdNextSubpass CmdNextSubpass; |
| 187 | PFN_vkCmdEndRenderPass CmdEndRenderPass; |
| 188 | PFN_vkCmdExecuteCommands CmdExecuteCommands; |
Jesse Hall | b1352bc | 2015-09-04 16:12:33 -0700 | [diff] [blame] | 189 | |
| 190 | // Layers and loader only, not implemented by drivers |
Jesse Hall | b1352bc | 2015-09-04 16:12:33 -0700 | [diff] [blame] | 191 | PFN_vkCreateSwapchainKHR CreateSwapchainKHR; |
| 192 | PFN_vkDestroySwapchainKHR DestroySwapchainKHR; |
| 193 | PFN_vkGetSwapchainImagesKHR GetSwapchainImagesKHR; |
| 194 | PFN_vkAcquireNextImageKHR AcquireNextImageKHR; |
| 195 | PFN_vkQueuePresentKHR QueuePresentKHR; |
| 196 | |
| 197 | // Implemented only by drivers, not by layers or the loader |
Jesse Hall | 70f9335 | 2015-11-04 09:41:31 -0800 | [diff] [blame] | 198 | PFN_vkGetSwapchainGrallocUsageANDROID GetSwapchainGrallocUsageANDROID; |
Jesse Hall | ab9aeef | 2015-11-04 10:56:20 -0800 | [diff] [blame] | 199 | PFN_vkAcquireImageANDROID AcquireImageANDROID; |
| 200 | PFN_vkQueueSignalReleaseImageANDROID QueueSignalReleaseImageANDROID; |
Jesse Hall | b1352bc | 2015-09-04 16:12:33 -0700 | [diff] [blame] | 201 | PFN_vkImportNativeFenceANDROID ImportNativeFenceANDROID; |
| 202 | PFN_vkQueueSignalNativeFenceANDROID QueueSignalNativeFenceANDROID; |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 203 | }; |
| 204 | |
| 205 | // ----------------------------------------------------------------------------- |
| 206 | // loader.cpp |
| 207 | |
Jesse Hall | 5ae3abb | 2015-10-08 14:00:22 -0700 | [diff] [blame] | 208 | VkResult EnumerateInstanceExtensionProperties( |
| 209 | const char* layer_name, |
| 210 | uint32_t* count, |
| 211 | VkExtensionProperties* properties); |
| 212 | VkResult EnumerateInstanceLayerProperties(uint32_t* count, |
| 213 | VkLayerProperties* properties); |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 214 | VkResult CreateInstance(const VkInstanceCreateInfo* create_info, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 215 | const VkAllocationCallbacks* pAllocator, |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 216 | VkInstance* instance); |
| 217 | PFN_vkVoidFunction GetInstanceProcAddr(VkInstance instance, const char* name); |
| 218 | PFN_vkVoidFunction GetDeviceProcAddr(VkDevice drv_device, const char* name); |
Jesse Hall | 606a54e | 2015-11-19 22:17:28 -0800 | [diff] [blame] | 219 | void GetDeviceQueue(VkDevice drv_device, |
| 220 | uint32_t family, |
| 221 | uint32_t index, |
| 222 | VkQueue* out_queue); |
Jesse Hall | fbf97b0 | 2015-11-20 14:17:03 -0800 | [diff] [blame] | 223 | VkResult AllocCommandBuffers(VkDevice device, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 224 | const VkCommandBufferAllocateInfo* alloc_info, |
| 225 | VkCommandBuffer* cmdbufs); |
| 226 | VkResult DestroyDevice(VkDevice drv_device, |
| 227 | const VkAllocationCallbacks* pAllocator); |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 228 | |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 229 | void* AllocMem(VkInstance instance, |
| 230 | size_t size, |
| 231 | size_t align, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 232 | VkSystemAllocationScope scope); |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 233 | void FreeMem(VkInstance instance, void* ptr); |
| 234 | void* AllocMem(VkDevice device, |
| 235 | size_t size, |
| 236 | size_t align, |
Jesse Hall | 3fbc856 | 2015-11-29 22:10:52 -0800 | [diff] [blame] | 237 | VkSystemAllocationScope scope); |
Jesse Hall | 1356b0d | 2015-11-23 17:24:58 -0800 | [diff] [blame] | 238 | void FreeMem(VkDevice device, void* ptr); |
Jesse Hall | d7b994a | 2015-09-07 14:17:37 -0700 | [diff] [blame] | 239 | const DeviceVtbl& GetDriverVtbl(VkDevice device); |
| 240 | const DeviceVtbl& GetDriverVtbl(VkQueue queue); |
| 241 | |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 242 | // ----------------------------------------------------------------------------- |
| 243 | // get_proc_addr.cpp |
| 244 | |
| 245 | PFN_vkVoidFunction GetGlobalInstanceProcAddr(const char* name); |
| 246 | PFN_vkVoidFunction GetGlobalDeviceProcAddr(const char* name); |
| 247 | PFN_vkVoidFunction GetSpecificInstanceProcAddr(const InstanceVtbl* vtbl, |
| 248 | const char* name); |
| 249 | PFN_vkVoidFunction GetSpecificDeviceProcAddr(const DeviceVtbl* vtbl, |
| 250 | const char* name); |
| 251 | |
| 252 | bool LoadInstanceVtbl(VkInstance instance, |
Michael Lentine | 03c64b0 | 2015-08-26 18:27:26 -0500 | [diff] [blame] | 253 | VkInstance next_instance, |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 254 | PFN_vkGetInstanceProcAddr get_proc_addr, |
| 255 | InstanceVtbl& vtbl); |
| 256 | bool LoadDeviceVtbl(VkDevice device, |
Michael Lentine | 03c64b0 | 2015-08-26 18:27:26 -0500 | [diff] [blame] | 257 | VkDevice next_device, |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 258 | PFN_vkGetDeviceProcAddr get_proc_addr, |
| 259 | DeviceVtbl& vtbl); |
| 260 | |
Jesse Hall | b1352bc | 2015-09-04 16:12:33 -0700 | [diff] [blame] | 261 | // ----------------------------------------------------------------------------- |
| 262 | // swapchain.cpp |
| 263 | |
Jesse Hall | e1b1278 | 2015-11-30 11:27:32 -0800 | [diff] [blame^] | 264 | VKAPI_ATTR VkResult CreateAndroidSurfaceKHR(VkInstance instance, |
| 265 | ANativeWindow* window, |
| 266 | VkSurfaceKHR* surface); |
| 267 | VKAPI_ATTR void DestroySurfaceKHR(VkInstance instance, VkSurfaceKHR surface); |
| 268 | VKAPI_ATTR VkResult GetPhysicalDeviceSurfaceSupportKHR(VkPhysicalDevice pdev, |
| 269 | uint32_t queue_family, |
| 270 | VkSurfaceKHR surface, |
| 271 | VkBool32* pSupported); |
| 272 | VKAPI_ATTR VkResult |
| 273 | GetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysicalDevice pdev, |
| 274 | VkSurfaceKHR surface, |
| 275 | VkSurfaceCapabilitiesKHR* capabilities); |
| 276 | VKAPI_ATTR VkResult |
| 277 | GetPhysicalDeviceSurfaceFormatsKHR(VkPhysicalDevice pdev, |
| 278 | VkSurfaceKHR surface, |
| 279 | uint32_t* count, |
| 280 | VkSurfaceFormatKHR* formats); |
| 281 | VKAPI_ATTR VkResult |
| 282 | GetPhysicalDeviceSurfacePresentModesKHR(VkPhysicalDevice pdev, |
| 283 | VkSurfaceKHR surface, |
| 284 | uint32_t* count, |
| 285 | VkPresentModeKHR* modes); |
| 286 | VKAPI_ATTR VkResult |
| 287 | CreateSwapchainKHR(VkDevice device, |
| 288 | const VkSwapchainCreateInfoKHR* create_info, |
| 289 | VkSwapchainKHR* swapchain_handle); |
| 290 | VKAPI_ATTR VkResult |
| 291 | DestroySwapchainKHR(VkDevice device, VkSwapchainKHR swapchain_handle); |
| 292 | VKAPI_ATTR VkResult GetSwapchainImagesKHR(VkDevice device, |
| 293 | VkSwapchainKHR swapchain_handle, |
| 294 | uint32_t* count, |
| 295 | VkImage* images); |
| 296 | VKAPI_ATTR VkResult AcquireNextImageKHR(VkDevice device, |
| 297 | VkSwapchainKHR swapchain_handle, |
| 298 | uint64_t timeout, |
| 299 | VkSemaphore semaphore, |
| 300 | uint32_t* image_index); |
| 301 | VKAPI_ATTR VkResult |
| 302 | QueuePresentKHR(VkQueue queue, VkPresentInfoKHR* present_info); |
Jesse Hall | b1352bc | 2015-09-04 16:12:33 -0700 | [diff] [blame] | 303 | |
Jesse Hall | 04f4f47 | 2015-08-16 19:51:04 -0700 | [diff] [blame] | 304 | } // namespace vulkan |
| 305 | |
| 306 | #endif // LIBVULKAN_LOADER_H |