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