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