blob: 08d3b60da8164153e8364fee2575d4937ddf588c [file] [log] [blame]
Jon Ashburn2139a3e2015-05-06 09:02:10 -06001/*
2 * Vulkan
3 *
4 * Copyright (C) 2014 LunarG, Inc.
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included
14 * in all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 * DEALINGS IN THE SOFTWARE.
23 */
24
25#include <string.h>
Courtney Goeltzenleuchter1c7c65d2015-06-10 17:39:03 -060026#include "wsi_lunarg.h"
Jon Ashburn2139a3e2015-05-06 09:02:10 -060027
28static inline void* globalGetProcAddr(const char *name)
29{
30 if (!name || name[0] != 'v' || name[1] != 'k')
31 return NULL;
32
33 name += 2;
34 if (!strcmp(name, "CreateInstance"))
35 return (void*) vkCreateInstance;
36 if (!strcmp(name, "DestroyInstance"))
37 return (void*) vkDestroyInstance;
38 if (!strcmp(name, "EnumeratePhysicalDevices"))
39 return (void*) vkEnumeratePhysicalDevices;
Tony Barbour426b9052015-06-24 16:06:58 -060040 if (!strcmp(name, "GetPhysicalDeviceProperties"))
41 return (void*) vkGetPhysicalDeviceProperties;
42 if (!strcmp(name, "GetPhysicalDevicePerformance"))
43 return (void*) vkGetPhysicalDevicePerformance;
44 if (!strcmp(name, "GetPhysicalDeviceQueueCount"))
45 return (void*) vkGetPhysicalDeviceQueueCount;
46 if (!strcmp(name, "GetPhysicalDeviceQueueProperties"))
47 return (void*) vkGetPhysicalDeviceQueueProperties;
48 if (!strcmp(name, "GetPhysicalDeviceMemoryProperties"))
49 return (void*) vkGetPhysicalDeviceMemoryProperties;
50 if (!strcmp(name, "GetPhysicalDeviceFeatures"))
51 return (void*) vkGetPhysicalDeviceFeatures;
52 if (!strcmp(name, "GetPhysicalDeviceFormatInfo"))
53 return (void*) vkGetPhysicalDeviceFormatInfo;
54 if (!strcmp(name, "GetPhysicalDeviceLimits"))
55 return (void*) vkGetPhysicalDeviceLimits;
Jon Ashburn53c16772015-05-06 10:15:07 -060056 if (!strcmp(name, "GetInstanceProcAddr"))
57 return (void*) vkGetInstanceProcAddr;
Jon Ashburn1245cec2015-05-18 13:20:15 -060058 if (!strcmp(name, "GetDeviceProcAddr"))
59 return (void*) vkGetDeviceProcAddr;
Jon Ashburn2139a3e2015-05-06 09:02:10 -060060 if (!strcmp(name, "CreateDevice"))
61 return (void*) vkCreateDevice;
62 if (!strcmp(name, "DestroyDevice"))
63 return (void*) vkDestroyDevice;
Tony Barbour426b9052015-06-24 16:06:58 -060064 if (!strcmp(name, "GetGlobalExtensionProperties"))
65 return (void*) vkGetGlobalExtensionProperties;
Tony Barbour426b9052015-06-24 16:06:58 -060066 if (!strcmp(name, "GetPhysicalDeviceExtensionProperties"))
67 return (void*) vkGetPhysicalDeviceExtensionProperties;
Courtney Goeltzenleuchter18061cd2015-06-29 15:39:26 -060068 if (!strcmp(name, "GetGlobalLayerProperties"))
69 return (void*) vkGetGlobalLayerProperties;
70 if (!strcmp(name, "GetPhysicalDeviceLayerProperties"))
71 return (void*) vkGetPhysicalDeviceLayerProperties;
Mark Lobodzinski83d4e6a2015-07-03 15:58:09 -060072 if (!strcmp(name, "GetPhysicalDeviceSparseImageFormatProperties"))
73 return (void*) vkGetPhysicalDeviceSparseImageFormatProperties;
Jon Ashburn2139a3e2015-05-06 09:02:10 -060074 if (!strcmp(name, "GetDeviceQueue"))
75 return (void*) vkGetDeviceQueue;
76 if (!strcmp(name, "QueueSubmit"))
77 return (void*) vkQueueSubmit;
78 if (!strcmp(name, "QueueWaitIdle"))
79 return (void*) vkQueueWaitIdle;
80 if (!strcmp(name, "DeviceWaitIdle"))
81 return (void*) vkDeviceWaitIdle;
82 if (!strcmp(name, "AllocMemory"))
83 return (void*) vkAllocMemory;
84 if (!strcmp(name, "FreeMemory"))
85 return (void*) vkFreeMemory;
Jon Ashburn2139a3e2015-05-06 09:02:10 -060086 if (!strcmp(name, "MapMemory"))
87 return (void*) vkMapMemory;
88 if (!strcmp(name, "UnmapMemory"))
89 return (void*) vkUnmapMemory;
90 if (!strcmp(name, "FlushMappedMemoryRanges"))
91 return (void*) vkFlushMappedMemoryRanges;
92 if (!strcmp(name, "InvalidateMappedMemoryRanges"))
93 return (void*) vkInvalidateMappedMemoryRanges;
Tony Barbourde4124d2015-07-03 10:33:54 -060094 if (!strcmp(name, "GetImageMemoryRequirements"))
95 return (void*) vkGetImageMemoryRequirements;
96 if (!strcmp(name, "GetBufferMemoryRequirements"))
97 return (void*) vkGetBufferMemoryRequirements;
98 if (!strcmp(name, "BindImageMemory"))
99 return (void*) vkBindImageMemory;
100 if (!strcmp(name, "BindBufferMemory"))
101 return (void*) vkBindBufferMemory;
Mark Lobodzinskifb9f5642015-05-11 17:21:15 -0500102 if (!strcmp(name, "QueueBindSparseBufferMemory"))
103 return (void*) vkQueueBindSparseBufferMemory;
104 if (!strcmp(name, "QueueBindSparseImageMemory"))
105 return (void*) vkQueueBindSparseImageMemory;
Mark Lobodzinski83d4e6a2015-07-03 15:58:09 -0600106 if (!strcmp(name, "QueueBindSparseImageOpaqueMemory"))
107 return (void*) vkQueueBindSparseImageOpaqueMemory;
108 if (!strcmp(name, "GetImageSparseMemoryRequirements"))
109 return (void*) vkGetImageSparseMemoryRequirements;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600110 if (!strcmp(name, "CreateFence"))
111 return (void*) vkCreateFence;
Tony Barbourde4124d2015-07-03 10:33:54 -0600112 if (!strcmp(name, "DestroyFence"))
113 return (void*) vkDestroyFence;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600114 if (!strcmp(name, "ResetFences"))
115 return (void*) vkResetFences;
116 if (!strcmp(name, "GetFenceStatus"))
117 return (void*) vkGetFenceStatus;
118 if (!strcmp(name, "WaitForFences"))
119 return (void*) vkWaitForFences;
120 if (!strcmp(name, "CreateSemaphore"))
121 return (void*) vkCreateSemaphore;
Tony Barbourde4124d2015-07-03 10:33:54 -0600122 if (!strcmp(name, "DestroySemaphore"))
123 return (void*) vkDestroySemaphore;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600124 if (!strcmp(name, "QueueSignalSemaphore"))
125 return (void*) vkQueueSignalSemaphore;
126 if (!strcmp(name, "QueueWaitSemaphore"))
127 return (void*) vkQueueWaitSemaphore;
128 if (!strcmp(name, "CreateEvent"))
129 return (void*) vkCreateEvent;
Tony Barbourde4124d2015-07-03 10:33:54 -0600130 if (!strcmp(name, "DestroyEvent"))
131 return (void*) vkDestroyEvent;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600132 if (!strcmp(name, "GetEventStatus"))
133 return (void*) vkGetEventStatus;
134 if (!strcmp(name, "SetEvent"))
135 return (void*) vkSetEvent;
136 if (!strcmp(name, "ResetEvent"))
137 return (void*) vkResetEvent;
138 if (!strcmp(name, "CreateQueryPool"))
139 return (void*) vkCreateQueryPool;
Tony Barbourde4124d2015-07-03 10:33:54 -0600140 if (!strcmp(name, "DestroyQueryPool"))
141 return (void*) vkDestroyQueryPool;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600142 if (!strcmp(name, "GetQueryPoolResults"))
143 return (void*) vkGetQueryPoolResults;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600144 if (!strcmp(name, "CreateBuffer"))
145 return (void*) vkCreateBuffer;
Tony Barbourde4124d2015-07-03 10:33:54 -0600146 if (!strcmp(name, "DestroyBuffer"))
147 return (void*) vkDestroyBuffer;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600148 if (!strcmp(name, "CreateBufferView"))
149 return (void*) vkCreateBufferView;
Tony Barbourde4124d2015-07-03 10:33:54 -0600150 if (!strcmp(name, "DestroyBufferView"))
151 return (void*) vkDestroyBufferView;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600152 if (!strcmp(name, "CreateImage"))
153 return (void*) vkCreateImage;
Tony Barbourde4124d2015-07-03 10:33:54 -0600154 if (!strcmp(name, "DestroyImage"))
155 return (void*) vkDestroyImage;
Tony Barbour426b9052015-06-24 16:06:58 -0600156 if (!strcmp(name, "GetImageSubresourceLayout"))
157 return (void*) vkGetImageSubresourceLayout;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600158 if (!strcmp(name, "CreateImageView"))
159 return (void*) vkCreateImageView;
Tony Barbourde4124d2015-07-03 10:33:54 -0600160 if (!strcmp(name, "DestroyImageView"))
161 return (void*) vkDestroyImageView;
Chia-I Wuc278df82015-07-07 11:50:03 +0800162 if (!strcmp(name, "CreateAttachmentView"))
163 return (void*) vkCreateAttachmentView;
Tony Barbourde4124d2015-07-03 10:33:54 -0600164 if (!strcmp(name, "DestroyAttachmentView"))
165 return (void*) vkDestroyAttachmentView;
Courtney Goeltzenleuchter0b29b0d2015-06-24 18:24:19 -0600166 if (!strcmp(name, "CreateShaderModule"))
167 return (void*) vkCreateShaderModule;
Tony Barbourde4124d2015-07-03 10:33:54 -0600168 if (!strcmp(name, "DestroyShaderModule"))
169 return (void*) vkDestroyShaderModule;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600170 if (!strcmp(name, "CreateShader"))
171 return (void*) vkCreateShader;
Tony Barbourde4124d2015-07-03 10:33:54 -0600172 if (!strcmp(name, "DestroyShader"))
173 return (void*) vkDestroyShader;
Jon Ashburn0d60d272015-07-09 15:02:25 -0600174 if (!strcmp(name, "CreatePipelineCache"))
175 return (void*) vkCreatePipelineCache;
176 if (!strcmp(name, "DestroyPipelineCache"))
177 return (void*) vkDestroyPipelineCache;
178 if (!strcmp(name, "GetPipelineCacheSize"))
179 return (void*) vkGetPipelineCacheSize;
180 if (!strcmp(name, "GetPipelineCacheData"))
181 return (void*) vkGetPipelineCacheData;
182 if (!strcmp(name, "MergePipelineCaches"))
183 return (void*) vkMergePipelineCaches;
184 if (!strcmp(name, "CreateGraphicsPipelines"))
185 return (void*) vkCreateGraphicsPipelines;
186 if (!strcmp(name, "CreateComputePipelines"))
187 return (void*) vkCreateComputePipelines;
Tony Barbourde4124d2015-07-03 10:33:54 -0600188 if (!strcmp(name, "DestroyPipeline"))
189 return (void*) vkDestroyPipeline;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600190 if (!strcmp(name, "CreatePipelineLayout"))
191 return (void*) vkCreatePipelineLayout;
Tony Barbourde4124d2015-07-03 10:33:54 -0600192 if (!strcmp(name, "DestroyPipelineLayout"))
193 return (void*) vkDestroyPipelineLayout;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600194 if (!strcmp(name, "CreateSampler"))
195 return (void*) vkCreateSampler;
Tony Barbourde4124d2015-07-03 10:33:54 -0600196 if (!strcmp(name, "DestroySampler"))
197 return (void*) vkDestroySampler;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600198 if (!strcmp(name, "CreateDescriptorSetLayout"))
199 return (void*) vkCreateDescriptorSetLayout;
Tony Barbourde4124d2015-07-03 10:33:54 -0600200 if (!strcmp(name, "DestroyDescriptorSetLayout"))
201 return (void*) vkDestroyDescriptorSetLayout;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600202 if (!strcmp(name, "CreateDescriptorPool"))
203 return (void*) vkCreateDescriptorPool;
Tony Barbourde4124d2015-07-03 10:33:54 -0600204 if (!strcmp(name, "DestroyDescriptorPool"))
205 return (void*) vkDestroyDescriptorPool;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600206 if (!strcmp(name, "ResetDescriptorPool"))
207 return (void*) vkResetDescriptorPool;
208 if (!strcmp(name, "AllocDescriptorSets"))
209 return (void*) vkAllocDescriptorSets;
Tony Barbourb857d312015-07-10 10:50:45 -0600210 if (!strcmp(name, "FreeDescriptorSets"))
211 return (void*) vkFreeDescriptorSets;
Chia-I Wu8cd8ecd2015-05-25 16:27:55 +0800212 if (!strcmp(name, "UpdateDescriptorSets"))
213 return (void*) vkUpdateDescriptorSets;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600214 if (!strcmp(name, "CreateDynamicViewportState"))
215 return (void*) vkCreateDynamicViewportState;
Tony Barbourde4124d2015-07-03 10:33:54 -0600216 if (!strcmp(name, "DestroyDynamicViewportState"))
217 return (void*) vkDestroyDynamicViewportState;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600218 if (!strcmp(name, "CreateDynamicRasterState"))
219 return (void*) vkCreateDynamicRasterState;
Tony Barbourde4124d2015-07-03 10:33:54 -0600220 if (!strcmp(name, "DestroyDynamicRasterState"))
221 return (void*) vkDestroyDynamicRasterState;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600222 if (!strcmp(name, "CreateDynamicColorBlendState"))
223 return (void*) vkCreateDynamicColorBlendState;
Tony Barbourde4124d2015-07-03 10:33:54 -0600224 if (!strcmp(name, "DestroyDynamicColorBlendState"))
225 return (void*) vkDestroyDynamicColorBlendState;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600226 if (!strcmp(name, "CreateDynamicDepthStencilState"))
227 return (void*) vkCreateDynamicDepthStencilState;
Tony Barbourde4124d2015-07-03 10:33:54 -0600228 if (!strcmp(name, "DestroyDynamicDepthStencilState"))
229 return (void*) vkDestroyDynamicDepthStencilState;
Cody Northropf02f9f82015-07-09 18:08:05 -0600230 if (!strcmp(name, "CreateCommandPool"))
231 return (void*) vkCreateCommandPool;
232 if (!strcmp(name, "DestroyCommandPool"))
233 return (void*) vkDestroyCommandPool;
234 if (!strcmp(name, "ResetCommandPool"))
235 return (void*) vkResetCommandPool;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600236 if (!strcmp(name, "CreateCommandBuffer"))
237 return (void*) vkCreateCommandBuffer;
Tony Barbourde4124d2015-07-03 10:33:54 -0600238 if (!strcmp(name, "DestroyCommandBuffer"))
239 return (void*) vkDestroyCommandBuffer;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600240 if (!strcmp(name, "BeginCommandBuffer"))
241 return (void*) vkBeginCommandBuffer;
242 if (!strcmp(name, "EndCommandBuffer"))
243 return (void*) vkEndCommandBuffer;
244 if (!strcmp(name, "ResetCommandBuffer"))
245 return (void*) vkResetCommandBuffer;
246 if (!strcmp(name, "CmdBindPipeline"))
247 return (void*) vkCmdBindPipeline;
Tony Barbourde4124d2015-07-03 10:33:54 -0600248 if (!strcmp(name, "CmdBindDynamicViewportState"))
249 return (void*) vkCmdBindDynamicViewportState;
250 if (!strcmp(name, "CmdBindDynamicRasterState"))
251 return (void*) vkCmdBindDynamicRasterState;
252 if (!strcmp(name, "CmdBindDynamicColorBlendState"))
253 return (void*) vkCmdBindDynamicColorBlendState;
254 if (!strcmp(name, "CmdBindDynamicDepthStencilState"))
255 return (void*) vkCmdBindDynamicDepthStencilState;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600256 if (!strcmp(name, "CmdBindDescriptorSets"))
257 return (void*) vkCmdBindDescriptorSets;
258 if (!strcmp(name, "CmdBindVertexBuffers"))
259 return (void*) vkCmdBindVertexBuffers;
260 if (!strcmp(name, "CmdBindIndexBuffer"))
261 return (void*) vkCmdBindIndexBuffer;
262 if (!strcmp(name, "CmdDraw"))
263 return (void*) vkCmdDraw;
264 if (!strcmp(name, "CmdDrawIndexed"))
265 return (void*) vkCmdDrawIndexed;
266 if (!strcmp(name, "CmdDrawIndirect"))
267 return (void*) vkCmdDrawIndirect;
268 if (!strcmp(name, "CmdDrawIndexedIndirect"))
269 return (void*) vkCmdDrawIndexedIndirect;
270 if (!strcmp(name, "CmdDispatch"))
271 return (void*) vkCmdDispatch;
272 if (!strcmp(name, "CmdDispatchIndirect"))
273 return (void*) vkCmdDispatchIndirect;
274 if (!strcmp(name, "CmdCopyBuffer"))
275 return (void*) vkCmdCopyBuffer;
276 if (!strcmp(name, "CmdCopyImage"))
277 return (void*) vkCmdCopyImage;
278 if (!strcmp(name, "CmdBlitImage"))
279 return (void*) vkCmdBlitImage;
280 if (!strcmp(name, "CmdCopyBufferToImage"))
281 return (void*) vkCmdCopyBufferToImage;
282 if (!strcmp(name, "CmdCopyImageToBuffer"))
283 return (void*) vkCmdCopyImageToBuffer;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600284 if (!strcmp(name, "CmdUpdateBuffer"))
285 return (void*) vkCmdUpdateBuffer;
286 if (!strcmp(name, "CmdFillBuffer"))
287 return (void*) vkCmdFillBuffer;
288 if (!strcmp(name, "CmdClearColorImage"))
289 return (void*) vkCmdClearColorImage;
Chris Forbes2951d7d2015-06-22 17:21:59 +1200290 if (!strcmp(name, "CmdClearDepthStencilImage"))
291 return (void*) vkCmdClearDepthStencilImage;
292 if (!strcmp(name, "CmdClearColorAttachment"))
293 return (void*) vkCmdClearColorAttachment;
294 if (!strcmp(name, "CmdClearDepthStencilAttachment"))
295 return (void*) vkCmdClearDepthStencilAttachment;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600296 if (!strcmp(name, "CmdResolveImage"))
297 return (void*) vkCmdResolveImage;
298 if (!strcmp(name, "CmdSetEvent"))
299 return (void*) vkCmdSetEvent;
300 if (!strcmp(name, "CmdResetEvent"))
301 return (void*) vkCmdResetEvent;
302 if (!strcmp(name, "CmdWaitEvents"))
303 return (void*) vkCmdWaitEvents;
304 if (!strcmp(name, "CmdPipelineBarrier"))
305 return (void*) vkCmdPipelineBarrier;
306 if (!strcmp(name, "CmdBeginQuery"))
307 return (void*) vkCmdBeginQuery;
308 if (!strcmp(name, "CmdEndQuery"))
309 return (void*) vkCmdEndQuery;
310 if (!strcmp(name, "CmdResetQueryPool"))
311 return (void*) vkCmdResetQueryPool;
312 if (!strcmp(name, "CmdWriteTimestamp"))
313 return (void*) vkCmdWriteTimestamp;
314 if (!strcmp(name, "CmdCopyQueryPoolResults"))
315 return (void*) vkCmdCopyQueryPoolResults;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600316 if (!strcmp(name, "CreateFramebuffer"))
317 return (void*) vkCreateFramebuffer;
Tony Barbourde4124d2015-07-03 10:33:54 -0600318 if (!strcmp(name, "DestroyFramebuffer"))
319 return (void*) vkDestroyFramebuffer;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600320 if (!strcmp(name, "CreateRenderPass"))
321 return (void*) vkCreateRenderPass;
Tony Barbourde4124d2015-07-03 10:33:54 -0600322 if (!strcmp(name, "DestroyRenderPass"))
323 return (void*) vkDestroyRenderPass;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600324 if (!strcmp(name, "CmdBeginRenderPass"))
325 return (void*) vkCmdBeginRenderPass;
Chia-I Wuc278df82015-07-07 11:50:03 +0800326 if (!strcmp(name, "CmdNextSubpass"))
327 return (void*) vkCmdNextSubpass;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600328 if (!strcmp(name, "CmdEndRenderPass"))
329 return (void*) vkCmdEndRenderPass;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600330
331 return NULL;
332}
333
334/* These functions require special handling by the loader.
335* They are not just generic trampoline code entrypoints.
336* Thus GPA must return loader entrypoint for these instead of first function
337* in the chain. */
338static inline void *loader_non_passthrough_gpa(const char *name)
339{
340 if (!name || name[0] != 'v' || name[1] != 'k')
341 return NULL;
342
343 name += 2;
344 if (!strcmp(name, "CreateInstance"))
345 return (void*) vkCreateInstance;
346 if (!strcmp(name, "DestroyInstance"))
347 return (void*) vkDestroyInstance;
348 if (!strcmp(name, "EnumeratePhysicalDevices"))
349 return (void*) vkEnumeratePhysicalDevices;
Chris Forbesd7576302015-06-21 22:55:02 +1200350 if (!strcmp(name, "GetPhysicalDeviceFeatures"))
351 return (void*) vkGetPhysicalDeviceFeatures;
352 if (!strcmp(name, "GetPhysicalDeviceFormatInfo"))
353 return (void*) vkGetPhysicalDeviceFormatInfo;
354 if (!strcmp(name, "GetPhysicalDeviceLimits"))
355 return (void*) vkGetPhysicalDeviceLimits;
Tony Barbour426b9052015-06-24 16:06:58 -0600356 if (!strcmp(name, "GetPhysicalDevicePerformance"))
357 return (void*) vkGetPhysicalDevicePerformance;
358 if (!strcmp(name, "GetPhysicalDeviceQueueCount"))
359 return (void*) vkGetPhysicalDeviceQueueCount;
360 if (!strcmp(name, "GetPhysicalDeviceQueueProperties"))
361 return (void*) vkGetPhysicalDeviceQueueProperties;
362 if (!strcmp(name, "GetPhysicalDeviceMemoryProperties"))
363 return (void*) vkGetPhysicalDeviceMemoryProperties;
364 if (!strcmp(name, "GetPhysicalDeviceProperties"))
365 return (void*) vkGetPhysicalDeviceProperties;
Mark Lobodzinski83d4e6a2015-07-03 15:58:09 -0600366 if (!strcmp(name, "GetPhysicalDeviceSparseImageFormatProperties"))
367 return (void*) vkGetPhysicalDeviceSparseImageFormatProperties;
Jon Ashburn53c16772015-05-06 10:15:07 -0600368 if (!strcmp(name, "GetInstanceProcAddr"))
369 return (void*) vkGetInstanceProcAddr;
Jon Ashburn1245cec2015-05-18 13:20:15 -0600370 if (!strcmp(name, "GetDeviceProcAddr"))
371 return (void*) vkGetDeviceProcAddr;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600372 if (!strcmp(name, "CreateDevice"))
373 return (void*) vkCreateDevice;
Tony Barbour426b9052015-06-24 16:06:58 -0600374 if (!strcmp(name, "GetPhysicalDeviceExtensionProperties"))
375 return (void*) vkGetPhysicalDeviceExtensionProperties;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600376 if (!strcmp(name, "GetDeviceQueue"))
377 return (void*) vkGetDeviceQueue;
378 if (!strcmp(name, "CreateCommandBuffer"))
379 return (void*) vkCreateCommandBuffer;
Courtney Goeltzenleuchter1c7c65d2015-06-10 17:39:03 -0600380 if (!strcmp(name, "CreateSwapChainWSI"))
381 return (void*) wsi_lunarg_CreateSwapChainWSI;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600382
383 return NULL;
384}