blob: 96c46e1b165a2eb880f4845d5bd5b3a0c8105066 [file] [log] [blame]
Courtney Goeltzenleuchterd8e229c2015-04-08 15:36:08 -06001"""VK API description"""
Chia-I Wufb2559d2014-08-01 11:19:52 +08002
3# Copyright (C) 2014 LunarG, Inc.
4#
5# Permission is hereby granted, free of charge, to any person obtaining a
6# copy of this software and associated documentation files (the "Software"),
7# to deal in the Software without restriction, including without limitation
8# the rights to use, copy, modify, merge, publish, distribute, sublicense,
9# and/or sell copies of the Software, and to permit persons to whom the
10# Software is furnished to do so, subject to the following conditions:
11#
12# The above copyright notice and this permission notice shall be included
13# in all copies or substantial portions of the Software.
14#
15# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21# DEALINGS IN THE SOFTWARE.
22
23class Param(object):
24 """A function parameter."""
25
26 def __init__(self, ty, name):
27 self.ty = ty
28 self.name = name
29
30 def c(self):
31 """Return the parameter in C."""
32 idx = self.ty.find("[")
33
34 # arrays have a different syntax
35 if idx >= 0:
36 return "%s %s%s" % (self.ty[:idx], self.name, self.ty[idx:])
37 else:
38 return "%s %s" % (self.ty, self.name)
39
Chia-I Wua5d28fa2015-01-04 15:02:50 +080040 def indirection_level(self):
41 """Return the level of indirection."""
42 return self.ty.count("*") + self.ty.count("[")
43
44 def dereferenced_type(self, level=0):
45 """Return the type after dereferencing."""
46 if not level:
47 level = self.indirection_level()
48
49 deref = self.ty if level else ""
50 while level > 0:
51 idx = deref.rfind("[")
52 if idx < 0:
53 idx = deref.rfind("*")
54 if idx < 0:
55 deref = ""
56 break
57 deref = deref[:idx]
58 level -= 1;
59
60 return deref.rstrip()
61
Chia-I Wu509a4122015-01-04 14:08:46 +080062 def __repr__(self):
63 return "Param(\"%s\", \"%s\")" % (self.ty, self.name)
64
Chia-I Wufb2559d2014-08-01 11:19:52 +080065class Proto(object):
66 """A function prototype."""
67
Chia-I Wue442dc32015-01-01 09:31:15 +080068 def __init__(self, ret, name, params=[]):
Chia-I Wufb2559d2014-08-01 11:19:52 +080069 # the proto has only a param
Chia-I Wue442dc32015-01-01 09:31:15 +080070 if not isinstance(params, list):
71 params = [params]
Chia-I Wufb2559d2014-08-01 11:19:52 +080072
73 self.ret = ret
74 self.name = name
75 self.params = params
76
77 def c_params(self, need_type=True, need_name=True):
78 """Return the parameter list in C."""
79 if self.params and (need_type or need_name):
80 if need_type and need_name:
81 return ", ".join([param.c() for param in self.params])
82 elif need_type:
83 return ", ".join([param.ty for param in self.params])
84 else:
85 return ", ".join([param.name for param in self.params])
86 else:
87 return "void" if need_type else ""
88
89 def c_decl(self, name, attr="", typed=False, need_param_names=True):
90 """Return a named declaration in C."""
91 format_vals = (self.ret,
92 attr + " " if attr else "",
93 name,
94 self.c_params(need_name=need_param_names))
95
96 if typed:
97 return "%s (%s*%s)(%s)" % format_vals
98 else:
99 return "%s %s%s(%s)" % format_vals
100
Chia-I Wuaf3b5552015-01-04 12:00:01 +0800101 def c_pretty_decl(self, name, attr=""):
Courtney Goeltzenleuchterd8e229c2015-04-08 15:36:08 -0600102 """Return a named declaration in C, with vulkan.h formatting."""
Chia-I Wuaf3b5552015-01-04 12:00:01 +0800103 plist = []
104 for param in self.params:
105 idx = param.ty.find("[")
106 if idx < 0:
107 idx = len(param.ty)
108
109 pad = 44 - idx
110 if pad <= 0:
111 pad = 1
112
113 plist.append(" %s%s%s%s" % (param.ty[:idx],
114 " " * pad, param.name, param.ty[idx:]))
115
116 return "%s %s%s(\n%s)" % (self.ret,
117 attr + " " if attr else "",
118 name,
119 ",\n".join(plist))
120
Chia-I Wufb2559d2014-08-01 11:19:52 +0800121 def c_typedef(self, suffix="", attr=""):
122 """Return the typedef for the prototype in C."""
123 return self.c_decl(self.name + suffix, attr=attr, typed=True)
124
125 def c_func(self, prefix="", attr=""):
126 """Return the prototype in C."""
127 return self.c_decl(prefix + self.name, attr=attr, typed=False)
128
129 def c_call(self):
130 """Return a call to the prototype in C."""
131 return "%s(%s)" % (self.name, self.c_params(need_type=False))
132
Chia-I Wua5d28fa2015-01-04 15:02:50 +0800133 def object_in_params(self):
Courtney Goeltzenleuchterd8e229c2015-04-08 15:36:08 -0600134 """Return the params that are simple VK objects and are inputs."""
Chia-I Wua5d28fa2015-01-04 15:02:50 +0800135 return [param for param in self.params if param.ty in objects]
136
137 def object_out_params(self):
Courtney Goeltzenleuchterd8e229c2015-04-08 15:36:08 -0600138 """Return the params that are simple VK objects and are outputs."""
Chia-I Wua5d28fa2015-01-04 15:02:50 +0800139 return [param for param in self.params
140 if param.dereferenced_type() in objects]
141
Chia-I Wu509a4122015-01-04 14:08:46 +0800142 def __repr__(self):
143 param_strs = []
144 for param in self.params:
145 param_strs.append(str(param))
146 param_str = " [%s]" % (",\n ".join(param_strs))
147
148 return "Proto(\"%s\", \"%s\",\n%s)" % \
149 (self.ret, self.name, param_str)
150
Chia-I Wuc4f24e82015-01-01 08:46:31 +0800151class Extension(object):
Chia-I Wue86d8ab2015-01-04 14:46:22 +0800152 def __init__(self, name, headers, objects, protos):
Chia-I Wuc4f24e82015-01-01 08:46:31 +0800153 self.name = name
154 self.headers = headers
Chia-I Wue86d8ab2015-01-04 14:46:22 +0800155 self.objects = objects
Chia-I Wuc4f24e82015-01-01 08:46:31 +0800156 self.protos = protos
157
Chia-I Wu509a4122015-01-04 14:08:46 +0800158 def __repr__(self):
159 lines = []
160 lines.append("Extension(")
161 lines.append(" name=\"%s\"," % self.name)
162 lines.append(" headers=[\"%s\"]," %
163 "\", \"".join(self.headers))
164
165 lines.append(" objects=[")
166 for obj in self.objects:
167 lines.append(" \"%s\"," % obj)
168 lines.append(" ],")
169
170 lines.append(" protos=[")
171 for proto in self.protos:
172 param_lines = str(proto).splitlines()
173 param_lines[-1] += ",\n" if proto != self.protos[-1] else ","
174 for p in param_lines:
175 lines.append(" " + p)
176 lines.append(" ],")
177 lines.append(")")
178
179 return "\n".join(lines)
180
Courtney Goeltzenleuchterd8e229c2015-04-08 15:36:08 -0600181# VK core API
Chia-I Wuc4f24e82015-01-01 08:46:31 +0800182core = Extension(
Courtney Goeltzenleuchterd8e229c2015-04-08 15:36:08 -0600183 name="VK_CORE",
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -0600184 headers=["vulkan.h", "vkDbg.h"],
Jon Ashburn9fd4cc42015-04-10 14:33:07 -0600185
Chia-I Wue86d8ab2015-01-04 14:46:22 +0800186 objects=[
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600187 "VkInstance",
Tony Barbourd1c35722015-04-16 15:59:00 -0600188 "VkPhysicalDevice",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600189 "VkDevice",
190 "VkQueue",
Tony Barbourd1c35722015-04-16 15:59:00 -0600191 "VkDeviceMemory",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600192 "VkObject",
193 "VkBuffer",
194 "VkBufferView",
195 "VkImage",
196 "VkImageView",
197 "VkColorAttachmentView",
198 "VkDepthStencilView",
199 "VkShader",
200 "VkPipeline",
201 "VkSampler",
202 "VkDescriptorSet",
203 "VkDescriptorSetLayout",
Mark Lobodzinski0fadf5f2015-04-17 14:11:39 -0500204 "VkPipelineLayout",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600205 "VkDescriptorPool",
206 "VkDynamicStateObject",
Courtney Goeltzenleuchter502744a2015-04-10 16:24:50 -0600207 "VkDynamicVpState",
208 "VkDynamicRsState",
209 "VkDynamicCbState",
210 "VkDynamicDsState",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600211 "VkCmdBuffer",
212 "VkFence",
213 "VkSemaphore",
214 "VkEvent",
215 "VkQueryPool",
216 "VkFramebuffer",
217 "VkRenderPass",
Chia-I Wue86d8ab2015-01-04 14:46:22 +0800218 ],
Chia-I Wue442dc32015-01-01 09:31:15 +0800219 protos=[
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600220 Proto("VkResult", "CreateInstance",
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -0600221 [Param("const VkInstanceCreateInfo*", "pCreateInfo"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600222 Param("VkInstance*", "pInstance")]),
Jon Ashburn1beab2d2015-01-26 14:51:40 -0700223
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600224 Proto("VkResult", "DestroyInstance",
225 [Param("VkInstance", "instance")]),
Jon Ashburn1beab2d2015-01-26 14:51:40 -0700226
Jon Ashburn83a64252015-04-15 11:31:12 -0600227 Proto("VkResult", "EnumeratePhysicalDevices",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600228 [Param("VkInstance", "instance"),
Jon Ashburn83a64252015-04-15 11:31:12 -0600229 Param("uint32_t*", "pPhysicalDeviceCount"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600230 Param("VkPhysicalDevice*", "pPhysicalDevices")]),
Jon Ashburn1beab2d2015-01-26 14:51:40 -0700231
Tony Barbourd1c35722015-04-16 15:59:00 -0600232 Proto("VkResult", "GetPhysicalDeviceInfo",
233 [Param("VkPhysicalDevice", "gpu"),
234 Param("VkPhysicalDeviceInfoType", "infoType"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600235 Param("size_t*", "pDataSize"),
236 Param("void*", "pData")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800237
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600238 Proto("void*", "GetProcAddr",
Tony Barbourd1c35722015-04-16 15:59:00 -0600239 [Param("VkPhysicalDevice", "gpu"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600240 Param("const char*", "pName")]),
Chia-I Wuf2ffc522015-01-04 14:51:06 +0800241
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600242 Proto("VkResult", "CreateDevice",
Tony Barbourd1c35722015-04-16 15:59:00 -0600243 [Param("VkPhysicalDevice", "gpu"),
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -0600244 Param("const VkDeviceCreateInfo*", "pCreateInfo"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600245 Param("VkDevice*", "pDevice")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800246
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600247 Proto("VkResult", "DestroyDevice",
248 [Param("VkDevice", "device")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800249
Jon Ashburn9fd4cc42015-04-10 14:33:07 -0600250 Proto("VkResult", "GetGlobalExtensionInfo",
251 [Param("VkExtensionInfoType", "infoType"),
252 Param("uint32_t", "extensionIndex"),
253 Param("size_t*", "pDataSize"),
254 Param("void*", "pData")]),
255
Tobin Ehlis01939012015-04-16 12:51:37 -0600256 Proto("VkResult", "GetPhysicalDeviceExtensionInfo",
Tony Barbourd1c35722015-04-16 15:59:00 -0600257 [Param("VkPhysicalDevice", "gpu"),
Tobin Ehlis01939012015-04-16 12:51:37 -0600258 Param("VkExtensionInfoType", "infoType"),
259 Param("uint32_t", "extensionIndex"),
260 Param("size_t*", "pDataSize"),
261 Param("void*", "pData")]),
262
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600263 Proto("VkResult", "EnumerateLayers",
Tony Barbourd1c35722015-04-16 15:59:00 -0600264 [Param("VkPhysicalDevice", "gpu"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600265 Param("size_t", "maxStringSize"),
Courtney Goeltzenleuchterd9dc0c72015-04-20 11:04:54 -0600266 Param("size_t*", "pLayerCount"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600267 Param("char* const*", "pOutLayers"),
268 Param("void*", "pReserved")]),
Jon Ashburnf7bcf9b2014-10-15 15:30:23 -0600269
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600270 Proto("VkResult", "GetDeviceQueue",
271 [Param("VkDevice", "device"),
Courtney Goeltzenleuchter18248e62015-03-05 18:09:39 -0700272 Param("uint32_t", "queueNodeIndex"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600273 Param("uint32_t", "queueIndex"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600274 Param("VkQueue*", "pQueue")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800275
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600276 Proto("VkResult", "QueueSubmit",
277 [Param("VkQueue", "queue"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600278 Param("uint32_t", "cmdBufferCount"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600279 Param("const VkCmdBuffer*", "pCmdBuffers"),
280 Param("VkFence", "fence")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800281
Courtney Goeltzenleuchterf68ad722015-04-16 13:38:46 -0600282 Proto("VkResult", "QueueAddMemReferences",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600283 [Param("VkQueue", "queue"),
Courtney Goeltzenleuchterf68ad722015-04-16 13:38:46 -0600284 Param("uint32_t", "count"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600285 Param("const VkDeviceMemory*", "pMems")]),
Courtney Goeltzenleuchterd3fb9552015-04-02 13:39:07 -0600286
Courtney Goeltzenleuchterf68ad722015-04-16 13:38:46 -0600287 Proto("VkResult", "QueueRemoveMemReferences",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600288 [Param("VkQueue", "queue"),
Courtney Goeltzenleuchterf68ad722015-04-16 13:38:46 -0600289 Param("uint32_t", "count"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600290 Param("const VkDeviceMemory*", "pMems")]),
Courtney Goeltzenleuchterd3fb9552015-04-02 13:39:07 -0600291
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600292 Proto("VkResult", "QueueWaitIdle",
293 [Param("VkQueue", "queue")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800294
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600295 Proto("VkResult", "DeviceWaitIdle",
296 [Param("VkDevice", "device")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800297
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600298 Proto("VkResult", "AllocMemory",
299 [Param("VkDevice", "device"),
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -0600300 Param("const VkMemoryAllocInfo*", "pAllocInfo"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600301 Param("VkDeviceMemory*", "pMem")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800302
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600303 Proto("VkResult", "FreeMemory",
Mike Stroyanb050c682015-04-17 12:36:38 -0600304 [Param("VkDevice", "device"),
305 Param("VkDeviceMemory", "mem")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800306
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600307 Proto("VkResult", "SetMemoryPriority",
Mike Stroyanb050c682015-04-17 12:36:38 -0600308 [Param("VkDevice", "device"),
309 Param("VkDeviceMemory", "mem"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600310 Param("VkMemoryPriority", "priority")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800311
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600312 Proto("VkResult", "MapMemory",
Mike Stroyanb050c682015-04-17 12:36:38 -0600313 [Param("VkDevice", "device"),
314 Param("VkDeviceMemory", "mem"),
Tony Barbour71a85122015-04-16 19:09:28 -0600315 Param("VkDeviceSize", "offset"),
316 Param("VkDeviceSize", "size"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600317 Param("VkFlags", "flags"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600318 Param("void**", "ppData")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800319
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600320 Proto("VkResult", "UnmapMemory",
Mike Stroyanb050c682015-04-17 12:36:38 -0600321 [Param("VkDevice", "device"),
322 Param("VkDeviceMemory", "mem")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800323
Courtney Goeltzenleuchterf69f8a22015-04-29 17:16:21 -0600324 Proto("VkResult", "FlushMappedMemoryRanges",
Mike Stroyanb050c682015-04-17 12:36:38 -0600325 [Param("VkDevice", "device"),
Courtney Goeltzenleuchterf69f8a22015-04-29 17:16:21 -0600326 Param("uint32_t", "memRangeCount"),
327 Param("const VkMappedMemoryRange*", "pMemRanges")]),
328
329 Proto("VkResult", "InvalidateMappedMemoryRanges",
330 [Param("VkDevice", "device"),
331 Param("uint32_t", "memRangeCount"),
332 Param("const VkMappedMemoryRange*", "pMemRanges")]),
Tony Barbourb1250542015-04-16 19:23:13 -0600333
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600334 Proto("VkResult", "PinSystemMemory",
335 [Param("VkDevice", "device"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600336 Param("const void*", "pSysMem"),
337 Param("size_t", "memSize"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600338 Param("VkDeviceMemory*", "pMem")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800339
Tony Barbourd1c35722015-04-16 15:59:00 -0600340 Proto("VkResult", "GetMultiDeviceCompatibility",
341 [Param("VkPhysicalDevice", "gpu0"),
342 Param("VkPhysicalDevice", "gpu1"),
343 Param("VkPhysicalDeviceCompatibilityInfo*", "pInfo")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800344
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600345 Proto("VkResult", "OpenSharedMemory",
346 [Param("VkDevice", "device"),
347 Param("const VkMemoryOpenInfo*", "pOpenInfo"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600348 Param("VkDeviceMemory*", "pMem")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800349
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600350 Proto("VkResult", "OpenSharedSemaphore",
351 [Param("VkDevice", "device"),
352 Param("const VkSemaphoreOpenInfo*", "pOpenInfo"),
353 Param("VkSemaphore*", "pSemaphore")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800354
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600355 Proto("VkResult", "OpenPeerMemory",
356 [Param("VkDevice", "device"),
357 Param("const VkPeerMemoryOpenInfo*", "pOpenInfo"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600358 Param("VkDeviceMemory*", "pMem")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800359
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600360 Proto("VkResult", "OpenPeerImage",
361 [Param("VkDevice", "device"),
362 Param("const VkPeerImageOpenInfo*", "pOpenInfo"),
363 Param("VkImage*", "pImage"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600364 Param("VkDeviceMemory*", "pMem")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800365
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600366 Proto("VkResult", "DestroyObject",
Mike Stroyanb050c682015-04-17 12:36:38 -0600367 [Param("VkDevice", "device"),
368 Param("VkObjectType", "objType"),
369 Param("VkObject", "object")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800370
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600371 Proto("VkResult", "GetObjectInfo",
Mike Stroyanb050c682015-04-17 12:36:38 -0600372 [Param("VkDevice", "device"),
373 Param("VkObjectType", "objType"),
374 Param("VkObject", "object"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600375 Param("VkObjectInfoType", "infoType"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600376 Param("size_t*", "pDataSize"),
377 Param("void*", "pData")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800378
Mark Lobodzinski40f7f402015-04-16 11:44:05 -0500379 Proto("VkResult", "QueueBindObjectMemory",
380 [Param("VkQueue", "queue"),
Mike Stroyanb050c682015-04-17 12:36:38 -0600381 Param("VkObjectType", "objType"),
Mark Lobodzinski40f7f402015-04-16 11:44:05 -0500382 Param("VkObject", "object"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600383 Param("uint32_t", "allocationIdx"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600384 Param("VkDeviceMemory", "mem"),
385 Param("VkDeviceSize", "offset")]),
Chia-I Wu1a28fe02015-01-01 07:55:04 +0800386
Mark Lobodzinski40f7f402015-04-16 11:44:05 -0500387 Proto("VkResult", "QueueBindObjectMemoryRange",
388 [Param("VkQueue", "queue"),
Mike Stroyanb050c682015-04-17 12:36:38 -0600389 Param("VkObjectType", "objType"),
Mark Lobodzinski40f7f402015-04-16 11:44:05 -0500390 Param("VkObject", "object"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600391 Param("uint32_t", "allocationIdx"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600392 Param("VkDeviceSize", "rangeOffset"),
393 Param("VkDeviceSize", "rangeSize"),
394 Param("VkDeviceMemory", "mem"),
395 Param("VkDeviceSize", "memOffset")]),
Chia-I Wu1a28fe02015-01-01 07:55:04 +0800396
Mark Lobodzinski40f7f402015-04-16 11:44:05 -0500397 Proto("VkResult", "QueueBindImageMemoryRange",
398 [Param("VkQueue", "queue"),
399 Param("VkImage", "image"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600400 Param("uint32_t", "allocationIdx"),
Jeremy Hayesaf0d72c2015-04-15 15:20:03 -0600401 Param("const VkImageMemoryBindInfo*", "pBindInfo"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600402 Param("VkDeviceMemory", "mem"),
403 Param("VkDeviceSize", "memOffset")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800404
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600405 Proto("VkResult", "CreateFence",
406 [Param("VkDevice", "device"),
407 Param("const VkFenceCreateInfo*", "pCreateInfo"),
408 Param("VkFence*", "pFence")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800409
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600410 Proto("VkResult", "ResetFences",
411 [Param("VkDevice", "device"),
Mark Lobodzinski148e1582015-04-07 16:07:57 -0500412 Param("uint32_t", "fenceCount"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600413 Param("VkFence*", "pFences")]),
Mark Lobodzinski148e1582015-04-07 16:07:57 -0500414
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600415 Proto("VkResult", "GetFenceStatus",
Mike Stroyanb050c682015-04-17 12:36:38 -0600416 [Param("VkDevice", "device"),
417 Param("VkFence", "fence")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800418
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600419 Proto("VkResult", "WaitForFences",
420 [Param("VkDevice", "device"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600421 Param("uint32_t", "fenceCount"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600422 Param("const VkFence*", "pFences"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600423 Param("bool32_t", "waitAll"),
424 Param("uint64_t", "timeout")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800425
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600426 Proto("VkResult", "CreateSemaphore",
427 [Param("VkDevice", "device"),
428 Param("const VkSemaphoreCreateInfo*", "pCreateInfo"),
429 Param("VkSemaphore*", "pSemaphore")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800430
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600431 Proto("VkResult", "QueueSignalSemaphore",
432 [Param("VkQueue", "queue"),
433 Param("VkSemaphore", "semaphore")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800434
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600435 Proto("VkResult", "QueueWaitSemaphore",
436 [Param("VkQueue", "queue"),
437 Param("VkSemaphore", "semaphore")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800438
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600439 Proto("VkResult", "CreateEvent",
440 [Param("VkDevice", "device"),
441 Param("const VkEventCreateInfo*", "pCreateInfo"),
442 Param("VkEvent*", "pEvent")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800443
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600444 Proto("VkResult", "GetEventStatus",
Mike Stroyanb050c682015-04-17 12:36:38 -0600445 [Param("VkDevice", "device"),
446 Param("VkEvent", "event")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800447
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600448 Proto("VkResult", "SetEvent",
Mike Stroyanb050c682015-04-17 12:36:38 -0600449 [Param("VkDevice", "device"),
450 Param("VkEvent", "event")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800451
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600452 Proto("VkResult", "ResetEvent",
Mike Stroyanb050c682015-04-17 12:36:38 -0600453 [Param("VkDevice", "device"),
454 Param("VkEvent", "event")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800455
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600456 Proto("VkResult", "CreateQueryPool",
457 [Param("VkDevice", "device"),
458 Param("const VkQueryPoolCreateInfo*", "pCreateInfo"),
459 Param("VkQueryPool*", "pQueryPool")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800460
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600461 Proto("VkResult", "GetQueryPoolResults",
Mike Stroyanb050c682015-04-17 12:36:38 -0600462 [Param("VkDevice", "device"),
463 Param("VkQueryPool", "queryPool"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600464 Param("uint32_t", "startQuery"),
465 Param("uint32_t", "queryCount"),
466 Param("size_t*", "pDataSize"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600467 Param("void*", "pData"),
468 Param("VkQueryResultFlags", "flags")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800469
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600470 Proto("VkResult", "GetFormatInfo",
471 [Param("VkDevice", "device"),
472 Param("VkFormat", "format"),
473 Param("VkFormatInfoType", "infoType"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600474 Param("size_t*", "pDataSize"),
475 Param("void*", "pData")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800476
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600477 Proto("VkResult", "CreateBuffer",
478 [Param("VkDevice", "device"),
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -0600479 Param("const VkBufferCreateInfo*", "pCreateInfo"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600480 Param("VkBuffer*", "pBuffer")]),
Chia-I Wu1a28fe02015-01-01 07:55:04 +0800481
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600482 Proto("VkResult", "CreateBufferView",
483 [Param("VkDevice", "device"),
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -0600484 Param("const VkBufferViewCreateInfo*", "pCreateInfo"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600485 Param("VkBufferView*", "pView")]),
Chia-I Wu1a28fe02015-01-01 07:55:04 +0800486
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600487 Proto("VkResult", "CreateImage",
488 [Param("VkDevice", "device"),
489 Param("const VkImageCreateInfo*", "pCreateInfo"),
490 Param("VkImage*", "pImage")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800491
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600492 Proto("VkResult", "GetImageSubresourceInfo",
Mike Stroyanb050c682015-04-17 12:36:38 -0600493 [Param("VkDevice", "device"),
494 Param("VkImage", "image"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600495 Param("const VkImageSubresource*", "pSubresource"),
496 Param("VkSubresourceInfoType", "infoType"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600497 Param("size_t*", "pDataSize"),
498 Param("void*", "pData")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800499
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600500 Proto("VkResult", "CreateImageView",
501 [Param("VkDevice", "device"),
502 Param("const VkImageViewCreateInfo*", "pCreateInfo"),
503 Param("VkImageView*", "pView")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800504
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600505 Proto("VkResult", "CreateColorAttachmentView",
506 [Param("VkDevice", "device"),
507 Param("const VkColorAttachmentViewCreateInfo*", "pCreateInfo"),
508 Param("VkColorAttachmentView*", "pView")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800509
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600510 Proto("VkResult", "CreateDepthStencilView",
511 [Param("VkDevice", "device"),
512 Param("const VkDepthStencilViewCreateInfo*", "pCreateInfo"),
513 Param("VkDepthStencilView*", "pView")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800514
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600515 Proto("VkResult", "CreateShader",
516 [Param("VkDevice", "device"),
517 Param("const VkShaderCreateInfo*", "pCreateInfo"),
518 Param("VkShader*", "pShader")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800519
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600520 Proto("VkResult", "CreateGraphicsPipeline",
521 [Param("VkDevice", "device"),
522 Param("const VkGraphicsPipelineCreateInfo*", "pCreateInfo"),
523 Param("VkPipeline*", "pPipeline")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800524
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600525 Proto("VkResult", "CreateGraphicsPipelineDerivative",
526 [Param("VkDevice", "device"),
527 Param("const VkGraphicsPipelineCreateInfo*", "pCreateInfo"),
528 Param("VkPipeline", "basePipeline"),
529 Param("VkPipeline*", "pPipeline")]),
Courtney Goeltzenleuchter0d40f152015-03-25 15:37:49 -0600530
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600531 Proto("VkResult", "CreateComputePipeline",
532 [Param("VkDevice", "device"),
533 Param("const VkComputePipelineCreateInfo*", "pCreateInfo"),
534 Param("VkPipeline*", "pPipeline")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800535
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600536 Proto("VkResult", "StorePipeline",
Mike Stroyanb050c682015-04-17 12:36:38 -0600537 [Param("VkDevice", "device"),
538 Param("VkPipeline", "pipeline"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600539 Param("size_t*", "pDataSize"),
540 Param("void*", "pData")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800541
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600542 Proto("VkResult", "LoadPipeline",
543 [Param("VkDevice", "device"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600544 Param("size_t", "dataSize"),
545 Param("const void*", "pData"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600546 Param("VkPipeline*", "pPipeline")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800547
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600548 Proto("VkResult", "LoadPipelineDerivative",
549 [Param("VkDevice", "device"),
Courtney Goeltzenleuchter0d40f152015-03-25 15:37:49 -0600550 Param("size_t", "dataSize"),
551 Param("const void*", "pData"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600552 Param("VkPipeline", "basePipeline"),
553 Param("VkPipeline*", "pPipeline")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800554
Mark Lobodzinski0fadf5f2015-04-17 14:11:39 -0500555 Proto("VkResult", "CreatePipelineLayout",
556 [Param("VkDevice", "device"),
557 Param("const VkPipelineLayoutCreateInfo*", "pCreateInfo"),
558 Param("VkPipelineLayout*", "pPipelineLayout")]),
559
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600560 Proto("VkResult", "CreateSampler",
561 [Param("VkDevice", "device"),
562 Param("const VkSamplerCreateInfo*", "pCreateInfo"),
563 Param("VkSampler*", "pSampler")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800564
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600565 Proto("VkResult", "CreateDescriptorSetLayout",
566 [Param("VkDevice", "device"),
567 Param("const VkDescriptorSetLayoutCreateInfo*", "pCreateInfo"),
568 Param("VkDescriptorSetLayout*", "pSetLayout")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800569
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600570 Proto("VkResult", "BeginDescriptorPoolUpdate",
571 [Param("VkDevice", "device"),
572 Param("VkDescriptorUpdateMode", "updateMode")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800573
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600574 Proto("VkResult", "EndDescriptorPoolUpdate",
575 [Param("VkDevice", "device"),
576 Param("VkCmdBuffer", "cmd")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800577
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600578 Proto("VkResult", "CreateDescriptorPool",
579 [Param("VkDevice", "device"),
580 Param("VkDescriptorPoolUsage", "poolUsage"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600581 Param("uint32_t", "maxSets"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600582 Param("const VkDescriptorPoolCreateInfo*", "pCreateInfo"),
583 Param("VkDescriptorPool*", "pDescriptorPool")]),
Chia-I Wu11078b02015-01-04 16:27:24 +0800584
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600585 Proto("VkResult", "ResetDescriptorPool",
Mike Stroyanb050c682015-04-17 12:36:38 -0600586 [Param("VkDevice", "device"),
587 Param("VkDescriptorPool", "descriptorPool")]),
Chia-I Wu11078b02015-01-04 16:27:24 +0800588
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600589 Proto("VkResult", "AllocDescriptorSets",
Mike Stroyanb050c682015-04-17 12:36:38 -0600590 [Param("VkDevice", "device"),
591 Param("VkDescriptorPool", "descriptorPool"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600592 Param("VkDescriptorSetUsage", "setUsage"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600593 Param("uint32_t", "count"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600594 Param("const VkDescriptorSetLayout*", "pSetLayouts"),
595 Param("VkDescriptorSet*", "pDescriptorSets"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600596 Param("uint32_t*", "pCount")]),
Chia-I Wu11078b02015-01-04 16:27:24 +0800597
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600598 Proto("void", "ClearDescriptorSets",
Mike Stroyanb050c682015-04-17 12:36:38 -0600599 [Param("VkDevice", "device"),
600 Param("VkDescriptorPool", "descriptorPool"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600601 Param("uint32_t", "count"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600602 Param("const VkDescriptorSet*", "pDescriptorSets")]),
Chia-I Wu11078b02015-01-04 16:27:24 +0800603
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600604 Proto("void", "UpdateDescriptors",
Mike Stroyanb050c682015-04-17 12:36:38 -0600605 [Param("VkDevice", "device"),
606 Param("VkDescriptorSet", "descriptorSet"),
Chia-I Wu41126e52015-03-26 15:27:55 +0800607 Param("uint32_t", "updateCount"),
608 Param("const void**", "ppUpdateArray")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800609
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600610 Proto("VkResult", "CreateDynamicViewportState",
611 [Param("VkDevice", "device"),
612 Param("const VkDynamicVpStateCreateInfo*", "pCreateInfo"),
Courtney Goeltzenleuchter502744a2015-04-10 16:24:50 -0600613 Param("VkDynamicVpState*", "pState")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800614
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600615 Proto("VkResult", "CreateDynamicRasterState",
616 [Param("VkDevice", "device"),
617 Param("const VkDynamicRsStateCreateInfo*", "pCreateInfo"),
Courtney Goeltzenleuchter502744a2015-04-10 16:24:50 -0600618 Param("VkDynamicRsState*", "pState")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800619
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600620 Proto("VkResult", "CreateDynamicColorBlendState",
621 [Param("VkDevice", "device"),
622 Param("const VkDynamicCbStateCreateInfo*", "pCreateInfo"),
Courtney Goeltzenleuchter502744a2015-04-10 16:24:50 -0600623 Param("VkDynamicCbState*", "pState")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800624
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600625 Proto("VkResult", "CreateDynamicDepthStencilState",
626 [Param("VkDevice", "device"),
627 Param("const VkDynamicDsStateCreateInfo*", "pCreateInfo"),
Courtney Goeltzenleuchter502744a2015-04-10 16:24:50 -0600628 Param("VkDynamicDsState*", "pState")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800629
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600630 Proto("VkResult", "CreateCommandBuffer",
631 [Param("VkDevice", "device"),
632 Param("const VkCmdBufferCreateInfo*", "pCreateInfo"),
633 Param("VkCmdBuffer*", "pCmdBuffer")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800634
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600635 Proto("VkResult", "BeginCommandBuffer",
636 [Param("VkCmdBuffer", "cmdBuffer"),
637 Param("const VkCmdBufferBeginInfo*", "pBeginInfo")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800638
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600639 Proto("VkResult", "EndCommandBuffer",
640 [Param("VkCmdBuffer", "cmdBuffer")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800641
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600642 Proto("VkResult", "ResetCommandBuffer",
643 [Param("VkCmdBuffer", "cmdBuffer")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800644
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600645 Proto("void", "CmdBindPipeline",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600646 [Param("VkCmdBuffer", "cmdBuffer"),
647 Param("VkPipelineBindPoint", "pipelineBindPoint"),
648 Param("VkPipeline", "pipeline")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800649
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600650 Proto("void", "CmdBindDynamicStateObject",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600651 [Param("VkCmdBuffer", "cmdBuffer"),
652 Param("VkStateBindPoint", "stateBindPoint"),
653 Param("VkDynamicStateObject", "state")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800654
Chia-I Wu53f07d72015-03-28 15:23:55 +0800655 Proto("void", "CmdBindDescriptorSets",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600656 [Param("VkCmdBuffer", "cmdBuffer"),
657 Param("VkPipelineBindPoint", "pipelineBindPoint"),
Cody Northropd4c1a502015-04-16 13:41:56 -0600658 Param("uint32_t", "firstSet"),
659 Param("uint32_t", "setCount"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600660 Param("const VkDescriptorSet*", "pDescriptorSets"),
Cody Northropd4c1a502015-04-16 13:41:56 -0600661 Param("uint32_t", "dynamicOffsetCount"),
662 Param("const uint32_t*", "pDynamicOffsets")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800663
Courtney Goeltzenleuchterf68ad722015-04-16 13:38:46 -0600664 Proto("void", "CmdBindVertexBuffers",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600665 [Param("VkCmdBuffer", "cmdBuffer"),
Courtney Goeltzenleuchterf68ad722015-04-16 13:38:46 -0600666 Param("uint32_t", "startBinding"),
667 Param("uint32_t", "bindingCount"),
668 Param("const VkBuffer*", "pBuffers"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600669 Param("const VkDeviceSize*", "pOffsets")]),
670
Chia-I Wu7a42e122014-11-08 10:48:20 +0800671
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600672 Proto("void", "CmdBindIndexBuffer",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600673 [Param("VkCmdBuffer", "cmdBuffer"),
674 Param("VkBuffer", "buffer"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600675 Param("VkDeviceSize", "offset"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600676 Param("VkIndexType", "indexType")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800677
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600678 Proto("void", "CmdDraw",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600679 [Param("VkCmdBuffer", "cmdBuffer"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600680 Param("uint32_t", "firstVertex"),
681 Param("uint32_t", "vertexCount"),
682 Param("uint32_t", "firstInstance"),
683 Param("uint32_t", "instanceCount")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800684
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600685 Proto("void", "CmdDrawIndexed",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600686 [Param("VkCmdBuffer", "cmdBuffer"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600687 Param("uint32_t", "firstIndex"),
688 Param("uint32_t", "indexCount"),
689 Param("int32_t", "vertexOffset"),
690 Param("uint32_t", "firstInstance"),
691 Param("uint32_t", "instanceCount")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800692
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600693 Proto("void", "CmdDrawIndirect",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600694 [Param("VkCmdBuffer", "cmdBuffer"),
695 Param("VkBuffer", "buffer"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600696 Param("VkDeviceSize", "offset"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600697 Param("uint32_t", "count"),
698 Param("uint32_t", "stride")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800699
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600700 Proto("void", "CmdDrawIndexedIndirect",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600701 [Param("VkCmdBuffer", "cmdBuffer"),
702 Param("VkBuffer", "buffer"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600703 Param("VkDeviceSize", "offset"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600704 Param("uint32_t", "count"),
705 Param("uint32_t", "stride")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800706
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600707 Proto("void", "CmdDispatch",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600708 [Param("VkCmdBuffer", "cmdBuffer"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600709 Param("uint32_t", "x"),
710 Param("uint32_t", "y"),
711 Param("uint32_t", "z")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800712
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600713 Proto("void", "CmdDispatchIndirect",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600714 [Param("VkCmdBuffer", "cmdBuffer"),
715 Param("VkBuffer", "buffer"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600716 Param("VkDeviceSize", "offset")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800717
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600718 Proto("void", "CmdCopyBuffer",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600719 [Param("VkCmdBuffer", "cmdBuffer"),
720 Param("VkBuffer", "srcBuffer"),
721 Param("VkBuffer", "destBuffer"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600722 Param("uint32_t", "regionCount"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600723 Param("const VkBufferCopy*", "pRegions")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800724
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600725 Proto("void", "CmdCopyImage",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600726 [Param("VkCmdBuffer", "cmdBuffer"),
727 Param("VkImage", "srcImage"),
728 Param("VkImageLayout", "srcImageLayout"),
729 Param("VkImage", "destImage"),
730 Param("VkImageLayout", "destImageLayout"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600731 Param("uint32_t", "regionCount"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600732 Param("const VkImageCopy*", "pRegions")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800733
Courtney Goeltzenleuchter89299fa2015-03-08 17:02:18 -0600734 Proto("void", "CmdBlitImage",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600735 [Param("VkCmdBuffer", "cmdBuffer"),
736 Param("VkImage", "srcImage"),
737 Param("VkImageLayout", "srcImageLayout"),
738 Param("VkImage", "destImage"),
739 Param("VkImageLayout", "destImageLayout"),
Courtney Goeltzenleuchter89299fa2015-03-08 17:02:18 -0600740 Param("uint32_t", "regionCount"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600741 Param("const VkImageBlit*", "pRegions")]),
Courtney Goeltzenleuchter89299fa2015-03-08 17:02:18 -0600742
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600743 Proto("void", "CmdCopyBufferToImage",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600744 [Param("VkCmdBuffer", "cmdBuffer"),
745 Param("VkBuffer", "srcBuffer"),
746 Param("VkImage", "destImage"),
747 Param("VkImageLayout", "destImageLayout"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600748 Param("uint32_t", "regionCount"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600749 Param("const VkBufferImageCopy*", "pRegions")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800750
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600751 Proto("void", "CmdCopyImageToBuffer",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600752 [Param("VkCmdBuffer", "cmdBuffer"),
753 Param("VkImage", "srcImage"),
754 Param("VkImageLayout", "srcImageLayout"),
755 Param("VkBuffer", "destBuffer"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600756 Param("uint32_t", "regionCount"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600757 Param("const VkBufferImageCopy*", "pRegions")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800758
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600759 Proto("void", "CmdCloneImageData",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600760 [Param("VkCmdBuffer", "cmdBuffer"),
761 Param("VkImage", "srcImage"),
762 Param("VkImageLayout", "srcImageLayout"),
763 Param("VkImage", "destImage"),
764 Param("VkImageLayout", "destImageLayout")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800765
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600766 Proto("void", "CmdUpdateBuffer",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600767 [Param("VkCmdBuffer", "cmdBuffer"),
768 Param("VkBuffer", "destBuffer"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600769 Param("VkDeviceSize", "destOffset"),
770 Param("VkDeviceSize", "dataSize"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600771 Param("const uint32_t*", "pData")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800772
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600773 Proto("void", "CmdFillBuffer",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600774 [Param("VkCmdBuffer", "cmdBuffer"),
775 Param("VkBuffer", "destBuffer"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600776 Param("VkDeviceSize", "destOffset"),
777 Param("VkDeviceSize", "fillSize"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600778 Param("uint32_t", "data")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800779
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600780 Proto("void", "CmdClearColorImage",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600781 [Param("VkCmdBuffer", "cmdBuffer"),
782 Param("VkImage", "image"),
783 Param("VkImageLayout", "imageLayout"),
Courtney Goeltzenleuchterd7a5cff2015-04-23 17:49:22 -0600784 Param("const VkClearColor*", "pColor"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600785 Param("uint32_t", "rangeCount"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600786 Param("const VkImageSubresourceRange*", "pRanges")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800787
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600788 Proto("void", "CmdClearDepthStencil",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600789 [Param("VkCmdBuffer", "cmdBuffer"),
790 Param("VkImage", "image"),
791 Param("VkImageLayout", "imageLayout"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600792 Param("float", "depth"),
793 Param("uint32_t", "stencil"),
794 Param("uint32_t", "rangeCount"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600795 Param("const VkImageSubresourceRange*", "pRanges")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800796
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600797 Proto("void", "CmdResolveImage",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600798 [Param("VkCmdBuffer", "cmdBuffer"),
799 Param("VkImage", "srcImage"),
800 Param("VkImageLayout", "srcImageLayout"),
801 Param("VkImage", "destImage"),
802 Param("VkImageLayout", "destImageLayout"),
Tony Barbour6865d4a2015-04-13 15:02:52 -0600803 Param("uint32_t", "regionCount"),
804 Param("const VkImageResolve*", "pRegions")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800805
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600806 Proto("void", "CmdSetEvent",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600807 [Param("VkCmdBuffer", "cmdBuffer"),
808 Param("VkEvent", "event"),
809 Param("VkPipeEvent", "pipeEvent")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800810
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600811 Proto("void", "CmdResetEvent",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600812 [Param("VkCmdBuffer", "cmdBuffer"),
813 Param("VkEvent", "event"),
814 Param("VkPipeEvent", "pipeEvent")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800815
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600816 Proto("void", "CmdWaitEvents",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600817 [Param("VkCmdBuffer", "cmdBuffer"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600818 Param("VkWaitEvent", "waitEvent"),
819 Param("uint32_t", "eventCount"),
820 Param("const VkEvent*", "pEvents"),
821 Param("uint32_t", "memBarrierCount"),
822 Param("const void**", "ppMemBarriers")]),
Mike Stroyanfb80d5f2014-12-04 11:08:39 +0000823
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600824 Proto("void", "CmdPipelineBarrier",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600825 [Param("VkCmdBuffer", "cmdBuffer"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600826 Param("VkWaitEvent", "waitEvent"),
827 Param("uint32_t", "pipeEventCount"),
828 Param("const VkPipeEvent*", "pPipeEvents"),
829 Param("uint32_t", "memBarrierCount"),
830 Param("const void**", "ppMemBarriers")]),
Mike Stroyanfb80d5f2014-12-04 11:08:39 +0000831
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600832 Proto("void", "CmdBeginQuery",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600833 [Param("VkCmdBuffer", "cmdBuffer"),
834 Param("VkQueryPool", "queryPool"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600835 Param("uint32_t", "slot"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600836 Param("VkFlags", "flags")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800837
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600838 Proto("void", "CmdEndQuery",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600839 [Param("VkCmdBuffer", "cmdBuffer"),
840 Param("VkQueryPool", "queryPool"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600841 Param("uint32_t", "slot")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800842
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600843 Proto("void", "CmdResetQueryPool",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600844 [Param("VkCmdBuffer", "cmdBuffer"),
845 Param("VkQueryPool", "queryPool"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600846 Param("uint32_t", "startQuery"),
847 Param("uint32_t", "queryCount")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800848
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600849 Proto("void", "CmdWriteTimestamp",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600850 [Param("VkCmdBuffer", "cmdBuffer"),
851 Param("VkTimestampType", "timestampType"),
852 Param("VkBuffer", "destBuffer"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600853 Param("VkDeviceSize", "destOffset")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800854
Courtney Goeltzenleuchter1dbc8e22015-04-15 18:21:13 -0600855 Proto("void", "CmdCopyQueryPoolResults",
856 [Param("VkCmdBuffer", "cmdBuffer"),
857 Param("VkQueryPool", "queryPool"),
858 Param("uint32_t", "startQuery"),
859 Param("uint32_t", "queryCount"),
860 Param("VkBuffer", "destBuffer"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600861 Param("VkDeviceSize", "destOffset"),
862 Param("VkDeviceSize", "destStride"),
Courtney Goeltzenleuchter1dbc8e22015-04-15 18:21:13 -0600863 Param("VkFlags", "flags")]),
864
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600865 Proto("void", "CmdInitAtomicCounters",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600866 [Param("VkCmdBuffer", "cmdBuffer"),
867 Param("VkPipelineBindPoint", "pipelineBindPoint"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600868 Param("uint32_t", "startCounter"),
869 Param("uint32_t", "counterCount"),
870 Param("const uint32_t*", "pData")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800871
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600872 Proto("void", "CmdLoadAtomicCounters",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600873 [Param("VkCmdBuffer", "cmdBuffer"),
874 Param("VkPipelineBindPoint", "pipelineBindPoint"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600875 Param("uint32_t", "startCounter"),
876 Param("uint32_t", "counterCount"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600877 Param("VkBuffer", "srcBuffer"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600878 Param("VkDeviceSize", "srcOffset")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800879
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600880 Proto("void", "CmdSaveAtomicCounters",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600881 [Param("VkCmdBuffer", "cmdBuffer"),
882 Param("VkPipelineBindPoint", "pipelineBindPoint"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600883 Param("uint32_t", "startCounter"),
884 Param("uint32_t", "counterCount"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600885 Param("VkBuffer", "destBuffer"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600886 Param("VkDeviceSize", "destOffset")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800887
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600888 Proto("VkResult", "CreateFramebuffer",
889 [Param("VkDevice", "device"),
890 Param("const VkFramebufferCreateInfo*", "pCreateInfo"),
891 Param("VkFramebuffer*", "pFramebuffer")]),
Jeremy Hayesd65ae082015-01-14 16:17:08 -0700892
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600893 Proto("VkResult", "CreateRenderPass",
894 [Param("VkDevice", "device"),
895 Param("const VkRenderPassCreateInfo*", "pCreateInfo"),
896 Param("VkRenderPass*", "pRenderPass")]),
Jeremy Hayesd65ae082015-01-14 16:17:08 -0700897
Jon Ashburne13f1982015-02-02 09:58:11 -0700898 Proto("void", "CmdBeginRenderPass",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600899 [Param("VkCmdBuffer", "cmdBuffer"),
900 Param("const VkRenderPassBegin*", "pRenderPassBegin")]),
Jon Ashburne13f1982015-02-02 09:58:11 -0700901
902 Proto("void", "CmdEndRenderPass",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600903 [Param("VkCmdBuffer", "cmdBuffer"),
904 Param("VkRenderPass", "renderPass")]),
Jon Ashburne13f1982015-02-02 09:58:11 -0700905
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600906 Proto("VkResult", "DbgSetValidationLevel",
907 [Param("VkDevice", "device"),
908 Param("VkValidationLevel", "validationLevel")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800909
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600910 Proto("VkResult", "DbgRegisterMsgCallback",
911 [Param("VkInstance", "instance"),
Courtney Goeltzenleuchterd8e229c2015-04-08 15:36:08 -0600912 Param("VK_DBG_MSG_CALLBACK_FUNCTION", "pfnMsgCallback"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600913 Param("void*", "pUserData")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800914
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600915 Proto("VkResult", "DbgUnregisterMsgCallback",
916 [Param("VkInstance", "instance"),
Courtney Goeltzenleuchterd8e229c2015-04-08 15:36:08 -0600917 Param("VK_DBG_MSG_CALLBACK_FUNCTION", "pfnMsgCallback")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800918
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600919 Proto("VkResult", "DbgSetMessageFilter",
920 [Param("VkDevice", "device"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600921 Param("int32_t", "msgCode"),
Courtney Goeltzenleuchterd8e229c2015-04-08 15:36:08 -0600922 Param("VK_DBG_MSG_FILTER", "filter")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800923
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600924 Proto("VkResult", "DbgSetObjectTag",
Mike Stroyanb050c682015-04-17 12:36:38 -0600925 [Param("VkDevice", "device"),
926 Param("VkObject", "object"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600927 Param("size_t", "tagSize"),
928 Param("const void*", "pTag")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800929
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600930 Proto("VkResult", "DbgSetGlobalOption",
931 [Param("VkInstance", "instance"),
Courtney Goeltzenleuchterd8e229c2015-04-08 15:36:08 -0600932 Param("VK_DBG_GLOBAL_OPTION", "dbgOption"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600933 Param("size_t", "dataSize"),
934 Param("const void*", "pData")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800935
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600936 Proto("VkResult", "DbgSetDeviceOption",
937 [Param("VkDevice", "device"),
Courtney Goeltzenleuchterd8e229c2015-04-08 15:36:08 -0600938 Param("VK_DBG_DEVICE_OPTION", "dbgOption"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600939 Param("size_t", "dataSize"),
940 Param("const void*", "pData")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800941
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600942 Proto("void", "CmdDbgMarkerBegin",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600943 [Param("VkCmdBuffer", "cmdBuffer"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600944 Param("const char*", "pMarker")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800945
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600946 Proto("void", "CmdDbgMarkerEnd",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600947 [Param("VkCmdBuffer", "cmdBuffer")]),
Chia-I Wue442dc32015-01-01 09:31:15 +0800948 ],
Chia-I Wufb2559d2014-08-01 11:19:52 +0800949)
950
Chia-I Wuf8693382015-04-16 22:02:10 +0800951wsi_lunarg = Extension(
952 name="VK_WSI_LunarG",
953 headers=["vk_wsi_lunarg.h"],
954 objects=[
955 "VkDisplayWSI",
956 "VkSwapChainWSI",
957 ],
Chia-I Wue442dc32015-01-01 09:31:15 +0800958 protos=[
Chia-I Wuf8693382015-04-16 22:02:10 +0800959 Proto("VkResult", "GetDisplayInfoWSI",
960 [Param("VkDisplayWSI", "display"),
961 Param("VkDisplayInfoTypeWSI", "infoType"),
962 Param("size_t*", "pDataSize"),
963 Param("void*", "pData")]),
Chia-I Wu6bdf0192014-09-13 13:36:06 +0800964
Chia-I Wuf8693382015-04-16 22:02:10 +0800965 Proto("VkResult", "CreateSwapChainWSI",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600966 [Param("VkDevice", "device"),
Chia-I Wuf8693382015-04-16 22:02:10 +0800967 Param("const VkSwapChainCreateInfoWSI*", "pCreateInfo"),
968 Param("VkSwapChainWSI*", "pSwapChain")]),
Chia-I Wu6dee8b82014-09-23 10:37:23 +0800969
Chia-I Wuf8693382015-04-16 22:02:10 +0800970 Proto("VkResult", "DestroySwapChainWSI",
971 [Param("VkSwapChainWSI", "swapChain")]),
Chia-I Wu6dee8b82014-09-23 10:37:23 +0800972
Chia-I Wuf8693382015-04-16 22:02:10 +0800973 Proto("VkResult", "GetSwapChainInfoWSI",
974 [Param("VkSwapChainWSI", "swapChain"),
975 Param("VkSwapChainInfoTypeWSI", "infoType"),
976 Param("size_t*", "pDataSize"),
977 Param("void*", "pData")]),
978
979 Proto("VkResult", "QueuePresentWSI",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600980 [Param("VkQueue", "queue"),
Chia-I Wuf8693382015-04-16 22:02:10 +0800981 Param("const VkPresentInfoWSI*", "pPresentInfo")]),
Chia-I Wue442dc32015-01-01 09:31:15 +0800982 ],
Chia-I Wu6dee8b82014-09-23 10:37:23 +0800983)
984
Chia-I Wuf8693382015-04-16 22:02:10 +0800985extensions = [core, wsi_lunarg]
Chia-I Wuc4f24e82015-01-01 08:46:31 +0800986
Tobin Ehlis7e65d752015-01-15 17:51:52 -0700987object_root_list = [
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600988 "VkInstance",
Tony Barbourd1c35722015-04-16 15:59:00 -0600989 "VkPhysicalDevice",
Chia-I Wuf8693382015-04-16 22:02:10 +0800990 "VkDisplayWSI",
991 "VkSwapChainWSI",
Tobin Ehlis7e65d752015-01-15 17:51:52 -0700992]
993
994object_base_list = [
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600995 "VkDevice",
996 "VkQueue",
Tony Barbourd1c35722015-04-16 15:59:00 -0600997 "VkDeviceMemory",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600998 "VkObject"
Tobin Ehlis7e65d752015-01-15 17:51:52 -0700999]
1000
1001object_list = [
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001002 "VkBuffer",
1003 "VkBufferView",
1004 "VkImage",
1005 "VkImageView",
1006 "VkColorAttachmentView",
1007 "VkDepthStencilView",
1008 "VkShader",
1009 "VkPipeline",
Mark Lobodzinski0fadf5f2015-04-17 14:11:39 -05001010 "VkPipelineLayout",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001011 "VkSampler",
1012 "VkDescriptorSet",
1013 "VkDescriptorSetLayout",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001014 "VkDescriptorPool",
1015 "VkDynamicStateObject",
1016 "VkCmdBuffer",
1017 "VkFence",
1018 "VkSemaphore",
1019 "VkEvent",
1020 "VkQueryPool",
1021 "VkFramebuffer",
1022 "VkRenderPass"
Tobin Ehlis7e65d752015-01-15 17:51:52 -07001023]
1024
1025object_dynamic_state_list = [
Courtney Goeltzenleuchter502744a2015-04-10 16:24:50 -06001026 "VkDynamicVpState",
1027 "VkDynamicRsState",
1028 "VkDynamicCbState",
1029 "VkDynamicDsState"
Tobin Ehlis7e65d752015-01-15 17:51:52 -07001030]
1031
1032object_type_list = object_root_list + object_base_list + object_list + object_dynamic_state_list
1033
Mike Stroyanb050c682015-04-17 12:36:38 -06001034object_parent_list = ["VkObject", "VkDynamicStateObject"]
Tobin Ehlis7e65d752015-01-15 17:51:52 -07001035
Chia-I Wuc4f24e82015-01-01 08:46:31 +08001036headers = []
Chia-I Wue86d8ab2015-01-04 14:46:22 +08001037objects = []
Chia-I Wuc4f24e82015-01-01 08:46:31 +08001038protos = []
1039for ext in extensions:
1040 headers.extend(ext.headers)
Chia-I Wue86d8ab2015-01-04 14:46:22 +08001041 objects.extend(ext.objects)
Chia-I Wuc4f24e82015-01-01 08:46:31 +08001042 protos.extend(ext.protos)
Chia-I Wu6dee8b82014-09-23 10:37:23 +08001043
Chia-I Wu9a4ceb12015-01-01 14:45:58 +08001044proto_names = [proto.name for proto in protos]
Chia-I Wu900a2572014-08-01 14:44:16 +08001045
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001046def parse_vk_h(filename):
Chia-I Wu509a4122015-01-04 14:08:46 +08001047 # read object and protoype typedefs
1048 object_lines = []
1049 proto_lines = []
1050 with open(filename, "r") as fp:
1051 for line in fp:
1052 line = line.strip()
Courtney Goeltzenleuchterd8e229c2015-04-08 15:36:08 -06001053 if line.startswith("VK_DEFINE"):
Chia-I Wu509a4122015-01-04 14:08:46 +08001054 begin = line.find("(") + 1
1055 end = line.find(",")
1056 # extract the object type
1057 object_lines.append(line[begin:end])
1058 if line.startswith("typedef") and line.endswith(");"):
1059 # drop leading "typedef " and trailing ");"
1060 proto_lines.append(line[8:-2])
1061
1062 # parse proto_lines to protos
1063 protos = []
1064 for line in proto_lines:
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001065 first, rest = line.split(" (VKAPI *PFN_vk")
1066 second, third = rest.split(")(")
Chia-I Wu509a4122015-01-04 14:08:46 +08001067
1068 # get the return type, no space before "*"
1069 proto_ret = "*".join([t.rstrip() for t in first.split("*")])
1070
1071 # get the name
1072 proto_name = second.strip()
1073
1074 # get the list of params
1075 param_strs = third.split(", ")
1076 params = []
1077 for s in param_strs:
1078 ty, name = s.rsplit(" ", 1)
1079
1080 # no space before "*"
1081 ty = "*".join([t.rstrip() for t in ty.split("*")])
1082 # attach [] to ty
1083 idx = name.rfind("[")
1084 if idx >= 0:
1085 ty += name[idx:]
1086 name = name[:idx]
1087
1088 params.append(Param(ty, name))
1089
1090 protos.append(Proto(proto_ret, proto_name, params))
1091
1092 # make them an extension and print
Courtney Goeltzenleuchterd8e229c2015-04-08 15:36:08 -06001093 ext = Extension("VK_CORE",
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001094 headers=["vulkan.h", "vkDbg.h"],
Chia-I Wu509a4122015-01-04 14:08:46 +08001095 objects=object_lines,
1096 protos=protos)
1097 print("core =", str(ext))
1098
1099 print("")
Jon Ashburnbacb0f52015-04-06 10:58:22 -06001100 print("typedef struct VkLayerDispatchTable_")
Chia-I Wu509a4122015-01-04 14:08:46 +08001101 print("{")
1102 for proto in ext.protos:
Courtney Goeltzenleuchterd8e229c2015-04-08 15:36:08 -06001103 print(" vk%sType %s;" % (proto.name, proto.name))
Jon Ashburnbacb0f52015-04-06 10:58:22 -06001104 print("} VkLayerDispatchTable;")
Chia-I Wu509a4122015-01-04 14:08:46 +08001105
1106if __name__ == "__main__":
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001107 parse_vk_h("include/vulkan.h")