blob: 5f05f0eecb062656ddaebc7b05bbe80181d2a285 [file] [log] [blame]
Jesse Hall04f4f472015-08-16 19:51:04 -07001/*
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// This file is generated. Do not edit manually!
18// To regenerate: $ apic template ../api/vulkan.api get_proc_addr.cpp.tmpl
19// Requires apic from https://android.googlesource.com/platform/tools/gpu/.
20
21#include <algorithm>
22#include <log/log.h>
23#include "loader.h"
24using namespace vulkan;
25
26#define UNLIKELY(expr) __builtin_expect((expr), 0)
27
28namespace {
29
30struct NameProcEntry {
31 const char* name;
32 PFN_vkVoidFunction proc;
33};
34
35struct NameOffsetEntry {
36 const char* name;
37 size_t offset;
38};
39
40template <typename TEntry, size_t N>
41const TEntry* FindProcEntry(const TEntry(&table)[N], const char* name) {
42 auto entry = std::lower_bound(
43 table, table + N, name,
44 [](const TEntry& e, const char* n) { return strcmp(e.name, n) < 0; });
45 if (entry != (table + N) && strcmp(entry->name, name) == 0)
46 return entry;
47 return nullptr;
48}
49
50const NameProcEntry kInstanceProcTbl[] = {
51 // clang-format off
52 {"vkCreateDevice", reinterpret_cast<PFN_vkVoidFunction>(vkCreateDevice)},
53 {"vkDestroyInstance", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyInstance)},
54 {"vkEnumeratePhysicalDevices", reinterpret_cast<PFN_vkVoidFunction>(vkEnumeratePhysicalDevices)},
55 {"vkGetInstanceProcAddr", reinterpret_cast<PFN_vkVoidFunction>(vkGetInstanceProcAddr)},
56 {"vkGetPhysicalDeviceExtensionProperties", reinterpret_cast<PFN_vkVoidFunction>(vkGetPhysicalDeviceExtensionProperties)},
57 {"vkGetPhysicalDeviceFeatures", reinterpret_cast<PFN_vkVoidFunction>(vkGetPhysicalDeviceFeatures)},
58 {"vkGetPhysicalDeviceFormatProperties", reinterpret_cast<PFN_vkVoidFunction>(vkGetPhysicalDeviceFormatProperties)},
59 {"vkGetPhysicalDeviceImageFormatProperties", reinterpret_cast<PFN_vkVoidFunction>(vkGetPhysicalDeviceImageFormatProperties)},
60 {"vkGetPhysicalDeviceLayerProperties", reinterpret_cast<PFN_vkVoidFunction>(vkGetPhysicalDeviceLayerProperties)},
61 {"vkGetPhysicalDeviceLimits", reinterpret_cast<PFN_vkVoidFunction>(vkGetPhysicalDeviceLimits)},
62 {"vkGetPhysicalDeviceMemoryProperties", reinterpret_cast<PFN_vkVoidFunction>(vkGetPhysicalDeviceMemoryProperties)},
63 {"vkGetPhysicalDeviceProperties", reinterpret_cast<PFN_vkVoidFunction>(vkGetPhysicalDeviceProperties)},
64 {"vkGetPhysicalDeviceQueueCount", reinterpret_cast<PFN_vkVoidFunction>(vkGetPhysicalDeviceQueueCount)},
65 {"vkGetPhysicalDeviceQueueProperties", reinterpret_cast<PFN_vkVoidFunction>(vkGetPhysicalDeviceQueueProperties)},
66 {"vkGetPhysicalDeviceSparseImageFormatProperties", reinterpret_cast<PFN_vkVoidFunction>(vkGetPhysicalDeviceSparseImageFormatProperties)},
67 // clang-format on
68};
69
70const NameProcEntry kDeviceProcTbl[] = {
71 // clang-format off
72 {"vkAllocDescriptorSets", reinterpret_cast<PFN_vkVoidFunction>(vkAllocDescriptorSets)},
73 {"vkAllocMemory", reinterpret_cast<PFN_vkVoidFunction>(vkAllocMemory)},
74 {"vkBeginCommandBuffer", reinterpret_cast<PFN_vkVoidFunction>(vkBeginCommandBuffer)},
75 {"vkBindBufferMemory", reinterpret_cast<PFN_vkVoidFunction>(vkBindBufferMemory)},
76 {"vkBindImageMemory", reinterpret_cast<PFN_vkVoidFunction>(vkBindImageMemory)},
77 {"vkCmdBeginQuery", reinterpret_cast<PFN_vkVoidFunction>(vkCmdBeginQuery)},
78 {"vkCmdBeginRenderPass", reinterpret_cast<PFN_vkVoidFunction>(vkCmdBeginRenderPass)},
79 {"vkCmdBindDescriptorSets", reinterpret_cast<PFN_vkVoidFunction>(vkCmdBindDescriptorSets)},
80 {"vkCmdBindDynamicColorBlendState", reinterpret_cast<PFN_vkVoidFunction>(vkCmdBindDynamicColorBlendState)},
81 {"vkCmdBindDynamicDepthStencilState", reinterpret_cast<PFN_vkVoidFunction>(vkCmdBindDynamicDepthStencilState)},
82 {"vkCmdBindDynamicRasterState", reinterpret_cast<PFN_vkVoidFunction>(vkCmdBindDynamicRasterState)},
83 {"vkCmdBindDynamicViewportState", reinterpret_cast<PFN_vkVoidFunction>(vkCmdBindDynamicViewportState)},
84 {"vkCmdBindIndexBuffer", reinterpret_cast<PFN_vkVoidFunction>(vkCmdBindIndexBuffer)},
85 {"vkCmdBindPipeline", reinterpret_cast<PFN_vkVoidFunction>(vkCmdBindPipeline)},
86 {"vkCmdBindVertexBuffers", reinterpret_cast<PFN_vkVoidFunction>(vkCmdBindVertexBuffers)},
87 {"vkCmdBlitImage", reinterpret_cast<PFN_vkVoidFunction>(vkCmdBlitImage)},
88 {"vkCmdClearColorAttachment", reinterpret_cast<PFN_vkVoidFunction>(vkCmdClearColorAttachment)},
89 {"vkCmdClearColorImage", reinterpret_cast<PFN_vkVoidFunction>(vkCmdClearColorImage)},
90 {"vkCmdClearDepthStencilAttachment", reinterpret_cast<PFN_vkVoidFunction>(vkCmdClearDepthStencilAttachment)},
91 {"vkCmdClearDepthStencilImage", reinterpret_cast<PFN_vkVoidFunction>(vkCmdClearDepthStencilImage)},
92 {"vkCmdCopyBuffer", reinterpret_cast<PFN_vkVoidFunction>(vkCmdCopyBuffer)},
93 {"vkCmdCopyBufferToImage", reinterpret_cast<PFN_vkVoidFunction>(vkCmdCopyBufferToImage)},
94 {"vkCmdCopyImage", reinterpret_cast<PFN_vkVoidFunction>(vkCmdCopyImage)},
95 {"vkCmdCopyImageToBuffer", reinterpret_cast<PFN_vkVoidFunction>(vkCmdCopyImageToBuffer)},
96 {"vkCmdCopyQueryPoolResults", reinterpret_cast<PFN_vkVoidFunction>(vkCmdCopyQueryPoolResults)},
97 {"vkCmdDispatch", reinterpret_cast<PFN_vkVoidFunction>(vkCmdDispatch)},
98 {"vkCmdDispatchIndirect", reinterpret_cast<PFN_vkVoidFunction>(vkCmdDispatchIndirect)},
99 {"vkCmdDraw", reinterpret_cast<PFN_vkVoidFunction>(vkCmdDraw)},
100 {"vkCmdDrawIndexed", reinterpret_cast<PFN_vkVoidFunction>(vkCmdDrawIndexed)},
101 {"vkCmdDrawIndexedIndirect", reinterpret_cast<PFN_vkVoidFunction>(vkCmdDrawIndexedIndirect)},
102 {"vkCmdDrawIndirect", reinterpret_cast<PFN_vkVoidFunction>(vkCmdDrawIndirect)},
103 {"vkCmdEndQuery", reinterpret_cast<PFN_vkVoidFunction>(vkCmdEndQuery)},
104 {"vkCmdEndRenderPass", reinterpret_cast<PFN_vkVoidFunction>(vkCmdEndRenderPass)},
105 {"vkCmdExecuteCommands", reinterpret_cast<PFN_vkVoidFunction>(vkCmdExecuteCommands)},
106 {"vkCmdFillBuffer", reinterpret_cast<PFN_vkVoidFunction>(vkCmdFillBuffer)},
107 {"vkCmdNextSubpass", reinterpret_cast<PFN_vkVoidFunction>(vkCmdNextSubpass)},
108 {"vkCmdPipelineBarrier", reinterpret_cast<PFN_vkVoidFunction>(vkCmdPipelineBarrier)},
109 {"vkCmdPushConstants", reinterpret_cast<PFN_vkVoidFunction>(vkCmdPushConstants)},
110 {"vkCmdResetEvent", reinterpret_cast<PFN_vkVoidFunction>(vkCmdResetEvent)},
111 {"vkCmdResetQueryPool", reinterpret_cast<PFN_vkVoidFunction>(vkCmdResetQueryPool)},
112 {"vkCmdResolveImage", reinterpret_cast<PFN_vkVoidFunction>(vkCmdResolveImage)},
113 {"vkCmdSetEvent", reinterpret_cast<PFN_vkVoidFunction>(vkCmdSetEvent)},
114 {"vkCmdUpdateBuffer", reinterpret_cast<PFN_vkVoidFunction>(vkCmdUpdateBuffer)},
115 {"vkCmdWaitEvents", reinterpret_cast<PFN_vkVoidFunction>(vkCmdWaitEvents)},
116 {"vkCmdWriteTimestamp", reinterpret_cast<PFN_vkVoidFunction>(vkCmdWriteTimestamp)},
117 {"vkCreateAttachmentView", reinterpret_cast<PFN_vkVoidFunction>(vkCreateAttachmentView)},
118 {"vkCreateBuffer", reinterpret_cast<PFN_vkVoidFunction>(vkCreateBuffer)},
119 {"vkCreateBufferView", reinterpret_cast<PFN_vkVoidFunction>(vkCreateBufferView)},
120 {"vkCreateCommandBuffer", reinterpret_cast<PFN_vkVoidFunction>(vkCreateCommandBuffer)},
121 {"vkCreateCommandPool", reinterpret_cast<PFN_vkVoidFunction>(vkCreateCommandPool)},
122 {"vkCreateComputePipelines", reinterpret_cast<PFN_vkVoidFunction>(vkCreateComputePipelines)},
123 {"vkCreateDescriptorPool", reinterpret_cast<PFN_vkVoidFunction>(vkCreateDescriptorPool)},
124 {"vkCreateDescriptorSetLayout", reinterpret_cast<PFN_vkVoidFunction>(vkCreateDescriptorSetLayout)},
125 {"vkCreateDynamicColorBlendState", reinterpret_cast<PFN_vkVoidFunction>(vkCreateDynamicColorBlendState)},
126 {"vkCreateDynamicDepthStencilState", reinterpret_cast<PFN_vkVoidFunction>(vkCreateDynamicDepthStencilState)},
127 {"vkCreateDynamicRasterState", reinterpret_cast<PFN_vkVoidFunction>(vkCreateDynamicRasterState)},
128 {"vkCreateDynamicViewportState", reinterpret_cast<PFN_vkVoidFunction>(vkCreateDynamicViewportState)},
129 {"vkCreateEvent", reinterpret_cast<PFN_vkVoidFunction>(vkCreateEvent)},
130 {"vkCreateFence", reinterpret_cast<PFN_vkVoidFunction>(vkCreateFence)},
131 {"vkCreateFramebuffer", reinterpret_cast<PFN_vkVoidFunction>(vkCreateFramebuffer)},
132 {"vkCreateGraphicsPipelines", reinterpret_cast<PFN_vkVoidFunction>(vkCreateGraphicsPipelines)},
133 {"vkCreateImage", reinterpret_cast<PFN_vkVoidFunction>(vkCreateImage)},
134 {"vkCreateImageView", reinterpret_cast<PFN_vkVoidFunction>(vkCreateImageView)},
135 {"vkCreatePipelineCache", reinterpret_cast<PFN_vkVoidFunction>(vkCreatePipelineCache)},
136 {"vkCreatePipelineLayout", reinterpret_cast<PFN_vkVoidFunction>(vkCreatePipelineLayout)},
137 {"vkCreateQueryPool", reinterpret_cast<PFN_vkVoidFunction>(vkCreateQueryPool)},
138 {"vkCreateRenderPass", reinterpret_cast<PFN_vkVoidFunction>(vkCreateRenderPass)},
139 {"vkCreateSampler", reinterpret_cast<PFN_vkVoidFunction>(vkCreateSampler)},
140 {"vkCreateSemaphore", reinterpret_cast<PFN_vkVoidFunction>(vkCreateSemaphore)},
141 {"vkCreateShader", reinterpret_cast<PFN_vkVoidFunction>(vkCreateShader)},
142 {"vkCreateShaderModule", reinterpret_cast<PFN_vkVoidFunction>(vkCreateShaderModule)},
143 {"vkDestroyAttachmentView", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyAttachmentView)},
144 {"vkDestroyBuffer", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyBuffer)},
145 {"vkDestroyBufferView", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyBufferView)},
146 {"vkDestroyCommandBuffer", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyCommandBuffer)},
147 {"vkDestroyCommandPool", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyCommandPool)},
148 {"vkDestroyDescriptorPool", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyDescriptorPool)},
149 {"vkDestroyDescriptorSetLayout", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyDescriptorSetLayout)},
150 {"vkDestroyDevice", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyDevice)},
151 {"vkDestroyDynamicColorBlendState", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyDynamicColorBlendState)},
152 {"vkDestroyDynamicDepthStencilState", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyDynamicDepthStencilState)},
153 {"vkDestroyDynamicRasterState", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyDynamicRasterState)},
154 {"vkDestroyDynamicViewportState", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyDynamicViewportState)},
155 {"vkDestroyEvent", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyEvent)},
156 {"vkDestroyFence", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyFence)},
157 {"vkDestroyFramebuffer", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyFramebuffer)},
158 {"vkDestroyImage", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyImage)},
159 {"vkDestroyImageView", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyImageView)},
160 {"vkDestroyPipeline", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyPipeline)},
161 {"vkDestroyPipelineCache", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyPipelineCache)},
162 {"vkDestroyPipelineLayout", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyPipelineLayout)},
163 {"vkDestroyQueryPool", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyQueryPool)},
164 {"vkDestroyRenderPass", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyRenderPass)},
165 {"vkDestroySampler", reinterpret_cast<PFN_vkVoidFunction>(vkDestroySampler)},
166 {"vkDestroySemaphore", reinterpret_cast<PFN_vkVoidFunction>(vkDestroySemaphore)},
167 {"vkDestroyShader", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyShader)},
168 {"vkDestroyShaderModule", reinterpret_cast<PFN_vkVoidFunction>(vkDestroyShaderModule)},
169 {"vkDeviceWaitIdle", reinterpret_cast<PFN_vkVoidFunction>(vkDeviceWaitIdle)},
170 {"vkEndCommandBuffer", reinterpret_cast<PFN_vkVoidFunction>(vkEndCommandBuffer)},
171 {"vkFlushMappedMemoryRanges", reinterpret_cast<PFN_vkVoidFunction>(vkFlushMappedMemoryRanges)},
172 {"vkFreeDescriptorSets", reinterpret_cast<PFN_vkVoidFunction>(vkFreeDescriptorSets)},
173 {"vkFreeMemory", reinterpret_cast<PFN_vkVoidFunction>(vkFreeMemory)},
174 {"vkGetBufferMemoryRequirements", reinterpret_cast<PFN_vkVoidFunction>(vkGetBufferMemoryRequirements)},
175 {"vkGetDeviceMemoryCommitment", reinterpret_cast<PFN_vkVoidFunction>(vkGetDeviceMemoryCommitment)},
176 {"vkGetDeviceProcAddr", reinterpret_cast<PFN_vkVoidFunction>(vkGetDeviceProcAddr)},
177 {"vkGetDeviceQueue", reinterpret_cast<PFN_vkVoidFunction>(vkGetDeviceQueue)},
178 {"vkGetEventStatus", reinterpret_cast<PFN_vkVoidFunction>(vkGetEventStatus)},
179 {"vkGetFenceStatus", reinterpret_cast<PFN_vkVoidFunction>(vkGetFenceStatus)},
180 {"vkGetImageMemoryRequirements", reinterpret_cast<PFN_vkVoidFunction>(vkGetImageMemoryRequirements)},
181 {"vkGetImageSparseMemoryRequirements", reinterpret_cast<PFN_vkVoidFunction>(vkGetImageSparseMemoryRequirements)},
182 {"vkGetImageSubresourceLayout", reinterpret_cast<PFN_vkVoidFunction>(vkGetImageSubresourceLayout)},
183 {"vkGetPipelineCacheData", reinterpret_cast<PFN_vkVoidFunction>(vkGetPipelineCacheData)},
184 {"vkGetPipelineCacheSize", reinterpret_cast<PFN_vkVoidFunction>(vkGetPipelineCacheSize)},
185 {"vkGetQueryPoolResults", reinterpret_cast<PFN_vkVoidFunction>(vkGetQueryPoolResults)},
186 {"vkGetRenderAreaGranularity", reinterpret_cast<PFN_vkVoidFunction>(vkGetRenderAreaGranularity)},
187 {"vkInvalidateMappedMemoryRanges", reinterpret_cast<PFN_vkVoidFunction>(vkInvalidateMappedMemoryRanges)},
188 {"vkMapMemory", reinterpret_cast<PFN_vkVoidFunction>(vkMapMemory)},
189 {"vkMergePipelineCaches", reinterpret_cast<PFN_vkVoidFunction>(vkMergePipelineCaches)},
190 {"vkQueueBindSparseBufferMemory", reinterpret_cast<PFN_vkVoidFunction>(vkQueueBindSparseBufferMemory)},
191 {"vkQueueBindSparseImageMemory", reinterpret_cast<PFN_vkVoidFunction>(vkQueueBindSparseImageMemory)},
192 {"vkQueueBindSparseImageOpaqueMemory", reinterpret_cast<PFN_vkVoidFunction>(vkQueueBindSparseImageOpaqueMemory)},
193 {"vkQueueSignalSemaphore", reinterpret_cast<PFN_vkVoidFunction>(vkQueueSignalSemaphore)},
194 {"vkQueueSubmit", reinterpret_cast<PFN_vkVoidFunction>(vkQueueSubmit)},
195 {"vkQueueWaitIdle", reinterpret_cast<PFN_vkVoidFunction>(vkQueueWaitIdle)},
196 {"vkQueueWaitSemaphore", reinterpret_cast<PFN_vkVoidFunction>(vkQueueWaitSemaphore)},
197 {"vkResetCommandBuffer", reinterpret_cast<PFN_vkVoidFunction>(vkResetCommandBuffer)},
198 {"vkResetCommandPool", reinterpret_cast<PFN_vkVoidFunction>(vkResetCommandPool)},
199 {"vkResetDescriptorPool", reinterpret_cast<PFN_vkVoidFunction>(vkResetDescriptorPool)},
200 {"vkResetEvent", reinterpret_cast<PFN_vkVoidFunction>(vkResetEvent)},
201 {"vkResetFences", reinterpret_cast<PFN_vkVoidFunction>(vkResetFences)},
202 {"vkSetEvent", reinterpret_cast<PFN_vkVoidFunction>(vkSetEvent)},
203 {"vkUnmapMemory", reinterpret_cast<PFN_vkVoidFunction>(vkUnmapMemory)},
204 {"vkUpdateDescriptorSets", reinterpret_cast<PFN_vkVoidFunction>(vkUpdateDescriptorSets)},
205 {"vkWaitForFences", reinterpret_cast<PFN_vkVoidFunction>(vkWaitForFences)},
206 // clang-format on
207};
208
209const NameOffsetEntry kInstanceOffsetTbl[] = {
210 // clang-format off
211 {"vkCreateDevice", offsetof(InstanceVtbl, CreateDevice)},
212 {"vkDestroyInstance", offsetof(InstanceVtbl, DestroyInstance)},
213 {"vkEnumeratePhysicalDevices", offsetof(InstanceVtbl, EnumeratePhysicalDevices)},
214 {"vkGetInstanceProcAddr", offsetof(InstanceVtbl, GetInstanceProcAddr)},
215 {"vkGetPhysicalDeviceExtensionProperties", offsetof(InstanceVtbl, GetPhysicalDeviceExtensionProperties)},
216 {"vkGetPhysicalDeviceFeatures", offsetof(InstanceVtbl, GetPhysicalDeviceFeatures)},
217 {"vkGetPhysicalDeviceFormatProperties", offsetof(InstanceVtbl, GetPhysicalDeviceFormatProperties)},
218 {"vkGetPhysicalDeviceImageFormatProperties", offsetof(InstanceVtbl, GetPhysicalDeviceImageFormatProperties)},
219 {"vkGetPhysicalDeviceLayerProperties", offsetof(InstanceVtbl, GetPhysicalDeviceLayerProperties)},
220 {"vkGetPhysicalDeviceLimits", offsetof(InstanceVtbl, GetPhysicalDeviceLimits)},
221 {"vkGetPhysicalDeviceMemoryProperties", offsetof(InstanceVtbl, GetPhysicalDeviceMemoryProperties)},
222 {"vkGetPhysicalDeviceProperties", offsetof(InstanceVtbl, GetPhysicalDeviceProperties)},
223 {"vkGetPhysicalDeviceQueueCount", offsetof(InstanceVtbl, GetPhysicalDeviceQueueCount)},
224 {"vkGetPhysicalDeviceQueueProperties", offsetof(InstanceVtbl, GetPhysicalDeviceQueueProperties)},
225 {"vkGetPhysicalDeviceSparseImageFormatProperties", offsetof(InstanceVtbl, GetPhysicalDeviceSparseImageFormatProperties)},
226 // clang-format on
227};
228
229const NameOffsetEntry kDeviceOffsetTbl[] = {
230 // clang-format off
231 {"vkAllocDescriptorSets", offsetof(DeviceVtbl, AllocDescriptorSets)},
232 {"vkAllocMemory", offsetof(DeviceVtbl, AllocMemory)},
233 {"vkBeginCommandBuffer", offsetof(DeviceVtbl, BeginCommandBuffer)},
234 {"vkBindBufferMemory", offsetof(DeviceVtbl, BindBufferMemory)},
235 {"vkBindImageMemory", offsetof(DeviceVtbl, BindImageMemory)},
236 {"vkCmdBeginQuery", offsetof(DeviceVtbl, CmdBeginQuery)},
237 {"vkCmdBeginRenderPass", offsetof(DeviceVtbl, CmdBeginRenderPass)},
238 {"vkCmdBindDescriptorSets", offsetof(DeviceVtbl, CmdBindDescriptorSets)},
239 {"vkCmdBindDynamicColorBlendState", offsetof(DeviceVtbl, CmdBindDynamicColorBlendState)},
240 {"vkCmdBindDynamicDepthStencilState", offsetof(DeviceVtbl, CmdBindDynamicDepthStencilState)},
241 {"vkCmdBindDynamicRasterState", offsetof(DeviceVtbl, CmdBindDynamicRasterState)},
242 {"vkCmdBindDynamicViewportState", offsetof(DeviceVtbl, CmdBindDynamicViewportState)},
243 {"vkCmdBindIndexBuffer", offsetof(DeviceVtbl, CmdBindIndexBuffer)},
244 {"vkCmdBindPipeline", offsetof(DeviceVtbl, CmdBindPipeline)},
245 {"vkCmdBindVertexBuffers", offsetof(DeviceVtbl, CmdBindVertexBuffers)},
246 {"vkCmdBlitImage", offsetof(DeviceVtbl, CmdBlitImage)},
247 {"vkCmdClearColorAttachment", offsetof(DeviceVtbl, CmdClearColorAttachment)},
248 {"vkCmdClearColorImage", offsetof(DeviceVtbl, CmdClearColorImage)},
249 {"vkCmdClearDepthStencilAttachment", offsetof(DeviceVtbl, CmdClearDepthStencilAttachment)},
250 {"vkCmdClearDepthStencilImage", offsetof(DeviceVtbl, CmdClearDepthStencilImage)},
251 {"vkCmdCopyBuffer", offsetof(DeviceVtbl, CmdCopyBuffer)},
252 {"vkCmdCopyBufferToImage", offsetof(DeviceVtbl, CmdCopyBufferToImage)},
253 {"vkCmdCopyImage", offsetof(DeviceVtbl, CmdCopyImage)},
254 {"vkCmdCopyImageToBuffer", offsetof(DeviceVtbl, CmdCopyImageToBuffer)},
255 {"vkCmdCopyQueryPoolResults", offsetof(DeviceVtbl, CmdCopyQueryPoolResults)},
256 {"vkCmdDispatch", offsetof(DeviceVtbl, CmdDispatch)},
257 {"vkCmdDispatchIndirect", offsetof(DeviceVtbl, CmdDispatchIndirect)},
258 {"vkCmdDraw", offsetof(DeviceVtbl, CmdDraw)},
259 {"vkCmdDrawIndexed", offsetof(DeviceVtbl, CmdDrawIndexed)},
260 {"vkCmdDrawIndexedIndirect", offsetof(DeviceVtbl, CmdDrawIndexedIndirect)},
261 {"vkCmdDrawIndirect", offsetof(DeviceVtbl, CmdDrawIndirect)},
262 {"vkCmdEndQuery", offsetof(DeviceVtbl, CmdEndQuery)},
263 {"vkCmdEndRenderPass", offsetof(DeviceVtbl, CmdEndRenderPass)},
264 {"vkCmdExecuteCommands", offsetof(DeviceVtbl, CmdExecuteCommands)},
265 {"vkCmdFillBuffer", offsetof(DeviceVtbl, CmdFillBuffer)},
266 {"vkCmdNextSubpass", offsetof(DeviceVtbl, CmdNextSubpass)},
267 {"vkCmdPipelineBarrier", offsetof(DeviceVtbl, CmdPipelineBarrier)},
268 {"vkCmdPushConstants", offsetof(DeviceVtbl, CmdPushConstants)},
269 {"vkCmdResetEvent", offsetof(DeviceVtbl, CmdResetEvent)},
270 {"vkCmdResetQueryPool", offsetof(DeviceVtbl, CmdResetQueryPool)},
271 {"vkCmdResolveImage", offsetof(DeviceVtbl, CmdResolveImage)},
272 {"vkCmdSetEvent", offsetof(DeviceVtbl, CmdSetEvent)},
273 {"vkCmdUpdateBuffer", offsetof(DeviceVtbl, CmdUpdateBuffer)},
274 {"vkCmdWaitEvents", offsetof(DeviceVtbl, CmdWaitEvents)},
275 {"vkCmdWriteTimestamp", offsetof(DeviceVtbl, CmdWriteTimestamp)},
276 {"vkCreateAttachmentView", offsetof(DeviceVtbl, CreateAttachmentView)},
277 {"vkCreateBuffer", offsetof(DeviceVtbl, CreateBuffer)},
278 {"vkCreateBufferView", offsetof(DeviceVtbl, CreateBufferView)},
279 {"vkCreateCommandBuffer", offsetof(DeviceVtbl, CreateCommandBuffer)},
280 {"vkCreateCommandPool", offsetof(DeviceVtbl, CreateCommandPool)},
281 {"vkCreateComputePipelines", offsetof(DeviceVtbl, CreateComputePipelines)},
282 {"vkCreateDescriptorPool", offsetof(DeviceVtbl, CreateDescriptorPool)},
283 {"vkCreateDescriptorSetLayout", offsetof(DeviceVtbl, CreateDescriptorSetLayout)},
284 {"vkCreateDynamicColorBlendState", offsetof(DeviceVtbl, CreateDynamicColorBlendState)},
285 {"vkCreateDynamicDepthStencilState", offsetof(DeviceVtbl, CreateDynamicDepthStencilState)},
286 {"vkCreateDynamicRasterState", offsetof(DeviceVtbl, CreateDynamicRasterState)},
287 {"vkCreateDynamicViewportState", offsetof(DeviceVtbl, CreateDynamicViewportState)},
288 {"vkCreateEvent", offsetof(DeviceVtbl, CreateEvent)},
289 {"vkCreateFence", offsetof(DeviceVtbl, CreateFence)},
290 {"vkCreateFramebuffer", offsetof(DeviceVtbl, CreateFramebuffer)},
291 {"vkCreateGraphicsPipelines", offsetof(DeviceVtbl, CreateGraphicsPipelines)},
292 {"vkCreateImage", offsetof(DeviceVtbl, CreateImage)},
293 {"vkCreateImageView", offsetof(DeviceVtbl, CreateImageView)},
294 {"vkCreatePipelineCache", offsetof(DeviceVtbl, CreatePipelineCache)},
295 {"vkCreatePipelineLayout", offsetof(DeviceVtbl, CreatePipelineLayout)},
296 {"vkCreateQueryPool", offsetof(DeviceVtbl, CreateQueryPool)},
297 {"vkCreateRenderPass", offsetof(DeviceVtbl, CreateRenderPass)},
298 {"vkCreateSampler", offsetof(DeviceVtbl, CreateSampler)},
299 {"vkCreateSemaphore", offsetof(DeviceVtbl, CreateSemaphore)},
300 {"vkCreateShader", offsetof(DeviceVtbl, CreateShader)},
301 {"vkCreateShaderModule", offsetof(DeviceVtbl, CreateShaderModule)},
302 {"vkDestroyAttachmentView", offsetof(DeviceVtbl, DestroyAttachmentView)},
303 {"vkDestroyBuffer", offsetof(DeviceVtbl, DestroyBuffer)},
304 {"vkDestroyBufferView", offsetof(DeviceVtbl, DestroyBufferView)},
305 {"vkDestroyCommandBuffer", offsetof(DeviceVtbl, DestroyCommandBuffer)},
306 {"vkDestroyCommandPool", offsetof(DeviceVtbl, DestroyCommandPool)},
307 {"vkDestroyDescriptorPool", offsetof(DeviceVtbl, DestroyDescriptorPool)},
308 {"vkDestroyDescriptorSetLayout", offsetof(DeviceVtbl, DestroyDescriptorSetLayout)},
309 {"vkDestroyDevice", offsetof(DeviceVtbl, DestroyDevice)},
310 {"vkDestroyDynamicColorBlendState", offsetof(DeviceVtbl, DestroyDynamicColorBlendState)},
311 {"vkDestroyDynamicDepthStencilState", offsetof(DeviceVtbl, DestroyDynamicDepthStencilState)},
312 {"vkDestroyDynamicRasterState", offsetof(DeviceVtbl, DestroyDynamicRasterState)},
313 {"vkDestroyDynamicViewportState", offsetof(DeviceVtbl, DestroyDynamicViewportState)},
314 {"vkDestroyEvent", offsetof(DeviceVtbl, DestroyEvent)},
315 {"vkDestroyFence", offsetof(DeviceVtbl, DestroyFence)},
316 {"vkDestroyFramebuffer", offsetof(DeviceVtbl, DestroyFramebuffer)},
317 {"vkDestroyImage", offsetof(DeviceVtbl, DestroyImage)},
318 {"vkDestroyImageView", offsetof(DeviceVtbl, DestroyImageView)},
319 {"vkDestroyPipeline", offsetof(DeviceVtbl, DestroyPipeline)},
320 {"vkDestroyPipelineCache", offsetof(DeviceVtbl, DestroyPipelineCache)},
321 {"vkDestroyPipelineLayout", offsetof(DeviceVtbl, DestroyPipelineLayout)},
322 {"vkDestroyQueryPool", offsetof(DeviceVtbl, DestroyQueryPool)},
323 {"vkDestroyRenderPass", offsetof(DeviceVtbl, DestroyRenderPass)},
324 {"vkDestroySampler", offsetof(DeviceVtbl, DestroySampler)},
325 {"vkDestroySemaphore", offsetof(DeviceVtbl, DestroySemaphore)},
326 {"vkDestroyShader", offsetof(DeviceVtbl, DestroyShader)},
327 {"vkDestroyShaderModule", offsetof(DeviceVtbl, DestroyShaderModule)},
328 {"vkDeviceWaitIdle", offsetof(DeviceVtbl, DeviceWaitIdle)},
329 {"vkEndCommandBuffer", offsetof(DeviceVtbl, EndCommandBuffer)},
330 {"vkFlushMappedMemoryRanges", offsetof(DeviceVtbl, FlushMappedMemoryRanges)},
331 {"vkFreeDescriptorSets", offsetof(DeviceVtbl, FreeDescriptorSets)},
332 {"vkFreeMemory", offsetof(DeviceVtbl, FreeMemory)},
333 {"vkGetBufferMemoryRequirements", offsetof(DeviceVtbl, GetBufferMemoryRequirements)},
334 {"vkGetDeviceMemoryCommitment", offsetof(DeviceVtbl, GetDeviceMemoryCommitment)},
335 {"vkGetDeviceProcAddr", offsetof(DeviceVtbl, GetDeviceProcAddr)},
336 {"vkGetDeviceQueue", offsetof(DeviceVtbl, GetDeviceQueue)},
337 {"vkGetEventStatus", offsetof(DeviceVtbl, GetEventStatus)},
338 {"vkGetFenceStatus", offsetof(DeviceVtbl, GetFenceStatus)},
339 {"vkGetImageMemoryRequirements", offsetof(DeviceVtbl, GetImageMemoryRequirements)},
340 {"vkGetImageSparseMemoryRequirements", offsetof(DeviceVtbl, GetImageSparseMemoryRequirements)},
341 {"vkGetImageSubresourceLayout", offsetof(DeviceVtbl, GetImageSubresourceLayout)},
342 {"vkGetPipelineCacheData", offsetof(DeviceVtbl, GetPipelineCacheData)},
343 {"vkGetPipelineCacheSize", offsetof(DeviceVtbl, GetPipelineCacheSize)},
344 {"vkGetQueryPoolResults", offsetof(DeviceVtbl, GetQueryPoolResults)},
345 {"vkGetRenderAreaGranularity", offsetof(DeviceVtbl, GetRenderAreaGranularity)},
346 {"vkInvalidateMappedMemoryRanges", offsetof(DeviceVtbl, InvalidateMappedMemoryRanges)},
347 {"vkMapMemory", offsetof(DeviceVtbl, MapMemory)},
348 {"vkMergePipelineCaches", offsetof(DeviceVtbl, MergePipelineCaches)},
349 {"vkQueueBindSparseBufferMemory", offsetof(DeviceVtbl, QueueBindSparseBufferMemory)},
350 {"vkQueueBindSparseImageMemory", offsetof(DeviceVtbl, QueueBindSparseImageMemory)},
351 {"vkQueueBindSparseImageOpaqueMemory", offsetof(DeviceVtbl, QueueBindSparseImageOpaqueMemory)},
352 {"vkQueueSignalSemaphore", offsetof(DeviceVtbl, QueueSignalSemaphore)},
353 {"vkQueueSubmit", offsetof(DeviceVtbl, QueueSubmit)},
354 {"vkQueueWaitIdle", offsetof(DeviceVtbl, QueueWaitIdle)},
355 {"vkQueueWaitSemaphore", offsetof(DeviceVtbl, QueueWaitSemaphore)},
356 {"vkResetCommandBuffer", offsetof(DeviceVtbl, ResetCommandBuffer)},
357 {"vkResetCommandPool", offsetof(DeviceVtbl, ResetCommandPool)},
358 {"vkResetDescriptorPool", offsetof(DeviceVtbl, ResetDescriptorPool)},
359 {"vkResetEvent", offsetof(DeviceVtbl, ResetEvent)},
360 {"vkResetFences", offsetof(DeviceVtbl, ResetFences)},
361 {"vkSetEvent", offsetof(DeviceVtbl, SetEvent)},
362 {"vkUnmapMemory", offsetof(DeviceVtbl, UnmapMemory)},
363 {"vkUpdateDescriptorSets", offsetof(DeviceVtbl, UpdateDescriptorSets)},
364 {"vkWaitForFences", offsetof(DeviceVtbl, WaitForFences)},
365 // clang-format on
366};
367
368} // namespace
369
370namespace vulkan {
371
372PFN_vkVoidFunction GetGlobalInstanceProcAddr(const char* name) {
373 if (strcmp(name, "vkGetDeviceProcAddr") == 0)
374 return reinterpret_cast<PFN_vkVoidFunction>(vkGetDeviceProcAddr);
375 const NameProcEntry* entry = FindProcEntry(kInstanceProcTbl, name);
376 return entry ? entry->proc : nullptr;
377}
378
379PFN_vkVoidFunction GetGlobalDeviceProcAddr(const char* name) {
380 const NameProcEntry* entry = FindProcEntry(kDeviceProcTbl, name);
381 return entry ? entry->proc : nullptr;
382}
383
384PFN_vkVoidFunction GetSpecificInstanceProcAddr(const InstanceVtbl* vtbl,
385 const char* name) {
386 const NameOffsetEntry* entry = FindProcEntry(kInstanceOffsetTbl, name);
387 if (!entry)
388 return nullptr;
389 const unsigned char* base = reinterpret_cast<const unsigned char*>(vtbl);
390 return reinterpret_cast<PFN_vkVoidFunction>(
391 const_cast<unsigned char*>(base) + entry->offset);
392}
393
394PFN_vkVoidFunction GetSpecificDeviceProcAddr(const DeviceVtbl* vtbl,
395 const char* name) {
396 const NameOffsetEntry* entry = FindProcEntry(kDeviceOffsetTbl, name);
397 if (!entry)
398 return nullptr;
399 const unsigned char* base = reinterpret_cast<const unsigned char*>(vtbl);
400 return reinterpret_cast<PFN_vkVoidFunction>(
401 const_cast<unsigned char*>(base) + entry->offset);
402}
403
404bool LoadInstanceVtbl(VkInstance instance,
405 PFN_vkGetInstanceProcAddr get_proc_addr,
406 InstanceVtbl& vtbl) {
407 bool success = true;
408 // clang-format off
409 vtbl.DestroyInstance = reinterpret_cast<PFN_vkDestroyInstance>(get_proc_addr(instance, "vkDestroyInstance"));
410 if (UNLIKELY(!vtbl.DestroyInstance)) {
411 ALOGE("missing instance proc: %s", "vkDestroyInstance");
412 success = false;
413 }
414 vtbl.EnumeratePhysicalDevices = reinterpret_cast<PFN_vkEnumeratePhysicalDevices>(get_proc_addr(instance, "vkEnumeratePhysicalDevices"));
415 if (UNLIKELY(!vtbl.EnumeratePhysicalDevices)) {
416 ALOGE("missing instance proc: %s", "vkEnumeratePhysicalDevices");
417 success = false;
418 }
419 vtbl.GetInstanceProcAddr = reinterpret_cast<PFN_vkGetInstanceProcAddr>(get_proc_addr(instance, "vkGetInstanceProcAddr"));
420 if (UNLIKELY(!vtbl.GetInstanceProcAddr)) {
421 ALOGE("missing instance proc: %s", "vkGetInstanceProcAddr");
422 success = false;
423 }
424 vtbl.GetPhysicalDeviceProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceProperties>(get_proc_addr(instance, "vkGetPhysicalDeviceProperties"));
425 if (UNLIKELY(!vtbl.GetPhysicalDeviceProperties)) {
426 ALOGE("missing instance proc: %s", "vkGetPhysicalDeviceProperties");
427 success = false;
428 }
429 vtbl.GetPhysicalDeviceQueueCount = reinterpret_cast<PFN_vkGetPhysicalDeviceQueueCount>(get_proc_addr(instance, "vkGetPhysicalDeviceQueueCount"));
430 if (UNLIKELY(!vtbl.GetPhysicalDeviceQueueCount)) {
431 ALOGE("missing instance proc: %s", "vkGetPhysicalDeviceQueueCount");
432 success = false;
433 }
434 vtbl.GetPhysicalDeviceQueueProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceQueueProperties>(get_proc_addr(instance, "vkGetPhysicalDeviceQueueProperties"));
435 if (UNLIKELY(!vtbl.GetPhysicalDeviceQueueProperties)) {
436 ALOGE("missing instance proc: %s", "vkGetPhysicalDeviceQueueProperties");
437 success = false;
438 }
439 vtbl.GetPhysicalDeviceMemoryProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceMemoryProperties>(get_proc_addr(instance, "vkGetPhysicalDeviceMemoryProperties"));
440 if (UNLIKELY(!vtbl.GetPhysicalDeviceMemoryProperties)) {
441 ALOGE("missing instance proc: %s", "vkGetPhysicalDeviceMemoryProperties");
442 success = false;
443 }
444 vtbl.GetPhysicalDeviceFeatures = reinterpret_cast<PFN_vkGetPhysicalDeviceFeatures>(get_proc_addr(instance, "vkGetPhysicalDeviceFeatures"));
445 if (UNLIKELY(!vtbl.GetPhysicalDeviceFeatures)) {
446 ALOGE("missing instance proc: %s", "vkGetPhysicalDeviceFeatures");
447 success = false;
448 }
449 vtbl.GetPhysicalDeviceFormatProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceFormatProperties>(get_proc_addr(instance, "vkGetPhysicalDeviceFormatProperties"));
450 if (UNLIKELY(!vtbl.GetPhysicalDeviceFormatProperties)) {
451 ALOGE("missing instance proc: %s", "vkGetPhysicalDeviceFormatProperties");
452 success = false;
453 }
454 vtbl.GetPhysicalDeviceImageFormatProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceImageFormatProperties>(get_proc_addr(instance, "vkGetPhysicalDeviceImageFormatProperties"));
455 if (UNLIKELY(!vtbl.GetPhysicalDeviceImageFormatProperties)) {
456 ALOGE("missing instance proc: %s", "vkGetPhysicalDeviceImageFormatProperties");
457 success = false;
458 }
459 vtbl.GetPhysicalDeviceLimits = reinterpret_cast<PFN_vkGetPhysicalDeviceLimits>(get_proc_addr(instance, "vkGetPhysicalDeviceLimits"));
460 if (UNLIKELY(!vtbl.GetPhysicalDeviceLimits)) {
461 ALOGE("missing instance proc: %s", "vkGetPhysicalDeviceLimits");
462 success = false;
463 }
464 vtbl.CreateDevice = reinterpret_cast<PFN_vkCreateDevice>(get_proc_addr(instance, "vkCreateDevice"));
465 if (UNLIKELY(!vtbl.CreateDevice)) {
466 ALOGE("missing instance proc: %s", "vkCreateDevice");
467 success = false;
468 }
469 vtbl.GetPhysicalDeviceLayerProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceLayerProperties>(get_proc_addr(instance, "vkGetPhysicalDeviceLayerProperties"));
470 if (UNLIKELY(!vtbl.GetPhysicalDeviceLayerProperties)) {
471 ALOGE("missing instance proc: %s", "vkGetPhysicalDeviceLayerProperties");
472 success = false;
473 }
474 vtbl.GetPhysicalDeviceExtensionProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceExtensionProperties>(get_proc_addr(instance, "vkGetPhysicalDeviceExtensionProperties"));
475 if (UNLIKELY(!vtbl.GetPhysicalDeviceExtensionProperties)) {
476 ALOGE("missing instance proc: %s", "vkGetPhysicalDeviceExtensionProperties");
477 success = false;
478 }
479 vtbl.GetPhysicalDeviceSparseImageFormatProperties = reinterpret_cast<PFN_vkGetPhysicalDeviceSparseImageFormatProperties>(get_proc_addr(instance, "vkGetPhysicalDeviceSparseImageFormatProperties"));
480 if (UNLIKELY(!vtbl.GetPhysicalDeviceSparseImageFormatProperties)) {
481 ALOGE("missing instance proc: %s", "vkGetPhysicalDeviceSparseImageFormatProperties");
482 success = false;
483 }
484 // clang-format on
485 return success;
486}
487
488bool LoadDeviceVtbl(VkDevice device,
489 PFN_vkGetDeviceProcAddr get_proc_addr,
490 DeviceVtbl& vtbl) {
491 bool success = true;
492 // clang-format off
493 vtbl.GetDeviceProcAddr = reinterpret_cast<PFN_vkGetDeviceProcAddr>(get_proc_addr(device, "vkGetDeviceProcAddr"));
494 if (UNLIKELY(!vtbl.GetDeviceProcAddr)) {
495 ALOGE("missing device proc: %s", "vkGetDeviceProcAddr");
496 success = false;
497 }
498 vtbl.DestroyDevice = reinterpret_cast<PFN_vkDestroyDevice>(get_proc_addr(device, "vkDestroyDevice"));
499 if (UNLIKELY(!vtbl.DestroyDevice)) {
500 ALOGE("missing device proc: %s", "vkDestroyDevice");
501 success = false;
502 }
503 vtbl.GetDeviceQueue = reinterpret_cast<PFN_vkGetDeviceQueue>(get_proc_addr(device, "vkGetDeviceQueue"));
504 if (UNLIKELY(!vtbl.GetDeviceQueue)) {
505 ALOGE("missing device proc: %s", "vkGetDeviceQueue");
506 success = false;
507 }
508 vtbl.QueueSubmit = reinterpret_cast<PFN_vkQueueSubmit>(get_proc_addr(device, "vkQueueSubmit"));
509 if (UNLIKELY(!vtbl.QueueSubmit)) {
510 ALOGE("missing device proc: %s", "vkQueueSubmit");
511 success = false;
512 }
513 vtbl.QueueWaitIdle = reinterpret_cast<PFN_vkQueueWaitIdle>(get_proc_addr(device, "vkQueueWaitIdle"));
514 if (UNLIKELY(!vtbl.QueueWaitIdle)) {
515 ALOGE("missing device proc: %s", "vkQueueWaitIdle");
516 success = false;
517 }
518 vtbl.DeviceWaitIdle = reinterpret_cast<PFN_vkDeviceWaitIdle>(get_proc_addr(device, "vkDeviceWaitIdle"));
519 if (UNLIKELY(!vtbl.DeviceWaitIdle)) {
520 ALOGE("missing device proc: %s", "vkDeviceWaitIdle");
521 success = false;
522 }
523 vtbl.AllocMemory = reinterpret_cast<PFN_vkAllocMemory>(get_proc_addr(device, "vkAllocMemory"));
524 if (UNLIKELY(!vtbl.AllocMemory)) {
525 ALOGE("missing device proc: %s", "vkAllocMemory");
526 success = false;
527 }
528 vtbl.FreeMemory = reinterpret_cast<PFN_vkFreeMemory>(get_proc_addr(device, "vkFreeMemory"));
529 if (UNLIKELY(!vtbl.FreeMemory)) {
530 ALOGE("missing device proc: %s", "vkFreeMemory");
531 success = false;
532 }
533 vtbl.MapMemory = reinterpret_cast<PFN_vkMapMemory>(get_proc_addr(device, "vkMapMemory"));
534 if (UNLIKELY(!vtbl.MapMemory)) {
535 ALOGE("missing device proc: %s", "vkMapMemory");
536 success = false;
537 }
538 vtbl.UnmapMemory = reinterpret_cast<PFN_vkUnmapMemory>(get_proc_addr(device, "vkUnmapMemory"));
539 if (UNLIKELY(!vtbl.UnmapMemory)) {
540 ALOGE("missing device proc: %s", "vkUnmapMemory");
541 success = false;
542 }
543 vtbl.FlushMappedMemoryRanges = reinterpret_cast<PFN_vkFlushMappedMemoryRanges>(get_proc_addr(device, "vkFlushMappedMemoryRanges"));
544 if (UNLIKELY(!vtbl.FlushMappedMemoryRanges)) {
545 ALOGE("missing device proc: %s", "vkFlushMappedMemoryRanges");
546 success = false;
547 }
548 vtbl.InvalidateMappedMemoryRanges = reinterpret_cast<PFN_vkInvalidateMappedMemoryRanges>(get_proc_addr(device, "vkInvalidateMappedMemoryRanges"));
549 if (UNLIKELY(!vtbl.InvalidateMappedMemoryRanges)) {
550 ALOGE("missing device proc: %s", "vkInvalidateMappedMemoryRanges");
551 success = false;
552 }
553 vtbl.GetDeviceMemoryCommitment = reinterpret_cast<PFN_vkGetDeviceMemoryCommitment>(get_proc_addr(device, "vkGetDeviceMemoryCommitment"));
554 if (UNLIKELY(!vtbl.GetDeviceMemoryCommitment)) {
555 ALOGE("missing device proc: %s", "vkGetDeviceMemoryCommitment");
556 success = false;
557 }
558 vtbl.GetBufferMemoryRequirements = reinterpret_cast<PFN_vkGetBufferMemoryRequirements>(get_proc_addr(device, "vkGetBufferMemoryRequirements"));
559 if (UNLIKELY(!vtbl.GetBufferMemoryRequirements)) {
560 ALOGE("missing device proc: %s", "vkGetBufferMemoryRequirements");
561 success = false;
562 }
563 vtbl.BindBufferMemory = reinterpret_cast<PFN_vkBindBufferMemory>(get_proc_addr(device, "vkBindBufferMemory"));
564 if (UNLIKELY(!vtbl.BindBufferMemory)) {
565 ALOGE("missing device proc: %s", "vkBindBufferMemory");
566 success = false;
567 }
568 vtbl.GetImageMemoryRequirements = reinterpret_cast<PFN_vkGetImageMemoryRequirements>(get_proc_addr(device, "vkGetImageMemoryRequirements"));
569 if (UNLIKELY(!vtbl.GetImageMemoryRequirements)) {
570 ALOGE("missing device proc: %s", "vkGetImageMemoryRequirements");
571 success = false;
572 }
573 vtbl.BindImageMemory = reinterpret_cast<PFN_vkBindImageMemory>(get_proc_addr(device, "vkBindImageMemory"));
574 if (UNLIKELY(!vtbl.BindImageMemory)) {
575 ALOGE("missing device proc: %s", "vkBindImageMemory");
576 success = false;
577 }
578 vtbl.GetImageSparseMemoryRequirements = reinterpret_cast<PFN_vkGetImageSparseMemoryRequirements>(get_proc_addr(device, "vkGetImageSparseMemoryRequirements"));
579 if (UNLIKELY(!vtbl.GetImageSparseMemoryRequirements)) {
580 ALOGE("missing device proc: %s", "vkGetImageSparseMemoryRequirements");
581 success = false;
582 }
583 vtbl.QueueBindSparseBufferMemory = reinterpret_cast<PFN_vkQueueBindSparseBufferMemory>(get_proc_addr(device, "vkQueueBindSparseBufferMemory"));
584 if (UNLIKELY(!vtbl.QueueBindSparseBufferMemory)) {
585 ALOGE("missing device proc: %s", "vkQueueBindSparseBufferMemory");
586 success = false;
587 }
588 vtbl.QueueBindSparseImageOpaqueMemory = reinterpret_cast<PFN_vkQueueBindSparseImageOpaqueMemory>(get_proc_addr(device, "vkQueueBindSparseImageOpaqueMemory"));
589 if (UNLIKELY(!vtbl.QueueBindSparseImageOpaqueMemory)) {
590 ALOGE("missing device proc: %s", "vkQueueBindSparseImageOpaqueMemory");
591 success = false;
592 }
593 vtbl.QueueBindSparseImageMemory = reinterpret_cast<PFN_vkQueueBindSparseImageMemory>(get_proc_addr(device, "vkQueueBindSparseImageMemory"));
594 if (UNLIKELY(!vtbl.QueueBindSparseImageMemory)) {
595 ALOGE("missing device proc: %s", "vkQueueBindSparseImageMemory");
596 success = false;
597 }
598 vtbl.CreateFence = reinterpret_cast<PFN_vkCreateFence>(get_proc_addr(device, "vkCreateFence"));
599 if (UNLIKELY(!vtbl.CreateFence)) {
600 ALOGE("missing device proc: %s", "vkCreateFence");
601 success = false;
602 }
603 vtbl.DestroyFence = reinterpret_cast<PFN_vkDestroyFence>(get_proc_addr(device, "vkDestroyFence"));
604 if (UNLIKELY(!vtbl.DestroyFence)) {
605 ALOGE("missing device proc: %s", "vkDestroyFence");
606 success = false;
607 }
608 vtbl.ResetFences = reinterpret_cast<PFN_vkResetFences>(get_proc_addr(device, "vkResetFences"));
609 if (UNLIKELY(!vtbl.ResetFences)) {
610 ALOGE("missing device proc: %s", "vkResetFences");
611 success = false;
612 }
613 vtbl.GetFenceStatus = reinterpret_cast<PFN_vkGetFenceStatus>(get_proc_addr(device, "vkGetFenceStatus"));
614 if (UNLIKELY(!vtbl.GetFenceStatus)) {
615 ALOGE("missing device proc: %s", "vkGetFenceStatus");
616 success = false;
617 }
618 vtbl.WaitForFences = reinterpret_cast<PFN_vkWaitForFences>(get_proc_addr(device, "vkWaitForFences"));
619 if (UNLIKELY(!vtbl.WaitForFences)) {
620 ALOGE("missing device proc: %s", "vkWaitForFences");
621 success = false;
622 }
623 vtbl.CreateSemaphore = reinterpret_cast<PFN_vkCreateSemaphore>(get_proc_addr(device, "vkCreateSemaphore"));
624 if (UNLIKELY(!vtbl.CreateSemaphore)) {
625 ALOGE("missing device proc: %s", "vkCreateSemaphore");
626 success = false;
627 }
628 vtbl.DestroySemaphore = reinterpret_cast<PFN_vkDestroySemaphore>(get_proc_addr(device, "vkDestroySemaphore"));
629 if (UNLIKELY(!vtbl.DestroySemaphore)) {
630 ALOGE("missing device proc: %s", "vkDestroySemaphore");
631 success = false;
632 }
633 vtbl.QueueSignalSemaphore = reinterpret_cast<PFN_vkQueueSignalSemaphore>(get_proc_addr(device, "vkQueueSignalSemaphore"));
634 if (UNLIKELY(!vtbl.QueueSignalSemaphore)) {
635 ALOGE("missing device proc: %s", "vkQueueSignalSemaphore");
636 success = false;
637 }
638 vtbl.QueueWaitSemaphore = reinterpret_cast<PFN_vkQueueWaitSemaphore>(get_proc_addr(device, "vkQueueWaitSemaphore"));
639 if (UNLIKELY(!vtbl.QueueWaitSemaphore)) {
640 ALOGE("missing device proc: %s", "vkQueueWaitSemaphore");
641 success = false;
642 }
643 vtbl.CreateEvent = reinterpret_cast<PFN_vkCreateEvent>(get_proc_addr(device, "vkCreateEvent"));
644 if (UNLIKELY(!vtbl.CreateEvent)) {
645 ALOGE("missing device proc: %s", "vkCreateEvent");
646 success = false;
647 }
648 vtbl.DestroyEvent = reinterpret_cast<PFN_vkDestroyEvent>(get_proc_addr(device, "vkDestroyEvent"));
649 if (UNLIKELY(!vtbl.DestroyEvent)) {
650 ALOGE("missing device proc: %s", "vkDestroyEvent");
651 success = false;
652 }
653 vtbl.GetEventStatus = reinterpret_cast<PFN_vkGetEventStatus>(get_proc_addr(device, "vkGetEventStatus"));
654 if (UNLIKELY(!vtbl.GetEventStatus)) {
655 ALOGE("missing device proc: %s", "vkGetEventStatus");
656 success = false;
657 }
658 vtbl.SetEvent = reinterpret_cast<PFN_vkSetEvent>(get_proc_addr(device, "vkSetEvent"));
659 if (UNLIKELY(!vtbl.SetEvent)) {
660 ALOGE("missing device proc: %s", "vkSetEvent");
661 success = false;
662 }
663 vtbl.ResetEvent = reinterpret_cast<PFN_vkResetEvent>(get_proc_addr(device, "vkResetEvent"));
664 if (UNLIKELY(!vtbl.ResetEvent)) {
665 ALOGE("missing device proc: %s", "vkResetEvent");
666 success = false;
667 }
668 vtbl.CreateQueryPool = reinterpret_cast<PFN_vkCreateQueryPool>(get_proc_addr(device, "vkCreateQueryPool"));
669 if (UNLIKELY(!vtbl.CreateQueryPool)) {
670 ALOGE("missing device proc: %s", "vkCreateQueryPool");
671 success = false;
672 }
673 vtbl.DestroyQueryPool = reinterpret_cast<PFN_vkDestroyQueryPool>(get_proc_addr(device, "vkDestroyQueryPool"));
674 if (UNLIKELY(!vtbl.DestroyQueryPool)) {
675 ALOGE("missing device proc: %s", "vkDestroyQueryPool");
676 success = false;
677 }
678 vtbl.GetQueryPoolResults = reinterpret_cast<PFN_vkGetQueryPoolResults>(get_proc_addr(device, "vkGetQueryPoolResults"));
679 if (UNLIKELY(!vtbl.GetQueryPoolResults)) {
680 ALOGE("missing device proc: %s", "vkGetQueryPoolResults");
681 success = false;
682 }
683 vtbl.CreateBuffer = reinterpret_cast<PFN_vkCreateBuffer>(get_proc_addr(device, "vkCreateBuffer"));
684 if (UNLIKELY(!vtbl.CreateBuffer)) {
685 ALOGE("missing device proc: %s", "vkCreateBuffer");
686 success = false;
687 }
688 vtbl.DestroyBuffer = reinterpret_cast<PFN_vkDestroyBuffer>(get_proc_addr(device, "vkDestroyBuffer"));
689 if (UNLIKELY(!vtbl.DestroyBuffer)) {
690 ALOGE("missing device proc: %s", "vkDestroyBuffer");
691 success = false;
692 }
693 vtbl.CreateBufferView = reinterpret_cast<PFN_vkCreateBufferView>(get_proc_addr(device, "vkCreateBufferView"));
694 if (UNLIKELY(!vtbl.CreateBufferView)) {
695 ALOGE("missing device proc: %s", "vkCreateBufferView");
696 success = false;
697 }
698 vtbl.DestroyBufferView = reinterpret_cast<PFN_vkDestroyBufferView>(get_proc_addr(device, "vkDestroyBufferView"));
699 if (UNLIKELY(!vtbl.DestroyBufferView)) {
700 ALOGE("missing device proc: %s", "vkDestroyBufferView");
701 success = false;
702 }
703 vtbl.CreateImage = reinterpret_cast<PFN_vkCreateImage>(get_proc_addr(device, "vkCreateImage"));
704 if (UNLIKELY(!vtbl.CreateImage)) {
705 ALOGE("missing device proc: %s", "vkCreateImage");
706 success = false;
707 }
708 vtbl.DestroyImage = reinterpret_cast<PFN_vkDestroyImage>(get_proc_addr(device, "vkDestroyImage"));
709 if (UNLIKELY(!vtbl.DestroyImage)) {
710 ALOGE("missing device proc: %s", "vkDestroyImage");
711 success = false;
712 }
713 vtbl.GetImageSubresourceLayout = reinterpret_cast<PFN_vkGetImageSubresourceLayout>(get_proc_addr(device, "vkGetImageSubresourceLayout"));
714 if (UNLIKELY(!vtbl.GetImageSubresourceLayout)) {
715 ALOGE("missing device proc: %s", "vkGetImageSubresourceLayout");
716 success = false;
717 }
718 vtbl.CreateImageView = reinterpret_cast<PFN_vkCreateImageView>(get_proc_addr(device, "vkCreateImageView"));
719 if (UNLIKELY(!vtbl.CreateImageView)) {
720 ALOGE("missing device proc: %s", "vkCreateImageView");
721 success = false;
722 }
723 vtbl.DestroyImageView = reinterpret_cast<PFN_vkDestroyImageView>(get_proc_addr(device, "vkDestroyImageView"));
724 if (UNLIKELY(!vtbl.DestroyImageView)) {
725 ALOGE("missing device proc: %s", "vkDestroyImageView");
726 success = false;
727 }
728 vtbl.CreateAttachmentView = reinterpret_cast<PFN_vkCreateAttachmentView>(get_proc_addr(device, "vkCreateAttachmentView"));
729 if (UNLIKELY(!vtbl.CreateAttachmentView)) {
730 ALOGE("missing device proc: %s", "vkCreateAttachmentView");
731 success = false;
732 }
733 vtbl.DestroyAttachmentView = reinterpret_cast<PFN_vkDestroyAttachmentView>(get_proc_addr(device, "vkDestroyAttachmentView"));
734 if (UNLIKELY(!vtbl.DestroyAttachmentView)) {
735 ALOGE("missing device proc: %s", "vkDestroyAttachmentView");
736 success = false;
737 }
738 vtbl.CreateShaderModule = reinterpret_cast<PFN_vkCreateShaderModule>(get_proc_addr(device, "vkCreateShaderModule"));
739 if (UNLIKELY(!vtbl.CreateShaderModule)) {
740 ALOGE("missing device proc: %s", "vkCreateShaderModule");
741 success = false;
742 }
743 vtbl.DestroyShaderModule = reinterpret_cast<PFN_vkDestroyShaderModule>(get_proc_addr(device, "vkDestroyShaderModule"));
744 if (UNLIKELY(!vtbl.DestroyShaderModule)) {
745 ALOGE("missing device proc: %s", "vkDestroyShaderModule");
746 success = false;
747 }
748 vtbl.CreateShader = reinterpret_cast<PFN_vkCreateShader>(get_proc_addr(device, "vkCreateShader"));
749 if (UNLIKELY(!vtbl.CreateShader)) {
750 ALOGE("missing device proc: %s", "vkCreateShader");
751 success = false;
752 }
753 vtbl.DestroyShader = reinterpret_cast<PFN_vkDestroyShader>(get_proc_addr(device, "vkDestroyShader"));
754 if (UNLIKELY(!vtbl.DestroyShader)) {
755 ALOGE("missing device proc: %s", "vkDestroyShader");
756 success = false;
757 }
758 vtbl.CreatePipelineCache = reinterpret_cast<PFN_vkCreatePipelineCache>(get_proc_addr(device, "vkCreatePipelineCache"));
759 if (UNLIKELY(!vtbl.CreatePipelineCache)) {
760 ALOGE("missing device proc: %s", "vkCreatePipelineCache");
761 success = false;
762 }
763 vtbl.DestroyPipelineCache = reinterpret_cast<PFN_vkDestroyPipelineCache>(get_proc_addr(device, "vkDestroyPipelineCache"));
764 if (UNLIKELY(!vtbl.DestroyPipelineCache)) {
765 ALOGE("missing device proc: %s", "vkDestroyPipelineCache");
766 success = false;
767 }
768 vtbl.GetPipelineCacheSize = reinterpret_cast<PFN_vkGetPipelineCacheSize>(get_proc_addr(device, "vkGetPipelineCacheSize"));
769 if (UNLIKELY(!vtbl.GetPipelineCacheSize)) {
770 ALOGE("missing device proc: %s", "vkGetPipelineCacheSize");
771 success = false;
772 }
773 vtbl.GetPipelineCacheData = reinterpret_cast<PFN_vkGetPipelineCacheData>(get_proc_addr(device, "vkGetPipelineCacheData"));
774 if (UNLIKELY(!vtbl.GetPipelineCacheData)) {
775 ALOGE("missing device proc: %s", "vkGetPipelineCacheData");
776 success = false;
777 }
778 vtbl.MergePipelineCaches = reinterpret_cast<PFN_vkMergePipelineCaches>(get_proc_addr(device, "vkMergePipelineCaches"));
779 if (UNLIKELY(!vtbl.MergePipelineCaches)) {
780 ALOGE("missing device proc: %s", "vkMergePipelineCaches");
781 success = false;
782 }
783 vtbl.CreateGraphicsPipelines = reinterpret_cast<PFN_vkCreateGraphicsPipelines>(get_proc_addr(device, "vkCreateGraphicsPipelines"));
784 if (UNLIKELY(!vtbl.CreateGraphicsPipelines)) {
785 ALOGE("missing device proc: %s", "vkCreateGraphicsPipelines");
786 success = false;
787 }
788 vtbl.CreateComputePipelines = reinterpret_cast<PFN_vkCreateComputePipelines>(get_proc_addr(device, "vkCreateComputePipelines"));
789 if (UNLIKELY(!vtbl.CreateComputePipelines)) {
790 ALOGE("missing device proc: %s", "vkCreateComputePipelines");
791 success = false;
792 }
793 vtbl.DestroyPipeline = reinterpret_cast<PFN_vkDestroyPipeline>(get_proc_addr(device, "vkDestroyPipeline"));
794 if (UNLIKELY(!vtbl.DestroyPipeline)) {
795 ALOGE("missing device proc: %s", "vkDestroyPipeline");
796 success = false;
797 }
798 vtbl.CreatePipelineLayout = reinterpret_cast<PFN_vkCreatePipelineLayout>(get_proc_addr(device, "vkCreatePipelineLayout"));
799 if (UNLIKELY(!vtbl.CreatePipelineLayout)) {
800 ALOGE("missing device proc: %s", "vkCreatePipelineLayout");
801 success = false;
802 }
803 vtbl.DestroyPipelineLayout = reinterpret_cast<PFN_vkDestroyPipelineLayout>(get_proc_addr(device, "vkDestroyPipelineLayout"));
804 if (UNLIKELY(!vtbl.DestroyPipelineLayout)) {
805 ALOGE("missing device proc: %s", "vkDestroyPipelineLayout");
806 success = false;
807 }
808 vtbl.CreateSampler = reinterpret_cast<PFN_vkCreateSampler>(get_proc_addr(device, "vkCreateSampler"));
809 if (UNLIKELY(!vtbl.CreateSampler)) {
810 ALOGE("missing device proc: %s", "vkCreateSampler");
811 success = false;
812 }
813 vtbl.DestroySampler = reinterpret_cast<PFN_vkDestroySampler>(get_proc_addr(device, "vkDestroySampler"));
814 if (UNLIKELY(!vtbl.DestroySampler)) {
815 ALOGE("missing device proc: %s", "vkDestroySampler");
816 success = false;
817 }
818 vtbl.CreateDescriptorSetLayout = reinterpret_cast<PFN_vkCreateDescriptorSetLayout>(get_proc_addr(device, "vkCreateDescriptorSetLayout"));
819 if (UNLIKELY(!vtbl.CreateDescriptorSetLayout)) {
820 ALOGE("missing device proc: %s", "vkCreateDescriptorSetLayout");
821 success = false;
822 }
823 vtbl.DestroyDescriptorSetLayout = reinterpret_cast<PFN_vkDestroyDescriptorSetLayout>(get_proc_addr(device, "vkDestroyDescriptorSetLayout"));
824 if (UNLIKELY(!vtbl.DestroyDescriptorSetLayout)) {
825 ALOGE("missing device proc: %s", "vkDestroyDescriptorSetLayout");
826 success = false;
827 }
828 vtbl.CreateDescriptorPool = reinterpret_cast<PFN_vkCreateDescriptorPool>(get_proc_addr(device, "vkCreateDescriptorPool"));
829 if (UNLIKELY(!vtbl.CreateDescriptorPool)) {
830 ALOGE("missing device proc: %s", "vkCreateDescriptorPool");
831 success = false;
832 }
833 vtbl.DestroyDescriptorPool = reinterpret_cast<PFN_vkDestroyDescriptorPool>(get_proc_addr(device, "vkDestroyDescriptorPool"));
834 if (UNLIKELY(!vtbl.DestroyDescriptorPool)) {
835 ALOGE("missing device proc: %s", "vkDestroyDescriptorPool");
836 success = false;
837 }
838 vtbl.ResetDescriptorPool = reinterpret_cast<PFN_vkResetDescriptorPool>(get_proc_addr(device, "vkResetDescriptorPool"));
839 if (UNLIKELY(!vtbl.ResetDescriptorPool)) {
840 ALOGE("missing device proc: %s", "vkResetDescriptorPool");
841 success = false;
842 }
843 vtbl.AllocDescriptorSets = reinterpret_cast<PFN_vkAllocDescriptorSets>(get_proc_addr(device, "vkAllocDescriptorSets"));
844 if (UNLIKELY(!vtbl.AllocDescriptorSets)) {
845 ALOGE("missing device proc: %s", "vkAllocDescriptorSets");
846 success = false;
847 }
848 vtbl.FreeDescriptorSets = reinterpret_cast<PFN_vkFreeDescriptorSets>(get_proc_addr(device, "vkFreeDescriptorSets"));
849 if (UNLIKELY(!vtbl.FreeDescriptorSets)) {
850 ALOGE("missing device proc: %s", "vkFreeDescriptorSets");
851 success = false;
852 }
853 vtbl.UpdateDescriptorSets = reinterpret_cast<PFN_vkUpdateDescriptorSets>(get_proc_addr(device, "vkUpdateDescriptorSets"));
854 if (UNLIKELY(!vtbl.UpdateDescriptorSets)) {
855 ALOGE("missing device proc: %s", "vkUpdateDescriptorSets");
856 success = false;
857 }
858 vtbl.CreateDynamicViewportState = reinterpret_cast<PFN_vkCreateDynamicViewportState>(get_proc_addr(device, "vkCreateDynamicViewportState"));
859 if (UNLIKELY(!vtbl.CreateDynamicViewportState)) {
860 ALOGE("missing device proc: %s", "vkCreateDynamicViewportState");
861 success = false;
862 }
863 vtbl.DestroyDynamicViewportState = reinterpret_cast<PFN_vkDestroyDynamicViewportState>(get_proc_addr(device, "vkDestroyDynamicViewportState"));
864 if (UNLIKELY(!vtbl.DestroyDynamicViewportState)) {
865 ALOGE("missing device proc: %s", "vkDestroyDynamicViewportState");
866 success = false;
867 }
868 vtbl.CreateDynamicRasterState = reinterpret_cast<PFN_vkCreateDynamicRasterState>(get_proc_addr(device, "vkCreateDynamicRasterState"));
869 if (UNLIKELY(!vtbl.CreateDynamicRasterState)) {
870 ALOGE("missing device proc: %s", "vkCreateDynamicRasterState");
871 success = false;
872 }
873 vtbl.DestroyDynamicRasterState = reinterpret_cast<PFN_vkDestroyDynamicRasterState>(get_proc_addr(device, "vkDestroyDynamicRasterState"));
874 if (UNLIKELY(!vtbl.DestroyDynamicRasterState)) {
875 ALOGE("missing device proc: %s", "vkDestroyDynamicRasterState");
876 success = false;
877 }
878 vtbl.CreateDynamicColorBlendState = reinterpret_cast<PFN_vkCreateDynamicColorBlendState>(get_proc_addr(device, "vkCreateDynamicColorBlendState"));
879 if (UNLIKELY(!vtbl.CreateDynamicColorBlendState)) {
880 ALOGE("missing device proc: %s", "vkCreateDynamicColorBlendState");
881 success = false;
882 }
883 vtbl.DestroyDynamicColorBlendState = reinterpret_cast<PFN_vkDestroyDynamicColorBlendState>(get_proc_addr(device, "vkDestroyDynamicColorBlendState"));
884 if (UNLIKELY(!vtbl.DestroyDynamicColorBlendState)) {
885 ALOGE("missing device proc: %s", "vkDestroyDynamicColorBlendState");
886 success = false;
887 }
888 vtbl.CreateDynamicDepthStencilState = reinterpret_cast<PFN_vkCreateDynamicDepthStencilState>(get_proc_addr(device, "vkCreateDynamicDepthStencilState"));
889 if (UNLIKELY(!vtbl.CreateDynamicDepthStencilState)) {
890 ALOGE("missing device proc: %s", "vkCreateDynamicDepthStencilState");
891 success = false;
892 }
893 vtbl.DestroyDynamicDepthStencilState = reinterpret_cast<PFN_vkDestroyDynamicDepthStencilState>(get_proc_addr(device, "vkDestroyDynamicDepthStencilState"));
894 if (UNLIKELY(!vtbl.DestroyDynamicDepthStencilState)) {
895 ALOGE("missing device proc: %s", "vkDestroyDynamicDepthStencilState");
896 success = false;
897 }
898 vtbl.CreateFramebuffer = reinterpret_cast<PFN_vkCreateFramebuffer>(get_proc_addr(device, "vkCreateFramebuffer"));
899 if (UNLIKELY(!vtbl.CreateFramebuffer)) {
900 ALOGE("missing device proc: %s", "vkCreateFramebuffer");
901 success = false;
902 }
903 vtbl.DestroyFramebuffer = reinterpret_cast<PFN_vkDestroyFramebuffer>(get_proc_addr(device, "vkDestroyFramebuffer"));
904 if (UNLIKELY(!vtbl.DestroyFramebuffer)) {
905 ALOGE("missing device proc: %s", "vkDestroyFramebuffer");
906 success = false;
907 }
908 vtbl.CreateRenderPass = reinterpret_cast<PFN_vkCreateRenderPass>(get_proc_addr(device, "vkCreateRenderPass"));
909 if (UNLIKELY(!vtbl.CreateRenderPass)) {
910 ALOGE("missing device proc: %s", "vkCreateRenderPass");
911 success = false;
912 }
913 vtbl.DestroyRenderPass = reinterpret_cast<PFN_vkDestroyRenderPass>(get_proc_addr(device, "vkDestroyRenderPass"));
914 if (UNLIKELY(!vtbl.DestroyRenderPass)) {
915 ALOGE("missing device proc: %s", "vkDestroyRenderPass");
916 success = false;
917 }
918 vtbl.GetRenderAreaGranularity = reinterpret_cast<PFN_vkGetRenderAreaGranularity>(get_proc_addr(device, "vkGetRenderAreaGranularity"));
919 if (UNLIKELY(!vtbl.GetRenderAreaGranularity)) {
920 ALOGE("missing device proc: %s", "vkGetRenderAreaGranularity");
921 success = false;
922 }
923 vtbl.CreateCommandPool = reinterpret_cast<PFN_vkCreateCommandPool>(get_proc_addr(device, "vkCreateCommandPool"));
924 if (UNLIKELY(!vtbl.CreateCommandPool)) {
925 ALOGE("missing device proc: %s", "vkCreateCommandPool");
926 success = false;
927 }
928 vtbl.DestroyCommandPool = reinterpret_cast<PFN_vkDestroyCommandPool>(get_proc_addr(device, "vkDestroyCommandPool"));
929 if (UNLIKELY(!vtbl.DestroyCommandPool)) {
930 ALOGE("missing device proc: %s", "vkDestroyCommandPool");
931 success = false;
932 }
933 vtbl.ResetCommandPool = reinterpret_cast<PFN_vkResetCommandPool>(get_proc_addr(device, "vkResetCommandPool"));
934 if (UNLIKELY(!vtbl.ResetCommandPool)) {
935 ALOGE("missing device proc: %s", "vkResetCommandPool");
936 success = false;
937 }
938 vtbl.CreateCommandBuffer = reinterpret_cast<PFN_vkCreateCommandBuffer>(get_proc_addr(device, "vkCreateCommandBuffer"));
939 if (UNLIKELY(!vtbl.CreateCommandBuffer)) {
940 ALOGE("missing device proc: %s", "vkCreateCommandBuffer");
941 success = false;
942 }
943 vtbl.DestroyCommandBuffer = reinterpret_cast<PFN_vkDestroyCommandBuffer>(get_proc_addr(device, "vkDestroyCommandBuffer"));
944 if (UNLIKELY(!vtbl.DestroyCommandBuffer)) {
945 ALOGE("missing device proc: %s", "vkDestroyCommandBuffer");
946 success = false;
947 }
948 vtbl.BeginCommandBuffer = reinterpret_cast<PFN_vkBeginCommandBuffer>(get_proc_addr(device, "vkBeginCommandBuffer"));
949 if (UNLIKELY(!vtbl.BeginCommandBuffer)) {
950 ALOGE("missing device proc: %s", "vkBeginCommandBuffer");
951 success = false;
952 }
953 vtbl.EndCommandBuffer = reinterpret_cast<PFN_vkEndCommandBuffer>(get_proc_addr(device, "vkEndCommandBuffer"));
954 if (UNLIKELY(!vtbl.EndCommandBuffer)) {
955 ALOGE("missing device proc: %s", "vkEndCommandBuffer");
956 success = false;
957 }
958 vtbl.ResetCommandBuffer = reinterpret_cast<PFN_vkResetCommandBuffer>(get_proc_addr(device, "vkResetCommandBuffer"));
959 if (UNLIKELY(!vtbl.ResetCommandBuffer)) {
960 ALOGE("missing device proc: %s", "vkResetCommandBuffer");
961 success = false;
962 }
963 vtbl.CmdBindPipeline = reinterpret_cast<PFN_vkCmdBindPipeline>(get_proc_addr(device, "vkCmdBindPipeline"));
964 if (UNLIKELY(!vtbl.CmdBindPipeline)) {
965 ALOGE("missing device proc: %s", "vkCmdBindPipeline");
966 success = false;
967 }
968 vtbl.CmdBindDynamicViewportState = reinterpret_cast<PFN_vkCmdBindDynamicViewportState>(get_proc_addr(device, "vkCmdBindDynamicViewportState"));
969 if (UNLIKELY(!vtbl.CmdBindDynamicViewportState)) {
970 ALOGE("missing device proc: %s", "vkCmdBindDynamicViewportState");
971 success = false;
972 }
973 vtbl.CmdBindDynamicRasterState = reinterpret_cast<PFN_vkCmdBindDynamicRasterState>(get_proc_addr(device, "vkCmdBindDynamicRasterState"));
974 if (UNLIKELY(!vtbl.CmdBindDynamicRasterState)) {
975 ALOGE("missing device proc: %s", "vkCmdBindDynamicRasterState");
976 success = false;
977 }
978 vtbl.CmdBindDynamicColorBlendState = reinterpret_cast<PFN_vkCmdBindDynamicColorBlendState>(get_proc_addr(device, "vkCmdBindDynamicColorBlendState"));
979 if (UNLIKELY(!vtbl.CmdBindDynamicColorBlendState)) {
980 ALOGE("missing device proc: %s", "vkCmdBindDynamicColorBlendState");
981 success = false;
982 }
983 vtbl.CmdBindDynamicDepthStencilState = reinterpret_cast<PFN_vkCmdBindDynamicDepthStencilState>(get_proc_addr(device, "vkCmdBindDynamicDepthStencilState"));
984 if (UNLIKELY(!vtbl.CmdBindDynamicDepthStencilState)) {
985 ALOGE("missing device proc: %s", "vkCmdBindDynamicDepthStencilState");
986 success = false;
987 }
988 vtbl.CmdBindDescriptorSets = reinterpret_cast<PFN_vkCmdBindDescriptorSets>(get_proc_addr(device, "vkCmdBindDescriptorSets"));
989 if (UNLIKELY(!vtbl.CmdBindDescriptorSets)) {
990 ALOGE("missing device proc: %s", "vkCmdBindDescriptorSets");
991 success = false;
992 }
993 vtbl.CmdBindIndexBuffer = reinterpret_cast<PFN_vkCmdBindIndexBuffer>(get_proc_addr(device, "vkCmdBindIndexBuffer"));
994 if (UNLIKELY(!vtbl.CmdBindIndexBuffer)) {
995 ALOGE("missing device proc: %s", "vkCmdBindIndexBuffer");
996 success = false;
997 }
998 vtbl.CmdBindVertexBuffers = reinterpret_cast<PFN_vkCmdBindVertexBuffers>(get_proc_addr(device, "vkCmdBindVertexBuffers"));
999 if (UNLIKELY(!vtbl.CmdBindVertexBuffers)) {
1000 ALOGE("missing device proc: %s", "vkCmdBindVertexBuffers");
1001 success = false;
1002 }
1003 vtbl.CmdDraw = reinterpret_cast<PFN_vkCmdDraw>(get_proc_addr(device, "vkCmdDraw"));
1004 if (UNLIKELY(!vtbl.CmdDraw)) {
1005 ALOGE("missing device proc: %s", "vkCmdDraw");
1006 success = false;
1007 }
1008 vtbl.CmdDrawIndexed = reinterpret_cast<PFN_vkCmdDrawIndexed>(get_proc_addr(device, "vkCmdDrawIndexed"));
1009 if (UNLIKELY(!vtbl.CmdDrawIndexed)) {
1010 ALOGE("missing device proc: %s", "vkCmdDrawIndexed");
1011 success = false;
1012 }
1013 vtbl.CmdDrawIndirect = reinterpret_cast<PFN_vkCmdDrawIndirect>(get_proc_addr(device, "vkCmdDrawIndirect"));
1014 if (UNLIKELY(!vtbl.CmdDrawIndirect)) {
1015 ALOGE("missing device proc: %s", "vkCmdDrawIndirect");
1016 success = false;
1017 }
1018 vtbl.CmdDrawIndexedIndirect = reinterpret_cast<PFN_vkCmdDrawIndexedIndirect>(get_proc_addr(device, "vkCmdDrawIndexedIndirect"));
1019 if (UNLIKELY(!vtbl.CmdDrawIndexedIndirect)) {
1020 ALOGE("missing device proc: %s", "vkCmdDrawIndexedIndirect");
1021 success = false;
1022 }
1023 vtbl.CmdDispatch = reinterpret_cast<PFN_vkCmdDispatch>(get_proc_addr(device, "vkCmdDispatch"));
1024 if (UNLIKELY(!vtbl.CmdDispatch)) {
1025 ALOGE("missing device proc: %s", "vkCmdDispatch");
1026 success = false;
1027 }
1028 vtbl.CmdDispatchIndirect = reinterpret_cast<PFN_vkCmdDispatchIndirect>(get_proc_addr(device, "vkCmdDispatchIndirect"));
1029 if (UNLIKELY(!vtbl.CmdDispatchIndirect)) {
1030 ALOGE("missing device proc: %s", "vkCmdDispatchIndirect");
1031 success = false;
1032 }
1033 vtbl.CmdCopyBuffer = reinterpret_cast<PFN_vkCmdCopyBuffer>(get_proc_addr(device, "vkCmdCopyBuffer"));
1034 if (UNLIKELY(!vtbl.CmdCopyBuffer)) {
1035 ALOGE("missing device proc: %s", "vkCmdCopyBuffer");
1036 success = false;
1037 }
1038 vtbl.CmdCopyImage = reinterpret_cast<PFN_vkCmdCopyImage>(get_proc_addr(device, "vkCmdCopyImage"));
1039 if (UNLIKELY(!vtbl.CmdCopyImage)) {
1040 ALOGE("missing device proc: %s", "vkCmdCopyImage");
1041 success = false;
1042 }
1043 vtbl.CmdBlitImage = reinterpret_cast<PFN_vkCmdBlitImage>(get_proc_addr(device, "vkCmdBlitImage"));
1044 if (UNLIKELY(!vtbl.CmdBlitImage)) {
1045 ALOGE("missing device proc: %s", "vkCmdBlitImage");
1046 success = false;
1047 }
1048 vtbl.CmdCopyBufferToImage = reinterpret_cast<PFN_vkCmdCopyBufferToImage>(get_proc_addr(device, "vkCmdCopyBufferToImage"));
1049 if (UNLIKELY(!vtbl.CmdCopyBufferToImage)) {
1050 ALOGE("missing device proc: %s", "vkCmdCopyBufferToImage");
1051 success = false;
1052 }
1053 vtbl.CmdCopyImageToBuffer = reinterpret_cast<PFN_vkCmdCopyImageToBuffer>(get_proc_addr(device, "vkCmdCopyImageToBuffer"));
1054 if (UNLIKELY(!vtbl.CmdCopyImageToBuffer)) {
1055 ALOGE("missing device proc: %s", "vkCmdCopyImageToBuffer");
1056 success = false;
1057 }
1058 vtbl.CmdUpdateBuffer = reinterpret_cast<PFN_vkCmdUpdateBuffer>(get_proc_addr(device, "vkCmdUpdateBuffer"));
1059 if (UNLIKELY(!vtbl.CmdUpdateBuffer)) {
1060 ALOGE("missing device proc: %s", "vkCmdUpdateBuffer");
1061 success = false;
1062 }
1063 vtbl.CmdFillBuffer = reinterpret_cast<PFN_vkCmdFillBuffer>(get_proc_addr(device, "vkCmdFillBuffer"));
1064 if (UNLIKELY(!vtbl.CmdFillBuffer)) {
1065 ALOGE("missing device proc: %s", "vkCmdFillBuffer");
1066 success = false;
1067 }
1068 vtbl.CmdClearColorImage = reinterpret_cast<PFN_vkCmdClearColorImage>(get_proc_addr(device, "vkCmdClearColorImage"));
1069 if (UNLIKELY(!vtbl.CmdClearColorImage)) {
1070 ALOGE("missing device proc: %s", "vkCmdClearColorImage");
1071 success = false;
1072 }
1073 vtbl.CmdClearDepthStencilImage = reinterpret_cast<PFN_vkCmdClearDepthStencilImage>(get_proc_addr(device, "vkCmdClearDepthStencilImage"));
1074 if (UNLIKELY(!vtbl.CmdClearDepthStencilImage)) {
1075 ALOGE("missing device proc: %s", "vkCmdClearDepthStencilImage");
1076 success = false;
1077 }
1078 vtbl.CmdClearColorAttachment = reinterpret_cast<PFN_vkCmdClearColorAttachment>(get_proc_addr(device, "vkCmdClearColorAttachment"));
1079 if (UNLIKELY(!vtbl.CmdClearColorAttachment)) {
1080 ALOGE("missing device proc: %s", "vkCmdClearColorAttachment");
1081 success = false;
1082 }
1083 vtbl.CmdClearDepthStencilAttachment = reinterpret_cast<PFN_vkCmdClearDepthStencilAttachment>(get_proc_addr(device, "vkCmdClearDepthStencilAttachment"));
1084 if (UNLIKELY(!vtbl.CmdClearDepthStencilAttachment)) {
1085 ALOGE("missing device proc: %s", "vkCmdClearDepthStencilAttachment");
1086 success = false;
1087 }
1088 vtbl.CmdResolveImage = reinterpret_cast<PFN_vkCmdResolveImage>(get_proc_addr(device, "vkCmdResolveImage"));
1089 if (UNLIKELY(!vtbl.CmdResolveImage)) {
1090 ALOGE("missing device proc: %s", "vkCmdResolveImage");
1091 success = false;
1092 }
1093 vtbl.CmdSetEvent = reinterpret_cast<PFN_vkCmdSetEvent>(get_proc_addr(device, "vkCmdSetEvent"));
1094 if (UNLIKELY(!vtbl.CmdSetEvent)) {
1095 ALOGE("missing device proc: %s", "vkCmdSetEvent");
1096 success = false;
1097 }
1098 vtbl.CmdResetEvent = reinterpret_cast<PFN_vkCmdResetEvent>(get_proc_addr(device, "vkCmdResetEvent"));
1099 if (UNLIKELY(!vtbl.CmdResetEvent)) {
1100 ALOGE("missing device proc: %s", "vkCmdResetEvent");
1101 success = false;
1102 }
1103 vtbl.CmdWaitEvents = reinterpret_cast<PFN_vkCmdWaitEvents>(get_proc_addr(device, "vkCmdWaitEvents"));
1104 if (UNLIKELY(!vtbl.CmdWaitEvents)) {
1105 ALOGE("missing device proc: %s", "vkCmdWaitEvents");
1106 success = false;
1107 }
1108 vtbl.CmdPipelineBarrier = reinterpret_cast<PFN_vkCmdPipelineBarrier>(get_proc_addr(device, "vkCmdPipelineBarrier"));
1109 if (UNLIKELY(!vtbl.CmdPipelineBarrier)) {
1110 ALOGE("missing device proc: %s", "vkCmdPipelineBarrier");
1111 success = false;
1112 }
1113 vtbl.CmdBeginQuery = reinterpret_cast<PFN_vkCmdBeginQuery>(get_proc_addr(device, "vkCmdBeginQuery"));
1114 if (UNLIKELY(!vtbl.CmdBeginQuery)) {
1115 ALOGE("missing device proc: %s", "vkCmdBeginQuery");
1116 success = false;
1117 }
1118 vtbl.CmdEndQuery = reinterpret_cast<PFN_vkCmdEndQuery>(get_proc_addr(device, "vkCmdEndQuery"));
1119 if (UNLIKELY(!vtbl.CmdEndQuery)) {
1120 ALOGE("missing device proc: %s", "vkCmdEndQuery");
1121 success = false;
1122 }
1123 vtbl.CmdResetQueryPool = reinterpret_cast<PFN_vkCmdResetQueryPool>(get_proc_addr(device, "vkCmdResetQueryPool"));
1124 if (UNLIKELY(!vtbl.CmdResetQueryPool)) {
1125 ALOGE("missing device proc: %s", "vkCmdResetQueryPool");
1126 success = false;
1127 }
1128 vtbl.CmdWriteTimestamp = reinterpret_cast<PFN_vkCmdWriteTimestamp>(get_proc_addr(device, "vkCmdWriteTimestamp"));
1129 if (UNLIKELY(!vtbl.CmdWriteTimestamp)) {
1130 ALOGE("missing device proc: %s", "vkCmdWriteTimestamp");
1131 success = false;
1132 }
1133 vtbl.CmdCopyQueryPoolResults = reinterpret_cast<PFN_vkCmdCopyQueryPoolResults>(get_proc_addr(device, "vkCmdCopyQueryPoolResults"));
1134 if (UNLIKELY(!vtbl.CmdCopyQueryPoolResults)) {
1135 ALOGE("missing device proc: %s", "vkCmdCopyQueryPoolResults");
1136 success = false;
1137 }
1138 vtbl.CmdPushConstants = reinterpret_cast<PFN_vkCmdPushConstants>(get_proc_addr(device, "vkCmdPushConstants"));
1139 if (UNLIKELY(!vtbl.CmdPushConstants)) {
1140 ALOGE("missing device proc: %s", "vkCmdPushConstants");
1141 success = false;
1142 }
1143 vtbl.CmdBeginRenderPass = reinterpret_cast<PFN_vkCmdBeginRenderPass>(get_proc_addr(device, "vkCmdBeginRenderPass"));
1144 if (UNLIKELY(!vtbl.CmdBeginRenderPass)) {
1145 ALOGE("missing device proc: %s", "vkCmdBeginRenderPass");
1146 success = false;
1147 }
1148 vtbl.CmdNextSubpass = reinterpret_cast<PFN_vkCmdNextSubpass>(get_proc_addr(device, "vkCmdNextSubpass"));
1149 if (UNLIKELY(!vtbl.CmdNextSubpass)) {
1150 ALOGE("missing device proc: %s", "vkCmdNextSubpass");
1151 success = false;
1152 }
1153 vtbl.CmdEndRenderPass = reinterpret_cast<PFN_vkCmdEndRenderPass>(get_proc_addr(device, "vkCmdEndRenderPass"));
1154 if (UNLIKELY(!vtbl.CmdEndRenderPass)) {
1155 ALOGE("missing device proc: %s", "vkCmdEndRenderPass");
1156 success = false;
1157 }
1158 vtbl.CmdExecuteCommands = reinterpret_cast<PFN_vkCmdExecuteCommands>(get_proc_addr(device, "vkCmdExecuteCommands"));
1159 if (UNLIKELY(!vtbl.CmdExecuteCommands)) {
1160 ALOGE("missing device proc: %s", "vkCmdExecuteCommands");
1161 success = false;
1162 }
1163 // clang-format on
1164 return success;
1165}
1166
1167} // namespace vulkan