blob: 78c6f249e14a047c374bcbe6b7cb03aa99130c4b [file] [log] [blame]
Jon Ashburn2139a3e2015-05-06 09:02:10 -06001/*
Jon Ashburn2139a3e2015-05-06 09:02:10 -06002 *
Jon Ashburn44aed662016-02-02 17:47:28 -07003 * Copyright (c) 2015-2016 The Khronos Group Inc.
4 * Copyright (c) 2015-2016 Valve Corporation
5 * Copyright (c) 2015-2016 LunarG, Inc.
6 * Copyright (C) 2016 Google Inc.
Jon Ashburn2139a3e2015-05-06 09:02:10 -06007 *
Jon Ashburn44aed662016-02-02 17:47:28 -07008 * Permission is hereby granted, free of charge, to any person obtaining a copy
9 * of this software and/or associated documentation files (the "Materials"), to
10 * deal in the Materials without restriction, including without limitation the
11 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
12 * sell copies of the Materials, and to permit persons to whom the Materials are
13 * furnished to do so, subject to the following conditions:
Jon Ashburn2139a3e2015-05-06 09:02:10 -060014 *
Jon Ashburn44aed662016-02-02 17:47:28 -070015 * The above copyright notice(s) and this permission notice shall be included in
16 * all copies or substantial portions of the Materials.
Jon Ashburn2139a3e2015-05-06 09:02:10 -060017 *
Jon Ashburn44aed662016-02-02 17:47:28 -070018 * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
Jon Ashburn2139a3e2015-05-06 09:02:10 -060019 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
Jon Ashburn44aed662016-02-02 17:47:28 -070020 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
Courtney Goeltzenleuchter96cd7952015-10-30 11:14:30 -060021 *
Jon Ashburn44aed662016-02-02 17:47:28 -070022 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
23 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
24 * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE
25 * USE OR OTHER DEALINGS IN THE MATERIALS.
26 *
27 * Author: Courtney Goeltzenleuchter <courtney@lunarg.com>
Courtney Goeltzenleuchter96cd7952015-10-30 11:14:30 -060028 * Author: Jon Ashburn <jon@lunarg.com>
Jon Ashburn44aed662016-02-02 17:47:28 -070029 * Author: Ian Elliott <ian@LunarG.com>
Courtney Goeltzenleuchter96cd7952015-10-30 11:14:30 -060030 * Author: Tony Barbour <tony@LunarG.com>
Jon Ashburn2139a3e2015-05-06 09:02:10 -060031 */
32
David Pinedo329ca9e2015-11-06 12:54:48 -070033#include <vulkan/vulkan.h>
34#include <vulkan/vk_layer.h>
Jon Ashburn2139a3e2015-05-06 09:02:10 -060035#include <string.h>
Jon Ashburnfce93d92015-05-12 17:26:48 -060036#include "loader.h"
Tobin Ehlis7a51d902015-07-03 10:34:49 -060037#include "vk_loader_platform.h"
Jon Ashburn2139a3e2015-05-06 09:02:10 -060038
Jon Ashburn44aed662016-02-02 17:47:28 -070039static VkResult vkDevExtError(VkDevice dev) {
Jon Ashburn7d1a53d2016-02-12 08:20:06 -070040 struct loader_device *found_dev;
41 struct loader_icd *icd = loader_get_icd_and_device(dev, &found_dev);
42
43 if (icd)
44 loader_log(icd->this_instance, VK_DEBUG_REPORT_ERROR_BIT_EXT, 0,
45 "Bad destination in loader trampoline dispatch,"
46 "Are layers and extensions that you are calling enabled?");
47 return VK_ERROR_EXTENSION_NOT_PRESENT;
Jon Ashburn429e19f2015-11-17 15:31:02 -070048}
49
Jon Ashburn44aed662016-02-02 17:47:28 -070050static inline void
51loader_init_device_dispatch_table(struct loader_dev_dispatch_table *dev_table,
52 PFN_vkGetDeviceProcAddr gpa, VkDevice dev) {
Jon Ashburn429e19f2015-11-17 15:31:02 -070053 VkLayerDispatchTable *table = &dev_table->core_dispatch;
54 for (uint32_t i = 0; i < MAX_NUM_DEV_EXTS; i++)
Jon Ashburn44aed662016-02-02 17:47:28 -070055 dev_table->ext_dispatch.DevExt[i] = (PFN_vkDevExt)vkDevExtError;
Jon Ashburn4f2575f2015-05-28 16:25:02 -060056
Jon Ashburn44aed662016-02-02 17:47:28 -070057 table->GetDeviceProcAddr =
58 (PFN_vkGetDeviceProcAddr)gpa(dev, "vkGetDeviceProcAddr");
59 table->DestroyDevice = (PFN_vkDestroyDevice)gpa(dev, "vkDestroyDevice");
60 table->GetDeviceQueue = (PFN_vkGetDeviceQueue)gpa(dev, "vkGetDeviceQueue");
61 table->QueueSubmit = (PFN_vkQueueSubmit)gpa(dev, "vkQueueSubmit");
62 table->QueueWaitIdle = (PFN_vkQueueWaitIdle)gpa(dev, "vkQueueWaitIdle");
63 table->DeviceWaitIdle = (PFN_vkDeviceWaitIdle)gpa(dev, "vkDeviceWaitIdle");
64 table->AllocateMemory = (PFN_vkAllocateMemory)gpa(dev, "vkAllocateMemory");
65 table->FreeMemory = (PFN_vkFreeMemory)gpa(dev, "vkFreeMemory");
66 table->MapMemory = (PFN_vkMapMemory)gpa(dev, "vkMapMemory");
67 table->UnmapMemory = (PFN_vkUnmapMemory)gpa(dev, "vkUnmapMemory");
68 table->FlushMappedMemoryRanges =
69 (PFN_vkFlushMappedMemoryRanges)gpa(dev, "vkFlushMappedMemoryRanges");
70 table->InvalidateMappedMemoryRanges =
71 (PFN_vkInvalidateMappedMemoryRanges)gpa(
72 dev, "vkInvalidateMappedMemoryRanges");
73 table->GetDeviceMemoryCommitment = (PFN_vkGetDeviceMemoryCommitment)gpa(
74 dev, "vkGetDeviceMemoryCommitment");
75 table->GetImageSparseMemoryRequirements =
76 (PFN_vkGetImageSparseMemoryRequirements)gpa(
77 dev, "vkGetImageSparseMemoryRequirements");
78 table->GetBufferMemoryRequirements = (PFN_vkGetBufferMemoryRequirements)gpa(
79 dev, "vkGetBufferMemoryRequirements");
80 table->GetImageMemoryRequirements = (PFN_vkGetImageMemoryRequirements)gpa(
81 dev, "vkGetImageMemoryRequirements");
82 table->BindBufferMemory =
83 (PFN_vkBindBufferMemory)gpa(dev, "vkBindBufferMemory");
84 table->BindImageMemory =
85 (PFN_vkBindImageMemory)gpa(dev, "vkBindImageMemory");
86 table->QueueBindSparse =
87 (PFN_vkQueueBindSparse)gpa(dev, "vkQueueBindSparse");
88 table->CreateFence = (PFN_vkCreateFence)gpa(dev, "vkCreateFence");
89 table->DestroyFence = (PFN_vkDestroyFence)gpa(dev, "vkDestroyFence");
90 table->ResetFences = (PFN_vkResetFences)gpa(dev, "vkResetFences");
91 table->GetFenceStatus = (PFN_vkGetFenceStatus)gpa(dev, "vkGetFenceStatus");
92 table->WaitForFences = (PFN_vkWaitForFences)gpa(dev, "vkWaitForFences");
93 table->CreateSemaphore =
94 (PFN_vkCreateSemaphore)gpa(dev, "vkCreateSemaphore");
95 table->DestroySemaphore =
96 (PFN_vkDestroySemaphore)gpa(dev, "vkDestroySemaphore");
97 table->CreateEvent = (PFN_vkCreateEvent)gpa(dev, "vkCreateEvent");
98 table->DestroyEvent = (PFN_vkDestroyEvent)gpa(dev, "vkDestroyEvent");
99 table->GetEventStatus = (PFN_vkGetEventStatus)gpa(dev, "vkGetEventStatus");
100 table->SetEvent = (PFN_vkSetEvent)gpa(dev, "vkSetEvent");
101 table->ResetEvent = (PFN_vkResetEvent)gpa(dev, "vkResetEvent");
102 table->CreateQueryPool =
103 (PFN_vkCreateQueryPool)gpa(dev, "vkCreateQueryPool");
104 table->DestroyQueryPool =
105 (PFN_vkDestroyQueryPool)gpa(dev, "vkDestroyQueryPool");
106 table->GetQueryPoolResults =
107 (PFN_vkGetQueryPoolResults)gpa(dev, "vkGetQueryPoolResults");
108 table->CreateBuffer = (PFN_vkCreateBuffer)gpa(dev, "vkCreateBuffer");
109 table->DestroyBuffer = (PFN_vkDestroyBuffer)gpa(dev, "vkDestroyBuffer");
110 table->CreateBufferView =
111 (PFN_vkCreateBufferView)gpa(dev, "vkCreateBufferView");
112 table->DestroyBufferView =
113 (PFN_vkDestroyBufferView)gpa(dev, "vkDestroyBufferView");
114 table->CreateImage = (PFN_vkCreateImage)gpa(dev, "vkCreateImage");
115 table->DestroyImage = (PFN_vkDestroyImage)gpa(dev, "vkDestroyImage");
116 table->GetImageSubresourceLayout = (PFN_vkGetImageSubresourceLayout)gpa(
117 dev, "vkGetImageSubresourceLayout");
118 table->CreateImageView =
119 (PFN_vkCreateImageView)gpa(dev, "vkCreateImageView");
120 table->DestroyImageView =
121 (PFN_vkDestroyImageView)gpa(dev, "vkDestroyImageView");
122 table->CreateShaderModule =
123 (PFN_vkCreateShaderModule)gpa(dev, "vkCreateShaderModule");
124 table->DestroyShaderModule =
125 (PFN_vkDestroyShaderModule)gpa(dev, "vkDestroyShaderModule");
126 table->CreatePipelineCache =
127 (PFN_vkCreatePipelineCache)gpa(dev, "vkCreatePipelineCache");
128 table->DestroyPipelineCache =
129 (PFN_vkDestroyPipelineCache)gpa(dev, "vkDestroyPipelineCache");
130 table->GetPipelineCacheData =
131 (PFN_vkGetPipelineCacheData)gpa(dev, "vkGetPipelineCacheData");
132 table->MergePipelineCaches =
133 (PFN_vkMergePipelineCaches)gpa(dev, "vkMergePipelineCaches");
134 table->CreateGraphicsPipelines =
135 (PFN_vkCreateGraphicsPipelines)gpa(dev, "vkCreateGraphicsPipelines");
136 table->CreateComputePipelines =
137 (PFN_vkCreateComputePipelines)gpa(dev, "vkCreateComputePipelines");
138 table->DestroyPipeline =
139 (PFN_vkDestroyPipeline)gpa(dev, "vkDestroyPipeline");
140 table->CreatePipelineLayout =
141 (PFN_vkCreatePipelineLayout)gpa(dev, "vkCreatePipelineLayout");
142 table->DestroyPipelineLayout =
143 (PFN_vkDestroyPipelineLayout)gpa(dev, "vkDestroyPipelineLayout");
144 table->CreateSampler = (PFN_vkCreateSampler)gpa(dev, "vkCreateSampler");
145 table->DestroySampler = (PFN_vkDestroySampler)gpa(dev, "vkDestroySampler");
146 table->CreateDescriptorSetLayout = (PFN_vkCreateDescriptorSetLayout)gpa(
147 dev, "vkCreateDescriptorSetLayout");
148 table->DestroyDescriptorSetLayout = (PFN_vkDestroyDescriptorSetLayout)gpa(
149 dev, "vkDestroyDescriptorSetLayout");
150 table->CreateDescriptorPool =
151 (PFN_vkCreateDescriptorPool)gpa(dev, "vkCreateDescriptorPool");
152 table->DestroyDescriptorPool =
153 (PFN_vkDestroyDescriptorPool)gpa(dev, "vkDestroyDescriptorPool");
154 table->ResetDescriptorPool =
155 (PFN_vkResetDescriptorPool)gpa(dev, "vkResetDescriptorPool");
156 table->AllocateDescriptorSets =
157 (PFN_vkAllocateDescriptorSets)gpa(dev, "vkAllocateDescriptorSets");
158 table->FreeDescriptorSets =
159 (PFN_vkFreeDescriptorSets)gpa(dev, "vkFreeDescriptorSets");
160 table->UpdateDescriptorSets =
161 (PFN_vkUpdateDescriptorSets)gpa(dev, "vkUpdateDescriptorSets");
162 table->CreateFramebuffer =
163 (PFN_vkCreateFramebuffer)gpa(dev, "vkCreateFramebuffer");
164 table->DestroyFramebuffer =
165 (PFN_vkDestroyFramebuffer)gpa(dev, "vkDestroyFramebuffer");
166 table->CreateRenderPass =
167 (PFN_vkCreateRenderPass)gpa(dev, "vkCreateRenderPass");
168 table->DestroyRenderPass =
169 (PFN_vkDestroyRenderPass)gpa(dev, "vkDestroyRenderPass");
170 table->GetRenderAreaGranularity =
171 (PFN_vkGetRenderAreaGranularity)gpa(dev, "vkGetRenderAreaGranularity");
172 table->CreateCommandPool =
173 (PFN_vkCreateCommandPool)gpa(dev, "vkCreateCommandPool");
174 table->DestroyCommandPool =
175 (PFN_vkDestroyCommandPool)gpa(dev, "vkDestroyCommandPool");
176 table->ResetCommandPool =
177 (PFN_vkResetCommandPool)gpa(dev, "vkResetCommandPool");
178 table->AllocateCommandBuffers =
179 (PFN_vkAllocateCommandBuffers)gpa(dev, "vkAllocateCommandBuffers");
180 table->FreeCommandBuffers =
181 (PFN_vkFreeCommandBuffers)gpa(dev, "vkFreeCommandBuffers");
182 table->BeginCommandBuffer =
183 (PFN_vkBeginCommandBuffer)gpa(dev, "vkBeginCommandBuffer");
184 table->EndCommandBuffer =
185 (PFN_vkEndCommandBuffer)gpa(dev, "vkEndCommandBuffer");
186 table->ResetCommandBuffer =
187 (PFN_vkResetCommandBuffer)gpa(dev, "vkResetCommandBuffer");
188 table->CmdBindPipeline =
189 (PFN_vkCmdBindPipeline)gpa(dev, "vkCmdBindPipeline");
190 table->CmdSetViewport = (PFN_vkCmdSetViewport)gpa(dev, "vkCmdSetViewport");
191 table->CmdSetScissor = (PFN_vkCmdSetScissor)gpa(dev, "vkCmdSetScissor");
192 table->CmdSetLineWidth =
193 (PFN_vkCmdSetLineWidth)gpa(dev, "vkCmdSetLineWidth");
194 table->CmdSetDepthBias =
195 (PFN_vkCmdSetDepthBias)gpa(dev, "vkCmdSetDepthBias");
196 table->CmdSetBlendConstants =
197 (PFN_vkCmdSetBlendConstants)gpa(dev, "vkCmdSetBlendConstants");
198 table->CmdSetDepthBounds =
199 (PFN_vkCmdSetDepthBounds)gpa(dev, "vkCmdSetDepthBounds");
200 table->CmdSetStencilCompareMask =
201 (PFN_vkCmdSetStencilCompareMask)gpa(dev, "vkCmdSetStencilCompareMask");
202 table->CmdSetStencilWriteMask =
203 (PFN_vkCmdSetStencilWriteMask)gpa(dev, "vkCmdSetStencilWriteMask");
204 table->CmdSetStencilReference =
205 (PFN_vkCmdSetStencilReference)gpa(dev, "vkCmdSetStencilReference");
206 table->CmdBindDescriptorSets =
207 (PFN_vkCmdBindDescriptorSets)gpa(dev, "vkCmdBindDescriptorSets");
208 table->CmdBindVertexBuffers =
209 (PFN_vkCmdBindVertexBuffers)gpa(dev, "vkCmdBindVertexBuffers");
210 table->CmdBindIndexBuffer =
211 (PFN_vkCmdBindIndexBuffer)gpa(dev, "vkCmdBindIndexBuffer");
212 table->CmdDraw = (PFN_vkCmdDraw)gpa(dev, "vkCmdDraw");
213 table->CmdDrawIndexed = (PFN_vkCmdDrawIndexed)gpa(dev, "vkCmdDrawIndexed");
214 table->CmdDrawIndirect =
215 (PFN_vkCmdDrawIndirect)gpa(dev, "vkCmdDrawIndirect");
216 table->CmdDrawIndexedIndirect =
217 (PFN_vkCmdDrawIndexedIndirect)gpa(dev, "vkCmdDrawIndexedIndirect");
218 table->CmdDispatch = (PFN_vkCmdDispatch)gpa(dev, "vkCmdDispatch");
219 table->CmdDispatchIndirect =
220 (PFN_vkCmdDispatchIndirect)gpa(dev, "vkCmdDispatchIndirect");
221 table->CmdCopyBuffer = (PFN_vkCmdCopyBuffer)gpa(dev, "vkCmdCopyBuffer");
222 table->CmdCopyImage = (PFN_vkCmdCopyImage)gpa(dev, "vkCmdCopyImage");
223 table->CmdBlitImage = (PFN_vkCmdBlitImage)gpa(dev, "vkCmdBlitImage");
224 table->CmdCopyBufferToImage =
225 (PFN_vkCmdCopyBufferToImage)gpa(dev, "vkCmdCopyBufferToImage");
226 table->CmdCopyImageToBuffer =
227 (PFN_vkCmdCopyImageToBuffer)gpa(dev, "vkCmdCopyImageToBuffer");
228 table->CmdUpdateBuffer =
229 (PFN_vkCmdUpdateBuffer)gpa(dev, "vkCmdUpdateBuffer");
230 table->CmdFillBuffer = (PFN_vkCmdFillBuffer)gpa(dev, "vkCmdFillBuffer");
231 table->CmdClearColorImage =
232 (PFN_vkCmdClearColorImage)gpa(dev, "vkCmdClearColorImage");
233 table->CmdClearDepthStencilImage = (PFN_vkCmdClearDepthStencilImage)gpa(
234 dev, "vkCmdClearDepthStencilImage");
235 table->CmdClearAttachments =
236 (PFN_vkCmdClearAttachments)gpa(dev, "vkCmdClearAttachments");
237 table->CmdResolveImage =
238 (PFN_vkCmdResolveImage)gpa(dev, "vkCmdResolveImage");
239 table->CmdSetEvent = (PFN_vkCmdSetEvent)gpa(dev, "vkCmdSetEvent");
240 table->CmdResetEvent = (PFN_vkCmdResetEvent)gpa(dev, "vkCmdResetEvent");
241 table->CmdWaitEvents = (PFN_vkCmdWaitEvents)gpa(dev, "vkCmdWaitEvents");
242 table->CmdPipelineBarrier =
243 (PFN_vkCmdPipelineBarrier)gpa(dev, "vkCmdPipelineBarrier");
244 table->CmdBeginQuery = (PFN_vkCmdBeginQuery)gpa(dev, "vkCmdBeginQuery");
245 table->CmdEndQuery = (PFN_vkCmdEndQuery)gpa(dev, "vkCmdEndQuery");
246 table->CmdResetQueryPool =
247 (PFN_vkCmdResetQueryPool)gpa(dev, "vkCmdResetQueryPool");
248 table->CmdWriteTimestamp =
249 (PFN_vkCmdWriteTimestamp)gpa(dev, "vkCmdWriteTimestamp");
250 table->CmdCopyQueryPoolResults =
251 (PFN_vkCmdCopyQueryPoolResults)gpa(dev, "vkCmdCopyQueryPoolResults");
252 table->CmdPushConstants =
253 (PFN_vkCmdPushConstants)gpa(dev, "vkCmdPushConstants");
254 table->CmdBeginRenderPass =
255 (PFN_vkCmdBeginRenderPass)gpa(dev, "vkCmdBeginRenderPass");
256 table->CmdNextSubpass = (PFN_vkCmdNextSubpass)gpa(dev, "vkCmdNextSubpass");
257 table->CmdEndRenderPass =
258 (PFN_vkCmdEndRenderPass)gpa(dev, "vkCmdEndRenderPass");
259 table->CmdExecuteCommands =
260 (PFN_vkCmdExecuteCommands)gpa(dev, "vkCmdExecuteCommands");
Jon Ashburn2818eb72015-11-30 17:21:25 -0700261}
262
Jon Ashburn44aed662016-02-02 17:47:28 -0700263static inline void loader_init_device_extension_dispatch_table(
264 struct loader_dev_dispatch_table *dev_table, PFN_vkGetDeviceProcAddr gpa,
265 VkDevice dev) {
Jon Ashburn2818eb72015-11-30 17:21:25 -0700266 VkLayerDispatchTable *table = &dev_table->core_dispatch;
Jon Ashburn44aed662016-02-02 17:47:28 -0700267 table->AcquireNextImageKHR =
268 (PFN_vkAcquireNextImageKHR)gpa(dev, "vkAcquireNextImageKHR");
269 table->CreateSwapchainKHR =
270 (PFN_vkCreateSwapchainKHR)gpa(dev, "vkCreateSwapchainKHR");
271 table->DestroySwapchainKHR =
272 (PFN_vkDestroySwapchainKHR)gpa(dev, "vkDestroySwapchainKHR");
273 table->GetSwapchainImagesKHR =
274 (PFN_vkGetSwapchainImagesKHR)gpa(dev, "vkGetSwapchainImagesKHR");
275 table->QueuePresentKHR =
276 (PFN_vkQueuePresentKHR)gpa(dev, "vkQueuePresentKHR");
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600277}
278
Jon Ashburn44aed662016-02-02 17:47:28 -0700279static inline void *
280loader_lookup_device_dispatch_table(const VkLayerDispatchTable *table,
281 const char *name) {
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600282 if (!name || name[0] != 'v' || name[1] != 'k')
283 return NULL;
284
285 name += 2;
Jon Ashburn1245cec2015-05-18 13:20:15 -0600286 if (!strcmp(name, "GetDeviceProcAddr"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700287 return (void *)table->GetDeviceProcAddr;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600288 if (!strcmp(name, "DestroyDevice"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700289 return (void *)table->DestroyDevice;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600290 if (!strcmp(name, "GetDeviceQueue"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700291 return (void *)table->GetDeviceQueue;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600292 if (!strcmp(name, "QueueSubmit"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700293 return (void *)table->QueueSubmit;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600294 if (!strcmp(name, "QueueWaitIdle"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700295 return (void *)table->QueueWaitIdle;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600296 if (!strcmp(name, "DeviceWaitIdle"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700297 return (void *)table->DeviceWaitIdle;
Chia-I Wu1f851912015-10-27 18:04:07 +0800298 if (!strcmp(name, "AllocateMemory"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700299 return (void *)table->AllocateMemory;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600300 if (!strcmp(name, "FreeMemory"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700301 return (void *)table->FreeMemory;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600302 if (!strcmp(name, "MapMemory"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700303 return (void *)table->MapMemory;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600304 if (!strcmp(name, "UnmapMemory"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700305 return (void *)table->UnmapMemory;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600306 if (!strcmp(name, "FlushMappedMemoryRanges"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700307 return (void *)table->FlushMappedMemoryRanges;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600308 if (!strcmp(name, "InvalidateMappedMemoryRanges"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700309 return (void *)table->InvalidateMappedMemoryRanges;
Courtney Goeltzenleuchterd040c5c2015-07-09 21:57:28 -0600310 if (!strcmp(name, "GetDeviceMemoryCommitment"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700311 return (void *)table->GetDeviceMemoryCommitment;
Jon Ashburn4e189562015-07-23 18:49:07 -0600312 if (!strcmp(name, "GetImageSparseMemoryRequirements"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700313 return (void *)table->GetImageSparseMemoryRequirements;
Tony Barbourde4124d2015-07-03 10:33:54 -0600314 if (!strcmp(name, "GetBufferMemoryRequirements"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700315 return (void *)table->GetBufferMemoryRequirements;
Tony Barbourde4124d2015-07-03 10:33:54 -0600316 if (!strcmp(name, "GetImageMemoryRequirements"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700317 return (void *)table->GetImageMemoryRequirements;
Tony Barbourde4124d2015-07-03 10:33:54 -0600318 if (!strcmp(name, "BindBufferMemory"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700319 return (void *)table->BindBufferMemory;
Tony Barbourde4124d2015-07-03 10:33:54 -0600320 if (!strcmp(name, "BindImageMemory"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700321 return (void *)table->BindImageMemory;
Chia-I Wu06809d52015-10-26 16:55:27 +0800322 if (!strcmp(name, "QueueBindSparse"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700323 return (void *)table->QueueBindSparse;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600324 if (!strcmp(name, "CreateFence"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700325 return (void *)table->CreateFence;
Tony Barbourde4124d2015-07-03 10:33:54 -0600326 if (!strcmp(name, "DestroyFence"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700327 return (void *)table->DestroyFence;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600328 if (!strcmp(name, "ResetFences"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700329 return (void *)table->ResetFences;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600330 if (!strcmp(name, "GetFenceStatus"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700331 return (void *)table->GetFenceStatus;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600332 if (!strcmp(name, "WaitForFences"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700333 return (void *)table->WaitForFences;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600334 if (!strcmp(name, "CreateSemaphore"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700335 return (void *)table->CreateSemaphore;
Tony Barbourde4124d2015-07-03 10:33:54 -0600336 if (!strcmp(name, "DestroySemaphore"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700337 return (void *)table->DestroySemaphore;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600338 if (!strcmp(name, "CreateEvent"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700339 return (void *)table->CreateEvent;
Tony Barbourde4124d2015-07-03 10:33:54 -0600340 if (!strcmp(name, "DestroyEvent"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700341 return (void *)table->DestroyEvent;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600342 if (!strcmp(name, "GetEventStatus"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700343 return (void *)table->GetEventStatus;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600344 if (!strcmp(name, "SetEvent"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700345 return (void *)table->SetEvent;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600346 if (!strcmp(name, "ResetEvent"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700347 return (void *)table->ResetEvent;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600348 if (!strcmp(name, "CreateQueryPool"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700349 return (void *)table->CreateQueryPool;
Tony Barbourde4124d2015-07-03 10:33:54 -0600350 if (!strcmp(name, "DestroyQueryPool"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700351 return (void *)table->DestroyQueryPool;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600352 if (!strcmp(name, "GetQueryPoolResults"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700353 return (void *)table->GetQueryPoolResults;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600354 if (!strcmp(name, "CreateBuffer"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700355 return (void *)table->CreateBuffer;
Tony Barbourde4124d2015-07-03 10:33:54 -0600356 if (!strcmp(name, "DestroyBuffer"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700357 return (void *)table->DestroyBuffer;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600358 if (!strcmp(name, "CreateBufferView"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700359 return (void *)table->CreateBufferView;
Tony Barbourde4124d2015-07-03 10:33:54 -0600360 if (!strcmp(name, "DestroyBufferView"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700361 return (void *)table->DestroyBufferView;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600362 if (!strcmp(name, "CreateImage"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700363 return (void *)table->CreateImage;
Tony Barbourde4124d2015-07-03 10:33:54 -0600364 if (!strcmp(name, "DestroyImage"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700365 return (void *)table->DestroyImage;
Tony Barbour426b9052015-06-24 16:06:58 -0600366 if (!strcmp(name, "GetImageSubresourceLayout"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700367 return (void *)table->GetImageSubresourceLayout;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600368 if (!strcmp(name, "CreateImageView"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700369 return (void *)table->CreateImageView;
Tony Barbourde4124d2015-07-03 10:33:54 -0600370 if (!strcmp(name, "DestroyImageView"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700371 return (void *)table->DestroyImageView;
Courtney Goeltzenleuchter0b29b0d2015-06-24 18:24:19 -0600372 if (!strcmp(name, "CreateShaderModule"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700373 return (void *)table->CreateShaderModule;
Tony Barbourde4124d2015-07-03 10:33:54 -0600374 if (!strcmp(name, "DestroyShaderModule"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700375 return (void *)table->DestroyShaderModule;
Jon Ashburn0d60d272015-07-09 15:02:25 -0600376 if (!strcmp(name, "CreatePipelineCache"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700377 return (void *)vkCreatePipelineCache;
Jon Ashburn0d60d272015-07-09 15:02:25 -0600378 if (!strcmp(name, "DestroyPipelineCache"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700379 return (void *)vkDestroyPipelineCache;
Jon Ashburn0d60d272015-07-09 15:02:25 -0600380 if (!strcmp(name, "GetPipelineCacheData"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700381 return (void *)vkGetPipelineCacheData;
Jon Ashburn0d60d272015-07-09 15:02:25 -0600382 if (!strcmp(name, "MergePipelineCaches"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700383 return (void *)vkMergePipelineCaches;
Jon Ashburn0d60d272015-07-09 15:02:25 -0600384 if (!strcmp(name, "CreateGraphicsPipelines"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700385 return (void *)vkCreateGraphicsPipelines;
Jon Ashburn0d60d272015-07-09 15:02:25 -0600386 if (!strcmp(name, "CreateComputePipelines"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700387 return (void *)vkCreateComputePipelines;
Tony Barbourde4124d2015-07-03 10:33:54 -0600388 if (!strcmp(name, "DestroyPipeline"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700389 return (void *)table->DestroyPipeline;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600390 if (!strcmp(name, "CreatePipelineLayout"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700391 return (void *)table->CreatePipelineLayout;
Tony Barbourde4124d2015-07-03 10:33:54 -0600392 if (!strcmp(name, "DestroyPipelineLayout"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700393 return (void *)table->DestroyPipelineLayout;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600394 if (!strcmp(name, "CreateSampler"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700395 return (void *)table->CreateSampler;
Tony Barbourde4124d2015-07-03 10:33:54 -0600396 if (!strcmp(name, "DestroySampler"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700397 return (void *)table->DestroySampler;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600398 if (!strcmp(name, "CreateDescriptorSetLayout"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700399 return (void *)table->CreateDescriptorSetLayout;
Tony Barbourde4124d2015-07-03 10:33:54 -0600400 if (!strcmp(name, "DestroyDescriptorSetLayout"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700401 return (void *)table->DestroyDescriptorSetLayout;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600402 if (!strcmp(name, "CreateDescriptorPool"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700403 return (void *)table->CreateDescriptorPool;
Tony Barbourde4124d2015-07-03 10:33:54 -0600404 if (!strcmp(name, "DestroyDescriptorPool"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700405 return (void *)table->DestroyDescriptorPool;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600406 if (!strcmp(name, "ResetDescriptorPool"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700407 return (void *)table->ResetDescriptorPool;
Chia-I Wu1f851912015-10-27 18:04:07 +0800408 if (!strcmp(name, "AllocateDescriptorSets"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700409 return (void *)table->AllocateDescriptorSets;
Tony Barbourb857d312015-07-10 10:50:45 -0600410 if (!strcmp(name, "FreeDescriptorSets"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700411 return (void *)table->FreeDescriptorSets;
Chia-I Wu8cd8ecd2015-05-25 16:27:55 +0800412 if (!strcmp(name, "UpdateDescriptorSets"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700413 return (void *)table->UpdateDescriptorSets;
Jon Ashburn4e189562015-07-23 18:49:07 -0600414 if (!strcmp(name, "CreateFramebuffer"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700415 return (void *)table->CreateFramebuffer;
Jon Ashburn4e189562015-07-23 18:49:07 -0600416 if (!strcmp(name, "DestroyFramebuffer"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700417 return (void *)table->DestroyFramebuffer;
Jon Ashburn4e189562015-07-23 18:49:07 -0600418 if (!strcmp(name, "CreateRenderPass"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700419 return (void *)table->CreateRenderPass;
Jon Ashburn4e189562015-07-23 18:49:07 -0600420 if (!strcmp(name, "DestroyRenderPass"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700421 return (void *)table->DestroyRenderPass;
Jon Ashburn4e189562015-07-23 18:49:07 -0600422 if (!strcmp(name, "GetRenderAreaGranularity"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700423 return (void *)table->GetRenderAreaGranularity;
Cody Northropf02f9f82015-07-09 18:08:05 -0600424 if (!strcmp(name, "CreateCommandPool"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700425 return (void *)table->CreateCommandPool;
Cody Northropf02f9f82015-07-09 18:08:05 -0600426 if (!strcmp(name, "DestroyCommandPool"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700427 return (void *)table->DestroyCommandPool;
Cody Northropf02f9f82015-07-09 18:08:05 -0600428 if (!strcmp(name, "ResetCommandPool"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700429 return (void *)table->ResetCommandPool;
Chia-I Wu1f851912015-10-27 18:04:07 +0800430 if (!strcmp(name, "AllocateCommandBuffers"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700431 return (void *)table->AllocateCommandBuffers;
Courtney Goeltzenleuchter831c1832015-10-23 14:21:05 -0600432 if (!strcmp(name, "FreeCommandBuffers"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700433 return (void *)table->FreeCommandBuffers;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600434 if (!strcmp(name, "BeginCommandBuffer"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700435 return (void *)table->BeginCommandBuffer;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600436 if (!strcmp(name, "EndCommandBuffer"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700437 return (void *)table->EndCommandBuffer;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600438 if (!strcmp(name, "ResetCommandBuffer"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700439 return (void *)table->ResetCommandBuffer;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600440 if (!strcmp(name, "CmdBindPipeline"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700441 return (void *)table->CmdBindPipeline;
Courtney Goeltzenleuchter09772bb2015-09-17 15:06:17 -0600442 if (!strcmp(name, "CmdSetViewport"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700443 return (void *)table->CmdSetViewport;
Courtney Goeltzenleuchter932cdb52015-09-21 11:44:06 -0600444 if (!strcmp(name, "CmdSetScissor"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700445 return (void *)table->CmdSetScissor;
Courtney Goeltzenleuchter09772bb2015-09-17 15:06:17 -0600446 if (!strcmp(name, "CmdSetLineWidth"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700447 return (void *)table->CmdSetLineWidth;
Courtney Goeltzenleuchter09772bb2015-09-17 15:06:17 -0600448 if (!strcmp(name, "CmdSetDepthBias"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700449 return (void *)table->CmdSetDepthBias;
Courtney Goeltzenleuchter09772bb2015-09-17 15:06:17 -0600450 if (!strcmp(name, "CmdSetBlendConstants"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700451 return (void *)table->CmdSetBlendConstants;
Courtney Goeltzenleuchter09772bb2015-09-17 15:06:17 -0600452 if (!strcmp(name, "CmdSetDepthBounds"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700453 return (void *)table->CmdSetDepthBounds;
Courtney Goeltzenleuchter09772bb2015-09-17 15:06:17 -0600454 if (!strcmp(name, "CmdSetStencilCompareMask"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700455 return (void *)table->CmdSetStencilCompareMask;
Courtney Goeltzenleuchter09772bb2015-09-17 15:06:17 -0600456 if (!strcmp(name, "CmdSetStencilwriteMask"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700457 return (void *)table->CmdSetStencilWriteMask;
Courtney Goeltzenleuchter09772bb2015-09-17 15:06:17 -0600458 if (!strcmp(name, "CmdSetStencilReference"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700459 return (void *)table->CmdSetStencilReference;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600460 if (!strcmp(name, "CmdBindDescriptorSets"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700461 return (void *)table->CmdBindDescriptorSets;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600462 if (!strcmp(name, "CmdBindVertexBuffers"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700463 return (void *)table->CmdBindVertexBuffers;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600464 if (!strcmp(name, "CmdBindIndexBuffer"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700465 return (void *)table->CmdBindIndexBuffer;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600466 if (!strcmp(name, "CmdDraw"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700467 return (void *)table->CmdDraw;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600468 if (!strcmp(name, "CmdDrawIndexed"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700469 return (void *)table->CmdDrawIndexed;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600470 if (!strcmp(name, "CmdDrawIndirect"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700471 return (void *)table->CmdDrawIndirect;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600472 if (!strcmp(name, "CmdDrawIndexedIndirect"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700473 return (void *)table->CmdDrawIndexedIndirect;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600474 if (!strcmp(name, "CmdDispatch"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700475 return (void *)table->CmdDispatch;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600476 if (!strcmp(name, "CmdDispatchIndirect"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700477 return (void *)table->CmdDispatchIndirect;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600478 if (!strcmp(name, "CmdCopyBuffer"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700479 return (void *)table->CmdCopyBuffer;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600480 if (!strcmp(name, "CmdCopyImage"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700481 return (void *)table->CmdCopyImage;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600482 if (!strcmp(name, "CmdBlitImage"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700483 return (void *)table->CmdBlitImage;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600484 if (!strcmp(name, "CmdCopyBufferToImage"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700485 return (void *)table->CmdCopyBufferToImage;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600486 if (!strcmp(name, "CmdCopyImageToBuffer"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700487 return (void *)table->CmdCopyImageToBuffer;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600488 if (!strcmp(name, "CmdUpdateBuffer"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700489 return (void *)table->CmdUpdateBuffer;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600490 if (!strcmp(name, "CmdFillBuffer"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700491 return (void *)table->CmdFillBuffer;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600492 if (!strcmp(name, "CmdClearColorImage"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700493 return (void *)table->CmdClearColorImage;
Chris Forbes2951d7d2015-06-22 17:21:59 +1200494 if (!strcmp(name, "CmdClearDepthStencilImage"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700495 return (void *)table->CmdClearDepthStencilImage;
Courtney Goeltzenleuchter9feb0732015-10-15 16:51:05 -0600496 if (!strcmp(name, "CmdClearAttachments"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700497 return (void *)table->CmdClearAttachments;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600498 if (!strcmp(name, "CmdResolveImage"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700499 return (void *)table->CmdResolveImage;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600500 if (!strcmp(name, "CmdSetEvent"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700501 return (void *)table->CmdSetEvent;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600502 if (!strcmp(name, "CmdResetEvent"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700503 return (void *)table->CmdResetEvent;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600504 if (!strcmp(name, "CmdWaitEvents"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700505 return (void *)table->CmdWaitEvents;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600506 if (!strcmp(name, "CmdPipelineBarrier"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700507 return (void *)table->CmdPipelineBarrier;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600508 if (!strcmp(name, "CmdBeginQuery"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700509 return (void *)table->CmdBeginQuery;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600510 if (!strcmp(name, "CmdEndQuery"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700511 return (void *)table->CmdEndQuery;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600512 if (!strcmp(name, "CmdResetQueryPool"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700513 return (void *)table->CmdResetQueryPool;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600514 if (!strcmp(name, "CmdWriteTimestamp"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700515 return (void *)table->CmdWriteTimestamp;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600516 if (!strcmp(name, "CmdCopyQueryPoolResults"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700517 return (void *)table->CmdCopyQueryPoolResults;
Jon Ashburn4e189562015-07-23 18:49:07 -0600518 if (!strcmp(name, "CmdPushConstants"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700519 return (void *)table->CmdPushConstants;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600520 if (!strcmp(name, "CmdBeginRenderPass"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700521 return (void *)table->CmdBeginRenderPass;
Chia-I Wuc278df82015-07-07 11:50:03 +0800522 if (!strcmp(name, "CmdNextSubpass"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700523 return (void *)table->CmdNextSubpass;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600524 if (!strcmp(name, "CmdEndRenderPass"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700525 return (void *)table->CmdEndRenderPass;
Jon Ashburn4e189562015-07-23 18:49:07 -0600526 if (!strcmp(name, "CmdExecuteCommands"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700527 return (void *)table->CmdExecuteCommands;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600528
529 return NULL;
530}
Jon Ashburn9a9bb642015-05-04 16:27:53 -0600531
Jon Ashburn44aed662016-02-02 17:47:28 -0700532static inline void
533loader_init_instance_core_dispatch_table(VkLayerInstanceDispatchTable *table,
534 PFN_vkGetInstanceProcAddr gpa,
535 VkInstance inst) {
536 table->GetInstanceProcAddr =
537 (PFN_vkGetInstanceProcAddr)gpa(inst, "vkGetInstanceProcAddr");
538 table->DestroyInstance =
539 (PFN_vkDestroyInstance)gpa(inst, "vkDestroyInstance");
540 table->EnumeratePhysicalDevices =
541 (PFN_vkEnumeratePhysicalDevices)gpa(inst, "vkEnumeratePhysicalDevices");
542 table->GetPhysicalDeviceFeatures = (PFN_vkGetPhysicalDeviceFeatures)gpa(
543 inst, "vkGetPhysicalDeviceFeatures");
544 table->GetPhysicalDeviceImageFormatProperties =
545 (PFN_vkGetPhysicalDeviceImageFormatProperties)gpa(
546 inst, "vkGetPhysicalDeviceImageFormatProperties");
547 table->GetPhysicalDeviceFormatProperties =
548 (PFN_vkGetPhysicalDeviceFormatProperties)gpa(
549 inst, "vkGetPhysicalDeviceFormatProperties");
550 table->GetPhysicalDeviceSparseImageFormatProperties =
551 (PFN_vkGetPhysicalDeviceSparseImageFormatProperties)gpa(
552 inst, "vkGetPhysicalDeviceSparseImageFormatProperties");
553 table->GetPhysicalDeviceProperties = (PFN_vkGetPhysicalDeviceProperties)gpa(
554 inst, "vkGetPhysicalDeviceProperties");
555 table->GetPhysicalDeviceQueueFamilyProperties =
556 (PFN_vkGetPhysicalDeviceQueueFamilyProperties)gpa(
557 inst, "vkGetPhysicalDeviceQueueFamilyProperties");
558 table->GetPhysicalDeviceMemoryProperties =
559 (PFN_vkGetPhysicalDeviceMemoryProperties)gpa(
560 inst, "vkGetPhysicalDeviceMemoryProperties");
561 table->EnumerateDeviceExtensionProperties =
562 (PFN_vkEnumerateDeviceExtensionProperties)gpa(
563 inst, "vkEnumerateDeviceExtensionProperties");
564 table->EnumerateDeviceLayerProperties =
565 (PFN_vkEnumerateDeviceLayerProperties)gpa(
566 inst, "vkEnumerateDeviceLayerProperties");
Courtney Goeltzenleuchter23b5f8d2015-06-17 20:51:59 -0600567}
Courtney Goeltzenleuchter1c7c65d2015-06-10 17:39:03 -0600568
Courtney Goeltzenleuchter23b5f8d2015-06-17 20:51:59 -0600569static inline void loader_init_instance_extension_dispatch_table(
Jon Ashburn44aed662016-02-02 17:47:28 -0700570 VkLayerInstanceDispatchTable *table, PFN_vkGetInstanceProcAddr gpa,
571 VkInstance inst) {
572 table->DestroySurfaceKHR =
573 (PFN_vkDestroySurfaceKHR)gpa(inst, "vkDestroySurfaceKHR");
574 table->CreateDebugReportCallbackEXT =
575 (PFN_vkCreateDebugReportCallbackEXT)gpa(
576 inst, "vkCreateDebugReportCallbackEXT");
577 table->DestroyDebugReportCallbackEXT =
578 (PFN_vkDestroyDebugReportCallbackEXT)gpa(
579 inst, "vkDestroyDebugReportCallbackEXT");
580 table->DebugReportMessageEXT =
581 (PFN_vkDebugReportMessageEXT)gpa(inst, "vkDebugReportMessageEXT");
582 table->GetPhysicalDeviceSurfaceSupportKHR =
583 (PFN_vkGetPhysicalDeviceSurfaceSupportKHR)gpa(
584 inst, "vkGetPhysicalDeviceSurfaceSupportKHR");
585 table->GetPhysicalDeviceSurfaceCapabilitiesKHR =
586 (PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR)gpa(
587 inst, "vkGetPhysicalDeviceSurfaceCapabilitiesKHR");
588 table->GetPhysicalDeviceSurfaceFormatsKHR =
589 (PFN_vkGetPhysicalDeviceSurfaceFormatsKHR)gpa(
590 inst, "vkGetPhysicalDeviceSurfaceFormatsKHR");
591 table->GetPhysicalDeviceSurfacePresentModesKHR =
592 (PFN_vkGetPhysicalDeviceSurfacePresentModesKHR)gpa(
593 inst, "vkGetPhysicalDeviceSurfacePresentModesKHR");
Ian Elliott40c4a1f2015-11-23 10:17:23 -0700594#ifdef VK_USE_PLATFORM_MIR_KHR
Jon Ashburn44aed662016-02-02 17:47:28 -0700595 table->CreateMirSurfaceKHR =
596 (PFN_vkCreateMirSurfaceKHR)gpa(inst, "vkCreateMirSurfaceKHR");
597 table->GetPhysicalDeviceMirPresentationSupportKHR =
598 (PFN_vkGetPhysicalDeviceMirPresentationSupportKHR)gpa(
599 inst, "vkGetPhysicalDeviceMirPresentationSupportKHR");
Ian Elliott40c4a1f2015-11-23 10:17:23 -0700600#endif
601#ifdef VK_USE_PLATFORM_WAYLAND_KHR
Jon Ashburn44aed662016-02-02 17:47:28 -0700602 table->CreateWaylandSurfaceKHR =
603 (PFN_vkCreateWaylandSurfaceKHR)gpa(inst, "vkCreateWaylandSurfaceKHR");
604 table->GetPhysicalDeviceWaylandPresentationSupportKHR =
605 (PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR)gpa(
606 inst, "vkGetPhysicalDeviceWaylandPresentationSupportKHR");
Ian Elliott40c4a1f2015-11-23 10:17:23 -0700607#endif
608#ifdef VK_USE_PLATFORM_WIN32_KHR
Jon Ashburn44aed662016-02-02 17:47:28 -0700609 table->CreateWin32SurfaceKHR =
610 (PFN_vkCreateWin32SurfaceKHR)gpa(inst, "vkCreateWin32SurfaceKHR");
611 table->GetPhysicalDeviceWin32PresentationSupportKHR =
612 (PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR)gpa(
613 inst, "vkGetPhysicalDeviceWin32PresentationSupportKHR");
Ian Elliott40c4a1f2015-11-23 10:17:23 -0700614#endif
615#ifdef VK_USE_PLATFORM_XCB_KHR
Jon Ashburn44aed662016-02-02 17:47:28 -0700616 table->CreateXcbSurfaceKHR =
617 (PFN_vkCreateXcbSurfaceKHR)gpa(inst, "vkCreateXcbSurfaceKHR");
618 table->GetPhysicalDeviceXcbPresentationSupportKHR =
619 (PFN_vkGetPhysicalDeviceXcbPresentationSupportKHR)gpa(
620 inst, "vkGetPhysicalDeviceXcbPresentationSupportKHR");
Ian Elliott40c4a1f2015-11-23 10:17:23 -0700621#endif
622#ifdef VK_USE_PLATFORM_XLIB_KHR
Jon Ashburn44aed662016-02-02 17:47:28 -0700623 table->CreateXlibSurfaceKHR =
624 (PFN_vkCreateXlibSurfaceKHR)gpa(inst, "vkCreateXlibSurfaceKHR");
625 table->GetPhysicalDeviceXlibPresentationSupportKHR =
626 (PFN_vkGetPhysicalDeviceXlibPresentationSupportKHR)gpa(
627 inst, "vkGetPhysicalDeviceXlibPresentationSupportKHR");
Ian Elliott40c4a1f2015-11-23 10:17:23 -0700628#endif
Jon Ashburn00df0452016-03-08 09:30:30 -0700629 table->GetPhysicalDeviceDisplayPropertiesKHR =
Jon Ashburn9b2a8c92016-04-15 09:25:03 -0600630 (PFN_vkGetPhysicalDeviceDisplayPropertiesKHR)gpa(
631 inst, "vkGetPhysicalDeviceDisplayPropertiesKHR");
Jon Ashburn00df0452016-03-08 09:30:30 -0700632 table->GetPhysicalDeviceDisplayPlanePropertiesKHR =
Jon Ashburn9b2a8c92016-04-15 09:25:03 -0600633 (PFN_vkGetPhysicalDeviceDisplayPlanePropertiesKHR)gpa(
634 inst, "vkGetPhysicalDeviceDisplayPlanePropertiesKHR");
Jon Ashburn00df0452016-03-08 09:30:30 -0700635 table->GetDisplayPlaneSupportedDisplaysKHR =
Jon Ashburn9b2a8c92016-04-15 09:25:03 -0600636 (PFN_vkGetDisplayPlaneSupportedDisplaysKHR)gpa(
637 inst, "vkGetDisplayPlaneSupportedDisplaysKHR");
638 table->GetDisplayModePropertiesKHR = (PFN_vkGetDisplayModePropertiesKHR)gpa(
639 inst, "vkGetDisplayModePropertiesKHR");
Jon Ashburn00df0452016-03-08 09:30:30 -0700640 table->CreateDisplayModeKHR =
Jon Ashburn9b2a8c92016-04-15 09:25:03 -0600641 (PFN_vkCreateDisplayModeKHR)gpa(inst, "vkCreateDisplayModeKHR");
Jon Ashburn00df0452016-03-08 09:30:30 -0700642 table->GetDisplayPlaneCapabilitiesKHR =
Jon Ashburn9b2a8c92016-04-15 09:25:03 -0600643 (PFN_vkGetDisplayPlaneCapabilitiesKHR)gpa(
644 inst, "vkGetDisplayPlaneCapabilitiesKHR");
Jon Ashburn00df0452016-03-08 09:30:30 -0700645 table->CreateDisplayPlaneSurfaceKHR =
Jon Ashburn9b2a8c92016-04-15 09:25:03 -0600646 (PFN_vkCreateDisplayPlaneSurfaceKHR)gpa(
647 inst, "vkCreateDisplayPlaneSurfaceKHR");
Jon Ashburn9a9bb642015-05-04 16:27:53 -0600648}
Jon Ashburnfce93d92015-05-12 17:26:48 -0600649
Jon Ashburn44aed662016-02-02 17:47:28 -0700650static inline void *
651loader_lookup_instance_dispatch_table(const VkLayerInstanceDispatchTable *table,
Jon Ashburn00df0452016-03-08 09:30:30 -0700652 const char *name, bool *found_name) {
653 if (!name || name[0] != 'v' || name[1] != 'k') {
654 *found_name = false;
Jon Ashburnfce93d92015-05-12 17:26:48 -0600655 return NULL;
Jon Ashburn00df0452016-03-08 09:30:30 -0700656 }
Jon Ashburnfce93d92015-05-12 17:26:48 -0600657
Jon Ashburn00df0452016-03-08 09:30:30 -0700658 *found_name = true;
Jon Ashburnfce93d92015-05-12 17:26:48 -0600659 name += 2;
Jon Ashburnfce93d92015-05-12 17:26:48 -0600660 if (!strcmp(name, "DestroyInstance"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700661 return (void *)table->DestroyInstance;
Jon Ashburnfce93d92015-05-12 17:26:48 -0600662 if (!strcmp(name, "EnumeratePhysicalDevices"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700663 return (void *)table->EnumeratePhysicalDevices;
Chris Forbesd7576302015-06-21 22:55:02 +1200664 if (!strcmp(name, "GetPhysicalDeviceFeatures"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700665 return (void *)table->GetPhysicalDeviceFeatures;
Jon Ashburn4e189562015-07-23 18:49:07 -0600666 if (!strcmp(name, "GetPhysicalDeviceImageFormatProperties"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700667 return (void *)table->GetPhysicalDeviceImageFormatProperties;
Courtney Goeltzenleuchter4da96aa2015-07-12 12:52:09 -0600668 if (!strcmp(name, "GetPhysicalDeviceFormatProperties"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700669 return (void *)table->GetPhysicalDeviceFormatProperties;
Mark Lobodzinski83d4e6a2015-07-03 15:58:09 -0600670 if (!strcmp(name, "GetPhysicalDeviceSparseImageFormatProperties"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700671 return (void *)table->GetPhysicalDeviceSparseImageFormatProperties;
Tony Barbour426b9052015-06-24 16:06:58 -0600672 if (!strcmp(name, "GetPhysicalDeviceProperties"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700673 return (void *)table->GetPhysicalDeviceProperties;
Cody Northropef72e2a2015-08-03 17:04:53 -0600674 if (!strcmp(name, "GetPhysicalDeviceQueueFamilyProperties"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700675 return (void *)table->GetPhysicalDeviceQueueFamilyProperties;
Tony Barbour426b9052015-06-24 16:06:58 -0600676 if (!strcmp(name, "GetPhysicalDeviceMemoryProperties"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700677 return (void *)table->GetPhysicalDeviceMemoryProperties;
Jon Ashburnfce93d92015-05-12 17:26:48 -0600678 if (!strcmp(name, "GetInstanceProcAddr"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700679 return (void *)table->GetInstanceProcAddr;
Courtney Goeltzenleuchter74c4ce92015-09-14 17:22:16 -0600680 if (!strcmp(name, "EnumerateDeviceExtensionProperties"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700681 return (void *)table->EnumerateDeviceExtensionProperties;
Courtney Goeltzenleuchter74c4ce92015-09-14 17:22:16 -0600682 if (!strcmp(name, "EnumerateDeviceLayerProperties"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700683 return (void *)table->EnumerateDeviceLayerProperties;
Ian Elliott7b9f7822015-11-25 14:43:02 -0700684 if (!strcmp(name, "DestroySurfaceKHR"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700685 return (void *)table->DestroySurfaceKHR;
Ian Elliott338dedb2015-08-21 15:09:33 -0600686 if (!strcmp(name, "GetPhysicalDeviceSurfaceSupportKHR"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700687 return (void *)table->GetPhysicalDeviceSurfaceSupportKHR;
Ian Elliott8cda1802015-11-19 16:05:09 -0700688 if (!strcmp(name, "GetPhysicalDeviceSurfaceCapabilitiesKHR"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700689 return (void *)table->GetPhysicalDeviceSurfaceCapabilitiesKHR;
Ian Elliott8cda1802015-11-19 16:05:09 -0700690 if (!strcmp(name, "GetPhysicalDeviceSurfaceFormatsKHR"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700691 return (void *)table->GetPhysicalDeviceSurfaceFormatsKHR;
Ian Elliott8cda1802015-11-19 16:05:09 -0700692 if (!strcmp(name, "GetPhysicalDeviceSurfacePresentModesKHR"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700693 return (void *)table->GetPhysicalDeviceSurfacePresentModesKHR;
Ian Elliott40c4a1f2015-11-23 10:17:23 -0700694#ifdef VK_USE_PLATFORM_MIR_KHR
695 if (!strcmp(name, "CreateMirSurfaceKHR"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700696 return (void *)table->CreateMirSurfaceKHR;
Ian Elliott4e309e92015-11-24 15:39:10 -0700697 if (!strcmp(name, "GetPhysicalDeviceMirPresentationSupportKHR"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700698 return (void *)table->GetPhysicalDeviceMirPresentationSupportKHR;
Ian Elliott40c4a1f2015-11-23 10:17:23 -0700699#endif
700#ifdef VK_USE_PLATFORM_WAYLAND_KHR
701 if (!strcmp(name, "CreateWaylandSurfaceKHR"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700702 return (void *)table->CreateWaylandSurfaceKHR;
Ian Elliott4e309e92015-11-24 15:39:10 -0700703 if (!strcmp(name, "GetPhysicalDeviceWaylandPresentationSupportKHR"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700704 return (void *)table->GetPhysicalDeviceWaylandPresentationSupportKHR;
Ian Elliott40c4a1f2015-11-23 10:17:23 -0700705#endif
706#ifdef VK_USE_PLATFORM_WIN32_KHR
707 if (!strcmp(name, "CreateWin32SurfaceKHR"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700708 return (void *)table->CreateWin32SurfaceKHR;
Ian Elliott4e309e92015-11-24 15:39:10 -0700709 if (!strcmp(name, "GetPhysicalDeviceWin32PresentationSupportKHR"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700710 return (void *)table->GetPhysicalDeviceWin32PresentationSupportKHR;
Ian Elliott40c4a1f2015-11-23 10:17:23 -0700711#endif
712#ifdef VK_USE_PLATFORM_XCB_KHR
713 if (!strcmp(name, "CreateXcbSurfaceKHR"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700714 return (void *)table->CreateXcbSurfaceKHR;
Ian Elliott4e309e92015-11-24 15:39:10 -0700715 if (!strcmp(name, "GetPhysicalDeviceXcbPresentationSupportKHR"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700716 return (void *)table->GetPhysicalDeviceXcbPresentationSupportKHR;
Ian Elliott40c4a1f2015-11-23 10:17:23 -0700717#endif
718#ifdef VK_USE_PLATFORM_XLIB_KHR
719 if (!strcmp(name, "CreateXlibSurfaceKHR"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700720 return (void *)table->CreateXlibSurfaceKHR;
Ian Elliott4e309e92015-11-24 15:39:10 -0700721 if (!strcmp(name, "GetPhysicalDeviceXlibPresentationSupportKHR"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700722 return (void *)table->GetPhysicalDeviceXlibPresentationSupportKHR;
Ian Elliott40c4a1f2015-11-23 10:17:23 -0700723#endif
Jon Ashburn00df0452016-03-08 09:30:30 -0700724 if (!strcmp(name, "GetPhysicalDeviceDisplayPropertiesKHR"))
725 return (void *)table->GetPhysicalDeviceDisplayPropertiesKHR;
726 if (!strcmp(name, "GetPhysicalDeviceDisplayPlanePropertiesKHR"))
727 return (void *)table->GetPhysicalDeviceDisplayPlanePropertiesKHR;
728 if (!strcmp(name, "GetDisplayPlaneSupportedDisplaysKHR"))
729 return (void *)table->GetDisplayPlaneSupportedDisplaysKHR;
730 if (!strcmp(name, "GetDisplayModePropertiesKHR"))
731 return (void *)table->GetDisplayModePropertiesKHR;
732 if (!strcmp(name, "CreateDisplayModeKHR"))
733 return (void *)table->CreateDisplayModeKHR;
734 if (!strcmp(name, "GetDisplayPlaneCapabilitiesKHR"))
735 return (void *)table->GetDisplayPlaneCapabilitiesKHR;
736 if (!strcmp(name, "CreateDisplayPlaneSurfaceKHR"))
737 return (void *)table->CreateDisplayPlaneSurfaceKHR;
738
Courtney Goeltzenleuchteracb13592015-12-09 15:48:16 -0700739 if (!strcmp(name, "CreateDebugReportCallbackEXT"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700740 return (void *)table->CreateDebugReportCallbackEXT;
Courtney Goeltzenleuchteracb13592015-12-09 15:48:16 -0700741 if (!strcmp(name, "DestroyDebugReportCallbackEXT"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700742 return (void *)table->DestroyDebugReportCallbackEXT;
Courtney Goeltzenleuchteracb13592015-12-09 15:48:16 -0700743 if (!strcmp(name, "DebugReportMessageEXT"))
Jon Ashburn44aed662016-02-02 17:47:28 -0700744 return (void *)table->DebugReportMessageEXT;
Courtney Goeltzenleuchter1c7c65d2015-06-10 17:39:03 -0600745
Jon Ashburn00df0452016-03-08 09:30:30 -0700746 *found_name = false;
Jon Ashburnfce93d92015-05-12 17:26:48 -0600747 return NULL;
Jon Ashburn1245cec2015-05-18 13:20:15 -0600748}