blob: 5373603e6a0b2be3c1826b23831e394b49c9a035 [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>
Ian Elliott1d73e662015-07-06 14:36:13 -060026#include "wsi_swapchain.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;
Tony Barbour426b9052015-06-24 16:06:58 -060042 if (!strcmp(name, "GetPhysicalDeviceQueueCount"))
43 return (void*) vkGetPhysicalDeviceQueueCount;
44 if (!strcmp(name, "GetPhysicalDeviceQueueProperties"))
45 return (void*) vkGetPhysicalDeviceQueueProperties;
46 if (!strcmp(name, "GetPhysicalDeviceMemoryProperties"))
47 return (void*) vkGetPhysicalDeviceMemoryProperties;
48 if (!strcmp(name, "GetPhysicalDeviceFeatures"))
49 return (void*) vkGetPhysicalDeviceFeatures;
Courtney Goeltzenleuchter4da96aa2015-07-12 12:52:09 -060050 if (!strcmp(name, "GetPhysicalDeviceFormatProperties"))
51 return (void*) vkGetPhysicalDeviceFormatProperties;
Tony Barbour426b9052015-06-24 16:06:58 -060052 if (!strcmp(name, "GetPhysicalDeviceLimits"))
53 return (void*) vkGetPhysicalDeviceLimits;
Jon Ashburn53c16772015-05-06 10:15:07 -060054 if (!strcmp(name, "GetInstanceProcAddr"))
55 return (void*) vkGetInstanceProcAddr;
Jon Ashburn1245cec2015-05-18 13:20:15 -060056 if (!strcmp(name, "GetDeviceProcAddr"))
57 return (void*) vkGetDeviceProcAddr;
Jon Ashburn2139a3e2015-05-06 09:02:10 -060058 if (!strcmp(name, "CreateDevice"))
59 return (void*) vkCreateDevice;
60 if (!strcmp(name, "DestroyDevice"))
61 return (void*) vkDestroyDevice;
Tony Barbour426b9052015-06-24 16:06:58 -060062 if (!strcmp(name, "GetGlobalExtensionProperties"))
63 return (void*) vkGetGlobalExtensionProperties;
Tony Barbour426b9052015-06-24 16:06:58 -060064 if (!strcmp(name, "GetPhysicalDeviceExtensionProperties"))
65 return (void*) vkGetPhysicalDeviceExtensionProperties;
Courtney Goeltzenleuchter18061cd2015-06-29 15:39:26 -060066 if (!strcmp(name, "GetGlobalLayerProperties"))
67 return (void*) vkGetGlobalLayerProperties;
68 if (!strcmp(name, "GetPhysicalDeviceLayerProperties"))
69 return (void*) vkGetPhysicalDeviceLayerProperties;
Mark Lobodzinski83d4e6a2015-07-03 15:58:09 -060070 if (!strcmp(name, "GetPhysicalDeviceSparseImageFormatProperties"))
71 return (void*) vkGetPhysicalDeviceSparseImageFormatProperties;
Jon Ashburn2139a3e2015-05-06 09:02:10 -060072 if (!strcmp(name, "GetDeviceQueue"))
73 return (void*) vkGetDeviceQueue;
74 if (!strcmp(name, "QueueSubmit"))
75 return (void*) vkQueueSubmit;
76 if (!strcmp(name, "QueueWaitIdle"))
77 return (void*) vkQueueWaitIdle;
78 if (!strcmp(name, "DeviceWaitIdle"))
79 return (void*) vkDeviceWaitIdle;
80 if (!strcmp(name, "AllocMemory"))
81 return (void*) vkAllocMemory;
82 if (!strcmp(name, "FreeMemory"))
83 return (void*) vkFreeMemory;
Jon Ashburn2139a3e2015-05-06 09:02:10 -060084 if (!strcmp(name, "MapMemory"))
85 return (void*) vkMapMemory;
86 if (!strcmp(name, "UnmapMemory"))
87 return (void*) vkUnmapMemory;
88 if (!strcmp(name, "FlushMappedMemoryRanges"))
89 return (void*) vkFlushMappedMemoryRanges;
90 if (!strcmp(name, "InvalidateMappedMemoryRanges"))
91 return (void*) vkInvalidateMappedMemoryRanges;
Tony Barbourde4124d2015-07-03 10:33:54 -060092 if (!strcmp(name, "GetImageMemoryRequirements"))
93 return (void*) vkGetImageMemoryRequirements;
94 if (!strcmp(name, "GetBufferMemoryRequirements"))
95 return (void*) vkGetBufferMemoryRequirements;
96 if (!strcmp(name, "BindImageMemory"))
97 return (void*) vkBindImageMemory;
98 if (!strcmp(name, "BindBufferMemory"))
99 return (void*) vkBindBufferMemory;
Mark Lobodzinskifb9f5642015-05-11 17:21:15 -0500100 if (!strcmp(name, "QueueBindSparseBufferMemory"))
101 return (void*) vkQueueBindSparseBufferMemory;
102 if (!strcmp(name, "QueueBindSparseImageMemory"))
103 return (void*) vkQueueBindSparseImageMemory;
Mark Lobodzinski83d4e6a2015-07-03 15:58:09 -0600104 if (!strcmp(name, "QueueBindSparseImageOpaqueMemory"))
105 return (void*) vkQueueBindSparseImageOpaqueMemory;
106 if (!strcmp(name, "GetImageSparseMemoryRequirements"))
107 return (void*) vkGetImageSparseMemoryRequirements;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600108 if (!strcmp(name, "CreateFence"))
109 return (void*) vkCreateFence;
Tony Barbourde4124d2015-07-03 10:33:54 -0600110 if (!strcmp(name, "DestroyFence"))
111 return (void*) vkDestroyFence;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600112 if (!strcmp(name, "ResetFences"))
113 return (void*) vkResetFences;
114 if (!strcmp(name, "GetFenceStatus"))
115 return (void*) vkGetFenceStatus;
116 if (!strcmp(name, "WaitForFences"))
117 return (void*) vkWaitForFences;
118 if (!strcmp(name, "CreateSemaphore"))
119 return (void*) vkCreateSemaphore;
Tony Barbourde4124d2015-07-03 10:33:54 -0600120 if (!strcmp(name, "DestroySemaphore"))
121 return (void*) vkDestroySemaphore;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600122 if (!strcmp(name, "QueueSignalSemaphore"))
123 return (void*) vkQueueSignalSemaphore;
124 if (!strcmp(name, "QueueWaitSemaphore"))
125 return (void*) vkQueueWaitSemaphore;
126 if (!strcmp(name, "CreateEvent"))
127 return (void*) vkCreateEvent;
Tony Barbourde4124d2015-07-03 10:33:54 -0600128 if (!strcmp(name, "DestroyEvent"))
129 return (void*) vkDestroyEvent;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600130 if (!strcmp(name, "GetEventStatus"))
131 return (void*) vkGetEventStatus;
132 if (!strcmp(name, "SetEvent"))
133 return (void*) vkSetEvent;
134 if (!strcmp(name, "ResetEvent"))
135 return (void*) vkResetEvent;
136 if (!strcmp(name, "CreateQueryPool"))
137 return (void*) vkCreateQueryPool;
Tony Barbourde4124d2015-07-03 10:33:54 -0600138 if (!strcmp(name, "DestroyQueryPool"))
139 return (void*) vkDestroyQueryPool;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600140 if (!strcmp(name, "GetQueryPoolResults"))
141 return (void*) vkGetQueryPoolResults;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600142 if (!strcmp(name, "CreateBuffer"))
143 return (void*) vkCreateBuffer;
Tony Barbourde4124d2015-07-03 10:33:54 -0600144 if (!strcmp(name, "DestroyBuffer"))
145 return (void*) vkDestroyBuffer;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600146 if (!strcmp(name, "CreateBufferView"))
147 return (void*) vkCreateBufferView;
Tony Barbourde4124d2015-07-03 10:33:54 -0600148 if (!strcmp(name, "DestroyBufferView"))
149 return (void*) vkDestroyBufferView;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600150 if (!strcmp(name, "CreateImage"))
151 return (void*) vkCreateImage;
Tony Barbourde4124d2015-07-03 10:33:54 -0600152 if (!strcmp(name, "DestroyImage"))
153 return (void*) vkDestroyImage;
Tony Barbour426b9052015-06-24 16:06:58 -0600154 if (!strcmp(name, "GetImageSubresourceLayout"))
155 return (void*) vkGetImageSubresourceLayout;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600156 if (!strcmp(name, "CreateImageView"))
157 return (void*) vkCreateImageView;
Tony Barbourde4124d2015-07-03 10:33:54 -0600158 if (!strcmp(name, "DestroyImageView"))
159 return (void*) vkDestroyImageView;
Chia-I Wuc278df82015-07-07 11:50:03 +0800160 if (!strcmp(name, "CreateAttachmentView"))
161 return (void*) vkCreateAttachmentView;
Tony Barbourde4124d2015-07-03 10:33:54 -0600162 if (!strcmp(name, "DestroyAttachmentView"))
163 return (void*) vkDestroyAttachmentView;
Courtney Goeltzenleuchter0b29b0d2015-06-24 18:24:19 -0600164 if (!strcmp(name, "CreateShaderModule"))
165 return (void*) vkCreateShaderModule;
Tony Barbourde4124d2015-07-03 10:33:54 -0600166 if (!strcmp(name, "DestroyShaderModule"))
167 return (void*) vkDestroyShaderModule;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600168 if (!strcmp(name, "CreateShader"))
169 return (void*) vkCreateShader;
Tony Barbourde4124d2015-07-03 10:33:54 -0600170 if (!strcmp(name, "DestroyShader"))
171 return (void*) vkDestroyShader;
Jon Ashburn0d60d272015-07-09 15:02:25 -0600172 if (!strcmp(name, "CreatePipelineCache"))
173 return (void*) vkCreatePipelineCache;
174 if (!strcmp(name, "DestroyPipelineCache"))
175 return (void*) vkDestroyPipelineCache;
176 if (!strcmp(name, "GetPipelineCacheSize"))
177 return (void*) vkGetPipelineCacheSize;
178 if (!strcmp(name, "GetPipelineCacheData"))
179 return (void*) vkGetPipelineCacheData;
180 if (!strcmp(name, "MergePipelineCaches"))
181 return (void*) vkMergePipelineCaches;
182 if (!strcmp(name, "CreateGraphicsPipelines"))
183 return (void*) vkCreateGraphicsPipelines;
184 if (!strcmp(name, "CreateComputePipelines"))
185 return (void*) vkCreateComputePipelines;
Tony Barbourde4124d2015-07-03 10:33:54 -0600186 if (!strcmp(name, "DestroyPipeline"))
187 return (void*) vkDestroyPipeline;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600188 if (!strcmp(name, "CreatePipelineLayout"))
189 return (void*) vkCreatePipelineLayout;
Tony Barbourde4124d2015-07-03 10:33:54 -0600190 if (!strcmp(name, "DestroyPipelineLayout"))
191 return (void*) vkDestroyPipelineLayout;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600192 if (!strcmp(name, "CreateSampler"))
193 return (void*) vkCreateSampler;
Tony Barbourde4124d2015-07-03 10:33:54 -0600194 if (!strcmp(name, "DestroySampler"))
195 return (void*) vkDestroySampler;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600196 if (!strcmp(name, "CreateDescriptorSetLayout"))
197 return (void*) vkCreateDescriptorSetLayout;
Tony Barbourde4124d2015-07-03 10:33:54 -0600198 if (!strcmp(name, "DestroyDescriptorSetLayout"))
199 return (void*) vkDestroyDescriptorSetLayout;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600200 if (!strcmp(name, "CreateDescriptorPool"))
201 return (void*) vkCreateDescriptorPool;
Tony Barbourde4124d2015-07-03 10:33:54 -0600202 if (!strcmp(name, "DestroyDescriptorPool"))
203 return (void*) vkDestroyDescriptorPool;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600204 if (!strcmp(name, "ResetDescriptorPool"))
205 return (void*) vkResetDescriptorPool;
206 if (!strcmp(name, "AllocDescriptorSets"))
207 return (void*) vkAllocDescriptorSets;
Tony Barbourb857d312015-07-10 10:50:45 -0600208 if (!strcmp(name, "FreeDescriptorSets"))
209 return (void*) vkFreeDescriptorSets;
Chia-I Wu8cd8ecd2015-05-25 16:27:55 +0800210 if (!strcmp(name, "UpdateDescriptorSets"))
211 return (void*) vkUpdateDescriptorSets;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600212 if (!strcmp(name, "CreateDynamicViewportState"))
213 return (void*) vkCreateDynamicViewportState;
Tony Barbourde4124d2015-07-03 10:33:54 -0600214 if (!strcmp(name, "DestroyDynamicViewportState"))
215 return (void*) vkDestroyDynamicViewportState;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600216 if (!strcmp(name, "CreateDynamicRasterState"))
217 return (void*) vkCreateDynamicRasterState;
Tony Barbourde4124d2015-07-03 10:33:54 -0600218 if (!strcmp(name, "DestroyDynamicRasterState"))
219 return (void*) vkDestroyDynamicRasterState;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600220 if (!strcmp(name, "CreateDynamicColorBlendState"))
221 return (void*) vkCreateDynamicColorBlendState;
Tony Barbourde4124d2015-07-03 10:33:54 -0600222 if (!strcmp(name, "DestroyDynamicColorBlendState"))
223 return (void*) vkDestroyDynamicColorBlendState;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600224 if (!strcmp(name, "CreateDynamicDepthStencilState"))
225 return (void*) vkCreateDynamicDepthStencilState;
Tony Barbourde4124d2015-07-03 10:33:54 -0600226 if (!strcmp(name, "DestroyDynamicDepthStencilState"))
227 return (void*) vkDestroyDynamicDepthStencilState;
Cody Northropf02f9f82015-07-09 18:08:05 -0600228 if (!strcmp(name, "CreateCommandPool"))
229 return (void*) vkCreateCommandPool;
230 if (!strcmp(name, "DestroyCommandPool"))
231 return (void*) vkDestroyCommandPool;
232 if (!strcmp(name, "ResetCommandPool"))
233 return (void*) vkResetCommandPool;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600234 if (!strcmp(name, "CreateCommandBuffer"))
235 return (void*) vkCreateCommandBuffer;
Tony Barbourde4124d2015-07-03 10:33:54 -0600236 if (!strcmp(name, "DestroyCommandBuffer"))
237 return (void*) vkDestroyCommandBuffer;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600238 if (!strcmp(name, "BeginCommandBuffer"))
239 return (void*) vkBeginCommandBuffer;
240 if (!strcmp(name, "EndCommandBuffer"))
241 return (void*) vkEndCommandBuffer;
242 if (!strcmp(name, "ResetCommandBuffer"))
243 return (void*) vkResetCommandBuffer;
244 if (!strcmp(name, "CmdBindPipeline"))
245 return (void*) vkCmdBindPipeline;
Tony Barbourde4124d2015-07-03 10:33:54 -0600246 if (!strcmp(name, "CmdBindDynamicViewportState"))
247 return (void*) vkCmdBindDynamicViewportState;
248 if (!strcmp(name, "CmdBindDynamicRasterState"))
249 return (void*) vkCmdBindDynamicRasterState;
250 if (!strcmp(name, "CmdBindDynamicColorBlendState"))
251 return (void*) vkCmdBindDynamicColorBlendState;
252 if (!strcmp(name, "CmdBindDynamicDepthStencilState"))
253 return (void*) vkCmdBindDynamicDepthStencilState;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600254 if (!strcmp(name, "CmdBindDescriptorSets"))
255 return (void*) vkCmdBindDescriptorSets;
256 if (!strcmp(name, "CmdBindVertexBuffers"))
257 return (void*) vkCmdBindVertexBuffers;
258 if (!strcmp(name, "CmdBindIndexBuffer"))
259 return (void*) vkCmdBindIndexBuffer;
260 if (!strcmp(name, "CmdDraw"))
261 return (void*) vkCmdDraw;
262 if (!strcmp(name, "CmdDrawIndexed"))
263 return (void*) vkCmdDrawIndexed;
264 if (!strcmp(name, "CmdDrawIndirect"))
265 return (void*) vkCmdDrawIndirect;
266 if (!strcmp(name, "CmdDrawIndexedIndirect"))
267 return (void*) vkCmdDrawIndexedIndirect;
268 if (!strcmp(name, "CmdDispatch"))
269 return (void*) vkCmdDispatch;
270 if (!strcmp(name, "CmdDispatchIndirect"))
271 return (void*) vkCmdDispatchIndirect;
272 if (!strcmp(name, "CmdCopyBuffer"))
273 return (void*) vkCmdCopyBuffer;
274 if (!strcmp(name, "CmdCopyImage"))
275 return (void*) vkCmdCopyImage;
276 if (!strcmp(name, "CmdBlitImage"))
277 return (void*) vkCmdBlitImage;
278 if (!strcmp(name, "CmdCopyBufferToImage"))
279 return (void*) vkCmdCopyBufferToImage;
280 if (!strcmp(name, "CmdCopyImageToBuffer"))
281 return (void*) vkCmdCopyImageToBuffer;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600282 if (!strcmp(name, "CmdUpdateBuffer"))
283 return (void*) vkCmdUpdateBuffer;
284 if (!strcmp(name, "CmdFillBuffer"))
285 return (void*) vkCmdFillBuffer;
286 if (!strcmp(name, "CmdClearColorImage"))
287 return (void*) vkCmdClearColorImage;
Chris Forbes2951d7d2015-06-22 17:21:59 +1200288 if (!strcmp(name, "CmdClearDepthStencilImage"))
289 return (void*) vkCmdClearDepthStencilImage;
290 if (!strcmp(name, "CmdClearColorAttachment"))
291 return (void*) vkCmdClearColorAttachment;
292 if (!strcmp(name, "CmdClearDepthStencilAttachment"))
293 return (void*) vkCmdClearDepthStencilAttachment;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600294 if (!strcmp(name, "CmdResolveImage"))
295 return (void*) vkCmdResolveImage;
296 if (!strcmp(name, "CmdSetEvent"))
297 return (void*) vkCmdSetEvent;
298 if (!strcmp(name, "CmdResetEvent"))
299 return (void*) vkCmdResetEvent;
300 if (!strcmp(name, "CmdWaitEvents"))
301 return (void*) vkCmdWaitEvents;
302 if (!strcmp(name, "CmdPipelineBarrier"))
303 return (void*) vkCmdPipelineBarrier;
304 if (!strcmp(name, "CmdBeginQuery"))
305 return (void*) vkCmdBeginQuery;
306 if (!strcmp(name, "CmdEndQuery"))
307 return (void*) vkCmdEndQuery;
308 if (!strcmp(name, "CmdResetQueryPool"))
309 return (void*) vkCmdResetQueryPool;
310 if (!strcmp(name, "CmdWriteTimestamp"))
311 return (void*) vkCmdWriteTimestamp;
312 if (!strcmp(name, "CmdCopyQueryPoolResults"))
313 return (void*) vkCmdCopyQueryPoolResults;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600314 if (!strcmp(name, "CreateFramebuffer"))
315 return (void*) vkCreateFramebuffer;
Tony Barbourde4124d2015-07-03 10:33:54 -0600316 if (!strcmp(name, "DestroyFramebuffer"))
317 return (void*) vkDestroyFramebuffer;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600318 if (!strcmp(name, "CreateRenderPass"))
319 return (void*) vkCreateRenderPass;
Tony Barbourde4124d2015-07-03 10:33:54 -0600320 if (!strcmp(name, "DestroyRenderPass"))
321 return (void*) vkDestroyRenderPass;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600322 if (!strcmp(name, "CmdBeginRenderPass"))
323 return (void*) vkCmdBeginRenderPass;
Chia-I Wuc278df82015-07-07 11:50:03 +0800324 if (!strcmp(name, "CmdNextSubpass"))
325 return (void*) vkCmdNextSubpass;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600326 if (!strcmp(name, "CmdEndRenderPass"))
327 return (void*) vkCmdEndRenderPass;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600328
329 return NULL;
330}
331
332/* These functions require special handling by the loader.
333* They are not just generic trampoline code entrypoints.
334* Thus GPA must return loader entrypoint for these instead of first function
335* in the chain. */
336static inline void *loader_non_passthrough_gpa(const char *name)
337{
338 if (!name || name[0] != 'v' || name[1] != 'k')
339 return NULL;
340
341 name += 2;
342 if (!strcmp(name, "CreateInstance"))
343 return (void*) vkCreateInstance;
344 if (!strcmp(name, "DestroyInstance"))
345 return (void*) vkDestroyInstance;
346 if (!strcmp(name, "EnumeratePhysicalDevices"))
347 return (void*) vkEnumeratePhysicalDevices;
Chris Forbesd7576302015-06-21 22:55:02 +1200348 if (!strcmp(name, "GetPhysicalDeviceFeatures"))
349 return (void*) vkGetPhysicalDeviceFeatures;
Courtney Goeltzenleuchter4da96aa2015-07-12 12:52:09 -0600350 if (!strcmp(name, "GetPhysicalDeviceFormatProperties"))
351 return (void*) vkGetPhysicalDeviceFormatProperties;
Chris Forbesd7576302015-06-21 22:55:02 +1200352 if (!strcmp(name, "GetPhysicalDeviceLimits"))
353 return (void*) vkGetPhysicalDeviceLimits;
Tony Barbour426b9052015-06-24 16:06:58 -0600354 if (!strcmp(name, "GetPhysicalDeviceQueueCount"))
355 return (void*) vkGetPhysicalDeviceQueueCount;
356 if (!strcmp(name, "GetPhysicalDeviceQueueProperties"))
357 return (void*) vkGetPhysicalDeviceQueueProperties;
358 if (!strcmp(name, "GetPhysicalDeviceMemoryProperties"))
359 return (void*) vkGetPhysicalDeviceMemoryProperties;
360 if (!strcmp(name, "GetPhysicalDeviceProperties"))
361 return (void*) vkGetPhysicalDeviceProperties;
Mark Lobodzinski83d4e6a2015-07-03 15:58:09 -0600362 if (!strcmp(name, "GetPhysicalDeviceSparseImageFormatProperties"))
363 return (void*) vkGetPhysicalDeviceSparseImageFormatProperties;
Jon Ashburn53c16772015-05-06 10:15:07 -0600364 if (!strcmp(name, "GetInstanceProcAddr"))
365 return (void*) vkGetInstanceProcAddr;
Jon Ashburn1245cec2015-05-18 13:20:15 -0600366 if (!strcmp(name, "GetDeviceProcAddr"))
367 return (void*) vkGetDeviceProcAddr;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600368 if (!strcmp(name, "CreateDevice"))
369 return (void*) vkCreateDevice;
Tony Barbour426b9052015-06-24 16:06:58 -0600370 if (!strcmp(name, "GetPhysicalDeviceExtensionProperties"))
371 return (void*) vkGetPhysicalDeviceExtensionProperties;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600372 if (!strcmp(name, "GetDeviceQueue"))
373 return (void*) vkGetDeviceQueue;
374 if (!strcmp(name, "CreateCommandBuffer"))
375 return (void*) vkCreateCommandBuffer;
Jon Ashburn2139a3e2015-05-06 09:02:10 -0600376
377 return NULL;
378}