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