Jesse Hall | 1f91d39 | 2015-12-11 16:28:44 -0800 | [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 | 0a40209 | 2016-02-01 14:43:47 -0800 | [diff] [blame^] | 17 | // WARNING: This file is generated. See ../README.md for instructions. |
| 18 | |
Jesse Hall | 1f91d39 | 2015-12-11 16:28:44 -0800 | [diff] [blame] | 19 | #include <log/log.h> |
| 20 | #include <algorithm> |
| 21 | #include "loader.h" |
| 22 | |
| 23 | #define UNLIKELY(expr) __builtin_expect((expr), 0) |
| 24 | |
| 25 | using namespace vulkan; |
| 26 | |
| 27 | namespace { |
| 28 | |
| 29 | struct NameProc { |
| 30 | const char* name; |
| 31 | PFN_vkVoidFunction proc; |
| 32 | }; |
| 33 | |
| 34 | PFN_vkVoidFunction Lookup(const char* name, |
| 35 | const NameProc* begin, |
| 36 | const NameProc* end) { |
| 37 | const auto& entry = std::lower_bound( |
| 38 | begin, end, name, |
| 39 | [](const NameProc& e, const char* n) { return strcmp(e.name, n) < 0; }); |
| 40 | if (entry == end || strcmp(entry->name, name) != 0) |
| 41 | return nullptr; |
| 42 | return entry->proc; |
| 43 | } |
| 44 | |
| 45 | template <size_t N> |
| 46 | PFN_vkVoidFunction Lookup(const char* name, const NameProc (&procs)[N]) { |
| 47 | return Lookup(name, procs, procs + N); |
| 48 | } |
| 49 | |
| 50 | const NameProc kLoaderExportProcs[] = { |
| 51 | // clang-format off |
| 52 | {"vkAcquireNextImageKHR", reinterpret_cast<PFN_vkVoidFunction>(vkAcquireNextImageKHR)}, |
| 53 | {"vkAllocateCommandBuffers", reinterpret_cast<PFN_vkVoidFunction>(vkAllocateCommandBuffers)}, |
| 54 | {"vkAllocateDescriptorSets", reinterpret_cast<PFN_vkVoidFunction>(vkAllocateDescriptorSets)}, |
| 55 | {"vkAllocateMemory", reinterpret_cast<PFN_vkVoidFunction>(vkAllocateMemory)}, |
| 56 | {"vkBeginCommandBuffer", reinterpret_cast<PFN_vkVoidFunction>(vkBeginCommandBuffer)}, |
| 57 | {"vkBindBufferMemory", reinterpret_cast<PFN_vkVoidFunction>(vkBindBufferMemory)}, |
| 58 | {"vkBindImageMemory", reinterpret_cast<PFN_vkVoidFunction>(vkBindImageMemory)}, |
| 59 | {"vkCmdBeginQuery", reinterpret_cast<PFN_vkVoidFunction>(vkCmdBeginQuery)}, |
| 60 | {"vkCmdBeginRenderPass", reinterpret_cast<PFN_vkVoidFunction>(vkCmdBeginRenderPass)}, |
| 61 | {"vkCmdBindDescriptorSets", reinterpret_cast<PFN_vkVoidFunction>(vkCmdBindDescriptorSets)}, |
| 62 | {"vkCmdBindIndexBuffer", reinterpret_cast<PFN_vkVoidFunction>(vkCmdBindIndexBuffer)}, |
| 63 | {"vkCmdBindPipeline", reinterpret_cast<PFN_vkVoidFunction>(vkCmdBindPipeline)}, |
| 64 | {"vkCmdBindVertexBuffers", reinterpret_cast<PFN_vkVoidFunction>(vkCmdBindVertexBuffers)}, |
| 65 | {"vkCmdBlitImage", reinterpret_cast<PFN_vkVoidFunction>(vkCmdBlitImage)}, |
| 66 | {"vkCmdClearAttachments", reinterpret_cast<PFN_vkVoidFunction>(vkCmdClearAttachments)}, |
| 67 | {"vkCmdClearColorImage", reinterpret_cast<PFN_vkVoidFunction>(vkCmdClearColorImage)}, |
| 68 | {"vkCmdClearDepthStencilImage", reinterpret_cast<PFN_vkVoidFunction>(vkCmdClearDepthStencilImage)}, |
| 69 | {"vkCmdCopyBuffer", reinterpret_cast<PFN_vkVoidFunction>(vkCmdCopyBuffer)}, |
| 70 | {"vkCmdCopyBufferToImage", reinterpret_cast<PFN_vkVoidFunction>(vkCmdCopyBufferToImage)}, |
| 71 | {"vkCmdCopyImage", reinterpret_cast<PFN_vkVoidFunction>(vkCmdCopyImage)}, |
| 72 | {"vkCmdCopyImageToBuffer", reinterpret_cast<PFN_vkVoidFunction>(vkCmdCopyImageToBuffer)}, |
| 73 | {"vkCmdCopyQueryPoolResults", reinterpret_cast<PFN_vkVoidFunction>(vkCmdCopyQueryPoolResults)}, |
| 74 | {"vkCmdDispatch", reinterpret_cast<PFN_vkVoidFunction>(vkCmdDispatch)}, |
| 75 | {"vkCmdDispatchIndirect", reinterpret_cast<PFN_vkVoidFunction>(vkCmdDispatchIndirect)}, |
| 76 | {"vkCmdDraw", reinterpret_cast<PFN_vkVoidFunction>(vkCmdDraw)}, |
| 77 | {"vkCmdDrawIndexed", reinterpret_cast<PFN_vkVoidFunction>(vkCmdDrawIndexed)}, |
| 78 | {"vkCmdDrawIndexedIndirect", reinterpret_cast<PFN_vkVoidFunction>(vkCmdDrawIndexedIndirect)}, |
| 79 | {"vkCmdDrawIndirect", reinterpret_cast<PFN_vkVoidFunction>(vkCmdDrawIndirect)}, |
| 80 | {"vkCmdEndQuery", reinterpret_cast<PFN_vkVoidFunction>(vkCmdEndQuery)}, |
| 81 | {"vkCmdEndRenderPass", reinterpret_cast<PFN_vkVoidFunction>(vkCmdEndRenderPass)}, |
| 82 | {"vkCmdExecuteCommands", reinterpret_cast<PFN_vkVoidFunction>(vkCmdExecuteCommands)}, |
| 83 | {"vkCmdFillBuffer", reinterpret_cast<PFN_vkVoidFunction>(vkCmdFillBuffer)}, |
| 84 | {"vkCmdNextSubpass", reinterpret_cast<PFN_vkVoidFunction>(vkCmdNextSubpass)}, |
| 85 | {"vkCmdPipelineBarrier", reinterpret_cast<PFN_vkVoidFunction>(vkCmdPipelineBarrier)}, |
| 86 | {"vkCmdPushConstants", reinterpret_cast<PFN_vkVoidFunction>(vkCmdPushConstants)}, |
| 87 | {"vkCmdResetEvent", reinterpret_cast<PFN_vkVoidFunction>(vkCmdResetEvent)}, |
| 88 | {"vkCmdResetQueryPool", reinterpret_cast<PFN_vkVoidFunction>(vkCmdResetQueryPool)}, |
| 89 | {"vkCmdResolveImage", reinterpret_cast<PFN_vkVoidFunction>(vkCmdResolveImage)}, |
| 90 | {"vkCmdSetBlendConstants", reinterpret_cast<PFN_vkVoidFunction>(vkCmdSetBlendConstants)}, |
| 91 | {"vkCmdSetDepthBias", reinterpret_cast<PFN_vkVoidFunction>(vkCmdSetDepthBias)}, |
| 92 | {"vkCmdSetDepthBounds", reinterpret_cast<PFN_vkVoidFunction>(vkCmdSetDepthBounds)}, |
| 93 | {"vkCmdSetEvent", reinterpret_cast<PFN_vkVoidFunction>(vkCmdSetEvent)}, |
| 94 | {"vkCmdSetLineWidth", reinterpret_cast<PFN_vkVoidFunction>(vkCmdSetLineWidth)}, |
| 95 | {"vkCmdSetScissor", reinterpret_cast<PFN_vkVoidFunction>(vkCmdSetScissor)}, |
| 96 | {"vkCmdSetStencilCompareMask", reinterpret_cast<PFN_vkVoidFunction>(vkCmdSetStencilCompareMask)}, |
| 97 | {"vkCmdSetStencilReference", reinterpret_cast<PFN_vkVoidFunction>(vkCmdSetStencilReference)}, |
| 98 | {"vkCmdSetStencilWriteMask", reinterpret_cast<PFN_vkVoidFunction>(vkCmdSetStencilWriteMask)}, |
| 99 | {"vkCmdSetViewport", reinterpret_cast<PFN_vkVoidFunction>(vkCmdSetViewport)}, |
| 100 | {"vkCmdUpdateBuffer", reinterpret_cast<PFN_vkVoidFunction>(vkCmdUpdateBuffer)}, |
| 101 | {"vkCmdWaitEvents", reinterpret_cast<PFN_vkVoidFunction>(vkCmdWaitEvents)}, |
| 102 | {"vkCmdWriteTimestamp", reinterpret_cast<PFN_vkVoidFunction>(vkCmdWriteTimestamp)}, |
| 103 | {"vkCreateAndroidSurfaceKHR", reinterpret_cast<PFN_vkVoidFunction>(vkCreateAndroidSurfaceKHR)}, |
| 104 | {"vkCreateBuffer", reinterpret_cast<PFN_vkVoidFunction>(vkCreateBuffer)}, |
| 105 | {"vkCreateBufferView", reinterpret_cast<PFN_vkVoidFunction>(vkCreateBufferView)}, |
| 106 | {"vkCreateCommandPool", reinterpret_cast<PFN_vkVoidFunction>(vkCreateCommandPool)}, |
| 107 | {"vkCreateComputePipelines", reinterpret_cast<PFN_vkVoidFunction>(vkCreateComputePipelines)}, |
| 108 | {"vkCreateDescriptorPool", reinterpret_cast<PFN_vkVoidFunction>(vkCreateDescriptorPool)}, |
| 109 | {"vkCreateDescriptorSetLayout", reinterpret_cast<PFN_vkVoidFunction>(vkCreateDescriptorSetLayout)}, |
| 110 | {"vkCreateDevice", reinterpret_cast<PFN_vkVoidFunction>(vkCreateDevice)}, |
| 111 | {"vkCreateEvent", reinterpret_cast<PFN_vkVoidFunction>(vkCreateEvent)}, |
| 112 | {"vkCreateFence", reinterpret_cast<PFN_vkVoidFunction>(vkCreateFence)}, |
| 113 | {"vkCreateFramebuffer", reinterpret_cast<PFN_vkVoidFunction>(vkCreateFramebuffer)}, |
| 114 | {"vkCreateGraphicsPipelines", reinterpret_cast<PFN_vkVoidFunction>(vkCreateGraphicsPipelines)}, |
| 115 | {"vkCreateImage", reinterpret_cast<PFN_vkVoidFunction>(vkCreateImage)}, |
| 116 | {"vkCreateImageView", reinterpret_cast<PFN_vkVoidFunction>(vkCreateImageView)}, |
| 117 | {"vkCreateInstance", reinterpret_cast<PFN_vkVoidFunction>(vkCreateInstance)}, |
| 118 | {"vkCreatePipelineCache", reinterpret_cast<PFN_vkVoidFunction>(vkCreatePipelineCache)}, |
| 119 | {"vkCreatePipelineLayout", reinterpret_cast<PFN_vkVoidFunction>(vkCreatePipelineLayout)}, |
| 120 | {"vkCreateQueryPool", reinterpret_cast<PFN_vkVoidFunction>(vkCreateQueryPool)}, |
| 121 | {"vkCreateRenderPass", reinterpret_cast<PFN_vkVoidFunction>(vkCreateRenderPass)}, |
| 122 | {"vkCreateSampler", reinterpret_cast<PFN_vkVoidFunction>(vkCreateSampler)}, |
| 123 | {"vkCreateSemaphore", reinterpret_cast<PFN_vkVoidFunction>(vkCreateSemaphore)}, |
| 124 | {"vkCreateShaderModule", reinterpret_cast<PFN_vkVoidFunction>(vkCreateShaderModule)}, |
| 125 | {"vkCreateSwapchainKHR", reinterpret_cast<PFN_vkVoidFunction>(vkCreateSwapchainKHR)}, |
| 126 | {"vkDestroyBuffer", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyBuffer)}, |
| 127 | {"vkDestroyBufferView", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyBufferView)}, |
| 128 | {"vkDestroyCommandPool", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyCommandPool)}, |
| 129 | {"vkDestroyDescriptorPool", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyDescriptorPool)}, |
| 130 | {"vkDestroyDescriptorSetLayout", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyDescriptorSetLayout)}, |
| 131 | {"vkDestroyDevice", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyDevice)}, |
| 132 | {"vkDestroyEvent", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyEvent)}, |
| 133 | {"vkDestroyFence", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyFence)}, |
| 134 | {"vkDestroyFramebuffer", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyFramebuffer)}, |
| 135 | {"vkDestroyImage", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyImage)}, |
| 136 | {"vkDestroyImageView", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyImageView)}, |
| 137 | {"vkDestroyInstance", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyInstance)}, |
| 138 | {"vkDestroyPipeline", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyPipeline)}, |
| 139 | {"vkDestroyPipelineCache", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyPipelineCache)}, |
| 140 | {"vkDestroyPipelineLayout", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyPipelineLayout)}, |
| 141 | {"vkDestroyQueryPool", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyQueryPool)}, |
| 142 | {"vkDestroyRenderPass", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyRenderPass)}, |
| 143 | {"vkDestroySampler", reinterpret_cast<PFN_vkVoidFunction>(vkDestroySampler)}, |
| 144 | {"vkDestroySemaphore", reinterpret_cast<PFN_vkVoidFunction>(vkDestroySemaphore)}, |
| 145 | {"vkDestroyShaderModule", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyShaderModule)}, |
| 146 | {"vkDestroySurfaceKHR", reinterpret_cast<PFN_vkVoidFunction>(vkDestroySurfaceKHR)}, |
| 147 | {"vkDestroySwapchainKHR", reinterpret_cast<PFN_vkVoidFunction>(vkDestroySwapchainKHR)}, |
| 148 | {"vkDeviceWaitIdle", reinterpret_cast<PFN_vkVoidFunction>(vkDeviceWaitIdle)}, |
| 149 | {"vkEndCommandBuffer", reinterpret_cast<PFN_vkVoidFunction>(vkEndCommandBuffer)}, |
| 150 | {"vkEnumerateDeviceExtensionProperties", reinterpret_cast<PFN_vkVoidFunction>(vkEnumerateDeviceExtensionProperties)}, |
| 151 | {"vkEnumerateDeviceLayerProperties", reinterpret_cast<PFN_vkVoidFunction>(vkEnumerateDeviceLayerProperties)}, |
| 152 | {"vkEnumerateInstanceExtensionProperties", reinterpret_cast<PFN_vkVoidFunction>(vkEnumerateInstanceExtensionProperties)}, |
| 153 | {"vkEnumerateInstanceLayerProperties", reinterpret_cast<PFN_vkVoidFunction>(vkEnumerateInstanceLayerProperties)}, |
| 154 | {"vkEnumeratePhysicalDevices", reinterpret_cast<PFN_vkVoidFunction>(vkEnumeratePhysicalDevices)}, |
| 155 | {"vkFlushMappedMemoryRanges", reinterpret_cast<PFN_vkVoidFunction>(vkFlushMappedMemoryRanges)}, |
| 156 | {"vkFreeCommandBuffers", reinterpret_cast<PFN_vkVoidFunction>(vkFreeCommandBuffers)}, |
| 157 | {"vkFreeDescriptorSets", reinterpret_cast<PFN_vkVoidFunction>(vkFreeDescriptorSets)}, |
| 158 | {"vkFreeMemory", reinterpret_cast<PFN_vkVoidFunction>(vkFreeMemory)}, |
| 159 | {"vkGetBufferMemoryRequirements", reinterpret_cast<PFN_vkVoidFunction>(vkGetBufferMemoryRequirements)}, |
| 160 | {"vkGetDeviceMemoryCommitment", reinterpret_cast<PFN_vkVoidFunction>(vkGetDeviceMemoryCommitment)}, |
| 161 | {"vkGetDeviceProcAddr", reinterpret_cast<PFN_vkVoidFunction>(vkGetDeviceProcAddr)}, |
| 162 | {"vkGetDeviceQueue", reinterpret_cast<PFN_vkVoidFunction>(vkGetDeviceQueue)}, |
| 163 | {"vkGetEventStatus", reinterpret_cast<PFN_vkVoidFunction>(vkGetEventStatus)}, |
| 164 | {"vkGetFenceStatus", reinterpret_cast<PFN_vkVoidFunction>(vkGetFenceStatus)}, |
| 165 | {"vkGetImageMemoryRequirements", reinterpret_cast<PFN_vkVoidFunction>(vkGetImageMemoryRequirements)}, |
| 166 | {"vkGetImageSparseMemoryRequirements", reinterpret_cast<PFN_vkVoidFunction>(vkGetImageSparseMemoryRequirements)}, |
| 167 | {"vkGetImageSubresourceLayout", reinterpret_cast<PFN_vkVoidFunction>(vkGetImageSubresourceLayout)}, |
| 168 | {"vkGetInstanceProcAddr", reinterpret_cast<PFN_vkVoidFunction>(vkGetInstanceProcAddr)}, |
| 169 | {"vkGetPhysicalDeviceFeatures", reinterpret_cast<PFN_vkVoidFunction>(vkGetPhysicalDeviceFeatures)}, |
| 170 | {"vkGetPhysicalDeviceFormatProperties", reinterpret_cast<PFN_vkVoidFunction>(vkGetPhysicalDeviceFormatProperties)}, |
| 171 | {"vkGetPhysicalDeviceImageFormatProperties", reinterpret_cast<PFN_vkVoidFunction>(vkGetPhysicalDeviceImageFormatProperties)}, |
| 172 | {"vkGetPhysicalDeviceMemoryProperties", reinterpret_cast<PFN_vkVoidFunction>(vkGetPhysicalDeviceMemoryProperties)}, |
| 173 | {"vkGetPhysicalDeviceProperties", reinterpret_cast<PFN_vkVoidFunction>(vkGetPhysicalDeviceProperties)}, |
| 174 | {"vkGetPhysicalDeviceQueueFamilyProperties", reinterpret_cast<PFN_vkVoidFunction>(vkGetPhysicalDeviceQueueFamilyProperties)}, |
| 175 | {"vkGetPhysicalDeviceSparseImageFormatProperties", reinterpret_cast<PFN_vkVoidFunction>(vkGetPhysicalDeviceSparseImageFormatProperties)}, |
| 176 | {"vkGetPhysicalDeviceSurfaceCapabilitiesKHR", reinterpret_cast<PFN_vkVoidFunction>(vkGetPhysicalDeviceSurfaceCapabilitiesKHR)}, |
| 177 | {"vkGetPhysicalDeviceSurfaceFormatsKHR", reinterpret_cast<PFN_vkVoidFunction>(vkGetPhysicalDeviceSurfaceFormatsKHR)}, |
| 178 | {"vkGetPhysicalDeviceSurfacePresentModesKHR", reinterpret_cast<PFN_vkVoidFunction>(vkGetPhysicalDeviceSurfacePresentModesKHR)}, |
| 179 | {"vkGetPhysicalDeviceSurfaceSupportKHR", reinterpret_cast<PFN_vkVoidFunction>(vkGetPhysicalDeviceSurfaceSupportKHR)}, |
| 180 | {"vkGetPipelineCacheData", reinterpret_cast<PFN_vkVoidFunction>(vkGetPipelineCacheData)}, |
| 181 | {"vkGetQueryPoolResults", reinterpret_cast<PFN_vkVoidFunction>(vkGetQueryPoolResults)}, |
| 182 | {"vkGetRenderAreaGranularity", reinterpret_cast<PFN_vkVoidFunction>(vkGetRenderAreaGranularity)}, |
| 183 | {"vkGetSwapchainImagesKHR", reinterpret_cast<PFN_vkVoidFunction>(vkGetSwapchainImagesKHR)}, |
| 184 | {"vkInvalidateMappedMemoryRanges", reinterpret_cast<PFN_vkVoidFunction>(vkInvalidateMappedMemoryRanges)}, |
| 185 | {"vkMapMemory", reinterpret_cast<PFN_vkVoidFunction>(vkMapMemory)}, |
| 186 | {"vkMergePipelineCaches", reinterpret_cast<PFN_vkVoidFunction>(vkMergePipelineCaches)}, |
| 187 | {"vkQueueBindSparse", reinterpret_cast<PFN_vkVoidFunction>(vkQueueBindSparse)}, |
| 188 | {"vkQueuePresentKHR", reinterpret_cast<PFN_vkVoidFunction>(vkQueuePresentKHR)}, |
| 189 | {"vkQueueSubmit", reinterpret_cast<PFN_vkVoidFunction>(vkQueueSubmit)}, |
| 190 | {"vkQueueWaitIdle", reinterpret_cast<PFN_vkVoidFunction>(vkQueueWaitIdle)}, |
| 191 | {"vkResetCommandBuffer", reinterpret_cast<PFN_vkVoidFunction>(vkResetCommandBuffer)}, |
| 192 | {"vkResetCommandPool", reinterpret_cast<PFN_vkVoidFunction>(vkResetCommandPool)}, |
| 193 | {"vkResetDescriptorPool", reinterpret_cast<PFN_vkVoidFunction>(vkResetDescriptorPool)}, |
| 194 | {"vkResetEvent", reinterpret_cast<PFN_vkVoidFunction>(vkResetEvent)}, |
| 195 | {"vkResetFences", reinterpret_cast<PFN_vkVoidFunction>(vkResetFences)}, |
| 196 | {"vkSetEvent", reinterpret_cast<PFN_vkVoidFunction>(vkSetEvent)}, |
| 197 | {"vkUnmapMemory", reinterpret_cast<PFN_vkVoidFunction>(vkUnmapMemory)}, |
| 198 | {"vkUpdateDescriptorSets", reinterpret_cast<PFN_vkVoidFunction>(vkUpdateDescriptorSets)}, |
| 199 | {"vkWaitForFences", reinterpret_cast<PFN_vkVoidFunction>(vkWaitForFences)}, |
| 200 | // clang-format on |
| 201 | }; |
| 202 | |
| 203 | const NameProc kLoaderGlobalProcs[] = { |
| 204 | // clang-format off |
| 205 | {"vkCreateInstance", reinterpret_cast<PFN_vkVoidFunction>(static_cast<PFN_vkCreateInstance>(CreateInstance_Top))}, |
| 206 | {"vkEnumerateInstanceExtensionProperties", reinterpret_cast<PFN_vkVoidFunction>(static_cast<PFN_vkEnumerateInstanceExtensionProperties>(EnumerateInstanceExtensionProperties_Top))}, |
| 207 | {"vkEnumerateInstanceLayerProperties", reinterpret_cast<PFN_vkVoidFunction>(static_cast<PFN_vkEnumerateInstanceLayerProperties>(EnumerateInstanceLayerProperties_Top))}, |
| 208 | // clang-format on |
| 209 | }; |
| 210 | |
| 211 | const NameProc kLoaderTopProcs[] = { |
| 212 | // clang-format off |
| 213 | {"vkAllocateCommandBuffers", reinterpret_cast<PFN_vkVoidFunction>(static_cast<PFN_vkAllocateCommandBuffers>(AllocateCommandBuffers_Top))}, |
| 214 | {"vkCreateInstance", reinterpret_cast<PFN_vkVoidFunction>(static_cast<PFN_vkCreateInstance>(CreateInstance_Top))}, |
| 215 | {"vkDestroyDevice", reinterpret_cast<PFN_vkVoidFunction>(static_cast<PFN_vkDestroyDevice>(DestroyDevice_Top))}, |
| 216 | {"vkDestroyInstance", reinterpret_cast<PFN_vkVoidFunction>(static_cast<PFN_vkDestroyInstance>(DestroyInstance_Top))}, |
| 217 | {"vkEnumerateInstanceExtensionProperties", reinterpret_cast<PFN_vkVoidFunction>(static_cast<PFN_vkEnumerateInstanceExtensionProperties>(EnumerateInstanceExtensionProperties_Top))}, |
| 218 | {"vkEnumerateInstanceLayerProperties", reinterpret_cast<PFN_vkVoidFunction>(static_cast<PFN_vkEnumerateInstanceLayerProperties>(EnumerateInstanceLayerProperties_Top))}, |
| 219 | {"vkGetDeviceProcAddr", reinterpret_cast<PFN_vkVoidFunction>(static_cast<PFN_vkGetDeviceProcAddr>(GetDeviceProcAddr_Top))}, |
| 220 | {"vkGetDeviceQueue", reinterpret_cast<PFN_vkVoidFunction>(static_cast<PFN_vkGetDeviceQueue>(GetDeviceQueue_Top))}, |
| 221 | {"vkGetInstanceProcAddr", reinterpret_cast<PFN_vkVoidFunction>(static_cast<PFN_vkGetInstanceProcAddr>(GetInstanceProcAddr_Top))}, |
| 222 | // clang-format on |
| 223 | }; |
| 224 | |
| 225 | const NameProc kLoaderBottomProcs[] = { |
| 226 | // clang-format off |
| 227 | {"vkAcquireNextImageKHR", reinterpret_cast<PFN_vkVoidFunction>(static_cast<PFN_vkAcquireNextImageKHR>(AcquireNextImageKHR_Bottom))}, |
| 228 | {"vkCreateAndroidSurfaceKHR", reinterpret_cast<PFN_vkVoidFunction>(static_cast<PFN_vkCreateAndroidSurfaceKHR>(CreateAndroidSurfaceKHR_Bottom))}, |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 229 | {"vkCreateDebugReportCallbackEXT", reinterpret_cast<PFN_vkVoidFunction>(static_cast<PFN_vkCreateDebugReportCallbackEXT>(CreateDebugReportCallbackEXT_Bottom))}, |
Jesse Hall | 1f91d39 | 2015-12-11 16:28:44 -0800 | [diff] [blame] | 230 | {"vkCreateDevice", reinterpret_cast<PFN_vkVoidFunction>(static_cast<PFN_vkCreateDevice>(CreateDevice_Bottom))}, |
| 231 | {"vkCreateInstance", reinterpret_cast<PFN_vkVoidFunction>(static_cast<PFN_vkCreateInstance>(CreateInstance_Bottom))}, |
| 232 | {"vkCreateSwapchainKHR", reinterpret_cast<PFN_vkVoidFunction>(static_cast<PFN_vkCreateSwapchainKHR>(CreateSwapchainKHR_Bottom))}, |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 233 | {"vkDebugReportMessageEXT", reinterpret_cast<PFN_vkVoidFunction>(static_cast<PFN_vkDebugReportMessageEXT>(DebugReportMessageEXT_Bottom))}, |
| 234 | {"vkDestroyDebugReportCallbackEXT", reinterpret_cast<PFN_vkVoidFunction>(static_cast<PFN_vkDestroyDebugReportCallbackEXT>(DestroyDebugReportCallbackEXT_Bottom))}, |
Jesse Hall | 1f91d39 | 2015-12-11 16:28:44 -0800 | [diff] [blame] | 235 | {"vkDestroyInstance", reinterpret_cast<PFN_vkVoidFunction>(static_cast<PFN_vkDestroyInstance>(DestroyInstance_Bottom))}, |
| 236 | {"vkDestroySurfaceKHR", reinterpret_cast<PFN_vkVoidFunction>(static_cast<PFN_vkDestroySurfaceKHR>(DestroySurfaceKHR_Bottom))}, |
| 237 | {"vkDestroySwapchainKHR", reinterpret_cast<PFN_vkVoidFunction>(static_cast<PFN_vkDestroySwapchainKHR>(DestroySwapchainKHR_Bottom))}, |
| 238 | {"vkEnumerateDeviceExtensionProperties", reinterpret_cast<PFN_vkVoidFunction>(static_cast<PFN_vkEnumerateDeviceExtensionProperties>(EnumerateDeviceExtensionProperties_Bottom))}, |
| 239 | {"vkEnumerateDeviceLayerProperties", reinterpret_cast<PFN_vkVoidFunction>(static_cast<PFN_vkEnumerateDeviceLayerProperties>(EnumerateDeviceLayerProperties_Bottom))}, |
| 240 | {"vkEnumeratePhysicalDevices", reinterpret_cast<PFN_vkVoidFunction>(static_cast<PFN_vkEnumeratePhysicalDevices>(EnumeratePhysicalDevices_Bottom))}, |
| 241 | {"vkGetDeviceProcAddr", reinterpret_cast<PFN_vkVoidFunction>(static_cast<PFN_vkGetDeviceProcAddr>(GetDeviceProcAddr_Bottom))}, |
| 242 | {"vkGetInstanceProcAddr", reinterpret_cast<PFN_vkVoidFunction>(static_cast<PFN_vkGetInstanceProcAddr>(GetInstanceProcAddr_Bottom))}, |
| 243 | {"vkGetPhysicalDeviceFeatures", reinterpret_cast<PFN_vkVoidFunction>(static_cast<PFN_vkGetPhysicalDeviceFeatures>(GetPhysicalDeviceFeatures_Bottom))}, |
| 244 | {"vkGetPhysicalDeviceFormatProperties", reinterpret_cast<PFN_vkVoidFunction>(static_cast<PFN_vkGetPhysicalDeviceFormatProperties>(GetPhysicalDeviceFormatProperties_Bottom))}, |
| 245 | {"vkGetPhysicalDeviceImageFormatProperties", reinterpret_cast<PFN_vkVoidFunction>(static_cast<PFN_vkGetPhysicalDeviceImageFormatProperties>(GetPhysicalDeviceImageFormatProperties_Bottom))}, |
| 246 | {"vkGetPhysicalDeviceMemoryProperties", reinterpret_cast<PFN_vkVoidFunction>(static_cast<PFN_vkGetPhysicalDeviceMemoryProperties>(GetPhysicalDeviceMemoryProperties_Bottom))}, |
| 247 | {"vkGetPhysicalDeviceProperties", reinterpret_cast<PFN_vkVoidFunction>(static_cast<PFN_vkGetPhysicalDeviceProperties>(GetPhysicalDeviceProperties_Bottom))}, |
| 248 | {"vkGetPhysicalDeviceQueueFamilyProperties", reinterpret_cast<PFN_vkVoidFunction>(static_cast<PFN_vkGetPhysicalDeviceQueueFamilyProperties>(GetPhysicalDeviceQueueFamilyProperties_Bottom))}, |
| 249 | {"vkGetPhysicalDeviceSparseImageFormatProperties", reinterpret_cast<PFN_vkVoidFunction>(static_cast<PFN_vkGetPhysicalDeviceSparseImageFormatProperties>(GetPhysicalDeviceSparseImageFormatProperties_Bottom))}, |
| 250 | {"vkGetPhysicalDeviceSurfaceCapabilitiesKHR", reinterpret_cast<PFN_vkVoidFunction>(static_cast<PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR>(GetPhysicalDeviceSurfaceCapabilitiesKHR_Bottom))}, |
| 251 | {"vkGetPhysicalDeviceSurfaceFormatsKHR", reinterpret_cast<PFN_vkVoidFunction>(static_cast<PFN_vkGetPhysicalDeviceSurfaceFormatsKHR>(GetPhysicalDeviceSurfaceFormatsKHR_Bottom))}, |
| 252 | {"vkGetPhysicalDeviceSurfacePresentModesKHR", reinterpret_cast<PFN_vkVoidFunction>(static_cast<PFN_vkGetPhysicalDeviceSurfacePresentModesKHR>(GetPhysicalDeviceSurfacePresentModesKHR_Bottom))}, |
| 253 | {"vkGetPhysicalDeviceSurfaceSupportKHR", reinterpret_cast<PFN_vkVoidFunction>(static_cast<PFN_vkGetPhysicalDeviceSurfaceSupportKHR>(GetPhysicalDeviceSurfaceSupportKHR_Bottom))}, |
| 254 | {"vkGetSwapchainImagesKHR", reinterpret_cast<PFN_vkVoidFunction>(static_cast<PFN_vkGetSwapchainImagesKHR>(GetSwapchainImagesKHR_Bottom))}, |
| 255 | {"vkQueuePresentKHR", reinterpret_cast<PFN_vkVoidFunction>(static_cast<PFN_vkQueuePresentKHR>(QueuePresentKHR_Bottom))}, |
| 256 | // clang-format on |
| 257 | }; |
| 258 | |
| 259 | struct NameOffset { |
| 260 | const char* name; |
| 261 | size_t offset; |
| 262 | }; |
| 263 | |
| 264 | ssize_t Lookup(const char* name, |
| 265 | const NameOffset* begin, |
| 266 | const NameOffset* end) { |
| 267 | const auto& entry = std::lower_bound( |
| 268 | begin, end, name, [](const NameOffset& e, const char* n) { |
| 269 | return strcmp(e.name, n) < 0; |
| 270 | }); |
| 271 | if (entry == end || strcmp(entry->name, name) != 0) |
| 272 | return -1; |
| 273 | return static_cast<ssize_t>(entry->offset); |
| 274 | } |
| 275 | |
| 276 | template <size_t N, class Table> |
| 277 | PFN_vkVoidFunction Lookup(const char* name, |
| 278 | const NameOffset (&offsets)[N], |
| 279 | const Table& table) { |
| 280 | ssize_t offset = Lookup(name, offsets, offsets + N); |
| 281 | if (offset < 0) |
| 282 | return nullptr; |
| 283 | uintptr_t base = reinterpret_cast<uintptr_t>(&table); |
| 284 | return *reinterpret_cast<PFN_vkVoidFunction*>(base + |
| 285 | static_cast<size_t>(offset)); |
| 286 | } |
| 287 | |
| 288 | const NameOffset kInstanceDispatchOffsets[] = { |
| 289 | // clang-format off |
| 290 | {"vkCreateAndroidSurfaceKHR", offsetof(InstanceDispatchTable, CreateAndroidSurfaceKHR)}, |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 291 | {"vkCreateDebugReportCallbackEXT", offsetof(InstanceDispatchTable, CreateDebugReportCallbackEXT)}, |
Jesse Hall | 1f91d39 | 2015-12-11 16:28:44 -0800 | [diff] [blame] | 292 | {"vkCreateDevice", offsetof(InstanceDispatchTable, CreateDevice)}, |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 293 | {"vkDebugReportMessageEXT", offsetof(InstanceDispatchTable, DebugReportMessageEXT)}, |
| 294 | {"vkDestroyDebugReportCallbackEXT", offsetof(InstanceDispatchTable, DestroyDebugReportCallbackEXT)}, |
Jesse Hall | 1f91d39 | 2015-12-11 16:28:44 -0800 | [diff] [blame] | 295 | {"vkDestroyInstance", offsetof(InstanceDispatchTable, DestroyInstance)}, |
| 296 | {"vkDestroySurfaceKHR", offsetof(InstanceDispatchTable, DestroySurfaceKHR)}, |
| 297 | {"vkEnumerateDeviceExtensionProperties", offsetof(InstanceDispatchTable, EnumerateDeviceExtensionProperties)}, |
| 298 | {"vkEnumerateDeviceLayerProperties", offsetof(InstanceDispatchTable, EnumerateDeviceLayerProperties)}, |
| 299 | {"vkEnumeratePhysicalDevices", offsetof(InstanceDispatchTable, EnumeratePhysicalDevices)}, |
| 300 | {"vkGetPhysicalDeviceFeatures", offsetof(InstanceDispatchTable, GetPhysicalDeviceFeatures)}, |
| 301 | {"vkGetPhysicalDeviceFormatProperties", offsetof(InstanceDispatchTable, GetPhysicalDeviceFormatProperties)}, |
| 302 | {"vkGetPhysicalDeviceImageFormatProperties", offsetof(InstanceDispatchTable, GetPhysicalDeviceImageFormatProperties)}, |
| 303 | {"vkGetPhysicalDeviceMemoryProperties", offsetof(InstanceDispatchTable, GetPhysicalDeviceMemoryProperties)}, |
| 304 | {"vkGetPhysicalDeviceProperties", offsetof(InstanceDispatchTable, GetPhysicalDeviceProperties)}, |
| 305 | {"vkGetPhysicalDeviceQueueFamilyProperties", offsetof(InstanceDispatchTable, GetPhysicalDeviceQueueFamilyProperties)}, |
| 306 | {"vkGetPhysicalDeviceSparseImageFormatProperties", offsetof(InstanceDispatchTable, GetPhysicalDeviceSparseImageFormatProperties)}, |
| 307 | {"vkGetPhysicalDeviceSurfaceCapabilitiesKHR", offsetof(InstanceDispatchTable, GetPhysicalDeviceSurfaceCapabilitiesKHR)}, |
| 308 | {"vkGetPhysicalDeviceSurfaceFormatsKHR", offsetof(InstanceDispatchTable, GetPhysicalDeviceSurfaceFormatsKHR)}, |
| 309 | {"vkGetPhysicalDeviceSurfacePresentModesKHR", offsetof(InstanceDispatchTable, GetPhysicalDeviceSurfacePresentModesKHR)}, |
| 310 | {"vkGetPhysicalDeviceSurfaceSupportKHR", offsetof(InstanceDispatchTable, GetPhysicalDeviceSurfaceSupportKHR)}, |
| 311 | // clang-format on |
| 312 | }; |
| 313 | |
| 314 | const NameOffset kDeviceDispatchOffsets[] = { |
| 315 | // clang-format off |
| 316 | {"vkAcquireNextImageKHR", offsetof(DeviceDispatchTable, AcquireNextImageKHR)}, |
| 317 | {"vkAllocateCommandBuffers", offsetof(DeviceDispatchTable, AllocateCommandBuffers)}, |
| 318 | {"vkAllocateDescriptorSets", offsetof(DeviceDispatchTable, AllocateDescriptorSets)}, |
| 319 | {"vkAllocateMemory", offsetof(DeviceDispatchTable, AllocateMemory)}, |
| 320 | {"vkBeginCommandBuffer", offsetof(DeviceDispatchTable, BeginCommandBuffer)}, |
| 321 | {"vkBindBufferMemory", offsetof(DeviceDispatchTable, BindBufferMemory)}, |
| 322 | {"vkBindImageMemory", offsetof(DeviceDispatchTable, BindImageMemory)}, |
| 323 | {"vkCmdBeginQuery", offsetof(DeviceDispatchTable, CmdBeginQuery)}, |
| 324 | {"vkCmdBeginRenderPass", offsetof(DeviceDispatchTable, CmdBeginRenderPass)}, |
| 325 | {"vkCmdBindDescriptorSets", offsetof(DeviceDispatchTable, CmdBindDescriptorSets)}, |
| 326 | {"vkCmdBindIndexBuffer", offsetof(DeviceDispatchTable, CmdBindIndexBuffer)}, |
| 327 | {"vkCmdBindPipeline", offsetof(DeviceDispatchTable, CmdBindPipeline)}, |
| 328 | {"vkCmdBindVertexBuffers", offsetof(DeviceDispatchTable, CmdBindVertexBuffers)}, |
| 329 | {"vkCmdBlitImage", offsetof(DeviceDispatchTable, CmdBlitImage)}, |
| 330 | {"vkCmdClearAttachments", offsetof(DeviceDispatchTable, CmdClearAttachments)}, |
| 331 | {"vkCmdClearColorImage", offsetof(DeviceDispatchTable, CmdClearColorImage)}, |
| 332 | {"vkCmdClearDepthStencilImage", offsetof(DeviceDispatchTable, CmdClearDepthStencilImage)}, |
| 333 | {"vkCmdCopyBuffer", offsetof(DeviceDispatchTable, CmdCopyBuffer)}, |
| 334 | {"vkCmdCopyBufferToImage", offsetof(DeviceDispatchTable, CmdCopyBufferToImage)}, |
| 335 | {"vkCmdCopyImage", offsetof(DeviceDispatchTable, CmdCopyImage)}, |
| 336 | {"vkCmdCopyImageToBuffer", offsetof(DeviceDispatchTable, CmdCopyImageToBuffer)}, |
| 337 | {"vkCmdCopyQueryPoolResults", offsetof(DeviceDispatchTable, CmdCopyQueryPoolResults)}, |
| 338 | {"vkCmdDispatch", offsetof(DeviceDispatchTable, CmdDispatch)}, |
| 339 | {"vkCmdDispatchIndirect", offsetof(DeviceDispatchTable, CmdDispatchIndirect)}, |
| 340 | {"vkCmdDraw", offsetof(DeviceDispatchTable, CmdDraw)}, |
| 341 | {"vkCmdDrawIndexed", offsetof(DeviceDispatchTable, CmdDrawIndexed)}, |
| 342 | {"vkCmdDrawIndexedIndirect", offsetof(DeviceDispatchTable, CmdDrawIndexedIndirect)}, |
| 343 | {"vkCmdDrawIndirect", offsetof(DeviceDispatchTable, CmdDrawIndirect)}, |
| 344 | {"vkCmdEndQuery", offsetof(DeviceDispatchTable, CmdEndQuery)}, |
| 345 | {"vkCmdEndRenderPass", offsetof(DeviceDispatchTable, CmdEndRenderPass)}, |
| 346 | {"vkCmdExecuteCommands", offsetof(DeviceDispatchTable, CmdExecuteCommands)}, |
| 347 | {"vkCmdFillBuffer", offsetof(DeviceDispatchTable, CmdFillBuffer)}, |
| 348 | {"vkCmdNextSubpass", offsetof(DeviceDispatchTable, CmdNextSubpass)}, |
| 349 | {"vkCmdPipelineBarrier", offsetof(DeviceDispatchTable, CmdPipelineBarrier)}, |
| 350 | {"vkCmdPushConstants", offsetof(DeviceDispatchTable, CmdPushConstants)}, |
| 351 | {"vkCmdResetEvent", offsetof(DeviceDispatchTable, CmdResetEvent)}, |
| 352 | {"vkCmdResetQueryPool", offsetof(DeviceDispatchTable, CmdResetQueryPool)}, |
| 353 | {"vkCmdResolveImage", offsetof(DeviceDispatchTable, CmdResolveImage)}, |
| 354 | {"vkCmdSetBlendConstants", offsetof(DeviceDispatchTable, CmdSetBlendConstants)}, |
| 355 | {"vkCmdSetDepthBias", offsetof(DeviceDispatchTable, CmdSetDepthBias)}, |
| 356 | {"vkCmdSetDepthBounds", offsetof(DeviceDispatchTable, CmdSetDepthBounds)}, |
| 357 | {"vkCmdSetEvent", offsetof(DeviceDispatchTable, CmdSetEvent)}, |
| 358 | {"vkCmdSetLineWidth", offsetof(DeviceDispatchTable, CmdSetLineWidth)}, |
| 359 | {"vkCmdSetScissor", offsetof(DeviceDispatchTable, CmdSetScissor)}, |
| 360 | {"vkCmdSetStencilCompareMask", offsetof(DeviceDispatchTable, CmdSetStencilCompareMask)}, |
| 361 | {"vkCmdSetStencilReference", offsetof(DeviceDispatchTable, CmdSetStencilReference)}, |
| 362 | {"vkCmdSetStencilWriteMask", offsetof(DeviceDispatchTable, CmdSetStencilWriteMask)}, |
| 363 | {"vkCmdSetViewport", offsetof(DeviceDispatchTable, CmdSetViewport)}, |
| 364 | {"vkCmdUpdateBuffer", offsetof(DeviceDispatchTable, CmdUpdateBuffer)}, |
| 365 | {"vkCmdWaitEvents", offsetof(DeviceDispatchTable, CmdWaitEvents)}, |
| 366 | {"vkCmdWriteTimestamp", offsetof(DeviceDispatchTable, CmdWriteTimestamp)}, |
| 367 | {"vkCreateBuffer", offsetof(DeviceDispatchTable, CreateBuffer)}, |
| 368 | {"vkCreateBufferView", offsetof(DeviceDispatchTable, CreateBufferView)}, |
| 369 | {"vkCreateCommandPool", offsetof(DeviceDispatchTable, CreateCommandPool)}, |
| 370 | {"vkCreateComputePipelines", offsetof(DeviceDispatchTable, CreateComputePipelines)}, |
| 371 | {"vkCreateDescriptorPool", offsetof(DeviceDispatchTable, CreateDescriptorPool)}, |
| 372 | {"vkCreateDescriptorSetLayout", offsetof(DeviceDispatchTable, CreateDescriptorSetLayout)}, |
| 373 | {"vkCreateEvent", offsetof(DeviceDispatchTable, CreateEvent)}, |
| 374 | {"vkCreateFence", offsetof(DeviceDispatchTable, CreateFence)}, |
| 375 | {"vkCreateFramebuffer", offsetof(DeviceDispatchTable, CreateFramebuffer)}, |
| 376 | {"vkCreateGraphicsPipelines", offsetof(DeviceDispatchTable, CreateGraphicsPipelines)}, |
| 377 | {"vkCreateImage", offsetof(DeviceDispatchTable, CreateImage)}, |
| 378 | {"vkCreateImageView", offsetof(DeviceDispatchTable, CreateImageView)}, |
| 379 | {"vkCreatePipelineCache", offsetof(DeviceDispatchTable, CreatePipelineCache)}, |
| 380 | {"vkCreatePipelineLayout", offsetof(DeviceDispatchTable, CreatePipelineLayout)}, |
| 381 | {"vkCreateQueryPool", offsetof(DeviceDispatchTable, CreateQueryPool)}, |
| 382 | {"vkCreateRenderPass", offsetof(DeviceDispatchTable, CreateRenderPass)}, |
| 383 | {"vkCreateSampler", offsetof(DeviceDispatchTable, CreateSampler)}, |
| 384 | {"vkCreateSemaphore", offsetof(DeviceDispatchTable, CreateSemaphore)}, |
| 385 | {"vkCreateShaderModule", offsetof(DeviceDispatchTable, CreateShaderModule)}, |
| 386 | {"vkCreateSwapchainKHR", offsetof(DeviceDispatchTable, CreateSwapchainKHR)}, |
| 387 | {"vkDestroyBuffer", offsetof(DeviceDispatchTable, DestroyBuffer)}, |
| 388 | {"vkDestroyBufferView", offsetof(DeviceDispatchTable, DestroyBufferView)}, |
| 389 | {"vkDestroyCommandPool", offsetof(DeviceDispatchTable, DestroyCommandPool)}, |
| 390 | {"vkDestroyDescriptorPool", offsetof(DeviceDispatchTable, DestroyDescriptorPool)}, |
| 391 | {"vkDestroyDescriptorSetLayout", offsetof(DeviceDispatchTable, DestroyDescriptorSetLayout)}, |
| 392 | {"vkDestroyDevice", offsetof(DeviceDispatchTable, DestroyDevice)}, |
| 393 | {"vkDestroyEvent", offsetof(DeviceDispatchTable, DestroyEvent)}, |
| 394 | {"vkDestroyFence", offsetof(DeviceDispatchTable, DestroyFence)}, |
| 395 | {"vkDestroyFramebuffer", offsetof(DeviceDispatchTable, DestroyFramebuffer)}, |
| 396 | {"vkDestroyImage", offsetof(DeviceDispatchTable, DestroyImage)}, |
| 397 | {"vkDestroyImageView", offsetof(DeviceDispatchTable, DestroyImageView)}, |
| 398 | {"vkDestroyPipeline", offsetof(DeviceDispatchTable, DestroyPipeline)}, |
| 399 | {"vkDestroyPipelineCache", offsetof(DeviceDispatchTable, DestroyPipelineCache)}, |
| 400 | {"vkDestroyPipelineLayout", offsetof(DeviceDispatchTable, DestroyPipelineLayout)}, |
| 401 | {"vkDestroyQueryPool", offsetof(DeviceDispatchTable, DestroyQueryPool)}, |
| 402 | {"vkDestroyRenderPass", offsetof(DeviceDispatchTable, DestroyRenderPass)}, |
| 403 | {"vkDestroySampler", offsetof(DeviceDispatchTable, DestroySampler)}, |
| 404 | {"vkDestroySemaphore", offsetof(DeviceDispatchTable, DestroySemaphore)}, |
| 405 | {"vkDestroyShaderModule", offsetof(DeviceDispatchTable, DestroyShaderModule)}, |
| 406 | {"vkDestroySwapchainKHR", offsetof(DeviceDispatchTable, DestroySwapchainKHR)}, |
| 407 | {"vkDeviceWaitIdle", offsetof(DeviceDispatchTable, DeviceWaitIdle)}, |
| 408 | {"vkEndCommandBuffer", offsetof(DeviceDispatchTable, EndCommandBuffer)}, |
| 409 | {"vkFlushMappedMemoryRanges", offsetof(DeviceDispatchTable, FlushMappedMemoryRanges)}, |
| 410 | {"vkFreeCommandBuffers", offsetof(DeviceDispatchTable, FreeCommandBuffers)}, |
| 411 | {"vkFreeDescriptorSets", offsetof(DeviceDispatchTable, FreeDescriptorSets)}, |
| 412 | {"vkFreeMemory", offsetof(DeviceDispatchTable, FreeMemory)}, |
| 413 | {"vkGetBufferMemoryRequirements", offsetof(DeviceDispatchTable, GetBufferMemoryRequirements)}, |
| 414 | {"vkGetDeviceMemoryCommitment", offsetof(DeviceDispatchTable, GetDeviceMemoryCommitment)}, |
| 415 | {"vkGetDeviceQueue", offsetof(DeviceDispatchTable, GetDeviceQueue)}, |
| 416 | {"vkGetEventStatus", offsetof(DeviceDispatchTable, GetEventStatus)}, |
| 417 | {"vkGetFenceStatus", offsetof(DeviceDispatchTable, GetFenceStatus)}, |
| 418 | {"vkGetImageMemoryRequirements", offsetof(DeviceDispatchTable, GetImageMemoryRequirements)}, |
| 419 | {"vkGetImageSparseMemoryRequirements", offsetof(DeviceDispatchTable, GetImageSparseMemoryRequirements)}, |
| 420 | {"vkGetImageSubresourceLayout", offsetof(DeviceDispatchTable, GetImageSubresourceLayout)}, |
| 421 | {"vkGetPipelineCacheData", offsetof(DeviceDispatchTable, GetPipelineCacheData)}, |
| 422 | {"vkGetQueryPoolResults", offsetof(DeviceDispatchTable, GetQueryPoolResults)}, |
| 423 | {"vkGetRenderAreaGranularity", offsetof(DeviceDispatchTable, GetRenderAreaGranularity)}, |
| 424 | {"vkGetSwapchainImagesKHR", offsetof(DeviceDispatchTable, GetSwapchainImagesKHR)}, |
| 425 | {"vkInvalidateMappedMemoryRanges", offsetof(DeviceDispatchTable, InvalidateMappedMemoryRanges)}, |
| 426 | {"vkMapMemory", offsetof(DeviceDispatchTable, MapMemory)}, |
| 427 | {"vkMergePipelineCaches", offsetof(DeviceDispatchTable, MergePipelineCaches)}, |
| 428 | {"vkQueueBindSparse", offsetof(DeviceDispatchTable, QueueBindSparse)}, |
| 429 | {"vkQueuePresentKHR", offsetof(DeviceDispatchTable, QueuePresentKHR)}, |
| 430 | {"vkQueueSubmit", offsetof(DeviceDispatchTable, QueueSubmit)}, |
| 431 | {"vkQueueWaitIdle", offsetof(DeviceDispatchTable, QueueWaitIdle)}, |
| 432 | {"vkResetCommandBuffer", offsetof(DeviceDispatchTable, ResetCommandBuffer)}, |
| 433 | {"vkResetCommandPool", offsetof(DeviceDispatchTable, ResetCommandPool)}, |
| 434 | {"vkResetDescriptorPool", offsetof(DeviceDispatchTable, ResetDescriptorPool)}, |
| 435 | {"vkResetEvent", offsetof(DeviceDispatchTable, ResetEvent)}, |
| 436 | {"vkResetFences", offsetof(DeviceDispatchTable, ResetFences)}, |
| 437 | {"vkSetEvent", offsetof(DeviceDispatchTable, SetEvent)}, |
| 438 | {"vkUnmapMemory", offsetof(DeviceDispatchTable, UnmapMemory)}, |
| 439 | {"vkUpdateDescriptorSets", offsetof(DeviceDispatchTable, UpdateDescriptorSets)}, |
| 440 | {"vkWaitForFences", offsetof(DeviceDispatchTable, WaitForFences)}, |
| 441 | // clang-format on |
| 442 | }; |
| 443 | |
| 444 | } // anonymous namespace |
| 445 | |
| 446 | namespace vulkan { |
| 447 | |
| 448 | PFN_vkVoidFunction GetLoaderExportProcAddr(const char* name) { |
| 449 | return Lookup(name, kLoaderExportProcs); |
| 450 | } |
| 451 | |
| 452 | PFN_vkVoidFunction GetLoaderGlobalProcAddr(const char* name) { |
| 453 | return Lookup(name, kLoaderGlobalProcs); |
| 454 | } |
| 455 | |
| 456 | PFN_vkVoidFunction GetLoaderTopProcAddr(const char* name) { |
| 457 | return Lookup(name, kLoaderTopProcs); |
| 458 | } |
| 459 | |
| 460 | PFN_vkVoidFunction GetLoaderBottomProcAddr(const char* name) { |
| 461 | return Lookup(name, kLoaderBottomProcs); |
| 462 | } |
| 463 | |
| 464 | PFN_vkVoidFunction GetDispatchProcAddr(const InstanceDispatchTable& dispatch, |
| 465 | const char* name) { |
| 466 | return Lookup(name, kInstanceDispatchOffsets, dispatch); |
| 467 | } |
| 468 | |
| 469 | PFN_vkVoidFunction GetDispatchProcAddr(const DeviceDispatchTable& dispatch, |
| 470 | const char* name) { |
| 471 | return Lookup(name, kDeviceDispatchOffsets, dispatch); |
| 472 | } |
| 473 | |
| 474 | bool LoadInstanceDispatchTable(VkInstance instance, |
| 475 | PFN_vkGetInstanceProcAddr get_proc_addr, |
| 476 | InstanceDispatchTable& dispatch) { |
| 477 | bool success = true; |
| 478 | // clang-format off |
| 479 | dispatch.DestroyInstance = reinterpret_cast<PFN_vkDestroyInstance>(get_proc_addr(instance, "vkDestroyInstance")); |
| 480 | if (UNLIKELY(!dispatch.DestroyInstance)) { |
| 481 | ALOGE("missing instance proc: %s", "vkDestroyInstance"); |
| 482 | success = false; |
| 483 | } |
| 484 | dispatch.EnumeratePhysicalDevices = reinterpret_cast<PFN_vkEnumeratePhysicalDevices>(get_proc_addr(instance, "vkEnumeratePhysicalDevices")); |
| 485 | if (UNLIKELY(!dispatch.EnumeratePhysicalDevices)) { |
| 486 | ALOGE("missing instance proc: %s", "vkEnumeratePhysicalDevices"); |
| 487 | success = false; |
| 488 | } |
| 489 | dispatch.GetPhysicalDeviceProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceProperties>(get_proc_addr(instance, "vkGetPhysicalDeviceProperties")); |
| 490 | if (UNLIKELY(!dispatch.GetPhysicalDeviceProperties)) { |
| 491 | ALOGE("missing instance proc: %s", "vkGetPhysicalDeviceProperties"); |
| 492 | success = false; |
| 493 | } |
| 494 | dispatch.GetPhysicalDeviceQueueFamilyProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceQueueFamilyProperties>(get_proc_addr(instance, "vkGetPhysicalDeviceQueueFamilyProperties")); |
| 495 | if (UNLIKELY(!dispatch.GetPhysicalDeviceQueueFamilyProperties)) { |
| 496 | ALOGE("missing instance proc: %s", "vkGetPhysicalDeviceQueueFamilyProperties"); |
| 497 | success = false; |
| 498 | } |
| 499 | dispatch.GetPhysicalDeviceMemoryProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceMemoryProperties>(get_proc_addr(instance, "vkGetPhysicalDeviceMemoryProperties")); |
| 500 | if (UNLIKELY(!dispatch.GetPhysicalDeviceMemoryProperties)) { |
| 501 | ALOGE("missing instance proc: %s", "vkGetPhysicalDeviceMemoryProperties"); |
| 502 | success = false; |
| 503 | } |
| 504 | dispatch.GetPhysicalDeviceFeatures = reinterpret_cast<PFN_vkGetPhysicalDeviceFeatures>(get_proc_addr(instance, "vkGetPhysicalDeviceFeatures")); |
| 505 | if (UNLIKELY(!dispatch.GetPhysicalDeviceFeatures)) { |
| 506 | ALOGE("missing instance proc: %s", "vkGetPhysicalDeviceFeatures"); |
| 507 | success = false; |
| 508 | } |
| 509 | dispatch.GetPhysicalDeviceFormatProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceFormatProperties>(get_proc_addr(instance, "vkGetPhysicalDeviceFormatProperties")); |
| 510 | if (UNLIKELY(!dispatch.GetPhysicalDeviceFormatProperties)) { |
| 511 | ALOGE("missing instance proc: %s", "vkGetPhysicalDeviceFormatProperties"); |
| 512 | success = false; |
| 513 | } |
| 514 | dispatch.GetPhysicalDeviceImageFormatProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceImageFormatProperties>(get_proc_addr(instance, "vkGetPhysicalDeviceImageFormatProperties")); |
| 515 | if (UNLIKELY(!dispatch.GetPhysicalDeviceImageFormatProperties)) { |
| 516 | ALOGE("missing instance proc: %s", "vkGetPhysicalDeviceImageFormatProperties"); |
| 517 | success = false; |
| 518 | } |
| 519 | dispatch.CreateDevice = reinterpret_cast<PFN_vkCreateDevice>(get_proc_addr(instance, "vkCreateDevice")); |
| 520 | if (UNLIKELY(!dispatch.CreateDevice)) { |
| 521 | ALOGE("missing instance proc: %s", "vkCreateDevice"); |
| 522 | success = false; |
| 523 | } |
| 524 | dispatch.EnumerateDeviceLayerProperties = reinterpret_cast<PFN_vkEnumerateDeviceLayerProperties>(get_proc_addr(instance, "vkEnumerateDeviceLayerProperties")); |
| 525 | if (UNLIKELY(!dispatch.EnumerateDeviceLayerProperties)) { |
| 526 | ALOGE("missing instance proc: %s", "vkEnumerateDeviceLayerProperties"); |
| 527 | success = false; |
| 528 | } |
| 529 | dispatch.EnumerateDeviceExtensionProperties = reinterpret_cast<PFN_vkEnumerateDeviceExtensionProperties>(get_proc_addr(instance, "vkEnumerateDeviceExtensionProperties")); |
| 530 | if (UNLIKELY(!dispatch.EnumerateDeviceExtensionProperties)) { |
| 531 | ALOGE("missing instance proc: %s", "vkEnumerateDeviceExtensionProperties"); |
| 532 | success = false; |
| 533 | } |
| 534 | dispatch.GetPhysicalDeviceSparseImageFormatProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceSparseImageFormatProperties>(get_proc_addr(instance, "vkGetPhysicalDeviceSparseImageFormatProperties")); |
| 535 | if (UNLIKELY(!dispatch.GetPhysicalDeviceSparseImageFormatProperties)) { |
| 536 | ALOGE("missing instance proc: %s", "vkGetPhysicalDeviceSparseImageFormatProperties"); |
| 537 | success = false; |
| 538 | } |
| 539 | dispatch.DestroySurfaceKHR = reinterpret_cast<PFN_vkDestroySurfaceKHR>(get_proc_addr(instance, "vkDestroySurfaceKHR")); |
| 540 | if (UNLIKELY(!dispatch.DestroySurfaceKHR)) { |
| 541 | ALOGE("missing instance proc: %s", "vkDestroySurfaceKHR"); |
| 542 | success = false; |
| 543 | } |
| 544 | dispatch.GetPhysicalDeviceSurfaceSupportKHR = reinterpret_cast<PFN_vkGetPhysicalDeviceSurfaceSupportKHR>(get_proc_addr(instance, "vkGetPhysicalDeviceSurfaceSupportKHR")); |
| 545 | if (UNLIKELY(!dispatch.GetPhysicalDeviceSurfaceSupportKHR)) { |
| 546 | ALOGE("missing instance proc: %s", "vkGetPhysicalDeviceSurfaceSupportKHR"); |
| 547 | success = false; |
| 548 | } |
| 549 | dispatch.GetPhysicalDeviceSurfaceCapabilitiesKHR = reinterpret_cast<PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR>(get_proc_addr(instance, "vkGetPhysicalDeviceSurfaceCapabilitiesKHR")); |
| 550 | if (UNLIKELY(!dispatch.GetPhysicalDeviceSurfaceCapabilitiesKHR)) { |
| 551 | ALOGE("missing instance proc: %s", "vkGetPhysicalDeviceSurfaceCapabilitiesKHR"); |
| 552 | success = false; |
| 553 | } |
| 554 | dispatch.GetPhysicalDeviceSurfaceFormatsKHR = reinterpret_cast<PFN_vkGetPhysicalDeviceSurfaceFormatsKHR>(get_proc_addr(instance, "vkGetPhysicalDeviceSurfaceFormatsKHR")); |
| 555 | if (UNLIKELY(!dispatch.GetPhysicalDeviceSurfaceFormatsKHR)) { |
| 556 | ALOGE("missing instance proc: %s", "vkGetPhysicalDeviceSurfaceFormatsKHR"); |
| 557 | success = false; |
| 558 | } |
| 559 | dispatch.GetPhysicalDeviceSurfacePresentModesKHR = reinterpret_cast<PFN_vkGetPhysicalDeviceSurfacePresentModesKHR>(get_proc_addr(instance, "vkGetPhysicalDeviceSurfacePresentModesKHR")); |
| 560 | if (UNLIKELY(!dispatch.GetPhysicalDeviceSurfacePresentModesKHR)) { |
| 561 | ALOGE("missing instance proc: %s", "vkGetPhysicalDeviceSurfacePresentModesKHR"); |
| 562 | success = false; |
| 563 | } |
| 564 | dispatch.CreateAndroidSurfaceKHR = reinterpret_cast<PFN_vkCreateAndroidSurfaceKHR>(get_proc_addr(instance, "vkCreateAndroidSurfaceKHR")); |
| 565 | if (UNLIKELY(!dispatch.CreateAndroidSurfaceKHR)) { |
| 566 | ALOGE("missing instance proc: %s", "vkCreateAndroidSurfaceKHR"); |
| 567 | success = false; |
| 568 | } |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 569 | dispatch.CreateDebugReportCallbackEXT = reinterpret_cast<PFN_vkCreateDebugReportCallbackEXT>(get_proc_addr(instance, "vkCreateDebugReportCallbackEXT")); |
| 570 | if (UNLIKELY(!dispatch.CreateDebugReportCallbackEXT)) { |
| 571 | ALOGE("missing instance proc: %s", "vkCreateDebugReportCallbackEXT"); |
| 572 | success = false; |
| 573 | } |
| 574 | dispatch.DestroyDebugReportCallbackEXT = reinterpret_cast<PFN_vkDestroyDebugReportCallbackEXT>(get_proc_addr(instance, "vkDestroyDebugReportCallbackEXT")); |
| 575 | if (UNLIKELY(!dispatch.DestroyDebugReportCallbackEXT)) { |
| 576 | ALOGE("missing instance proc: %s", "vkDestroyDebugReportCallbackEXT"); |
| 577 | success = false; |
| 578 | } |
| 579 | dispatch.DebugReportMessageEXT = reinterpret_cast<PFN_vkDebugReportMessageEXT>(get_proc_addr(instance, "vkDebugReportMessageEXT")); |
| 580 | if (UNLIKELY(!dispatch.DebugReportMessageEXT)) { |
| 581 | ALOGE("missing instance proc: %s", "vkDebugReportMessageEXT"); |
| 582 | success = false; |
| 583 | } |
Jesse Hall | 1f91d39 | 2015-12-11 16:28:44 -0800 | [diff] [blame] | 584 | // clang-format on |
| 585 | return success; |
| 586 | } |
| 587 | |
| 588 | bool LoadDeviceDispatchTable(VkDevice device, |
| 589 | PFN_vkGetDeviceProcAddr get_proc_addr, |
| 590 | DeviceDispatchTable& dispatch) { |
| 591 | bool success = true; |
| 592 | // clang-format off |
| 593 | dispatch.DestroyDevice = reinterpret_cast<PFN_vkDestroyDevice>(get_proc_addr(device, "vkDestroyDevice")); |
| 594 | if (UNLIKELY(!dispatch.DestroyDevice)) { |
| 595 | ALOGE("missing device proc: %s", "vkDestroyDevice"); |
| 596 | success = false; |
| 597 | } |
| 598 | dispatch.GetDeviceQueue = reinterpret_cast<PFN_vkGetDeviceQueue>(get_proc_addr(device, "vkGetDeviceQueue")); |
| 599 | if (UNLIKELY(!dispatch.GetDeviceQueue)) { |
| 600 | ALOGE("missing device proc: %s", "vkGetDeviceQueue"); |
| 601 | success = false; |
| 602 | } |
| 603 | dispatch.QueueSubmit = reinterpret_cast<PFN_vkQueueSubmit>(get_proc_addr(device, "vkQueueSubmit")); |
| 604 | if (UNLIKELY(!dispatch.QueueSubmit)) { |
| 605 | ALOGE("missing device proc: %s", "vkQueueSubmit"); |
| 606 | success = false; |
| 607 | } |
| 608 | dispatch.QueueWaitIdle = reinterpret_cast<PFN_vkQueueWaitIdle>(get_proc_addr(device, "vkQueueWaitIdle")); |
| 609 | if (UNLIKELY(!dispatch.QueueWaitIdle)) { |
| 610 | ALOGE("missing device proc: %s", "vkQueueWaitIdle"); |
| 611 | success = false; |
| 612 | } |
| 613 | dispatch.DeviceWaitIdle = reinterpret_cast<PFN_vkDeviceWaitIdle>(get_proc_addr(device, "vkDeviceWaitIdle")); |
| 614 | if (UNLIKELY(!dispatch.DeviceWaitIdle)) { |
| 615 | ALOGE("missing device proc: %s", "vkDeviceWaitIdle"); |
| 616 | success = false; |
| 617 | } |
| 618 | dispatch.AllocateMemory = reinterpret_cast<PFN_vkAllocateMemory>(get_proc_addr(device, "vkAllocateMemory")); |
| 619 | if (UNLIKELY(!dispatch.AllocateMemory)) { |
| 620 | ALOGE("missing device proc: %s", "vkAllocateMemory"); |
| 621 | success = false; |
| 622 | } |
| 623 | dispatch.FreeMemory = reinterpret_cast<PFN_vkFreeMemory>(get_proc_addr(device, "vkFreeMemory")); |
| 624 | if (UNLIKELY(!dispatch.FreeMemory)) { |
| 625 | ALOGE("missing device proc: %s", "vkFreeMemory"); |
| 626 | success = false; |
| 627 | } |
| 628 | dispatch.MapMemory = reinterpret_cast<PFN_vkMapMemory>(get_proc_addr(device, "vkMapMemory")); |
| 629 | if (UNLIKELY(!dispatch.MapMemory)) { |
| 630 | ALOGE("missing device proc: %s", "vkMapMemory"); |
| 631 | success = false; |
| 632 | } |
| 633 | dispatch.UnmapMemory = reinterpret_cast<PFN_vkUnmapMemory>(get_proc_addr(device, "vkUnmapMemory")); |
| 634 | if (UNLIKELY(!dispatch.UnmapMemory)) { |
| 635 | ALOGE("missing device proc: %s", "vkUnmapMemory"); |
| 636 | success = false; |
| 637 | } |
| 638 | dispatch.FlushMappedMemoryRanges = reinterpret_cast<PFN_vkFlushMappedMemoryRanges>(get_proc_addr(device, "vkFlushMappedMemoryRanges")); |
| 639 | if (UNLIKELY(!dispatch.FlushMappedMemoryRanges)) { |
| 640 | ALOGE("missing device proc: %s", "vkFlushMappedMemoryRanges"); |
| 641 | success = false; |
| 642 | } |
| 643 | dispatch.InvalidateMappedMemoryRanges = reinterpret_cast<PFN_vkInvalidateMappedMemoryRanges>(get_proc_addr(device, "vkInvalidateMappedMemoryRanges")); |
| 644 | if (UNLIKELY(!dispatch.InvalidateMappedMemoryRanges)) { |
| 645 | ALOGE("missing device proc: %s", "vkInvalidateMappedMemoryRanges"); |
| 646 | success = false; |
| 647 | } |
| 648 | dispatch.GetDeviceMemoryCommitment = reinterpret_cast<PFN_vkGetDeviceMemoryCommitment>(get_proc_addr(device, "vkGetDeviceMemoryCommitment")); |
| 649 | if (UNLIKELY(!dispatch.GetDeviceMemoryCommitment)) { |
| 650 | ALOGE("missing device proc: %s", "vkGetDeviceMemoryCommitment"); |
| 651 | success = false; |
| 652 | } |
| 653 | dispatch.GetBufferMemoryRequirements = reinterpret_cast<PFN_vkGetBufferMemoryRequirements>(get_proc_addr(device, "vkGetBufferMemoryRequirements")); |
| 654 | if (UNLIKELY(!dispatch.GetBufferMemoryRequirements)) { |
| 655 | ALOGE("missing device proc: %s", "vkGetBufferMemoryRequirements"); |
| 656 | success = false; |
| 657 | } |
| 658 | dispatch.BindBufferMemory = reinterpret_cast<PFN_vkBindBufferMemory>(get_proc_addr(device, "vkBindBufferMemory")); |
| 659 | if (UNLIKELY(!dispatch.BindBufferMemory)) { |
| 660 | ALOGE("missing device proc: %s", "vkBindBufferMemory"); |
| 661 | success = false; |
| 662 | } |
| 663 | dispatch.GetImageMemoryRequirements = reinterpret_cast<PFN_vkGetImageMemoryRequirements>(get_proc_addr(device, "vkGetImageMemoryRequirements")); |
| 664 | if (UNLIKELY(!dispatch.GetImageMemoryRequirements)) { |
| 665 | ALOGE("missing device proc: %s", "vkGetImageMemoryRequirements"); |
| 666 | success = false; |
| 667 | } |
| 668 | dispatch.BindImageMemory = reinterpret_cast<PFN_vkBindImageMemory>(get_proc_addr(device, "vkBindImageMemory")); |
| 669 | if (UNLIKELY(!dispatch.BindImageMemory)) { |
| 670 | ALOGE("missing device proc: %s", "vkBindImageMemory"); |
| 671 | success = false; |
| 672 | } |
| 673 | dispatch.GetImageSparseMemoryRequirements = reinterpret_cast<PFN_vkGetImageSparseMemoryRequirements>(get_proc_addr(device, "vkGetImageSparseMemoryRequirements")); |
| 674 | if (UNLIKELY(!dispatch.GetImageSparseMemoryRequirements)) { |
| 675 | ALOGE("missing device proc: %s", "vkGetImageSparseMemoryRequirements"); |
| 676 | success = false; |
| 677 | } |
| 678 | dispatch.QueueBindSparse = reinterpret_cast<PFN_vkQueueBindSparse>(get_proc_addr(device, "vkQueueBindSparse")); |
| 679 | if (UNLIKELY(!dispatch.QueueBindSparse)) { |
| 680 | ALOGE("missing device proc: %s", "vkQueueBindSparse"); |
| 681 | success = false; |
| 682 | } |
| 683 | dispatch.CreateFence = reinterpret_cast<PFN_vkCreateFence>(get_proc_addr(device, "vkCreateFence")); |
| 684 | if (UNLIKELY(!dispatch.CreateFence)) { |
| 685 | ALOGE("missing device proc: %s", "vkCreateFence"); |
| 686 | success = false; |
| 687 | } |
| 688 | dispatch.DestroyFence = reinterpret_cast<PFN_vkDestroyFence>(get_proc_addr(device, "vkDestroyFence")); |
| 689 | if (UNLIKELY(!dispatch.DestroyFence)) { |
| 690 | ALOGE("missing device proc: %s", "vkDestroyFence"); |
| 691 | success = false; |
| 692 | } |
| 693 | dispatch.ResetFences = reinterpret_cast<PFN_vkResetFences>(get_proc_addr(device, "vkResetFences")); |
| 694 | if (UNLIKELY(!dispatch.ResetFences)) { |
| 695 | ALOGE("missing device proc: %s", "vkResetFences"); |
| 696 | success = false; |
| 697 | } |
| 698 | dispatch.GetFenceStatus = reinterpret_cast<PFN_vkGetFenceStatus>(get_proc_addr(device, "vkGetFenceStatus")); |
| 699 | if (UNLIKELY(!dispatch.GetFenceStatus)) { |
| 700 | ALOGE("missing device proc: %s", "vkGetFenceStatus"); |
| 701 | success = false; |
| 702 | } |
| 703 | dispatch.WaitForFences = reinterpret_cast<PFN_vkWaitForFences>(get_proc_addr(device, "vkWaitForFences")); |
| 704 | if (UNLIKELY(!dispatch.WaitForFences)) { |
| 705 | ALOGE("missing device proc: %s", "vkWaitForFences"); |
| 706 | success = false; |
| 707 | } |
| 708 | dispatch.CreateSemaphore = reinterpret_cast<PFN_vkCreateSemaphore>(get_proc_addr(device, "vkCreateSemaphore")); |
| 709 | if (UNLIKELY(!dispatch.CreateSemaphore)) { |
| 710 | ALOGE("missing device proc: %s", "vkCreateSemaphore"); |
| 711 | success = false; |
| 712 | } |
| 713 | dispatch.DestroySemaphore = reinterpret_cast<PFN_vkDestroySemaphore>(get_proc_addr(device, "vkDestroySemaphore")); |
| 714 | if (UNLIKELY(!dispatch.DestroySemaphore)) { |
| 715 | ALOGE("missing device proc: %s", "vkDestroySemaphore"); |
| 716 | success = false; |
| 717 | } |
| 718 | dispatch.CreateEvent = reinterpret_cast<PFN_vkCreateEvent>(get_proc_addr(device, "vkCreateEvent")); |
| 719 | if (UNLIKELY(!dispatch.CreateEvent)) { |
| 720 | ALOGE("missing device proc: %s", "vkCreateEvent"); |
| 721 | success = false; |
| 722 | } |
| 723 | dispatch.DestroyEvent = reinterpret_cast<PFN_vkDestroyEvent>(get_proc_addr(device, "vkDestroyEvent")); |
| 724 | if (UNLIKELY(!dispatch.DestroyEvent)) { |
| 725 | ALOGE("missing device proc: %s", "vkDestroyEvent"); |
| 726 | success = false; |
| 727 | } |
| 728 | dispatch.GetEventStatus = reinterpret_cast<PFN_vkGetEventStatus>(get_proc_addr(device, "vkGetEventStatus")); |
| 729 | if (UNLIKELY(!dispatch.GetEventStatus)) { |
| 730 | ALOGE("missing device proc: %s", "vkGetEventStatus"); |
| 731 | success = false; |
| 732 | } |
| 733 | dispatch.SetEvent = reinterpret_cast<PFN_vkSetEvent>(get_proc_addr(device, "vkSetEvent")); |
| 734 | if (UNLIKELY(!dispatch.SetEvent)) { |
| 735 | ALOGE("missing device proc: %s", "vkSetEvent"); |
| 736 | success = false; |
| 737 | } |
| 738 | dispatch.ResetEvent = reinterpret_cast<PFN_vkResetEvent>(get_proc_addr(device, "vkResetEvent")); |
| 739 | if (UNLIKELY(!dispatch.ResetEvent)) { |
| 740 | ALOGE("missing device proc: %s", "vkResetEvent"); |
| 741 | success = false; |
| 742 | } |
| 743 | dispatch.CreateQueryPool = reinterpret_cast<PFN_vkCreateQueryPool>(get_proc_addr(device, "vkCreateQueryPool")); |
| 744 | if (UNLIKELY(!dispatch.CreateQueryPool)) { |
| 745 | ALOGE("missing device proc: %s", "vkCreateQueryPool"); |
| 746 | success = false; |
| 747 | } |
| 748 | dispatch.DestroyQueryPool = reinterpret_cast<PFN_vkDestroyQueryPool>(get_proc_addr(device, "vkDestroyQueryPool")); |
| 749 | if (UNLIKELY(!dispatch.DestroyQueryPool)) { |
| 750 | ALOGE("missing device proc: %s", "vkDestroyQueryPool"); |
| 751 | success = false; |
| 752 | } |
| 753 | dispatch.GetQueryPoolResults = reinterpret_cast<PFN_vkGetQueryPoolResults>(get_proc_addr(device, "vkGetQueryPoolResults")); |
| 754 | if (UNLIKELY(!dispatch.GetQueryPoolResults)) { |
| 755 | ALOGE("missing device proc: %s", "vkGetQueryPoolResults"); |
| 756 | success = false; |
| 757 | } |
| 758 | dispatch.CreateBuffer = reinterpret_cast<PFN_vkCreateBuffer>(get_proc_addr(device, "vkCreateBuffer")); |
| 759 | if (UNLIKELY(!dispatch.CreateBuffer)) { |
| 760 | ALOGE("missing device proc: %s", "vkCreateBuffer"); |
| 761 | success = false; |
| 762 | } |
| 763 | dispatch.DestroyBuffer = reinterpret_cast<PFN_vkDestroyBuffer>(get_proc_addr(device, "vkDestroyBuffer")); |
| 764 | if (UNLIKELY(!dispatch.DestroyBuffer)) { |
| 765 | ALOGE("missing device proc: %s", "vkDestroyBuffer"); |
| 766 | success = false; |
| 767 | } |
| 768 | dispatch.CreateBufferView = reinterpret_cast<PFN_vkCreateBufferView>(get_proc_addr(device, "vkCreateBufferView")); |
| 769 | if (UNLIKELY(!dispatch.CreateBufferView)) { |
| 770 | ALOGE("missing device proc: %s", "vkCreateBufferView"); |
| 771 | success = false; |
| 772 | } |
| 773 | dispatch.DestroyBufferView = reinterpret_cast<PFN_vkDestroyBufferView>(get_proc_addr(device, "vkDestroyBufferView")); |
| 774 | if (UNLIKELY(!dispatch.DestroyBufferView)) { |
| 775 | ALOGE("missing device proc: %s", "vkDestroyBufferView"); |
| 776 | success = false; |
| 777 | } |
| 778 | dispatch.CreateImage = reinterpret_cast<PFN_vkCreateImage>(get_proc_addr(device, "vkCreateImage")); |
| 779 | if (UNLIKELY(!dispatch.CreateImage)) { |
| 780 | ALOGE("missing device proc: %s", "vkCreateImage"); |
| 781 | success = false; |
| 782 | } |
| 783 | dispatch.DestroyImage = reinterpret_cast<PFN_vkDestroyImage>(get_proc_addr(device, "vkDestroyImage")); |
| 784 | if (UNLIKELY(!dispatch.DestroyImage)) { |
| 785 | ALOGE("missing device proc: %s", "vkDestroyImage"); |
| 786 | success = false; |
| 787 | } |
| 788 | dispatch.GetImageSubresourceLayout = reinterpret_cast<PFN_vkGetImageSubresourceLayout>(get_proc_addr(device, "vkGetImageSubresourceLayout")); |
| 789 | if (UNLIKELY(!dispatch.GetImageSubresourceLayout)) { |
| 790 | ALOGE("missing device proc: %s", "vkGetImageSubresourceLayout"); |
| 791 | success = false; |
| 792 | } |
| 793 | dispatch.CreateImageView = reinterpret_cast<PFN_vkCreateImageView>(get_proc_addr(device, "vkCreateImageView")); |
| 794 | if (UNLIKELY(!dispatch.CreateImageView)) { |
| 795 | ALOGE("missing device proc: %s", "vkCreateImageView"); |
| 796 | success = false; |
| 797 | } |
| 798 | dispatch.DestroyImageView = reinterpret_cast<PFN_vkDestroyImageView>(get_proc_addr(device, "vkDestroyImageView")); |
| 799 | if (UNLIKELY(!dispatch.DestroyImageView)) { |
| 800 | ALOGE("missing device proc: %s", "vkDestroyImageView"); |
| 801 | success = false; |
| 802 | } |
| 803 | dispatch.CreateShaderModule = reinterpret_cast<PFN_vkCreateShaderModule>(get_proc_addr(device, "vkCreateShaderModule")); |
| 804 | if (UNLIKELY(!dispatch.CreateShaderModule)) { |
| 805 | ALOGE("missing device proc: %s", "vkCreateShaderModule"); |
| 806 | success = false; |
| 807 | } |
| 808 | dispatch.DestroyShaderModule = reinterpret_cast<PFN_vkDestroyShaderModule>(get_proc_addr(device, "vkDestroyShaderModule")); |
| 809 | if (UNLIKELY(!dispatch.DestroyShaderModule)) { |
| 810 | ALOGE("missing device proc: %s", "vkDestroyShaderModule"); |
| 811 | success = false; |
| 812 | } |
| 813 | dispatch.CreatePipelineCache = reinterpret_cast<PFN_vkCreatePipelineCache>(get_proc_addr(device, "vkCreatePipelineCache")); |
| 814 | if (UNLIKELY(!dispatch.CreatePipelineCache)) { |
| 815 | ALOGE("missing device proc: %s", "vkCreatePipelineCache"); |
| 816 | success = false; |
| 817 | } |
| 818 | dispatch.DestroyPipelineCache = reinterpret_cast<PFN_vkDestroyPipelineCache>(get_proc_addr(device, "vkDestroyPipelineCache")); |
| 819 | if (UNLIKELY(!dispatch.DestroyPipelineCache)) { |
| 820 | ALOGE("missing device proc: %s", "vkDestroyPipelineCache"); |
| 821 | success = false; |
| 822 | } |
| 823 | dispatch.GetPipelineCacheData = reinterpret_cast<PFN_vkGetPipelineCacheData>(get_proc_addr(device, "vkGetPipelineCacheData")); |
| 824 | if (UNLIKELY(!dispatch.GetPipelineCacheData)) { |
| 825 | ALOGE("missing device proc: %s", "vkGetPipelineCacheData"); |
| 826 | success = false; |
| 827 | } |
| 828 | dispatch.MergePipelineCaches = reinterpret_cast<PFN_vkMergePipelineCaches>(get_proc_addr(device, "vkMergePipelineCaches")); |
| 829 | if (UNLIKELY(!dispatch.MergePipelineCaches)) { |
| 830 | ALOGE("missing device proc: %s", "vkMergePipelineCaches"); |
| 831 | success = false; |
| 832 | } |
| 833 | dispatch.CreateGraphicsPipelines = reinterpret_cast<PFN_vkCreateGraphicsPipelines>(get_proc_addr(device, "vkCreateGraphicsPipelines")); |
| 834 | if (UNLIKELY(!dispatch.CreateGraphicsPipelines)) { |
| 835 | ALOGE("missing device proc: %s", "vkCreateGraphicsPipelines"); |
| 836 | success = false; |
| 837 | } |
| 838 | dispatch.CreateComputePipelines = reinterpret_cast<PFN_vkCreateComputePipelines>(get_proc_addr(device, "vkCreateComputePipelines")); |
| 839 | if (UNLIKELY(!dispatch.CreateComputePipelines)) { |
| 840 | ALOGE("missing device proc: %s", "vkCreateComputePipelines"); |
| 841 | success = false; |
| 842 | } |
| 843 | dispatch.DestroyPipeline = reinterpret_cast<PFN_vkDestroyPipeline>(get_proc_addr(device, "vkDestroyPipeline")); |
| 844 | if (UNLIKELY(!dispatch.DestroyPipeline)) { |
| 845 | ALOGE("missing device proc: %s", "vkDestroyPipeline"); |
| 846 | success = false; |
| 847 | } |
| 848 | dispatch.CreatePipelineLayout = reinterpret_cast<PFN_vkCreatePipelineLayout>(get_proc_addr(device, "vkCreatePipelineLayout")); |
| 849 | if (UNLIKELY(!dispatch.CreatePipelineLayout)) { |
| 850 | ALOGE("missing device proc: %s", "vkCreatePipelineLayout"); |
| 851 | success = false; |
| 852 | } |
| 853 | dispatch.DestroyPipelineLayout = reinterpret_cast<PFN_vkDestroyPipelineLayout>(get_proc_addr(device, "vkDestroyPipelineLayout")); |
| 854 | if (UNLIKELY(!dispatch.DestroyPipelineLayout)) { |
| 855 | ALOGE("missing device proc: %s", "vkDestroyPipelineLayout"); |
| 856 | success = false; |
| 857 | } |
| 858 | dispatch.CreateSampler = reinterpret_cast<PFN_vkCreateSampler>(get_proc_addr(device, "vkCreateSampler")); |
| 859 | if (UNLIKELY(!dispatch.CreateSampler)) { |
| 860 | ALOGE("missing device proc: %s", "vkCreateSampler"); |
| 861 | success = false; |
| 862 | } |
| 863 | dispatch.DestroySampler = reinterpret_cast<PFN_vkDestroySampler>(get_proc_addr(device, "vkDestroySampler")); |
| 864 | if (UNLIKELY(!dispatch.DestroySampler)) { |
| 865 | ALOGE("missing device proc: %s", "vkDestroySampler"); |
| 866 | success = false; |
| 867 | } |
| 868 | dispatch.CreateDescriptorSetLayout = reinterpret_cast<PFN_vkCreateDescriptorSetLayout>(get_proc_addr(device, "vkCreateDescriptorSetLayout")); |
| 869 | if (UNLIKELY(!dispatch.CreateDescriptorSetLayout)) { |
| 870 | ALOGE("missing device proc: %s", "vkCreateDescriptorSetLayout"); |
| 871 | success = false; |
| 872 | } |
| 873 | dispatch.DestroyDescriptorSetLayout = reinterpret_cast<PFN_vkDestroyDescriptorSetLayout>(get_proc_addr(device, "vkDestroyDescriptorSetLayout")); |
| 874 | if (UNLIKELY(!dispatch.DestroyDescriptorSetLayout)) { |
| 875 | ALOGE("missing device proc: %s", "vkDestroyDescriptorSetLayout"); |
| 876 | success = false; |
| 877 | } |
| 878 | dispatch.CreateDescriptorPool = reinterpret_cast<PFN_vkCreateDescriptorPool>(get_proc_addr(device, "vkCreateDescriptorPool")); |
| 879 | if (UNLIKELY(!dispatch.CreateDescriptorPool)) { |
| 880 | ALOGE("missing device proc: %s", "vkCreateDescriptorPool"); |
| 881 | success = false; |
| 882 | } |
| 883 | dispatch.DestroyDescriptorPool = reinterpret_cast<PFN_vkDestroyDescriptorPool>(get_proc_addr(device, "vkDestroyDescriptorPool")); |
| 884 | if (UNLIKELY(!dispatch.DestroyDescriptorPool)) { |
| 885 | ALOGE("missing device proc: %s", "vkDestroyDescriptorPool"); |
| 886 | success = false; |
| 887 | } |
| 888 | dispatch.ResetDescriptorPool = reinterpret_cast<PFN_vkResetDescriptorPool>(get_proc_addr(device, "vkResetDescriptorPool")); |
| 889 | if (UNLIKELY(!dispatch.ResetDescriptorPool)) { |
| 890 | ALOGE("missing device proc: %s", "vkResetDescriptorPool"); |
| 891 | success = false; |
| 892 | } |
| 893 | dispatch.AllocateDescriptorSets = reinterpret_cast<PFN_vkAllocateDescriptorSets>(get_proc_addr(device, "vkAllocateDescriptorSets")); |
| 894 | if (UNLIKELY(!dispatch.AllocateDescriptorSets)) { |
| 895 | ALOGE("missing device proc: %s", "vkAllocateDescriptorSets"); |
| 896 | success = false; |
| 897 | } |
| 898 | dispatch.FreeDescriptorSets = reinterpret_cast<PFN_vkFreeDescriptorSets>(get_proc_addr(device, "vkFreeDescriptorSets")); |
| 899 | if (UNLIKELY(!dispatch.FreeDescriptorSets)) { |
| 900 | ALOGE("missing device proc: %s", "vkFreeDescriptorSets"); |
| 901 | success = false; |
| 902 | } |
| 903 | dispatch.UpdateDescriptorSets = reinterpret_cast<PFN_vkUpdateDescriptorSets>(get_proc_addr(device, "vkUpdateDescriptorSets")); |
| 904 | if (UNLIKELY(!dispatch.UpdateDescriptorSets)) { |
| 905 | ALOGE("missing device proc: %s", "vkUpdateDescriptorSets"); |
| 906 | success = false; |
| 907 | } |
| 908 | dispatch.CreateFramebuffer = reinterpret_cast<PFN_vkCreateFramebuffer>(get_proc_addr(device, "vkCreateFramebuffer")); |
| 909 | if (UNLIKELY(!dispatch.CreateFramebuffer)) { |
| 910 | ALOGE("missing device proc: %s", "vkCreateFramebuffer"); |
| 911 | success = false; |
| 912 | } |
| 913 | dispatch.DestroyFramebuffer = reinterpret_cast<PFN_vkDestroyFramebuffer>(get_proc_addr(device, "vkDestroyFramebuffer")); |
| 914 | if (UNLIKELY(!dispatch.DestroyFramebuffer)) { |
| 915 | ALOGE("missing device proc: %s", "vkDestroyFramebuffer"); |
| 916 | success = false; |
| 917 | } |
| 918 | dispatch.CreateRenderPass = reinterpret_cast<PFN_vkCreateRenderPass>(get_proc_addr(device, "vkCreateRenderPass")); |
| 919 | if (UNLIKELY(!dispatch.CreateRenderPass)) { |
| 920 | ALOGE("missing device proc: %s", "vkCreateRenderPass"); |
| 921 | success = false; |
| 922 | } |
| 923 | dispatch.DestroyRenderPass = reinterpret_cast<PFN_vkDestroyRenderPass>(get_proc_addr(device, "vkDestroyRenderPass")); |
| 924 | if (UNLIKELY(!dispatch.DestroyRenderPass)) { |
| 925 | ALOGE("missing device proc: %s", "vkDestroyRenderPass"); |
| 926 | success = false; |
| 927 | } |
| 928 | dispatch.GetRenderAreaGranularity = reinterpret_cast<PFN_vkGetRenderAreaGranularity>(get_proc_addr(device, "vkGetRenderAreaGranularity")); |
| 929 | if (UNLIKELY(!dispatch.GetRenderAreaGranularity)) { |
| 930 | ALOGE("missing device proc: %s", "vkGetRenderAreaGranularity"); |
| 931 | success = false; |
| 932 | } |
| 933 | dispatch.CreateCommandPool = reinterpret_cast<PFN_vkCreateCommandPool>(get_proc_addr(device, "vkCreateCommandPool")); |
| 934 | if (UNLIKELY(!dispatch.CreateCommandPool)) { |
| 935 | ALOGE("missing device proc: %s", "vkCreateCommandPool"); |
| 936 | success = false; |
| 937 | } |
| 938 | dispatch.DestroyCommandPool = reinterpret_cast<PFN_vkDestroyCommandPool>(get_proc_addr(device, "vkDestroyCommandPool")); |
| 939 | if (UNLIKELY(!dispatch.DestroyCommandPool)) { |
| 940 | ALOGE("missing device proc: %s", "vkDestroyCommandPool"); |
| 941 | success = false; |
| 942 | } |
| 943 | dispatch.ResetCommandPool = reinterpret_cast<PFN_vkResetCommandPool>(get_proc_addr(device, "vkResetCommandPool")); |
| 944 | if (UNLIKELY(!dispatch.ResetCommandPool)) { |
| 945 | ALOGE("missing device proc: %s", "vkResetCommandPool"); |
| 946 | success = false; |
| 947 | } |
| 948 | dispatch.AllocateCommandBuffers = reinterpret_cast<PFN_vkAllocateCommandBuffers>(get_proc_addr(device, "vkAllocateCommandBuffers")); |
| 949 | if (UNLIKELY(!dispatch.AllocateCommandBuffers)) { |
| 950 | ALOGE("missing device proc: %s", "vkAllocateCommandBuffers"); |
| 951 | success = false; |
| 952 | } |
| 953 | dispatch.FreeCommandBuffers = reinterpret_cast<PFN_vkFreeCommandBuffers>(get_proc_addr(device, "vkFreeCommandBuffers")); |
| 954 | if (UNLIKELY(!dispatch.FreeCommandBuffers)) { |
| 955 | ALOGE("missing device proc: %s", "vkFreeCommandBuffers"); |
| 956 | success = false; |
| 957 | } |
| 958 | dispatch.BeginCommandBuffer = reinterpret_cast<PFN_vkBeginCommandBuffer>(get_proc_addr(device, "vkBeginCommandBuffer")); |
| 959 | if (UNLIKELY(!dispatch.BeginCommandBuffer)) { |
| 960 | ALOGE("missing device proc: %s", "vkBeginCommandBuffer"); |
| 961 | success = false; |
| 962 | } |
| 963 | dispatch.EndCommandBuffer = reinterpret_cast<PFN_vkEndCommandBuffer>(get_proc_addr(device, "vkEndCommandBuffer")); |
| 964 | if (UNLIKELY(!dispatch.EndCommandBuffer)) { |
| 965 | ALOGE("missing device proc: %s", "vkEndCommandBuffer"); |
| 966 | success = false; |
| 967 | } |
| 968 | dispatch.ResetCommandBuffer = reinterpret_cast<PFN_vkResetCommandBuffer>(get_proc_addr(device, "vkResetCommandBuffer")); |
| 969 | if (UNLIKELY(!dispatch.ResetCommandBuffer)) { |
| 970 | ALOGE("missing device proc: %s", "vkResetCommandBuffer"); |
| 971 | success = false; |
| 972 | } |
| 973 | dispatch.CmdBindPipeline = reinterpret_cast<PFN_vkCmdBindPipeline>(get_proc_addr(device, "vkCmdBindPipeline")); |
| 974 | if (UNLIKELY(!dispatch.CmdBindPipeline)) { |
| 975 | ALOGE("missing device proc: %s", "vkCmdBindPipeline"); |
| 976 | success = false; |
| 977 | } |
| 978 | dispatch.CmdSetViewport = reinterpret_cast<PFN_vkCmdSetViewport>(get_proc_addr(device, "vkCmdSetViewport")); |
| 979 | if (UNLIKELY(!dispatch.CmdSetViewport)) { |
| 980 | ALOGE("missing device proc: %s", "vkCmdSetViewport"); |
| 981 | success = false; |
| 982 | } |
| 983 | dispatch.CmdSetScissor = reinterpret_cast<PFN_vkCmdSetScissor>(get_proc_addr(device, "vkCmdSetScissor")); |
| 984 | if (UNLIKELY(!dispatch.CmdSetScissor)) { |
| 985 | ALOGE("missing device proc: %s", "vkCmdSetScissor"); |
| 986 | success = false; |
| 987 | } |
| 988 | dispatch.CmdSetLineWidth = reinterpret_cast<PFN_vkCmdSetLineWidth>(get_proc_addr(device, "vkCmdSetLineWidth")); |
| 989 | if (UNLIKELY(!dispatch.CmdSetLineWidth)) { |
| 990 | ALOGE("missing device proc: %s", "vkCmdSetLineWidth"); |
| 991 | success = false; |
| 992 | } |
| 993 | dispatch.CmdSetDepthBias = reinterpret_cast<PFN_vkCmdSetDepthBias>(get_proc_addr(device, "vkCmdSetDepthBias")); |
| 994 | if (UNLIKELY(!dispatch.CmdSetDepthBias)) { |
| 995 | ALOGE("missing device proc: %s", "vkCmdSetDepthBias"); |
| 996 | success = false; |
| 997 | } |
| 998 | dispatch.CmdSetBlendConstants = reinterpret_cast<PFN_vkCmdSetBlendConstants>(get_proc_addr(device, "vkCmdSetBlendConstants")); |
| 999 | if (UNLIKELY(!dispatch.CmdSetBlendConstants)) { |
| 1000 | ALOGE("missing device proc: %s", "vkCmdSetBlendConstants"); |
| 1001 | success = false; |
| 1002 | } |
| 1003 | dispatch.CmdSetDepthBounds = reinterpret_cast<PFN_vkCmdSetDepthBounds>(get_proc_addr(device, "vkCmdSetDepthBounds")); |
| 1004 | if (UNLIKELY(!dispatch.CmdSetDepthBounds)) { |
| 1005 | ALOGE("missing device proc: %s", "vkCmdSetDepthBounds"); |
| 1006 | success = false; |
| 1007 | } |
| 1008 | dispatch.CmdSetStencilCompareMask = reinterpret_cast<PFN_vkCmdSetStencilCompareMask>(get_proc_addr(device, "vkCmdSetStencilCompareMask")); |
| 1009 | if (UNLIKELY(!dispatch.CmdSetStencilCompareMask)) { |
| 1010 | ALOGE("missing device proc: %s", "vkCmdSetStencilCompareMask"); |
| 1011 | success = false; |
| 1012 | } |
| 1013 | dispatch.CmdSetStencilWriteMask = reinterpret_cast<PFN_vkCmdSetStencilWriteMask>(get_proc_addr(device, "vkCmdSetStencilWriteMask")); |
| 1014 | if (UNLIKELY(!dispatch.CmdSetStencilWriteMask)) { |
| 1015 | ALOGE("missing device proc: %s", "vkCmdSetStencilWriteMask"); |
| 1016 | success = false; |
| 1017 | } |
| 1018 | dispatch.CmdSetStencilReference = reinterpret_cast<PFN_vkCmdSetStencilReference>(get_proc_addr(device, "vkCmdSetStencilReference")); |
| 1019 | if (UNLIKELY(!dispatch.CmdSetStencilReference)) { |
| 1020 | ALOGE("missing device proc: %s", "vkCmdSetStencilReference"); |
| 1021 | success = false; |
| 1022 | } |
| 1023 | dispatch.CmdBindDescriptorSets = reinterpret_cast<PFN_vkCmdBindDescriptorSets>(get_proc_addr(device, "vkCmdBindDescriptorSets")); |
| 1024 | if (UNLIKELY(!dispatch.CmdBindDescriptorSets)) { |
| 1025 | ALOGE("missing device proc: %s", "vkCmdBindDescriptorSets"); |
| 1026 | success = false; |
| 1027 | } |
| 1028 | dispatch.CmdBindIndexBuffer = reinterpret_cast<PFN_vkCmdBindIndexBuffer>(get_proc_addr(device, "vkCmdBindIndexBuffer")); |
| 1029 | if (UNLIKELY(!dispatch.CmdBindIndexBuffer)) { |
| 1030 | ALOGE("missing device proc: %s", "vkCmdBindIndexBuffer"); |
| 1031 | success = false; |
| 1032 | } |
| 1033 | dispatch.CmdBindVertexBuffers = reinterpret_cast<PFN_vkCmdBindVertexBuffers>(get_proc_addr(device, "vkCmdBindVertexBuffers")); |
| 1034 | if (UNLIKELY(!dispatch.CmdBindVertexBuffers)) { |
| 1035 | ALOGE("missing device proc: %s", "vkCmdBindVertexBuffers"); |
| 1036 | success = false; |
| 1037 | } |
| 1038 | dispatch.CmdDraw = reinterpret_cast<PFN_vkCmdDraw>(get_proc_addr(device, "vkCmdDraw")); |
| 1039 | if (UNLIKELY(!dispatch.CmdDraw)) { |
| 1040 | ALOGE("missing device proc: %s", "vkCmdDraw"); |
| 1041 | success = false; |
| 1042 | } |
| 1043 | dispatch.CmdDrawIndexed = reinterpret_cast<PFN_vkCmdDrawIndexed>(get_proc_addr(device, "vkCmdDrawIndexed")); |
| 1044 | if (UNLIKELY(!dispatch.CmdDrawIndexed)) { |
| 1045 | ALOGE("missing device proc: %s", "vkCmdDrawIndexed"); |
| 1046 | success = false; |
| 1047 | } |
| 1048 | dispatch.CmdDrawIndirect = reinterpret_cast<PFN_vkCmdDrawIndirect>(get_proc_addr(device, "vkCmdDrawIndirect")); |
| 1049 | if (UNLIKELY(!dispatch.CmdDrawIndirect)) { |
| 1050 | ALOGE("missing device proc: %s", "vkCmdDrawIndirect"); |
| 1051 | success = false; |
| 1052 | } |
| 1053 | dispatch.CmdDrawIndexedIndirect = reinterpret_cast<PFN_vkCmdDrawIndexedIndirect>(get_proc_addr(device, "vkCmdDrawIndexedIndirect")); |
| 1054 | if (UNLIKELY(!dispatch.CmdDrawIndexedIndirect)) { |
| 1055 | ALOGE("missing device proc: %s", "vkCmdDrawIndexedIndirect"); |
| 1056 | success = false; |
| 1057 | } |
| 1058 | dispatch.CmdDispatch = reinterpret_cast<PFN_vkCmdDispatch>(get_proc_addr(device, "vkCmdDispatch")); |
| 1059 | if (UNLIKELY(!dispatch.CmdDispatch)) { |
| 1060 | ALOGE("missing device proc: %s", "vkCmdDispatch"); |
| 1061 | success = false; |
| 1062 | } |
| 1063 | dispatch.CmdDispatchIndirect = reinterpret_cast<PFN_vkCmdDispatchIndirect>(get_proc_addr(device, "vkCmdDispatchIndirect")); |
| 1064 | if (UNLIKELY(!dispatch.CmdDispatchIndirect)) { |
| 1065 | ALOGE("missing device proc: %s", "vkCmdDispatchIndirect"); |
| 1066 | success = false; |
| 1067 | } |
| 1068 | dispatch.CmdCopyBuffer = reinterpret_cast<PFN_vkCmdCopyBuffer>(get_proc_addr(device, "vkCmdCopyBuffer")); |
| 1069 | if (UNLIKELY(!dispatch.CmdCopyBuffer)) { |
| 1070 | ALOGE("missing device proc: %s", "vkCmdCopyBuffer"); |
| 1071 | success = false; |
| 1072 | } |
| 1073 | dispatch.CmdCopyImage = reinterpret_cast<PFN_vkCmdCopyImage>(get_proc_addr(device, "vkCmdCopyImage")); |
| 1074 | if (UNLIKELY(!dispatch.CmdCopyImage)) { |
| 1075 | ALOGE("missing device proc: %s", "vkCmdCopyImage"); |
| 1076 | success = false; |
| 1077 | } |
| 1078 | dispatch.CmdBlitImage = reinterpret_cast<PFN_vkCmdBlitImage>(get_proc_addr(device, "vkCmdBlitImage")); |
| 1079 | if (UNLIKELY(!dispatch.CmdBlitImage)) { |
| 1080 | ALOGE("missing device proc: %s", "vkCmdBlitImage"); |
| 1081 | success = false; |
| 1082 | } |
| 1083 | dispatch.CmdCopyBufferToImage = reinterpret_cast<PFN_vkCmdCopyBufferToImage>(get_proc_addr(device, "vkCmdCopyBufferToImage")); |
| 1084 | if (UNLIKELY(!dispatch.CmdCopyBufferToImage)) { |
| 1085 | ALOGE("missing device proc: %s", "vkCmdCopyBufferToImage"); |
| 1086 | success = false; |
| 1087 | } |
| 1088 | dispatch.CmdCopyImageToBuffer = reinterpret_cast<PFN_vkCmdCopyImageToBuffer>(get_proc_addr(device, "vkCmdCopyImageToBuffer")); |
| 1089 | if (UNLIKELY(!dispatch.CmdCopyImageToBuffer)) { |
| 1090 | ALOGE("missing device proc: %s", "vkCmdCopyImageToBuffer"); |
| 1091 | success = false; |
| 1092 | } |
| 1093 | dispatch.CmdUpdateBuffer = reinterpret_cast<PFN_vkCmdUpdateBuffer>(get_proc_addr(device, "vkCmdUpdateBuffer")); |
| 1094 | if (UNLIKELY(!dispatch.CmdUpdateBuffer)) { |
| 1095 | ALOGE("missing device proc: %s", "vkCmdUpdateBuffer"); |
| 1096 | success = false; |
| 1097 | } |
| 1098 | dispatch.CmdFillBuffer = reinterpret_cast<PFN_vkCmdFillBuffer>(get_proc_addr(device, "vkCmdFillBuffer")); |
| 1099 | if (UNLIKELY(!dispatch.CmdFillBuffer)) { |
| 1100 | ALOGE("missing device proc: %s", "vkCmdFillBuffer"); |
| 1101 | success = false; |
| 1102 | } |
| 1103 | dispatch.CmdClearColorImage = reinterpret_cast<PFN_vkCmdClearColorImage>(get_proc_addr(device, "vkCmdClearColorImage")); |
| 1104 | if (UNLIKELY(!dispatch.CmdClearColorImage)) { |
| 1105 | ALOGE("missing device proc: %s", "vkCmdClearColorImage"); |
| 1106 | success = false; |
| 1107 | } |
| 1108 | dispatch.CmdClearDepthStencilImage = reinterpret_cast<PFN_vkCmdClearDepthStencilImage>(get_proc_addr(device, "vkCmdClearDepthStencilImage")); |
| 1109 | if (UNLIKELY(!dispatch.CmdClearDepthStencilImage)) { |
| 1110 | ALOGE("missing device proc: %s", "vkCmdClearDepthStencilImage"); |
| 1111 | success = false; |
| 1112 | } |
| 1113 | dispatch.CmdClearAttachments = reinterpret_cast<PFN_vkCmdClearAttachments>(get_proc_addr(device, "vkCmdClearAttachments")); |
| 1114 | if (UNLIKELY(!dispatch.CmdClearAttachments)) { |
| 1115 | ALOGE("missing device proc: %s", "vkCmdClearAttachments"); |
| 1116 | success = false; |
| 1117 | } |
| 1118 | dispatch.CmdResolveImage = reinterpret_cast<PFN_vkCmdResolveImage>(get_proc_addr(device, "vkCmdResolveImage")); |
| 1119 | if (UNLIKELY(!dispatch.CmdResolveImage)) { |
| 1120 | ALOGE("missing device proc: %s", "vkCmdResolveImage"); |
| 1121 | success = false; |
| 1122 | } |
| 1123 | dispatch.CmdSetEvent = reinterpret_cast<PFN_vkCmdSetEvent>(get_proc_addr(device, "vkCmdSetEvent")); |
| 1124 | if (UNLIKELY(!dispatch.CmdSetEvent)) { |
| 1125 | ALOGE("missing device proc: %s", "vkCmdSetEvent"); |
| 1126 | success = false; |
| 1127 | } |
| 1128 | dispatch.CmdResetEvent = reinterpret_cast<PFN_vkCmdResetEvent>(get_proc_addr(device, "vkCmdResetEvent")); |
| 1129 | if (UNLIKELY(!dispatch.CmdResetEvent)) { |
| 1130 | ALOGE("missing device proc: %s", "vkCmdResetEvent"); |
| 1131 | success = false; |
| 1132 | } |
| 1133 | dispatch.CmdWaitEvents = reinterpret_cast<PFN_vkCmdWaitEvents>(get_proc_addr(device, "vkCmdWaitEvents")); |
| 1134 | if (UNLIKELY(!dispatch.CmdWaitEvents)) { |
| 1135 | ALOGE("missing device proc: %s", "vkCmdWaitEvents"); |
| 1136 | success = false; |
| 1137 | } |
| 1138 | dispatch.CmdPipelineBarrier = reinterpret_cast<PFN_vkCmdPipelineBarrier>(get_proc_addr(device, "vkCmdPipelineBarrier")); |
| 1139 | if (UNLIKELY(!dispatch.CmdPipelineBarrier)) { |
| 1140 | ALOGE("missing device proc: %s", "vkCmdPipelineBarrier"); |
| 1141 | success = false; |
| 1142 | } |
| 1143 | dispatch.CmdBeginQuery = reinterpret_cast<PFN_vkCmdBeginQuery>(get_proc_addr(device, "vkCmdBeginQuery")); |
| 1144 | if (UNLIKELY(!dispatch.CmdBeginQuery)) { |
| 1145 | ALOGE("missing device proc: %s", "vkCmdBeginQuery"); |
| 1146 | success = false; |
| 1147 | } |
| 1148 | dispatch.CmdEndQuery = reinterpret_cast<PFN_vkCmdEndQuery>(get_proc_addr(device, "vkCmdEndQuery")); |
| 1149 | if (UNLIKELY(!dispatch.CmdEndQuery)) { |
| 1150 | ALOGE("missing device proc: %s", "vkCmdEndQuery"); |
| 1151 | success = false; |
| 1152 | } |
| 1153 | dispatch.CmdResetQueryPool = reinterpret_cast<PFN_vkCmdResetQueryPool>(get_proc_addr(device, "vkCmdResetQueryPool")); |
| 1154 | if (UNLIKELY(!dispatch.CmdResetQueryPool)) { |
| 1155 | ALOGE("missing device proc: %s", "vkCmdResetQueryPool"); |
| 1156 | success = false; |
| 1157 | } |
| 1158 | dispatch.CmdWriteTimestamp = reinterpret_cast<PFN_vkCmdWriteTimestamp>(get_proc_addr(device, "vkCmdWriteTimestamp")); |
| 1159 | if (UNLIKELY(!dispatch.CmdWriteTimestamp)) { |
| 1160 | ALOGE("missing device proc: %s", "vkCmdWriteTimestamp"); |
| 1161 | success = false; |
| 1162 | } |
| 1163 | dispatch.CmdCopyQueryPoolResults = reinterpret_cast<PFN_vkCmdCopyQueryPoolResults>(get_proc_addr(device, "vkCmdCopyQueryPoolResults")); |
| 1164 | if (UNLIKELY(!dispatch.CmdCopyQueryPoolResults)) { |
| 1165 | ALOGE("missing device proc: %s", "vkCmdCopyQueryPoolResults"); |
| 1166 | success = false; |
| 1167 | } |
| 1168 | dispatch.CmdPushConstants = reinterpret_cast<PFN_vkCmdPushConstants>(get_proc_addr(device, "vkCmdPushConstants")); |
| 1169 | if (UNLIKELY(!dispatch.CmdPushConstants)) { |
| 1170 | ALOGE("missing device proc: %s", "vkCmdPushConstants"); |
| 1171 | success = false; |
| 1172 | } |
| 1173 | dispatch.CmdBeginRenderPass = reinterpret_cast<PFN_vkCmdBeginRenderPass>(get_proc_addr(device, "vkCmdBeginRenderPass")); |
| 1174 | if (UNLIKELY(!dispatch.CmdBeginRenderPass)) { |
| 1175 | ALOGE("missing device proc: %s", "vkCmdBeginRenderPass"); |
| 1176 | success = false; |
| 1177 | } |
| 1178 | dispatch.CmdNextSubpass = reinterpret_cast<PFN_vkCmdNextSubpass>(get_proc_addr(device, "vkCmdNextSubpass")); |
| 1179 | if (UNLIKELY(!dispatch.CmdNextSubpass)) { |
| 1180 | ALOGE("missing device proc: %s", "vkCmdNextSubpass"); |
| 1181 | success = false; |
| 1182 | } |
| 1183 | dispatch.CmdEndRenderPass = reinterpret_cast<PFN_vkCmdEndRenderPass>(get_proc_addr(device, "vkCmdEndRenderPass")); |
| 1184 | if (UNLIKELY(!dispatch.CmdEndRenderPass)) { |
| 1185 | ALOGE("missing device proc: %s", "vkCmdEndRenderPass"); |
| 1186 | success = false; |
| 1187 | } |
| 1188 | dispatch.CmdExecuteCommands = reinterpret_cast<PFN_vkCmdExecuteCommands>(get_proc_addr(device, "vkCmdExecuteCommands")); |
| 1189 | if (UNLIKELY(!dispatch.CmdExecuteCommands)) { |
| 1190 | ALOGE("missing device proc: %s", "vkCmdExecuteCommands"); |
| 1191 | success = false; |
| 1192 | } |
| 1193 | dispatch.CreateSwapchainKHR = reinterpret_cast<PFN_vkCreateSwapchainKHR>(get_proc_addr(device, "vkCreateSwapchainKHR")); |
| 1194 | if (UNLIKELY(!dispatch.CreateSwapchainKHR)) { |
| 1195 | ALOGE("missing device proc: %s", "vkCreateSwapchainKHR"); |
| 1196 | success = false; |
| 1197 | } |
| 1198 | dispatch.DestroySwapchainKHR = reinterpret_cast<PFN_vkDestroySwapchainKHR>(get_proc_addr(device, "vkDestroySwapchainKHR")); |
| 1199 | if (UNLIKELY(!dispatch.DestroySwapchainKHR)) { |
| 1200 | ALOGE("missing device proc: %s", "vkDestroySwapchainKHR"); |
| 1201 | success = false; |
| 1202 | } |
| 1203 | dispatch.GetSwapchainImagesKHR = reinterpret_cast<PFN_vkGetSwapchainImagesKHR>(get_proc_addr(device, "vkGetSwapchainImagesKHR")); |
| 1204 | if (UNLIKELY(!dispatch.GetSwapchainImagesKHR)) { |
| 1205 | ALOGE("missing device proc: %s", "vkGetSwapchainImagesKHR"); |
| 1206 | success = false; |
| 1207 | } |
| 1208 | dispatch.AcquireNextImageKHR = reinterpret_cast<PFN_vkAcquireNextImageKHR>(get_proc_addr(device, "vkAcquireNextImageKHR")); |
| 1209 | if (UNLIKELY(!dispatch.AcquireNextImageKHR)) { |
| 1210 | ALOGE("missing device proc: %s", "vkAcquireNextImageKHR"); |
| 1211 | success = false; |
| 1212 | } |
| 1213 | dispatch.QueuePresentKHR = reinterpret_cast<PFN_vkQueuePresentKHR>(get_proc_addr(device, "vkQueuePresentKHR")); |
| 1214 | if (UNLIKELY(!dispatch.QueuePresentKHR)) { |
| 1215 | ALOGE("missing device proc: %s", "vkQueuePresentKHR"); |
| 1216 | success = false; |
| 1217 | } |
| 1218 | // clang-format on |
| 1219 | return success; |
| 1220 | } |
| 1221 | |
| 1222 | bool LoadDriverDispatchTable(VkInstance instance, |
| 1223 | PFN_vkGetInstanceProcAddr get_proc_addr, |
Jesse Hall | 6bd5dfa | 2016-01-16 17:13:30 -0800 | [diff] [blame] | 1224 | const InstanceExtensionSet& extensions, |
Jesse Hall | 1f91d39 | 2015-12-11 16:28:44 -0800 | [diff] [blame] | 1225 | DriverDispatchTable& dispatch) { |
| 1226 | bool success = true; |
| 1227 | // clang-format off |
| 1228 | dispatch.DestroyInstance = reinterpret_cast<PFN_vkDestroyInstance>(get_proc_addr(instance, "vkDestroyInstance")); |
| 1229 | if (UNLIKELY(!dispatch.DestroyInstance)) { |
| 1230 | ALOGE("missing driver proc: %s", "vkDestroyInstance"); |
| 1231 | success = false; |
| 1232 | } |
| 1233 | dispatch.EnumeratePhysicalDevices = reinterpret_cast<PFN_vkEnumeratePhysicalDevices>(get_proc_addr(instance, "vkEnumeratePhysicalDevices")); |
| 1234 | if (UNLIKELY(!dispatch.EnumeratePhysicalDevices)) { |
| 1235 | ALOGE("missing driver proc: %s", "vkEnumeratePhysicalDevices"); |
| 1236 | success = false; |
| 1237 | } |
| 1238 | dispatch.GetPhysicalDeviceProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceProperties>(get_proc_addr(instance, "vkGetPhysicalDeviceProperties")); |
| 1239 | if (UNLIKELY(!dispatch.GetPhysicalDeviceProperties)) { |
| 1240 | ALOGE("missing driver proc: %s", "vkGetPhysicalDeviceProperties"); |
| 1241 | success = false; |
| 1242 | } |
| 1243 | dispatch.GetPhysicalDeviceQueueFamilyProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceQueueFamilyProperties>(get_proc_addr(instance, "vkGetPhysicalDeviceQueueFamilyProperties")); |
| 1244 | if (UNLIKELY(!dispatch.GetPhysicalDeviceQueueFamilyProperties)) { |
| 1245 | ALOGE("missing driver proc: %s", "vkGetPhysicalDeviceQueueFamilyProperties"); |
| 1246 | success = false; |
| 1247 | } |
| 1248 | dispatch.GetPhysicalDeviceMemoryProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceMemoryProperties>(get_proc_addr(instance, "vkGetPhysicalDeviceMemoryProperties")); |
| 1249 | if (UNLIKELY(!dispatch.GetPhysicalDeviceMemoryProperties)) { |
| 1250 | ALOGE("missing driver proc: %s", "vkGetPhysicalDeviceMemoryProperties"); |
| 1251 | success = false; |
| 1252 | } |
| 1253 | dispatch.GetPhysicalDeviceFeatures = reinterpret_cast<PFN_vkGetPhysicalDeviceFeatures>(get_proc_addr(instance, "vkGetPhysicalDeviceFeatures")); |
| 1254 | if (UNLIKELY(!dispatch.GetPhysicalDeviceFeatures)) { |
| 1255 | ALOGE("missing driver proc: %s", "vkGetPhysicalDeviceFeatures"); |
| 1256 | success = false; |
| 1257 | } |
| 1258 | dispatch.GetPhysicalDeviceFormatProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceFormatProperties>(get_proc_addr(instance, "vkGetPhysicalDeviceFormatProperties")); |
| 1259 | if (UNLIKELY(!dispatch.GetPhysicalDeviceFormatProperties)) { |
| 1260 | ALOGE("missing driver proc: %s", "vkGetPhysicalDeviceFormatProperties"); |
| 1261 | success = false; |
| 1262 | } |
| 1263 | dispatch.GetPhysicalDeviceImageFormatProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceImageFormatProperties>(get_proc_addr(instance, "vkGetPhysicalDeviceImageFormatProperties")); |
| 1264 | if (UNLIKELY(!dispatch.GetPhysicalDeviceImageFormatProperties)) { |
| 1265 | ALOGE("missing driver proc: %s", "vkGetPhysicalDeviceImageFormatProperties"); |
| 1266 | success = false; |
| 1267 | } |
| 1268 | dispatch.CreateDevice = reinterpret_cast<PFN_vkCreateDevice>(get_proc_addr(instance, "vkCreateDevice")); |
| 1269 | if (UNLIKELY(!dispatch.CreateDevice)) { |
| 1270 | ALOGE("missing driver proc: %s", "vkCreateDevice"); |
| 1271 | success = false; |
| 1272 | } |
| 1273 | dispatch.EnumerateDeviceLayerProperties = reinterpret_cast<PFN_vkEnumerateDeviceLayerProperties>(get_proc_addr(instance, "vkEnumerateDeviceLayerProperties")); |
| 1274 | if (UNLIKELY(!dispatch.EnumerateDeviceLayerProperties)) { |
| 1275 | ALOGE("missing driver proc: %s", "vkEnumerateDeviceLayerProperties"); |
| 1276 | success = false; |
| 1277 | } |
| 1278 | dispatch.EnumerateDeviceExtensionProperties = reinterpret_cast<PFN_vkEnumerateDeviceExtensionProperties>(get_proc_addr(instance, "vkEnumerateDeviceExtensionProperties")); |
| 1279 | if (UNLIKELY(!dispatch.EnumerateDeviceExtensionProperties)) { |
| 1280 | ALOGE("missing driver proc: %s", "vkEnumerateDeviceExtensionProperties"); |
| 1281 | success = false; |
| 1282 | } |
| 1283 | dispatch.GetPhysicalDeviceSparseImageFormatProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceSparseImageFormatProperties>(get_proc_addr(instance, "vkGetPhysicalDeviceSparseImageFormatProperties")); |
| 1284 | if (UNLIKELY(!dispatch.GetPhysicalDeviceSparseImageFormatProperties)) { |
| 1285 | ALOGE("missing driver proc: %s", "vkGetPhysicalDeviceSparseImageFormatProperties"); |
| 1286 | success = false; |
| 1287 | } |
Jesse Hall | 715b86a | 2016-01-16 16:34:29 -0800 | [diff] [blame] | 1288 | if (extensions[kEXT_debug_report]) { |
| 1289 | dispatch.CreateDebugReportCallbackEXT = reinterpret_cast<PFN_vkCreateDebugReportCallbackEXT>(get_proc_addr(instance, "vkCreateDebugReportCallbackEXT")); |
| 1290 | if (UNLIKELY(!dispatch.CreateDebugReportCallbackEXT)) { |
| 1291 | ALOGE("missing driver proc: %s", "vkCreateDebugReportCallbackEXT"); |
| 1292 | success = false; |
| 1293 | } |
| 1294 | } |
| 1295 | if (extensions[kEXT_debug_report]) { |
| 1296 | dispatch.DestroyDebugReportCallbackEXT = reinterpret_cast<PFN_vkDestroyDebugReportCallbackEXT>(get_proc_addr(instance, "vkDestroyDebugReportCallbackEXT")); |
| 1297 | if (UNLIKELY(!dispatch.DestroyDebugReportCallbackEXT)) { |
| 1298 | ALOGE("missing driver proc: %s", "vkDestroyDebugReportCallbackEXT"); |
| 1299 | success = false; |
| 1300 | } |
| 1301 | } |
| 1302 | if (extensions[kEXT_debug_report]) { |
| 1303 | dispatch.DebugReportMessageEXT = reinterpret_cast<PFN_vkDebugReportMessageEXT>(get_proc_addr(instance, "vkDebugReportMessageEXT")); |
| 1304 | if (UNLIKELY(!dispatch.DebugReportMessageEXT)) { |
| 1305 | ALOGE("missing driver proc: %s", "vkDebugReportMessageEXT"); |
| 1306 | success = false; |
| 1307 | } |
| 1308 | } |
Jesse Hall | 1f91d39 | 2015-12-11 16:28:44 -0800 | [diff] [blame] | 1309 | dispatch.GetDeviceProcAddr = reinterpret_cast<PFN_vkGetDeviceProcAddr>(get_proc_addr(instance, "vkGetDeviceProcAddr")); |
| 1310 | if (UNLIKELY(!dispatch.GetDeviceProcAddr)) { |
| 1311 | ALOGE("missing driver proc: %s", "vkGetDeviceProcAddr"); |
| 1312 | success = false; |
| 1313 | } |
| 1314 | dispatch.CreateImage = reinterpret_cast<PFN_vkCreateImage>(get_proc_addr(instance, "vkCreateImage")); |
| 1315 | if (UNLIKELY(!dispatch.CreateImage)) { |
| 1316 | ALOGE("missing driver proc: %s", "vkCreateImage"); |
| 1317 | success = false; |
| 1318 | } |
| 1319 | dispatch.DestroyImage = reinterpret_cast<PFN_vkDestroyImage>(get_proc_addr(instance, "vkDestroyImage")); |
| 1320 | if (UNLIKELY(!dispatch.DestroyImage)) { |
| 1321 | ALOGE("missing driver proc: %s", "vkDestroyImage"); |
| 1322 | success = false; |
| 1323 | } |
Jesse Hall | d913282 | 2016-01-14 15:50:52 -0800 | [diff] [blame] | 1324 | dispatch.GetSwapchainGrallocUsageANDROID = reinterpret_cast<PFN_vkGetSwapchainGrallocUsageANDROID>(get_proc_addr(instance, "vkGetSwapchainGrallocUsageANDROID")); |
| 1325 | if (UNLIKELY(!dispatch.GetSwapchainGrallocUsageANDROID)) { |
| 1326 | ALOGE("missing driver proc: %s", "vkGetSwapchainGrallocUsageANDROID"); |
| 1327 | success = false; |
| 1328 | } |
Jesse Hall | 1f91d39 | 2015-12-11 16:28:44 -0800 | [diff] [blame] | 1329 | dispatch.AcquireImageANDROID = reinterpret_cast<PFN_vkAcquireImageANDROID>(get_proc_addr(instance, "vkAcquireImageANDROID")); |
| 1330 | if (UNLIKELY(!dispatch.AcquireImageANDROID)) { |
| 1331 | ALOGE("missing driver proc: %s", "vkAcquireImageANDROID"); |
| 1332 | success = false; |
| 1333 | } |
| 1334 | dispatch.QueueSignalReleaseImageANDROID = reinterpret_cast<PFN_vkQueueSignalReleaseImageANDROID>(get_proc_addr(instance, "vkQueueSignalReleaseImageANDROID")); |
| 1335 | if (UNLIKELY(!dispatch.QueueSignalReleaseImageANDROID)) { |
| 1336 | ALOGE("missing driver proc: %s", "vkQueueSignalReleaseImageANDROID"); |
| 1337 | success = false; |
| 1338 | } |
| 1339 | // clang-format on |
| 1340 | return success; |
| 1341 | } |
| 1342 | |
| 1343 | } // namespace vulkan |
| 1344 | |
| 1345 | // clang-format off |
| 1346 | |
| 1347 | __attribute__((visibility("default"))) |
| 1348 | VKAPI_ATTR VkResult vkCreateInstance(const VkInstanceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkInstance* pInstance) { |
| 1349 | return CreateInstance_Top(pCreateInfo, pAllocator, pInstance); |
| 1350 | } |
| 1351 | |
| 1352 | __attribute__((visibility("default"))) |
| 1353 | VKAPI_ATTR void vkDestroyInstance(VkInstance instance, const VkAllocationCallbacks* pAllocator) { |
| 1354 | DestroyInstance_Top(instance, pAllocator); |
| 1355 | } |
| 1356 | |
| 1357 | __attribute__((visibility("default"))) |
| 1358 | VKAPI_ATTR VkResult vkEnumeratePhysicalDevices(VkInstance instance, uint32_t* pPhysicalDeviceCount, VkPhysicalDevice* pPhysicalDevices) { |
| 1359 | return GetDispatchTable(instance).EnumeratePhysicalDevices(instance, pPhysicalDeviceCount, pPhysicalDevices); |
| 1360 | } |
| 1361 | |
| 1362 | __attribute__((visibility("default"))) |
| 1363 | VKAPI_ATTR PFN_vkVoidFunction vkGetDeviceProcAddr(VkDevice device, const char* pName) { |
| 1364 | return GetDeviceProcAddr_Top(device, pName); |
| 1365 | } |
| 1366 | |
| 1367 | __attribute__((visibility("default"))) |
| 1368 | VKAPI_ATTR PFN_vkVoidFunction vkGetInstanceProcAddr(VkInstance instance, const char* pName) { |
| 1369 | return GetInstanceProcAddr_Top(instance, pName); |
| 1370 | } |
| 1371 | |
| 1372 | __attribute__((visibility("default"))) |
| 1373 | VKAPI_ATTR void vkGetPhysicalDeviceProperties(VkPhysicalDevice physicalDevice, VkPhysicalDeviceProperties* pProperties) { |
| 1374 | GetDispatchTable(physicalDevice).GetPhysicalDeviceProperties(physicalDevice, pProperties); |
| 1375 | } |
| 1376 | |
| 1377 | __attribute__((visibility("default"))) |
| 1378 | VKAPI_ATTR void vkGetPhysicalDeviceQueueFamilyProperties(VkPhysicalDevice physicalDevice, uint32_t* pQueueFamilyPropertyCount, VkQueueFamilyProperties* pQueueFamilyProperties) { |
| 1379 | GetDispatchTable(physicalDevice).GetPhysicalDeviceQueueFamilyProperties(physicalDevice, pQueueFamilyPropertyCount, pQueueFamilyProperties); |
| 1380 | } |
| 1381 | |
| 1382 | __attribute__((visibility("default"))) |
| 1383 | VKAPI_ATTR void vkGetPhysicalDeviceMemoryProperties(VkPhysicalDevice physicalDevice, VkPhysicalDeviceMemoryProperties* pMemoryProperties) { |
| 1384 | GetDispatchTable(physicalDevice).GetPhysicalDeviceMemoryProperties(physicalDevice, pMemoryProperties); |
| 1385 | } |
| 1386 | |
| 1387 | __attribute__((visibility("default"))) |
| 1388 | VKAPI_ATTR void vkGetPhysicalDeviceFeatures(VkPhysicalDevice physicalDevice, VkPhysicalDeviceFeatures* pFeatures) { |
| 1389 | GetDispatchTable(physicalDevice).GetPhysicalDeviceFeatures(physicalDevice, pFeatures); |
| 1390 | } |
| 1391 | |
| 1392 | __attribute__((visibility("default"))) |
| 1393 | VKAPI_ATTR void vkGetPhysicalDeviceFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, VkFormatProperties* pFormatProperties) { |
| 1394 | GetDispatchTable(physicalDevice).GetPhysicalDeviceFormatProperties(physicalDevice, format, pFormatProperties); |
| 1395 | } |
| 1396 | |
| 1397 | __attribute__((visibility("default"))) |
| 1398 | VKAPI_ATTR VkResult vkGetPhysicalDeviceImageFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkImageTiling tiling, VkImageUsageFlags usage, VkImageCreateFlags flags, VkImageFormatProperties* pImageFormatProperties) { |
| 1399 | return GetDispatchTable(physicalDevice).GetPhysicalDeviceImageFormatProperties(physicalDevice, format, type, tiling, usage, flags, pImageFormatProperties); |
| 1400 | } |
| 1401 | |
| 1402 | __attribute__((visibility("default"))) |
| 1403 | VKAPI_ATTR VkResult vkCreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDevice* pDevice) { |
| 1404 | return GetDispatchTable(physicalDevice).CreateDevice(physicalDevice, pCreateInfo, pAllocator, pDevice); |
| 1405 | } |
| 1406 | |
| 1407 | __attribute__((visibility("default"))) |
| 1408 | VKAPI_ATTR void vkDestroyDevice(VkDevice device, const VkAllocationCallbacks* pAllocator) { |
| 1409 | DestroyDevice_Top(device, pAllocator); |
| 1410 | } |
| 1411 | |
| 1412 | __attribute__((visibility("default"))) |
| 1413 | VKAPI_ATTR VkResult vkEnumerateInstanceLayerProperties(uint32_t* pPropertyCount, VkLayerProperties* pProperties) { |
| 1414 | return EnumerateInstanceLayerProperties_Top(pPropertyCount, pProperties); |
| 1415 | } |
| 1416 | |
| 1417 | __attribute__((visibility("default"))) |
| 1418 | VKAPI_ATTR VkResult vkEnumerateInstanceExtensionProperties(const char* pLayerName, uint32_t* pPropertyCount, VkExtensionProperties* pProperties) { |
| 1419 | return EnumerateInstanceExtensionProperties_Top(pLayerName, pPropertyCount, pProperties); |
| 1420 | } |
| 1421 | |
| 1422 | __attribute__((visibility("default"))) |
| 1423 | VKAPI_ATTR VkResult vkEnumerateDeviceLayerProperties(VkPhysicalDevice physicalDevice, uint32_t* pPropertyCount, VkLayerProperties* pProperties) { |
| 1424 | return GetDispatchTable(physicalDevice).EnumerateDeviceLayerProperties(physicalDevice, pPropertyCount, pProperties); |
| 1425 | } |
| 1426 | |
| 1427 | __attribute__((visibility("default"))) |
| 1428 | VKAPI_ATTR VkResult vkEnumerateDeviceExtensionProperties(VkPhysicalDevice physicalDevice, const char* pLayerName, uint32_t* pPropertyCount, VkExtensionProperties* pProperties) { |
| 1429 | return GetDispatchTable(physicalDevice).EnumerateDeviceExtensionProperties(physicalDevice, pLayerName, pPropertyCount, pProperties); |
| 1430 | } |
| 1431 | |
| 1432 | __attribute__((visibility("default"))) |
| 1433 | VKAPI_ATTR void vkGetDeviceQueue(VkDevice device, uint32_t queueFamilyIndex, uint32_t queueIndex, VkQueue* pQueue) { |
| 1434 | GetDeviceQueue_Top(device, queueFamilyIndex, queueIndex, pQueue); |
| 1435 | } |
| 1436 | |
| 1437 | __attribute__((visibility("default"))) |
| 1438 | VKAPI_ATTR VkResult vkQueueSubmit(VkQueue queue, uint32_t submitCount, const VkSubmitInfo* pSubmits, VkFence fence) { |
| 1439 | return GetDispatchTable(queue).QueueSubmit(queue, submitCount, pSubmits, fence); |
| 1440 | } |
| 1441 | |
| 1442 | __attribute__((visibility("default"))) |
| 1443 | VKAPI_ATTR VkResult vkQueueWaitIdle(VkQueue queue) { |
| 1444 | return GetDispatchTable(queue).QueueWaitIdle(queue); |
| 1445 | } |
| 1446 | |
| 1447 | __attribute__((visibility("default"))) |
| 1448 | VKAPI_ATTR VkResult vkDeviceWaitIdle(VkDevice device) { |
| 1449 | return GetDispatchTable(device).DeviceWaitIdle(device); |
| 1450 | } |
| 1451 | |
| 1452 | __attribute__((visibility("default"))) |
| 1453 | VKAPI_ATTR VkResult vkAllocateMemory(VkDevice device, const VkMemoryAllocateInfo* pAllocateInfo, const VkAllocationCallbacks* pAllocator, VkDeviceMemory* pMemory) { |
| 1454 | return GetDispatchTable(device).AllocateMemory(device, pAllocateInfo, pAllocator, pMemory); |
| 1455 | } |
| 1456 | |
| 1457 | __attribute__((visibility("default"))) |
| 1458 | VKAPI_ATTR void vkFreeMemory(VkDevice device, VkDeviceMemory memory, const VkAllocationCallbacks* pAllocator) { |
| 1459 | GetDispatchTable(device).FreeMemory(device, memory, pAllocator); |
| 1460 | } |
| 1461 | |
| 1462 | __attribute__((visibility("default"))) |
| 1463 | VKAPI_ATTR VkResult vkMapMemory(VkDevice device, VkDeviceMemory memory, VkDeviceSize offset, VkDeviceSize size, VkMemoryMapFlags flags, void** ppData) { |
| 1464 | return GetDispatchTable(device).MapMemory(device, memory, offset, size, flags, ppData); |
| 1465 | } |
| 1466 | |
| 1467 | __attribute__((visibility("default"))) |
| 1468 | VKAPI_ATTR void vkUnmapMemory(VkDevice device, VkDeviceMemory memory) { |
| 1469 | GetDispatchTable(device).UnmapMemory(device, memory); |
| 1470 | } |
| 1471 | |
| 1472 | __attribute__((visibility("default"))) |
| 1473 | VKAPI_ATTR VkResult vkFlushMappedMemoryRanges(VkDevice device, uint32_t memoryRangeCount, const VkMappedMemoryRange* pMemoryRanges) { |
| 1474 | return GetDispatchTable(device).FlushMappedMemoryRanges(device, memoryRangeCount, pMemoryRanges); |
| 1475 | } |
| 1476 | |
| 1477 | __attribute__((visibility("default"))) |
| 1478 | VKAPI_ATTR VkResult vkInvalidateMappedMemoryRanges(VkDevice device, uint32_t memoryRangeCount, const VkMappedMemoryRange* pMemoryRanges) { |
| 1479 | return GetDispatchTable(device).InvalidateMappedMemoryRanges(device, memoryRangeCount, pMemoryRanges); |
| 1480 | } |
| 1481 | |
| 1482 | __attribute__((visibility("default"))) |
| 1483 | VKAPI_ATTR void vkGetDeviceMemoryCommitment(VkDevice device, VkDeviceMemory memory, VkDeviceSize* pCommittedMemoryInBytes) { |
| 1484 | GetDispatchTable(device).GetDeviceMemoryCommitment(device, memory, pCommittedMemoryInBytes); |
| 1485 | } |
| 1486 | |
| 1487 | __attribute__((visibility("default"))) |
| 1488 | VKAPI_ATTR void vkGetBufferMemoryRequirements(VkDevice device, VkBuffer buffer, VkMemoryRequirements* pMemoryRequirements) { |
| 1489 | GetDispatchTable(device).GetBufferMemoryRequirements(device, buffer, pMemoryRequirements); |
| 1490 | } |
| 1491 | |
| 1492 | __attribute__((visibility("default"))) |
| 1493 | VKAPI_ATTR VkResult vkBindBufferMemory(VkDevice device, VkBuffer buffer, VkDeviceMemory memory, VkDeviceSize memoryOffset) { |
| 1494 | return GetDispatchTable(device).BindBufferMemory(device, buffer, memory, memoryOffset); |
| 1495 | } |
| 1496 | |
| 1497 | __attribute__((visibility("default"))) |
| 1498 | VKAPI_ATTR void vkGetImageMemoryRequirements(VkDevice device, VkImage image, VkMemoryRequirements* pMemoryRequirements) { |
| 1499 | GetDispatchTable(device).GetImageMemoryRequirements(device, image, pMemoryRequirements); |
| 1500 | } |
| 1501 | |
| 1502 | __attribute__((visibility("default"))) |
| 1503 | VKAPI_ATTR VkResult vkBindImageMemory(VkDevice device, VkImage image, VkDeviceMemory memory, VkDeviceSize memoryOffset) { |
| 1504 | return GetDispatchTable(device).BindImageMemory(device, image, memory, memoryOffset); |
| 1505 | } |
| 1506 | |
| 1507 | __attribute__((visibility("default"))) |
| 1508 | VKAPI_ATTR void vkGetImageSparseMemoryRequirements(VkDevice device, VkImage image, uint32_t* pSparseMemoryRequirementCount, VkSparseImageMemoryRequirements* pSparseMemoryRequirements) { |
| 1509 | GetDispatchTable(device).GetImageSparseMemoryRequirements(device, image, pSparseMemoryRequirementCount, pSparseMemoryRequirements); |
| 1510 | } |
| 1511 | |
| 1512 | __attribute__((visibility("default"))) |
| 1513 | VKAPI_ATTR void vkGetPhysicalDeviceSparseImageFormatProperties(VkPhysicalDevice physicalDevice, VkFormat format, VkImageType type, VkSampleCountFlagBits samples, VkImageUsageFlags usage, VkImageTiling tiling, uint32_t* pPropertyCount, VkSparseImageFormatProperties* pProperties) { |
| 1514 | GetDispatchTable(physicalDevice).GetPhysicalDeviceSparseImageFormatProperties(physicalDevice, format, type, samples, usage, tiling, pPropertyCount, pProperties); |
| 1515 | } |
| 1516 | |
| 1517 | __attribute__((visibility("default"))) |
| 1518 | VKAPI_ATTR VkResult vkQueueBindSparse(VkQueue queue, uint32_t bindInfoCount, const VkBindSparseInfo* pBindInfo, VkFence fence) { |
| 1519 | return GetDispatchTable(queue).QueueBindSparse(queue, bindInfoCount, pBindInfo, fence); |
| 1520 | } |
| 1521 | |
| 1522 | __attribute__((visibility("default"))) |
| 1523 | VKAPI_ATTR VkResult vkCreateFence(VkDevice device, const VkFenceCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkFence* pFence) { |
| 1524 | return GetDispatchTable(device).CreateFence(device, pCreateInfo, pAllocator, pFence); |
| 1525 | } |
| 1526 | |
| 1527 | __attribute__((visibility("default"))) |
| 1528 | VKAPI_ATTR void vkDestroyFence(VkDevice device, VkFence fence, const VkAllocationCallbacks* pAllocator) { |
| 1529 | GetDispatchTable(device).DestroyFence(device, fence, pAllocator); |
| 1530 | } |
| 1531 | |
| 1532 | __attribute__((visibility("default"))) |
| 1533 | VKAPI_ATTR VkResult vkResetFences(VkDevice device, uint32_t fenceCount, const VkFence* pFences) { |
| 1534 | return GetDispatchTable(device).ResetFences(device, fenceCount, pFences); |
| 1535 | } |
| 1536 | |
| 1537 | __attribute__((visibility("default"))) |
| 1538 | VKAPI_ATTR VkResult vkGetFenceStatus(VkDevice device, VkFence fence) { |
| 1539 | return GetDispatchTable(device).GetFenceStatus(device, fence); |
| 1540 | } |
| 1541 | |
| 1542 | __attribute__((visibility("default"))) |
| 1543 | VKAPI_ATTR VkResult vkWaitForFences(VkDevice device, uint32_t fenceCount, const VkFence* pFences, VkBool32 waitAll, uint64_t timeout) { |
| 1544 | return GetDispatchTable(device).WaitForFences(device, fenceCount, pFences, waitAll, timeout); |
| 1545 | } |
| 1546 | |
| 1547 | __attribute__((visibility("default"))) |
| 1548 | VKAPI_ATTR VkResult vkCreateSemaphore(VkDevice device, const VkSemaphoreCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSemaphore* pSemaphore) { |
| 1549 | return GetDispatchTable(device).CreateSemaphore(device, pCreateInfo, pAllocator, pSemaphore); |
| 1550 | } |
| 1551 | |
| 1552 | __attribute__((visibility("default"))) |
| 1553 | VKAPI_ATTR void vkDestroySemaphore(VkDevice device, VkSemaphore semaphore, const VkAllocationCallbacks* pAllocator) { |
| 1554 | GetDispatchTable(device).DestroySemaphore(device, semaphore, pAllocator); |
| 1555 | } |
| 1556 | |
| 1557 | __attribute__((visibility("default"))) |
| 1558 | VKAPI_ATTR VkResult vkCreateEvent(VkDevice device, const VkEventCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkEvent* pEvent) { |
| 1559 | return GetDispatchTable(device).CreateEvent(device, pCreateInfo, pAllocator, pEvent); |
| 1560 | } |
| 1561 | |
| 1562 | __attribute__((visibility("default"))) |
| 1563 | VKAPI_ATTR void vkDestroyEvent(VkDevice device, VkEvent event, const VkAllocationCallbacks* pAllocator) { |
| 1564 | GetDispatchTable(device).DestroyEvent(device, event, pAllocator); |
| 1565 | } |
| 1566 | |
| 1567 | __attribute__((visibility("default"))) |
| 1568 | VKAPI_ATTR VkResult vkGetEventStatus(VkDevice device, VkEvent event) { |
| 1569 | return GetDispatchTable(device).GetEventStatus(device, event); |
| 1570 | } |
| 1571 | |
| 1572 | __attribute__((visibility("default"))) |
| 1573 | VKAPI_ATTR VkResult vkSetEvent(VkDevice device, VkEvent event) { |
| 1574 | return GetDispatchTable(device).SetEvent(device, event); |
| 1575 | } |
| 1576 | |
| 1577 | __attribute__((visibility("default"))) |
| 1578 | VKAPI_ATTR VkResult vkResetEvent(VkDevice device, VkEvent event) { |
| 1579 | return GetDispatchTable(device).ResetEvent(device, event); |
| 1580 | } |
| 1581 | |
| 1582 | __attribute__((visibility("default"))) |
| 1583 | VKAPI_ATTR VkResult vkCreateQueryPool(VkDevice device, const VkQueryPoolCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkQueryPool* pQueryPool) { |
| 1584 | return GetDispatchTable(device).CreateQueryPool(device, pCreateInfo, pAllocator, pQueryPool); |
| 1585 | } |
| 1586 | |
| 1587 | __attribute__((visibility("default"))) |
| 1588 | VKAPI_ATTR void vkDestroyQueryPool(VkDevice device, VkQueryPool queryPool, const VkAllocationCallbacks* pAllocator) { |
| 1589 | GetDispatchTable(device).DestroyQueryPool(device, queryPool, pAllocator); |
| 1590 | } |
| 1591 | |
| 1592 | __attribute__((visibility("default"))) |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1593 | VKAPI_ATTR VkResult vkGetQueryPoolResults(VkDevice device, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, size_t dataSize, void* pData, VkDeviceSize stride, VkQueryResultFlags flags) { |
| 1594 | return GetDispatchTable(device).GetQueryPoolResults(device, queryPool, firstQuery, queryCount, dataSize, pData, stride, flags); |
Jesse Hall | 1f91d39 | 2015-12-11 16:28:44 -0800 | [diff] [blame] | 1595 | } |
| 1596 | |
| 1597 | __attribute__((visibility("default"))) |
| 1598 | VKAPI_ATTR VkResult vkCreateBuffer(VkDevice device, const VkBufferCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkBuffer* pBuffer) { |
| 1599 | return GetDispatchTable(device).CreateBuffer(device, pCreateInfo, pAllocator, pBuffer); |
| 1600 | } |
| 1601 | |
| 1602 | __attribute__((visibility("default"))) |
| 1603 | VKAPI_ATTR void vkDestroyBuffer(VkDevice device, VkBuffer buffer, const VkAllocationCallbacks* pAllocator) { |
| 1604 | GetDispatchTable(device).DestroyBuffer(device, buffer, pAllocator); |
| 1605 | } |
| 1606 | |
| 1607 | __attribute__((visibility("default"))) |
| 1608 | VKAPI_ATTR VkResult vkCreateBufferView(VkDevice device, const VkBufferViewCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkBufferView* pView) { |
| 1609 | return GetDispatchTable(device).CreateBufferView(device, pCreateInfo, pAllocator, pView); |
| 1610 | } |
| 1611 | |
| 1612 | __attribute__((visibility("default"))) |
| 1613 | VKAPI_ATTR void vkDestroyBufferView(VkDevice device, VkBufferView bufferView, const VkAllocationCallbacks* pAllocator) { |
| 1614 | GetDispatchTable(device).DestroyBufferView(device, bufferView, pAllocator); |
| 1615 | } |
| 1616 | |
| 1617 | __attribute__((visibility("default"))) |
| 1618 | VKAPI_ATTR VkResult vkCreateImage(VkDevice device, const VkImageCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkImage* pImage) { |
| 1619 | return GetDispatchTable(device).CreateImage(device, pCreateInfo, pAllocator, pImage); |
| 1620 | } |
| 1621 | |
| 1622 | __attribute__((visibility("default"))) |
| 1623 | VKAPI_ATTR void vkDestroyImage(VkDevice device, VkImage image, const VkAllocationCallbacks* pAllocator) { |
| 1624 | GetDispatchTable(device).DestroyImage(device, image, pAllocator); |
| 1625 | } |
| 1626 | |
| 1627 | __attribute__((visibility("default"))) |
| 1628 | VKAPI_ATTR void vkGetImageSubresourceLayout(VkDevice device, VkImage image, const VkImageSubresource* pSubresource, VkSubresourceLayout* pLayout) { |
| 1629 | GetDispatchTable(device).GetImageSubresourceLayout(device, image, pSubresource, pLayout); |
| 1630 | } |
| 1631 | |
| 1632 | __attribute__((visibility("default"))) |
| 1633 | VKAPI_ATTR VkResult vkCreateImageView(VkDevice device, const VkImageViewCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkImageView* pView) { |
| 1634 | return GetDispatchTable(device).CreateImageView(device, pCreateInfo, pAllocator, pView); |
| 1635 | } |
| 1636 | |
| 1637 | __attribute__((visibility("default"))) |
| 1638 | VKAPI_ATTR void vkDestroyImageView(VkDevice device, VkImageView imageView, const VkAllocationCallbacks* pAllocator) { |
| 1639 | GetDispatchTable(device).DestroyImageView(device, imageView, pAllocator); |
| 1640 | } |
| 1641 | |
| 1642 | __attribute__((visibility("default"))) |
| 1643 | VKAPI_ATTR VkResult vkCreateShaderModule(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkShaderModule* pShaderModule) { |
| 1644 | return GetDispatchTable(device).CreateShaderModule(device, pCreateInfo, pAllocator, pShaderModule); |
| 1645 | } |
| 1646 | |
| 1647 | __attribute__((visibility("default"))) |
| 1648 | VKAPI_ATTR void vkDestroyShaderModule(VkDevice device, VkShaderModule shaderModule, const VkAllocationCallbacks* pAllocator) { |
| 1649 | GetDispatchTable(device).DestroyShaderModule(device, shaderModule, pAllocator); |
| 1650 | } |
| 1651 | |
| 1652 | __attribute__((visibility("default"))) |
| 1653 | VKAPI_ATTR VkResult vkCreatePipelineCache(VkDevice device, const VkPipelineCacheCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkPipelineCache* pPipelineCache) { |
| 1654 | return GetDispatchTable(device).CreatePipelineCache(device, pCreateInfo, pAllocator, pPipelineCache); |
| 1655 | } |
| 1656 | |
| 1657 | __attribute__((visibility("default"))) |
| 1658 | VKAPI_ATTR void vkDestroyPipelineCache(VkDevice device, VkPipelineCache pipelineCache, const VkAllocationCallbacks* pAllocator) { |
| 1659 | GetDispatchTable(device).DestroyPipelineCache(device, pipelineCache, pAllocator); |
| 1660 | } |
| 1661 | |
| 1662 | __attribute__((visibility("default"))) |
| 1663 | VKAPI_ATTR VkResult vkGetPipelineCacheData(VkDevice device, VkPipelineCache pipelineCache, size_t* pDataSize, void* pData) { |
| 1664 | return GetDispatchTable(device).GetPipelineCacheData(device, pipelineCache, pDataSize, pData); |
| 1665 | } |
| 1666 | |
| 1667 | __attribute__((visibility("default"))) |
| 1668 | VKAPI_ATTR VkResult vkMergePipelineCaches(VkDevice device, VkPipelineCache dstCache, uint32_t srcCacheCount, const VkPipelineCache* pSrcCaches) { |
| 1669 | return GetDispatchTable(device).MergePipelineCaches(device, dstCache, srcCacheCount, pSrcCaches); |
| 1670 | } |
| 1671 | |
| 1672 | __attribute__((visibility("default"))) |
| 1673 | VKAPI_ATTR VkResult vkCreateGraphicsPipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkGraphicsPipelineCreateInfo* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines) { |
| 1674 | return GetDispatchTable(device).CreateGraphicsPipelines(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines); |
| 1675 | } |
| 1676 | |
| 1677 | __attribute__((visibility("default"))) |
| 1678 | VKAPI_ATTR VkResult vkCreateComputePipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkComputePipelineCreateInfo* pCreateInfos, const VkAllocationCallbacks* pAllocator, VkPipeline* pPipelines) { |
| 1679 | return GetDispatchTable(device).CreateComputePipelines(device, pipelineCache, createInfoCount, pCreateInfos, pAllocator, pPipelines); |
| 1680 | } |
| 1681 | |
| 1682 | __attribute__((visibility("default"))) |
| 1683 | VKAPI_ATTR void vkDestroyPipeline(VkDevice device, VkPipeline pipeline, const VkAllocationCallbacks* pAllocator) { |
| 1684 | GetDispatchTable(device).DestroyPipeline(device, pipeline, pAllocator); |
| 1685 | } |
| 1686 | |
| 1687 | __attribute__((visibility("default"))) |
| 1688 | VKAPI_ATTR VkResult vkCreatePipelineLayout(VkDevice device, const VkPipelineLayoutCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkPipelineLayout* pPipelineLayout) { |
| 1689 | return GetDispatchTable(device).CreatePipelineLayout(device, pCreateInfo, pAllocator, pPipelineLayout); |
| 1690 | } |
| 1691 | |
| 1692 | __attribute__((visibility("default"))) |
| 1693 | VKAPI_ATTR void vkDestroyPipelineLayout(VkDevice device, VkPipelineLayout pipelineLayout, const VkAllocationCallbacks* pAllocator) { |
| 1694 | GetDispatchTable(device).DestroyPipelineLayout(device, pipelineLayout, pAllocator); |
| 1695 | } |
| 1696 | |
| 1697 | __attribute__((visibility("default"))) |
| 1698 | VKAPI_ATTR VkResult vkCreateSampler(VkDevice device, const VkSamplerCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSampler* pSampler) { |
| 1699 | return GetDispatchTable(device).CreateSampler(device, pCreateInfo, pAllocator, pSampler); |
| 1700 | } |
| 1701 | |
| 1702 | __attribute__((visibility("default"))) |
| 1703 | VKAPI_ATTR void vkDestroySampler(VkDevice device, VkSampler sampler, const VkAllocationCallbacks* pAllocator) { |
| 1704 | GetDispatchTable(device).DestroySampler(device, sampler, pAllocator); |
| 1705 | } |
| 1706 | |
| 1707 | __attribute__((visibility("default"))) |
| 1708 | VKAPI_ATTR VkResult vkCreateDescriptorSetLayout(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDescriptorSetLayout* pSetLayout) { |
| 1709 | return GetDispatchTable(device).CreateDescriptorSetLayout(device, pCreateInfo, pAllocator, pSetLayout); |
| 1710 | } |
| 1711 | |
| 1712 | __attribute__((visibility("default"))) |
| 1713 | VKAPI_ATTR void vkDestroyDescriptorSetLayout(VkDevice device, VkDescriptorSetLayout descriptorSetLayout, const VkAllocationCallbacks* pAllocator) { |
| 1714 | GetDispatchTable(device).DestroyDescriptorSetLayout(device, descriptorSetLayout, pAllocator); |
| 1715 | } |
| 1716 | |
| 1717 | __attribute__((visibility("default"))) |
| 1718 | VKAPI_ATTR VkResult vkCreateDescriptorPool(VkDevice device, const VkDescriptorPoolCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkDescriptorPool* pDescriptorPool) { |
| 1719 | return GetDispatchTable(device).CreateDescriptorPool(device, pCreateInfo, pAllocator, pDescriptorPool); |
| 1720 | } |
| 1721 | |
| 1722 | __attribute__((visibility("default"))) |
| 1723 | VKAPI_ATTR void vkDestroyDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool, const VkAllocationCallbacks* pAllocator) { |
| 1724 | GetDispatchTable(device).DestroyDescriptorPool(device, descriptorPool, pAllocator); |
| 1725 | } |
| 1726 | |
| 1727 | __attribute__((visibility("default"))) |
| 1728 | VKAPI_ATTR VkResult vkResetDescriptorPool(VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorPoolResetFlags flags) { |
| 1729 | return GetDispatchTable(device).ResetDescriptorPool(device, descriptorPool, flags); |
| 1730 | } |
| 1731 | |
| 1732 | __attribute__((visibility("default"))) |
| 1733 | VKAPI_ATTR VkResult vkAllocateDescriptorSets(VkDevice device, const VkDescriptorSetAllocateInfo* pAllocateInfo, VkDescriptorSet* pDescriptorSets) { |
| 1734 | return GetDispatchTable(device).AllocateDescriptorSets(device, pAllocateInfo, pDescriptorSets); |
| 1735 | } |
| 1736 | |
| 1737 | __attribute__((visibility("default"))) |
| 1738 | VKAPI_ATTR VkResult vkFreeDescriptorSets(VkDevice device, VkDescriptorPool descriptorPool, uint32_t descriptorSetCount, const VkDescriptorSet* pDescriptorSets) { |
| 1739 | return GetDispatchTable(device).FreeDescriptorSets(device, descriptorPool, descriptorSetCount, pDescriptorSets); |
| 1740 | } |
| 1741 | |
| 1742 | __attribute__((visibility("default"))) |
| 1743 | VKAPI_ATTR void vkUpdateDescriptorSets(VkDevice device, uint32_t descriptorWriteCount, const VkWriteDescriptorSet* pDescriptorWrites, uint32_t descriptorCopyCount, const VkCopyDescriptorSet* pDescriptorCopies) { |
| 1744 | GetDispatchTable(device).UpdateDescriptorSets(device, descriptorWriteCount, pDescriptorWrites, descriptorCopyCount, pDescriptorCopies); |
| 1745 | } |
| 1746 | |
| 1747 | __attribute__((visibility("default"))) |
| 1748 | VKAPI_ATTR VkResult vkCreateFramebuffer(VkDevice device, const VkFramebufferCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkFramebuffer* pFramebuffer) { |
| 1749 | return GetDispatchTable(device).CreateFramebuffer(device, pCreateInfo, pAllocator, pFramebuffer); |
| 1750 | } |
| 1751 | |
| 1752 | __attribute__((visibility("default"))) |
| 1753 | VKAPI_ATTR void vkDestroyFramebuffer(VkDevice device, VkFramebuffer framebuffer, const VkAllocationCallbacks* pAllocator) { |
| 1754 | GetDispatchTable(device).DestroyFramebuffer(device, framebuffer, pAllocator); |
| 1755 | } |
| 1756 | |
| 1757 | __attribute__((visibility("default"))) |
| 1758 | VKAPI_ATTR VkResult vkCreateRenderPass(VkDevice device, const VkRenderPassCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkRenderPass* pRenderPass) { |
| 1759 | return GetDispatchTable(device).CreateRenderPass(device, pCreateInfo, pAllocator, pRenderPass); |
| 1760 | } |
| 1761 | |
| 1762 | __attribute__((visibility("default"))) |
| 1763 | VKAPI_ATTR void vkDestroyRenderPass(VkDevice device, VkRenderPass renderPass, const VkAllocationCallbacks* pAllocator) { |
| 1764 | GetDispatchTable(device).DestroyRenderPass(device, renderPass, pAllocator); |
| 1765 | } |
| 1766 | |
| 1767 | __attribute__((visibility("default"))) |
| 1768 | VKAPI_ATTR void vkGetRenderAreaGranularity(VkDevice device, VkRenderPass renderPass, VkExtent2D* pGranularity) { |
| 1769 | GetDispatchTable(device).GetRenderAreaGranularity(device, renderPass, pGranularity); |
| 1770 | } |
| 1771 | |
| 1772 | __attribute__((visibility("default"))) |
| 1773 | VKAPI_ATTR VkResult vkCreateCommandPool(VkDevice device, const VkCommandPoolCreateInfo* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkCommandPool* pCommandPool) { |
| 1774 | return GetDispatchTable(device).CreateCommandPool(device, pCreateInfo, pAllocator, pCommandPool); |
| 1775 | } |
| 1776 | |
| 1777 | __attribute__((visibility("default"))) |
| 1778 | VKAPI_ATTR void vkDestroyCommandPool(VkDevice device, VkCommandPool commandPool, const VkAllocationCallbacks* pAllocator) { |
| 1779 | GetDispatchTable(device).DestroyCommandPool(device, commandPool, pAllocator); |
| 1780 | } |
| 1781 | |
| 1782 | __attribute__((visibility("default"))) |
| 1783 | VKAPI_ATTR VkResult vkResetCommandPool(VkDevice device, VkCommandPool commandPool, VkCommandPoolResetFlags flags) { |
| 1784 | return GetDispatchTable(device).ResetCommandPool(device, commandPool, flags); |
| 1785 | } |
| 1786 | |
| 1787 | __attribute__((visibility("default"))) |
| 1788 | VKAPI_ATTR VkResult vkAllocateCommandBuffers(VkDevice device, const VkCommandBufferAllocateInfo* pAllocateInfo, VkCommandBuffer* pCommandBuffers) { |
| 1789 | return AllocateCommandBuffers_Top(device, pAllocateInfo, pCommandBuffers); |
| 1790 | } |
| 1791 | |
| 1792 | __attribute__((visibility("default"))) |
| 1793 | VKAPI_ATTR void vkFreeCommandBuffers(VkDevice device, VkCommandPool commandPool, uint32_t commandBufferCount, const VkCommandBuffer* pCommandBuffers) { |
| 1794 | GetDispatchTable(device).FreeCommandBuffers(device, commandPool, commandBufferCount, pCommandBuffers); |
| 1795 | } |
| 1796 | |
| 1797 | __attribute__((visibility("default"))) |
| 1798 | VKAPI_ATTR VkResult vkBeginCommandBuffer(VkCommandBuffer commandBuffer, const VkCommandBufferBeginInfo* pBeginInfo) { |
| 1799 | return GetDispatchTable(commandBuffer).BeginCommandBuffer(commandBuffer, pBeginInfo); |
| 1800 | } |
| 1801 | |
| 1802 | __attribute__((visibility("default"))) |
| 1803 | VKAPI_ATTR VkResult vkEndCommandBuffer(VkCommandBuffer commandBuffer) { |
| 1804 | return GetDispatchTable(commandBuffer).EndCommandBuffer(commandBuffer); |
| 1805 | } |
| 1806 | |
| 1807 | __attribute__((visibility("default"))) |
| 1808 | VKAPI_ATTR VkResult vkResetCommandBuffer(VkCommandBuffer commandBuffer, VkCommandBufferResetFlags flags) { |
| 1809 | return GetDispatchTable(commandBuffer).ResetCommandBuffer(commandBuffer, flags); |
| 1810 | } |
| 1811 | |
| 1812 | __attribute__((visibility("default"))) |
| 1813 | VKAPI_ATTR void vkCmdBindPipeline(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipeline pipeline) { |
| 1814 | GetDispatchTable(commandBuffer).CmdBindPipeline(commandBuffer, pipelineBindPoint, pipeline); |
| 1815 | } |
| 1816 | |
| 1817 | __attribute__((visibility("default"))) |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1818 | VKAPI_ATTR void vkCmdSetViewport(VkCommandBuffer commandBuffer, uint32_t firstViewport, uint32_t viewportCount, const VkViewport* pViewports) { |
| 1819 | GetDispatchTable(commandBuffer).CmdSetViewport(commandBuffer, firstViewport, viewportCount, pViewports); |
Jesse Hall | 1f91d39 | 2015-12-11 16:28:44 -0800 | [diff] [blame] | 1820 | } |
| 1821 | |
| 1822 | __attribute__((visibility("default"))) |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1823 | VKAPI_ATTR void vkCmdSetScissor(VkCommandBuffer commandBuffer, uint32_t firstScissor, uint32_t scissorCount, const VkRect2D* pScissors) { |
| 1824 | GetDispatchTable(commandBuffer).CmdSetScissor(commandBuffer, firstScissor, scissorCount, pScissors); |
Jesse Hall | 1f91d39 | 2015-12-11 16:28:44 -0800 | [diff] [blame] | 1825 | } |
| 1826 | |
| 1827 | __attribute__((visibility("default"))) |
| 1828 | VKAPI_ATTR void vkCmdSetLineWidth(VkCommandBuffer commandBuffer, float lineWidth) { |
| 1829 | GetDispatchTable(commandBuffer).CmdSetLineWidth(commandBuffer, lineWidth); |
| 1830 | } |
| 1831 | |
| 1832 | __attribute__((visibility("default"))) |
| 1833 | VKAPI_ATTR void vkCmdSetDepthBias(VkCommandBuffer commandBuffer, float depthBiasConstantFactor, float depthBiasClamp, float depthBiasSlopeFactor) { |
| 1834 | GetDispatchTable(commandBuffer).CmdSetDepthBias(commandBuffer, depthBiasConstantFactor, depthBiasClamp, depthBiasSlopeFactor); |
| 1835 | } |
| 1836 | |
| 1837 | __attribute__((visibility("default"))) |
| 1838 | VKAPI_ATTR void vkCmdSetBlendConstants(VkCommandBuffer commandBuffer, const float blendConstants[4]) { |
| 1839 | GetDispatchTable(commandBuffer).CmdSetBlendConstants(commandBuffer, blendConstants); |
| 1840 | } |
| 1841 | |
| 1842 | __attribute__((visibility("default"))) |
| 1843 | VKAPI_ATTR void vkCmdSetDepthBounds(VkCommandBuffer commandBuffer, float minDepthBounds, float maxDepthBounds) { |
| 1844 | GetDispatchTable(commandBuffer).CmdSetDepthBounds(commandBuffer, minDepthBounds, maxDepthBounds); |
| 1845 | } |
| 1846 | |
| 1847 | __attribute__((visibility("default"))) |
| 1848 | VKAPI_ATTR void vkCmdSetStencilCompareMask(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t compareMask) { |
| 1849 | GetDispatchTable(commandBuffer).CmdSetStencilCompareMask(commandBuffer, faceMask, compareMask); |
| 1850 | } |
| 1851 | |
| 1852 | __attribute__((visibility("default"))) |
| 1853 | VKAPI_ATTR void vkCmdSetStencilWriteMask(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t writeMask) { |
| 1854 | GetDispatchTable(commandBuffer).CmdSetStencilWriteMask(commandBuffer, faceMask, writeMask); |
| 1855 | } |
| 1856 | |
| 1857 | __attribute__((visibility("default"))) |
| 1858 | VKAPI_ATTR void vkCmdSetStencilReference(VkCommandBuffer commandBuffer, VkStencilFaceFlags faceMask, uint32_t reference) { |
| 1859 | GetDispatchTable(commandBuffer).CmdSetStencilReference(commandBuffer, faceMask, reference); |
| 1860 | } |
| 1861 | |
| 1862 | __attribute__((visibility("default"))) |
| 1863 | VKAPI_ATTR void vkCmdBindDescriptorSets(VkCommandBuffer commandBuffer, VkPipelineBindPoint pipelineBindPoint, VkPipelineLayout layout, uint32_t firstSet, uint32_t descriptorSetCount, const VkDescriptorSet* pDescriptorSets, uint32_t dynamicOffsetCount, const uint32_t* pDynamicOffsets) { |
| 1864 | GetDispatchTable(commandBuffer).CmdBindDescriptorSets(commandBuffer, pipelineBindPoint, layout, firstSet, descriptorSetCount, pDescriptorSets, dynamicOffsetCount, pDynamicOffsets); |
| 1865 | } |
| 1866 | |
| 1867 | __attribute__((visibility("default"))) |
| 1868 | VKAPI_ATTR void vkCmdBindIndexBuffer(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, VkIndexType indexType) { |
| 1869 | GetDispatchTable(commandBuffer).CmdBindIndexBuffer(commandBuffer, buffer, offset, indexType); |
| 1870 | } |
| 1871 | |
| 1872 | __attribute__((visibility("default"))) |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1873 | VKAPI_ATTR void vkCmdBindVertexBuffers(VkCommandBuffer commandBuffer, uint32_t firstBinding, uint32_t bindingCount, const VkBuffer* pBuffers, const VkDeviceSize* pOffsets) { |
| 1874 | GetDispatchTable(commandBuffer).CmdBindVertexBuffers(commandBuffer, firstBinding, bindingCount, pBuffers, pOffsets); |
Jesse Hall | 1f91d39 | 2015-12-11 16:28:44 -0800 | [diff] [blame] | 1875 | } |
| 1876 | |
| 1877 | __attribute__((visibility("default"))) |
| 1878 | VKAPI_ATTR void vkCmdDraw(VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t instanceCount, uint32_t firstVertex, uint32_t firstInstance) { |
| 1879 | GetDispatchTable(commandBuffer).CmdDraw(commandBuffer, vertexCount, instanceCount, firstVertex, firstInstance); |
| 1880 | } |
| 1881 | |
| 1882 | __attribute__((visibility("default"))) |
| 1883 | VKAPI_ATTR void vkCmdDrawIndexed(VkCommandBuffer commandBuffer, uint32_t indexCount, uint32_t instanceCount, uint32_t firstIndex, int32_t vertexOffset, uint32_t firstInstance) { |
| 1884 | GetDispatchTable(commandBuffer).CmdDrawIndexed(commandBuffer, indexCount, instanceCount, firstIndex, vertexOffset, firstInstance); |
| 1885 | } |
| 1886 | |
| 1887 | __attribute__((visibility("default"))) |
| 1888 | VKAPI_ATTR void vkCmdDrawIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride) { |
| 1889 | GetDispatchTable(commandBuffer).CmdDrawIndirect(commandBuffer, buffer, offset, drawCount, stride); |
| 1890 | } |
| 1891 | |
| 1892 | __attribute__((visibility("default"))) |
| 1893 | VKAPI_ATTR void vkCmdDrawIndexedIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t drawCount, uint32_t stride) { |
| 1894 | GetDispatchTable(commandBuffer).CmdDrawIndexedIndirect(commandBuffer, buffer, offset, drawCount, stride); |
| 1895 | } |
| 1896 | |
| 1897 | __attribute__((visibility("default"))) |
| 1898 | VKAPI_ATTR void vkCmdDispatch(VkCommandBuffer commandBuffer, uint32_t x, uint32_t y, uint32_t z) { |
| 1899 | GetDispatchTable(commandBuffer).CmdDispatch(commandBuffer, x, y, z); |
| 1900 | } |
| 1901 | |
| 1902 | __attribute__((visibility("default"))) |
| 1903 | VKAPI_ATTR void vkCmdDispatchIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset) { |
| 1904 | GetDispatchTable(commandBuffer).CmdDispatchIndirect(commandBuffer, buffer, offset); |
| 1905 | } |
| 1906 | |
| 1907 | __attribute__((visibility("default"))) |
| 1908 | VKAPI_ATTR void vkCmdCopyBuffer(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferCopy* pRegions) { |
| 1909 | GetDispatchTable(commandBuffer).CmdCopyBuffer(commandBuffer, srcBuffer, dstBuffer, regionCount, pRegions); |
| 1910 | } |
| 1911 | |
| 1912 | __attribute__((visibility("default"))) |
| 1913 | VKAPI_ATTR void vkCmdCopyImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageCopy* pRegions) { |
| 1914 | GetDispatchTable(commandBuffer).CmdCopyImage(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions); |
| 1915 | } |
| 1916 | |
| 1917 | __attribute__((visibility("default"))) |
| 1918 | VKAPI_ATTR void vkCmdBlitImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageBlit* pRegions, VkFilter filter) { |
| 1919 | GetDispatchTable(commandBuffer).CmdBlitImage(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions, filter); |
| 1920 | } |
| 1921 | |
| 1922 | __attribute__((visibility("default"))) |
| 1923 | VKAPI_ATTR void vkCmdCopyBufferToImage(VkCommandBuffer commandBuffer, VkBuffer srcBuffer, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkBufferImageCopy* pRegions) { |
| 1924 | GetDispatchTable(commandBuffer).CmdCopyBufferToImage(commandBuffer, srcBuffer, dstImage, dstImageLayout, regionCount, pRegions); |
| 1925 | } |
| 1926 | |
| 1927 | __attribute__((visibility("default"))) |
| 1928 | VKAPI_ATTR void vkCmdCopyImageToBuffer(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkBuffer dstBuffer, uint32_t regionCount, const VkBufferImageCopy* pRegions) { |
| 1929 | GetDispatchTable(commandBuffer).CmdCopyImageToBuffer(commandBuffer, srcImage, srcImageLayout, dstBuffer, regionCount, pRegions); |
| 1930 | } |
| 1931 | |
| 1932 | __attribute__((visibility("default"))) |
| 1933 | VKAPI_ATTR void vkCmdUpdateBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize dataSize, const uint32_t* pData) { |
| 1934 | GetDispatchTable(commandBuffer).CmdUpdateBuffer(commandBuffer, dstBuffer, dstOffset, dataSize, pData); |
| 1935 | } |
| 1936 | |
| 1937 | __attribute__((visibility("default"))) |
| 1938 | VKAPI_ATTR void vkCmdFillBuffer(VkCommandBuffer commandBuffer, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize size, uint32_t data) { |
| 1939 | GetDispatchTable(commandBuffer).CmdFillBuffer(commandBuffer, dstBuffer, dstOffset, size, data); |
| 1940 | } |
| 1941 | |
| 1942 | __attribute__((visibility("default"))) |
| 1943 | VKAPI_ATTR void vkCmdClearColorImage(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearColorValue* pColor, uint32_t rangeCount, const VkImageSubresourceRange* pRanges) { |
| 1944 | GetDispatchTable(commandBuffer).CmdClearColorImage(commandBuffer, image, imageLayout, pColor, rangeCount, pRanges); |
| 1945 | } |
| 1946 | |
| 1947 | __attribute__((visibility("default"))) |
| 1948 | VKAPI_ATTR void vkCmdClearDepthStencilImage(VkCommandBuffer commandBuffer, VkImage image, VkImageLayout imageLayout, const VkClearDepthStencilValue* pDepthStencil, uint32_t rangeCount, const VkImageSubresourceRange* pRanges) { |
| 1949 | GetDispatchTable(commandBuffer).CmdClearDepthStencilImage(commandBuffer, image, imageLayout, pDepthStencil, rangeCount, pRanges); |
| 1950 | } |
| 1951 | |
| 1952 | __attribute__((visibility("default"))) |
| 1953 | VKAPI_ATTR void vkCmdClearAttachments(VkCommandBuffer commandBuffer, uint32_t attachmentCount, const VkClearAttachment* pAttachments, uint32_t rectCount, const VkClearRect* pRects) { |
| 1954 | GetDispatchTable(commandBuffer).CmdClearAttachments(commandBuffer, attachmentCount, pAttachments, rectCount, pRects); |
| 1955 | } |
| 1956 | |
| 1957 | __attribute__((visibility("default"))) |
| 1958 | VKAPI_ATTR void vkCmdResolveImage(VkCommandBuffer commandBuffer, VkImage srcImage, VkImageLayout srcImageLayout, VkImage dstImage, VkImageLayout dstImageLayout, uint32_t regionCount, const VkImageResolve* pRegions) { |
| 1959 | GetDispatchTable(commandBuffer).CmdResolveImage(commandBuffer, srcImage, srcImageLayout, dstImage, dstImageLayout, regionCount, pRegions); |
| 1960 | } |
| 1961 | |
| 1962 | __attribute__((visibility("default"))) |
| 1963 | VKAPI_ATTR void vkCmdSetEvent(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask) { |
| 1964 | GetDispatchTable(commandBuffer).CmdSetEvent(commandBuffer, event, stageMask); |
| 1965 | } |
| 1966 | |
| 1967 | __attribute__((visibility("default"))) |
| 1968 | VKAPI_ATTR void vkCmdResetEvent(VkCommandBuffer commandBuffer, VkEvent event, VkPipelineStageFlags stageMask) { |
| 1969 | GetDispatchTable(commandBuffer).CmdResetEvent(commandBuffer, event, stageMask); |
| 1970 | } |
| 1971 | |
| 1972 | __attribute__((visibility("default"))) |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 1973 | VKAPI_ATTR void vkCmdWaitEvents(VkCommandBuffer commandBuffer, uint32_t eventCount, const VkEvent* pEvents, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, uint32_t memoryBarrierCount, const VkMemoryBarrier* pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const VkBufferMemoryBarrier* pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier* pImageMemoryBarriers) { |
| 1974 | GetDispatchTable(commandBuffer).CmdWaitEvents(commandBuffer, eventCount, pEvents, srcStageMask, dstStageMask, memoryBarrierCount, pMemoryBarriers, bufferMemoryBarrierCount, pBufferMemoryBarriers, imageMemoryBarrierCount, pImageMemoryBarriers); |
Jesse Hall | 1f91d39 | 2015-12-11 16:28:44 -0800 | [diff] [blame] | 1975 | } |
| 1976 | |
| 1977 | __attribute__((visibility("default"))) |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 1978 | VKAPI_ATTR void vkCmdPipelineBarrier(VkCommandBuffer commandBuffer, VkPipelineStageFlags srcStageMask, VkPipelineStageFlags dstStageMask, VkDependencyFlags dependencyFlags, uint32_t memoryBarrierCount, const VkMemoryBarrier* pMemoryBarriers, uint32_t bufferMemoryBarrierCount, const VkBufferMemoryBarrier* pBufferMemoryBarriers, uint32_t imageMemoryBarrierCount, const VkImageMemoryBarrier* pImageMemoryBarriers) { |
| 1979 | GetDispatchTable(commandBuffer).CmdPipelineBarrier(commandBuffer, srcStageMask, dstStageMask, dependencyFlags, memoryBarrierCount, pMemoryBarriers, bufferMemoryBarrierCount, pBufferMemoryBarriers, imageMemoryBarrierCount, pImageMemoryBarriers); |
Jesse Hall | 1f91d39 | 2015-12-11 16:28:44 -0800 | [diff] [blame] | 1980 | } |
| 1981 | |
| 1982 | __attribute__((visibility("default"))) |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 1983 | VKAPI_ATTR void vkCmdBeginQuery(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query, VkQueryControlFlags flags) { |
| 1984 | GetDispatchTable(commandBuffer).CmdBeginQuery(commandBuffer, queryPool, query, flags); |
Jesse Hall | 1f91d39 | 2015-12-11 16:28:44 -0800 | [diff] [blame] | 1985 | } |
| 1986 | |
| 1987 | __attribute__((visibility("default"))) |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 1988 | VKAPI_ATTR void vkCmdEndQuery(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t query) { |
| 1989 | GetDispatchTable(commandBuffer).CmdEndQuery(commandBuffer, queryPool, query); |
Jesse Hall | 1f91d39 | 2015-12-11 16:28:44 -0800 | [diff] [blame] | 1990 | } |
| 1991 | |
| 1992 | __attribute__((visibility("default"))) |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 1993 | VKAPI_ATTR void vkCmdResetQueryPool(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount) { |
| 1994 | GetDispatchTable(commandBuffer).CmdResetQueryPool(commandBuffer, queryPool, firstQuery, queryCount); |
Jesse Hall | 1f91d39 | 2015-12-11 16:28:44 -0800 | [diff] [blame] | 1995 | } |
| 1996 | |
| 1997 | __attribute__((visibility("default"))) |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 1998 | VKAPI_ATTR void vkCmdWriteTimestamp(VkCommandBuffer commandBuffer, VkPipelineStageFlagBits pipelineStage, VkQueryPool queryPool, uint32_t query) { |
| 1999 | GetDispatchTable(commandBuffer).CmdWriteTimestamp(commandBuffer, pipelineStage, queryPool, query); |
Jesse Hall | 1f91d39 | 2015-12-11 16:28:44 -0800 | [diff] [blame] | 2000 | } |
| 2001 | |
| 2002 | __attribute__((visibility("default"))) |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 2003 | VKAPI_ATTR void vkCmdCopyQueryPoolResults(VkCommandBuffer commandBuffer, VkQueryPool queryPool, uint32_t firstQuery, uint32_t queryCount, VkBuffer dstBuffer, VkDeviceSize dstOffset, VkDeviceSize stride, VkQueryResultFlags flags) { |
| 2004 | GetDispatchTable(commandBuffer).CmdCopyQueryPoolResults(commandBuffer, queryPool, firstQuery, queryCount, dstBuffer, dstOffset, stride, flags); |
Jesse Hall | 1f91d39 | 2015-12-11 16:28:44 -0800 | [diff] [blame] | 2005 | } |
| 2006 | |
| 2007 | __attribute__((visibility("default"))) |
| 2008 | VKAPI_ATTR void vkCmdPushConstants(VkCommandBuffer commandBuffer, VkPipelineLayout layout, VkShaderStageFlags stageFlags, uint32_t offset, uint32_t size, const void* pValues) { |
| 2009 | GetDispatchTable(commandBuffer).CmdPushConstants(commandBuffer, layout, stageFlags, offset, size, pValues); |
| 2010 | } |
| 2011 | |
| 2012 | __attribute__((visibility("default"))) |
| 2013 | VKAPI_ATTR void vkCmdBeginRenderPass(VkCommandBuffer commandBuffer, const VkRenderPassBeginInfo* pRenderPassBegin, VkSubpassContents contents) { |
| 2014 | GetDispatchTable(commandBuffer).CmdBeginRenderPass(commandBuffer, pRenderPassBegin, contents); |
| 2015 | } |
| 2016 | |
| 2017 | __attribute__((visibility("default"))) |
| 2018 | VKAPI_ATTR void vkCmdNextSubpass(VkCommandBuffer commandBuffer, VkSubpassContents contents) { |
| 2019 | GetDispatchTable(commandBuffer).CmdNextSubpass(commandBuffer, contents); |
| 2020 | } |
| 2021 | |
| 2022 | __attribute__((visibility("default"))) |
| 2023 | VKAPI_ATTR void vkCmdEndRenderPass(VkCommandBuffer commandBuffer) { |
| 2024 | GetDispatchTable(commandBuffer).CmdEndRenderPass(commandBuffer); |
| 2025 | } |
| 2026 | |
| 2027 | __attribute__((visibility("default"))) |
Jesse Hall | 3dd678a | 2016-01-08 21:52:01 -0800 | [diff] [blame] | 2028 | VKAPI_ATTR void vkCmdExecuteCommands(VkCommandBuffer commandBuffer, uint32_t commandBufferCount, const VkCommandBuffer* pCommandBuffers) { |
| 2029 | GetDispatchTable(commandBuffer).CmdExecuteCommands(commandBuffer, commandBufferCount, pCommandBuffers); |
Jesse Hall | 1f91d39 | 2015-12-11 16:28:44 -0800 | [diff] [blame] | 2030 | } |
| 2031 | |
| 2032 | __attribute__((visibility("default"))) |
| 2033 | VKAPI_ATTR void vkDestroySurfaceKHR(VkInstance instance, VkSurfaceKHR surface, const VkAllocationCallbacks* pAllocator) { |
| 2034 | GetDispatchTable(instance).DestroySurfaceKHR(instance, surface, pAllocator); |
| 2035 | } |
| 2036 | |
| 2037 | __attribute__((visibility("default"))) |
| 2038 | VKAPI_ATTR VkResult vkGetPhysicalDeviceSurfaceSupportKHR(VkPhysicalDevice physicalDevice, uint32_t queueFamilyIndex, VkSurfaceKHR surface, VkBool32* pSupported) { |
| 2039 | return GetDispatchTable(physicalDevice).GetPhysicalDeviceSurfaceSupportKHR(physicalDevice, queueFamilyIndex, surface, pSupported); |
| 2040 | } |
| 2041 | |
| 2042 | __attribute__((visibility("default"))) |
| 2043 | VKAPI_ATTR VkResult vkGetPhysicalDeviceSurfaceCapabilitiesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, VkSurfaceCapabilitiesKHR* pSurfaceCapabilities) { |
| 2044 | return GetDispatchTable(physicalDevice).GetPhysicalDeviceSurfaceCapabilitiesKHR(physicalDevice, surface, pSurfaceCapabilities); |
| 2045 | } |
| 2046 | |
| 2047 | __attribute__((visibility("default"))) |
| 2048 | VKAPI_ATTR VkResult vkGetPhysicalDeviceSurfaceFormatsKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t* pSurfaceFormatCount, VkSurfaceFormatKHR* pSurfaceFormats) { |
| 2049 | return GetDispatchTable(physicalDevice).GetPhysicalDeviceSurfaceFormatsKHR(physicalDevice, surface, pSurfaceFormatCount, pSurfaceFormats); |
| 2050 | } |
| 2051 | |
| 2052 | __attribute__((visibility("default"))) |
| 2053 | VKAPI_ATTR VkResult vkGetPhysicalDeviceSurfacePresentModesKHR(VkPhysicalDevice physicalDevice, VkSurfaceKHR surface, uint32_t* pPresentModeCount, VkPresentModeKHR* pPresentModes) { |
| 2054 | return GetDispatchTable(physicalDevice).GetPhysicalDeviceSurfacePresentModesKHR(physicalDevice, surface, pPresentModeCount, pPresentModes); |
| 2055 | } |
| 2056 | |
| 2057 | __attribute__((visibility("default"))) |
| 2058 | VKAPI_ATTR VkResult vkCreateSwapchainKHR(VkDevice device, const VkSwapchainCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSwapchainKHR* pSwapchain) { |
| 2059 | return GetDispatchTable(device).CreateSwapchainKHR(device, pCreateInfo, pAllocator, pSwapchain); |
| 2060 | } |
| 2061 | |
| 2062 | __attribute__((visibility("default"))) |
| 2063 | VKAPI_ATTR void vkDestroySwapchainKHR(VkDevice device, VkSwapchainKHR swapchain, const VkAllocationCallbacks* pAllocator) { |
| 2064 | GetDispatchTable(device).DestroySwapchainKHR(device, swapchain, pAllocator); |
| 2065 | } |
| 2066 | |
| 2067 | __attribute__((visibility("default"))) |
| 2068 | VKAPI_ATTR VkResult vkGetSwapchainImagesKHR(VkDevice device, VkSwapchainKHR swapchain, uint32_t* pSwapchainImageCount, VkImage* pSwapchainImages) { |
| 2069 | return GetDispatchTable(device).GetSwapchainImagesKHR(device, swapchain, pSwapchainImageCount, pSwapchainImages); |
| 2070 | } |
| 2071 | |
| 2072 | __attribute__((visibility("default"))) |
| 2073 | VKAPI_ATTR VkResult vkAcquireNextImageKHR(VkDevice device, VkSwapchainKHR swapchain, uint64_t timeout, VkSemaphore semaphore, VkFence fence, uint32_t* pImageIndex) { |
| 2074 | return GetDispatchTable(device).AcquireNextImageKHR(device, swapchain, timeout, semaphore, fence, pImageIndex); |
| 2075 | } |
| 2076 | |
| 2077 | __attribute__((visibility("default"))) |
| 2078 | VKAPI_ATTR VkResult vkQueuePresentKHR(VkQueue queue, const VkPresentInfoKHR* pPresentInfo) { |
| 2079 | return GetDispatchTable(queue).QueuePresentKHR(queue, pPresentInfo); |
| 2080 | } |
| 2081 | |
| 2082 | __attribute__((visibility("default"))) |
Jesse Hall | f9fa9a5 | 2016-01-08 16:08:51 -0800 | [diff] [blame] | 2083 | VKAPI_ATTR VkResult vkCreateAndroidSurfaceKHR(VkInstance instance, const VkAndroidSurfaceCreateInfoKHR* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface) { |
| 2084 | return GetDispatchTable(instance).CreateAndroidSurfaceKHR(instance, pCreateInfo, pAllocator, pSurface); |
Jesse Hall | 1f91d39 | 2015-12-11 16:28:44 -0800 | [diff] [blame] | 2085 | } |
| 2086 | |
| 2087 | // clang-format on |