blob: d9a077560ef72939221a89904333c3cf42adc6ca [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", "maxLayerCount"),
266 Param("size_t", "maxStringSize"),
267 Param("size_t*", "pOutLayerCount"),
268 Param("char* const*", "pOutLayers"),
269 Param("void*", "pReserved")]),
Jon Ashburnf7bcf9b2014-10-15 15:30:23 -0600270
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600271 Proto("VkResult", "GetDeviceQueue",
272 [Param("VkDevice", "device"),
Courtney Goeltzenleuchter18248e62015-03-05 18:09:39 -0700273 Param("uint32_t", "queueNodeIndex"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600274 Param("uint32_t", "queueIndex"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600275 Param("VkQueue*", "pQueue")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800276
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600277 Proto("VkResult", "QueueSubmit",
278 [Param("VkQueue", "queue"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600279 Param("uint32_t", "cmdBufferCount"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600280 Param("const VkCmdBuffer*", "pCmdBuffers"),
281 Param("VkFence", "fence")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800282
Courtney Goeltzenleuchterf68ad722015-04-16 13:38:46 -0600283 Proto("VkResult", "QueueAddMemReferences",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600284 [Param("VkQueue", "queue"),
Courtney Goeltzenleuchterf68ad722015-04-16 13:38:46 -0600285 Param("uint32_t", "count"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600286 Param("const VkDeviceMemory*", "pMems")]),
Courtney Goeltzenleuchterd3fb9552015-04-02 13:39:07 -0600287
Courtney Goeltzenleuchterf68ad722015-04-16 13:38:46 -0600288 Proto("VkResult", "QueueRemoveMemReferences",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600289 [Param("VkQueue", "queue"),
Courtney Goeltzenleuchterf68ad722015-04-16 13:38:46 -0600290 Param("uint32_t", "count"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600291 Param("const VkDeviceMemory*", "pMems")]),
Courtney Goeltzenleuchterd3fb9552015-04-02 13:39:07 -0600292
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600293 Proto("VkResult", "QueueWaitIdle",
294 [Param("VkQueue", "queue")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800295
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600296 Proto("VkResult", "DeviceWaitIdle",
297 [Param("VkDevice", "device")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800298
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600299 Proto("VkResult", "AllocMemory",
300 [Param("VkDevice", "device"),
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -0600301 Param("const VkMemoryAllocInfo*", "pAllocInfo"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600302 Param("VkDeviceMemory*", "pMem")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800303
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600304 Proto("VkResult", "FreeMemory",
Mike Stroyanb050c682015-04-17 12:36:38 -0600305 [Param("VkDevice", "device"),
306 Param("VkDeviceMemory", "mem")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800307
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600308 Proto("VkResult", "SetMemoryPriority",
Mike Stroyanb050c682015-04-17 12:36:38 -0600309 [Param("VkDevice", "device"),
310 Param("VkDeviceMemory", "mem"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600311 Param("VkMemoryPriority", "priority")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800312
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600313 Proto("VkResult", "MapMemory",
Mike Stroyanb050c682015-04-17 12:36:38 -0600314 [Param("VkDevice", "device"),
315 Param("VkDeviceMemory", "mem"),
Tony Barbour71a85122015-04-16 19:09:28 -0600316 Param("VkDeviceSize", "offset"),
317 Param("VkDeviceSize", "size"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600318 Param("VkFlags", "flags"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600319 Param("void**", "ppData")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800320
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600321 Proto("VkResult", "UnmapMemory",
Mike Stroyanb050c682015-04-17 12:36:38 -0600322 [Param("VkDevice", "device"),
323 Param("VkDeviceMemory", "mem")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800324
Tony Barbourb1250542015-04-16 19:23:13 -0600325 Proto("VkResult", "FlushMappedMemory",
Mike Stroyanb050c682015-04-17 12:36:38 -0600326 [Param("VkDevice", "device"),
327 Param("VkDeviceMemory", "mem"),
Tony Barbourb1250542015-04-16 19:23:13 -0600328 Param("VkDeviceSize", "offset"),
329 Param("VkDeviceSize", "size")]),
330
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600331 Proto("VkResult", "PinSystemMemory",
332 [Param("VkDevice", "device"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600333 Param("const void*", "pSysMem"),
334 Param("size_t", "memSize"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600335 Param("VkDeviceMemory*", "pMem")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800336
Tony Barbourd1c35722015-04-16 15:59:00 -0600337 Proto("VkResult", "GetMultiDeviceCompatibility",
338 [Param("VkPhysicalDevice", "gpu0"),
339 Param("VkPhysicalDevice", "gpu1"),
340 Param("VkPhysicalDeviceCompatibilityInfo*", "pInfo")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800341
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600342 Proto("VkResult", "OpenSharedMemory",
343 [Param("VkDevice", "device"),
344 Param("const VkMemoryOpenInfo*", "pOpenInfo"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600345 Param("VkDeviceMemory*", "pMem")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800346
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600347 Proto("VkResult", "OpenSharedSemaphore",
348 [Param("VkDevice", "device"),
349 Param("const VkSemaphoreOpenInfo*", "pOpenInfo"),
350 Param("VkSemaphore*", "pSemaphore")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800351
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600352 Proto("VkResult", "OpenPeerMemory",
353 [Param("VkDevice", "device"),
354 Param("const VkPeerMemoryOpenInfo*", "pOpenInfo"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600355 Param("VkDeviceMemory*", "pMem")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800356
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600357 Proto("VkResult", "OpenPeerImage",
358 [Param("VkDevice", "device"),
359 Param("const VkPeerImageOpenInfo*", "pOpenInfo"),
360 Param("VkImage*", "pImage"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600361 Param("VkDeviceMemory*", "pMem")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800362
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600363 Proto("VkResult", "DestroyObject",
Mike Stroyanb050c682015-04-17 12:36:38 -0600364 [Param("VkDevice", "device"),
365 Param("VkObjectType", "objType"),
366 Param("VkObject", "object")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800367
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600368 Proto("VkResult", "GetObjectInfo",
Mike Stroyanb050c682015-04-17 12:36:38 -0600369 [Param("VkDevice", "device"),
370 Param("VkObjectType", "objType"),
371 Param("VkObject", "object"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600372 Param("VkObjectInfoType", "infoType"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600373 Param("size_t*", "pDataSize"),
374 Param("void*", "pData")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800375
Mark Lobodzinski40f7f402015-04-16 11:44:05 -0500376 Proto("VkResult", "QueueBindObjectMemory",
377 [Param("VkQueue", "queue"),
Mike Stroyanb050c682015-04-17 12:36:38 -0600378 Param("VkObjectType", "objType"),
Mark Lobodzinski40f7f402015-04-16 11:44:05 -0500379 Param("VkObject", "object"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600380 Param("uint32_t", "allocationIdx"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600381 Param("VkDeviceMemory", "mem"),
382 Param("VkDeviceSize", "offset")]),
Chia-I Wu1a28fe02015-01-01 07:55:04 +0800383
Mark Lobodzinski40f7f402015-04-16 11:44:05 -0500384 Proto("VkResult", "QueueBindObjectMemoryRange",
385 [Param("VkQueue", "queue"),
Mike Stroyanb050c682015-04-17 12:36:38 -0600386 Param("VkObjectType", "objType"),
Mark Lobodzinski40f7f402015-04-16 11:44:05 -0500387 Param("VkObject", "object"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600388 Param("uint32_t", "allocationIdx"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600389 Param("VkDeviceSize", "rangeOffset"),
390 Param("VkDeviceSize", "rangeSize"),
391 Param("VkDeviceMemory", "mem"),
392 Param("VkDeviceSize", "memOffset")]),
Chia-I Wu1a28fe02015-01-01 07:55:04 +0800393
Mark Lobodzinski40f7f402015-04-16 11:44:05 -0500394 Proto("VkResult", "QueueBindImageMemoryRange",
395 [Param("VkQueue", "queue"),
396 Param("VkImage", "image"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600397 Param("uint32_t", "allocationIdx"),
Jeremy Hayesaf0d72c2015-04-15 15:20:03 -0600398 Param("const VkImageMemoryBindInfo*", "pBindInfo"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600399 Param("VkDeviceMemory", "mem"),
400 Param("VkDeviceSize", "memOffset")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800401
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600402 Proto("VkResult", "CreateFence",
403 [Param("VkDevice", "device"),
404 Param("const VkFenceCreateInfo*", "pCreateInfo"),
405 Param("VkFence*", "pFence")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800406
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600407 Proto("VkResult", "ResetFences",
408 [Param("VkDevice", "device"),
Mark Lobodzinski148e1582015-04-07 16:07:57 -0500409 Param("uint32_t", "fenceCount"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600410 Param("VkFence*", "pFences")]),
Mark Lobodzinski148e1582015-04-07 16:07:57 -0500411
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600412 Proto("VkResult", "GetFenceStatus",
Mike Stroyanb050c682015-04-17 12:36:38 -0600413 [Param("VkDevice", "device"),
414 Param("VkFence", "fence")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800415
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600416 Proto("VkResult", "WaitForFences",
417 [Param("VkDevice", "device"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600418 Param("uint32_t", "fenceCount"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600419 Param("const VkFence*", "pFences"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600420 Param("bool32_t", "waitAll"),
421 Param("uint64_t", "timeout")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800422
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600423 Proto("VkResult", "CreateSemaphore",
424 [Param("VkDevice", "device"),
425 Param("const VkSemaphoreCreateInfo*", "pCreateInfo"),
426 Param("VkSemaphore*", "pSemaphore")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800427
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600428 Proto("VkResult", "QueueSignalSemaphore",
429 [Param("VkQueue", "queue"),
430 Param("VkSemaphore", "semaphore")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800431
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600432 Proto("VkResult", "QueueWaitSemaphore",
433 [Param("VkQueue", "queue"),
434 Param("VkSemaphore", "semaphore")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800435
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600436 Proto("VkResult", "CreateEvent",
437 [Param("VkDevice", "device"),
438 Param("const VkEventCreateInfo*", "pCreateInfo"),
439 Param("VkEvent*", "pEvent")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800440
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600441 Proto("VkResult", "GetEventStatus",
Mike Stroyanb050c682015-04-17 12:36:38 -0600442 [Param("VkDevice", "device"),
443 Param("VkEvent", "event")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800444
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600445 Proto("VkResult", "SetEvent",
Mike Stroyanb050c682015-04-17 12:36:38 -0600446 [Param("VkDevice", "device"),
447 Param("VkEvent", "event")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800448
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600449 Proto("VkResult", "ResetEvent",
Mike Stroyanb050c682015-04-17 12:36:38 -0600450 [Param("VkDevice", "device"),
451 Param("VkEvent", "event")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800452
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600453 Proto("VkResult", "CreateQueryPool",
454 [Param("VkDevice", "device"),
455 Param("const VkQueryPoolCreateInfo*", "pCreateInfo"),
456 Param("VkQueryPool*", "pQueryPool")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800457
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600458 Proto("VkResult", "GetQueryPoolResults",
Mike Stroyanb050c682015-04-17 12:36:38 -0600459 [Param("VkDevice", "device"),
460 Param("VkQueryPool", "queryPool"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600461 Param("uint32_t", "startQuery"),
462 Param("uint32_t", "queryCount"),
463 Param("size_t*", "pDataSize"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600464 Param("void*", "pData"),
465 Param("VkQueryResultFlags", "flags")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800466
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600467 Proto("VkResult", "GetFormatInfo",
468 [Param("VkDevice", "device"),
469 Param("VkFormat", "format"),
470 Param("VkFormatInfoType", "infoType"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600471 Param("size_t*", "pDataSize"),
472 Param("void*", "pData")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800473
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600474 Proto("VkResult", "CreateBuffer",
475 [Param("VkDevice", "device"),
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -0600476 Param("const VkBufferCreateInfo*", "pCreateInfo"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600477 Param("VkBuffer*", "pBuffer")]),
Chia-I Wu1a28fe02015-01-01 07:55:04 +0800478
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600479 Proto("VkResult", "CreateBufferView",
480 [Param("VkDevice", "device"),
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -0600481 Param("const VkBufferViewCreateInfo*", "pCreateInfo"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600482 Param("VkBufferView*", "pView")]),
Chia-I Wu1a28fe02015-01-01 07:55:04 +0800483
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600484 Proto("VkResult", "CreateImage",
485 [Param("VkDevice", "device"),
486 Param("const VkImageCreateInfo*", "pCreateInfo"),
487 Param("VkImage*", "pImage")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800488
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600489 Proto("VkResult", "GetImageSubresourceInfo",
Mike Stroyanb050c682015-04-17 12:36:38 -0600490 [Param("VkDevice", "device"),
491 Param("VkImage", "image"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600492 Param("const VkImageSubresource*", "pSubresource"),
493 Param("VkSubresourceInfoType", "infoType"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600494 Param("size_t*", "pDataSize"),
495 Param("void*", "pData")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800496
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600497 Proto("VkResult", "CreateImageView",
498 [Param("VkDevice", "device"),
499 Param("const VkImageViewCreateInfo*", "pCreateInfo"),
500 Param("VkImageView*", "pView")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800501
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600502 Proto("VkResult", "CreateColorAttachmentView",
503 [Param("VkDevice", "device"),
504 Param("const VkColorAttachmentViewCreateInfo*", "pCreateInfo"),
505 Param("VkColorAttachmentView*", "pView")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800506
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600507 Proto("VkResult", "CreateDepthStencilView",
508 [Param("VkDevice", "device"),
509 Param("const VkDepthStencilViewCreateInfo*", "pCreateInfo"),
510 Param("VkDepthStencilView*", "pView")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800511
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600512 Proto("VkResult", "CreateShader",
513 [Param("VkDevice", "device"),
514 Param("const VkShaderCreateInfo*", "pCreateInfo"),
515 Param("VkShader*", "pShader")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800516
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600517 Proto("VkResult", "CreateGraphicsPipeline",
518 [Param("VkDevice", "device"),
519 Param("const VkGraphicsPipelineCreateInfo*", "pCreateInfo"),
520 Param("VkPipeline*", "pPipeline")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800521
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600522 Proto("VkResult", "CreateGraphicsPipelineDerivative",
523 [Param("VkDevice", "device"),
524 Param("const VkGraphicsPipelineCreateInfo*", "pCreateInfo"),
525 Param("VkPipeline", "basePipeline"),
526 Param("VkPipeline*", "pPipeline")]),
Courtney Goeltzenleuchter0d40f152015-03-25 15:37:49 -0600527
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600528 Proto("VkResult", "CreateComputePipeline",
529 [Param("VkDevice", "device"),
530 Param("const VkComputePipelineCreateInfo*", "pCreateInfo"),
531 Param("VkPipeline*", "pPipeline")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800532
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600533 Proto("VkResult", "StorePipeline",
Mike Stroyanb050c682015-04-17 12:36:38 -0600534 [Param("VkDevice", "device"),
535 Param("VkPipeline", "pipeline"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600536 Param("size_t*", "pDataSize"),
537 Param("void*", "pData")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800538
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600539 Proto("VkResult", "LoadPipeline",
540 [Param("VkDevice", "device"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600541 Param("size_t", "dataSize"),
542 Param("const void*", "pData"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600543 Param("VkPipeline*", "pPipeline")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800544
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600545 Proto("VkResult", "LoadPipelineDerivative",
546 [Param("VkDevice", "device"),
Courtney Goeltzenleuchter0d40f152015-03-25 15:37:49 -0600547 Param("size_t", "dataSize"),
548 Param("const void*", "pData"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600549 Param("VkPipeline", "basePipeline"),
550 Param("VkPipeline*", "pPipeline")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800551
Mark Lobodzinski0fadf5f2015-04-17 14:11:39 -0500552 Proto("VkResult", "CreatePipelineLayout",
553 [Param("VkDevice", "device"),
554 Param("const VkPipelineLayoutCreateInfo*", "pCreateInfo"),
555 Param("VkPipelineLayout*", "pPipelineLayout")]),
556
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600557 Proto("VkResult", "CreateSampler",
558 [Param("VkDevice", "device"),
559 Param("const VkSamplerCreateInfo*", "pCreateInfo"),
560 Param("VkSampler*", "pSampler")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800561
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600562 Proto("VkResult", "CreateDescriptorSetLayout",
563 [Param("VkDevice", "device"),
564 Param("const VkDescriptorSetLayoutCreateInfo*", "pCreateInfo"),
565 Param("VkDescriptorSetLayout*", "pSetLayout")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800566
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600567 Proto("VkResult", "BeginDescriptorPoolUpdate",
568 [Param("VkDevice", "device"),
569 Param("VkDescriptorUpdateMode", "updateMode")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800570
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600571 Proto("VkResult", "EndDescriptorPoolUpdate",
572 [Param("VkDevice", "device"),
573 Param("VkCmdBuffer", "cmd")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800574
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600575 Proto("VkResult", "CreateDescriptorPool",
576 [Param("VkDevice", "device"),
577 Param("VkDescriptorPoolUsage", "poolUsage"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600578 Param("uint32_t", "maxSets"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600579 Param("const VkDescriptorPoolCreateInfo*", "pCreateInfo"),
580 Param("VkDescriptorPool*", "pDescriptorPool")]),
Chia-I Wu11078b02015-01-04 16:27:24 +0800581
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600582 Proto("VkResult", "ResetDescriptorPool",
Mike Stroyanb050c682015-04-17 12:36:38 -0600583 [Param("VkDevice", "device"),
584 Param("VkDescriptorPool", "descriptorPool")]),
Chia-I Wu11078b02015-01-04 16:27:24 +0800585
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600586 Proto("VkResult", "AllocDescriptorSets",
Mike Stroyanb050c682015-04-17 12:36:38 -0600587 [Param("VkDevice", "device"),
588 Param("VkDescriptorPool", "descriptorPool"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600589 Param("VkDescriptorSetUsage", "setUsage"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600590 Param("uint32_t", "count"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600591 Param("const VkDescriptorSetLayout*", "pSetLayouts"),
592 Param("VkDescriptorSet*", "pDescriptorSets"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600593 Param("uint32_t*", "pCount")]),
Chia-I Wu11078b02015-01-04 16:27:24 +0800594
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600595 Proto("void", "ClearDescriptorSets",
Mike Stroyanb050c682015-04-17 12:36:38 -0600596 [Param("VkDevice", "device"),
597 Param("VkDescriptorPool", "descriptorPool"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600598 Param("uint32_t", "count"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600599 Param("const VkDescriptorSet*", "pDescriptorSets")]),
Chia-I Wu11078b02015-01-04 16:27:24 +0800600
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600601 Proto("void", "UpdateDescriptors",
Mike Stroyanb050c682015-04-17 12:36:38 -0600602 [Param("VkDevice", "device"),
603 Param("VkDescriptorSet", "descriptorSet"),
Chia-I Wu41126e52015-03-26 15:27:55 +0800604 Param("uint32_t", "updateCount"),
605 Param("const void**", "ppUpdateArray")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800606
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600607 Proto("VkResult", "CreateDynamicViewportState",
608 [Param("VkDevice", "device"),
609 Param("const VkDynamicVpStateCreateInfo*", "pCreateInfo"),
Courtney Goeltzenleuchter502744a2015-04-10 16:24:50 -0600610 Param("VkDynamicVpState*", "pState")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800611
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600612 Proto("VkResult", "CreateDynamicRasterState",
613 [Param("VkDevice", "device"),
614 Param("const VkDynamicRsStateCreateInfo*", "pCreateInfo"),
Courtney Goeltzenleuchter502744a2015-04-10 16:24:50 -0600615 Param("VkDynamicRsState*", "pState")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800616
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600617 Proto("VkResult", "CreateDynamicColorBlendState",
618 [Param("VkDevice", "device"),
619 Param("const VkDynamicCbStateCreateInfo*", "pCreateInfo"),
Courtney Goeltzenleuchter502744a2015-04-10 16:24:50 -0600620 Param("VkDynamicCbState*", "pState")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800621
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600622 Proto("VkResult", "CreateDynamicDepthStencilState",
623 [Param("VkDevice", "device"),
624 Param("const VkDynamicDsStateCreateInfo*", "pCreateInfo"),
Courtney Goeltzenleuchter502744a2015-04-10 16:24:50 -0600625 Param("VkDynamicDsState*", "pState")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800626
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600627 Proto("VkResult", "CreateCommandBuffer",
628 [Param("VkDevice", "device"),
629 Param("const VkCmdBufferCreateInfo*", "pCreateInfo"),
630 Param("VkCmdBuffer*", "pCmdBuffer")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800631
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600632 Proto("VkResult", "BeginCommandBuffer",
633 [Param("VkCmdBuffer", "cmdBuffer"),
634 Param("const VkCmdBufferBeginInfo*", "pBeginInfo")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800635
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600636 Proto("VkResult", "EndCommandBuffer",
637 [Param("VkCmdBuffer", "cmdBuffer")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800638
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600639 Proto("VkResult", "ResetCommandBuffer",
640 [Param("VkCmdBuffer", "cmdBuffer")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800641
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600642 Proto("void", "CmdBindPipeline",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600643 [Param("VkCmdBuffer", "cmdBuffer"),
644 Param("VkPipelineBindPoint", "pipelineBindPoint"),
645 Param("VkPipeline", "pipeline")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800646
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600647 Proto("void", "CmdBindDynamicStateObject",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600648 [Param("VkCmdBuffer", "cmdBuffer"),
649 Param("VkStateBindPoint", "stateBindPoint"),
650 Param("VkDynamicStateObject", "state")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800651
Chia-I Wu53f07d72015-03-28 15:23:55 +0800652 Proto("void", "CmdBindDescriptorSets",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600653 [Param("VkCmdBuffer", "cmdBuffer"),
654 Param("VkPipelineBindPoint", "pipelineBindPoint"),
Cody Northropd4c1a502015-04-16 13:41:56 -0600655 Param("uint32_t", "firstSet"),
656 Param("uint32_t", "setCount"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600657 Param("const VkDescriptorSet*", "pDescriptorSets"),
Cody Northropd4c1a502015-04-16 13:41:56 -0600658 Param("uint32_t", "dynamicOffsetCount"),
659 Param("const uint32_t*", "pDynamicOffsets")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800660
Courtney Goeltzenleuchterf68ad722015-04-16 13:38:46 -0600661 Proto("void", "CmdBindVertexBuffers",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600662 [Param("VkCmdBuffer", "cmdBuffer"),
Courtney Goeltzenleuchterf68ad722015-04-16 13:38:46 -0600663 Param("uint32_t", "startBinding"),
664 Param("uint32_t", "bindingCount"),
665 Param("const VkBuffer*", "pBuffers"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600666 Param("const VkDeviceSize*", "pOffsets")]),
667
Chia-I Wu7a42e122014-11-08 10:48:20 +0800668
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600669 Proto("void", "CmdBindIndexBuffer",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600670 [Param("VkCmdBuffer", "cmdBuffer"),
671 Param("VkBuffer", "buffer"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600672 Param("VkDeviceSize", "offset"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600673 Param("VkIndexType", "indexType")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800674
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600675 Proto("void", "CmdDraw",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600676 [Param("VkCmdBuffer", "cmdBuffer"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600677 Param("uint32_t", "firstVertex"),
678 Param("uint32_t", "vertexCount"),
679 Param("uint32_t", "firstInstance"),
680 Param("uint32_t", "instanceCount")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800681
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600682 Proto("void", "CmdDrawIndexed",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600683 [Param("VkCmdBuffer", "cmdBuffer"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600684 Param("uint32_t", "firstIndex"),
685 Param("uint32_t", "indexCount"),
686 Param("int32_t", "vertexOffset"),
687 Param("uint32_t", "firstInstance"),
688 Param("uint32_t", "instanceCount")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800689
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600690 Proto("void", "CmdDrawIndirect",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600691 [Param("VkCmdBuffer", "cmdBuffer"),
692 Param("VkBuffer", "buffer"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600693 Param("VkDeviceSize", "offset"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600694 Param("uint32_t", "count"),
695 Param("uint32_t", "stride")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800696
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600697 Proto("void", "CmdDrawIndexedIndirect",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600698 [Param("VkCmdBuffer", "cmdBuffer"),
699 Param("VkBuffer", "buffer"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600700 Param("VkDeviceSize", "offset"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600701 Param("uint32_t", "count"),
702 Param("uint32_t", "stride")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800703
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600704 Proto("void", "CmdDispatch",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600705 [Param("VkCmdBuffer", "cmdBuffer"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600706 Param("uint32_t", "x"),
707 Param("uint32_t", "y"),
708 Param("uint32_t", "z")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800709
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600710 Proto("void", "CmdDispatchIndirect",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600711 [Param("VkCmdBuffer", "cmdBuffer"),
712 Param("VkBuffer", "buffer"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600713 Param("VkDeviceSize", "offset")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800714
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600715 Proto("void", "CmdCopyBuffer",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600716 [Param("VkCmdBuffer", "cmdBuffer"),
717 Param("VkBuffer", "srcBuffer"),
718 Param("VkBuffer", "destBuffer"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600719 Param("uint32_t", "regionCount"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600720 Param("const VkBufferCopy*", "pRegions")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800721
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600722 Proto("void", "CmdCopyImage",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600723 [Param("VkCmdBuffer", "cmdBuffer"),
724 Param("VkImage", "srcImage"),
725 Param("VkImageLayout", "srcImageLayout"),
726 Param("VkImage", "destImage"),
727 Param("VkImageLayout", "destImageLayout"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600728 Param("uint32_t", "regionCount"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600729 Param("const VkImageCopy*", "pRegions")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800730
Courtney Goeltzenleuchter89299fa2015-03-08 17:02:18 -0600731 Proto("void", "CmdBlitImage",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600732 [Param("VkCmdBuffer", "cmdBuffer"),
733 Param("VkImage", "srcImage"),
734 Param("VkImageLayout", "srcImageLayout"),
735 Param("VkImage", "destImage"),
736 Param("VkImageLayout", "destImageLayout"),
Courtney Goeltzenleuchter89299fa2015-03-08 17:02:18 -0600737 Param("uint32_t", "regionCount"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600738 Param("const VkImageBlit*", "pRegions")]),
Courtney Goeltzenleuchter89299fa2015-03-08 17:02:18 -0600739
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600740 Proto("void", "CmdCopyBufferToImage",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600741 [Param("VkCmdBuffer", "cmdBuffer"),
742 Param("VkBuffer", "srcBuffer"),
743 Param("VkImage", "destImage"),
744 Param("VkImageLayout", "destImageLayout"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600745 Param("uint32_t", "regionCount"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600746 Param("const VkBufferImageCopy*", "pRegions")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800747
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600748 Proto("void", "CmdCopyImageToBuffer",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600749 [Param("VkCmdBuffer", "cmdBuffer"),
750 Param("VkImage", "srcImage"),
751 Param("VkImageLayout", "srcImageLayout"),
752 Param("VkBuffer", "destBuffer"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600753 Param("uint32_t", "regionCount"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600754 Param("const VkBufferImageCopy*", "pRegions")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800755
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600756 Proto("void", "CmdCloneImageData",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600757 [Param("VkCmdBuffer", "cmdBuffer"),
758 Param("VkImage", "srcImage"),
759 Param("VkImageLayout", "srcImageLayout"),
760 Param("VkImage", "destImage"),
761 Param("VkImageLayout", "destImageLayout")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800762
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600763 Proto("void", "CmdUpdateBuffer",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600764 [Param("VkCmdBuffer", "cmdBuffer"),
765 Param("VkBuffer", "destBuffer"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600766 Param("VkDeviceSize", "destOffset"),
767 Param("VkDeviceSize", "dataSize"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600768 Param("const uint32_t*", "pData")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800769
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600770 Proto("void", "CmdFillBuffer",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600771 [Param("VkCmdBuffer", "cmdBuffer"),
772 Param("VkBuffer", "destBuffer"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600773 Param("VkDeviceSize", "destOffset"),
774 Param("VkDeviceSize", "fillSize"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600775 Param("uint32_t", "data")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800776
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600777 Proto("void", "CmdClearColorImage",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600778 [Param("VkCmdBuffer", "cmdBuffer"),
779 Param("VkImage", "image"),
780 Param("VkImageLayout", "imageLayout"),
Mike Stroyanb050c682015-04-17 12:36:38 -0600781 Param("VkClearColor", "color"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600782 Param("uint32_t", "rangeCount"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600783 Param("const VkImageSubresourceRange*", "pRanges")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800784
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600785 Proto("void", "CmdClearDepthStencil",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600786 [Param("VkCmdBuffer", "cmdBuffer"),
787 Param("VkImage", "image"),
788 Param("VkImageLayout", "imageLayout"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600789 Param("float", "depth"),
790 Param("uint32_t", "stencil"),
791 Param("uint32_t", "rangeCount"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600792 Param("const VkImageSubresourceRange*", "pRanges")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800793
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600794 Proto("void", "CmdResolveImage",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600795 [Param("VkCmdBuffer", "cmdBuffer"),
796 Param("VkImage", "srcImage"),
797 Param("VkImageLayout", "srcImageLayout"),
798 Param("VkImage", "destImage"),
799 Param("VkImageLayout", "destImageLayout"),
Tony Barbour6865d4a2015-04-13 15:02:52 -0600800 Param("uint32_t", "regionCount"),
801 Param("const VkImageResolve*", "pRegions")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800802
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600803 Proto("void", "CmdSetEvent",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600804 [Param("VkCmdBuffer", "cmdBuffer"),
805 Param("VkEvent", "event"),
806 Param("VkPipeEvent", "pipeEvent")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800807
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600808 Proto("void", "CmdResetEvent",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600809 [Param("VkCmdBuffer", "cmdBuffer"),
810 Param("VkEvent", "event"),
811 Param("VkPipeEvent", "pipeEvent")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800812
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600813 Proto("void", "CmdWaitEvents",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600814 [Param("VkCmdBuffer", "cmdBuffer"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600815 Param("VkWaitEvent", "waitEvent"),
816 Param("uint32_t", "eventCount"),
817 Param("const VkEvent*", "pEvents"),
818 Param("uint32_t", "memBarrierCount"),
819 Param("const void**", "ppMemBarriers")]),
Mike Stroyanfb80d5f2014-12-04 11:08:39 +0000820
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600821 Proto("void", "CmdPipelineBarrier",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600822 [Param("VkCmdBuffer", "cmdBuffer"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600823 Param("VkWaitEvent", "waitEvent"),
824 Param("uint32_t", "pipeEventCount"),
825 Param("const VkPipeEvent*", "pPipeEvents"),
826 Param("uint32_t", "memBarrierCount"),
827 Param("const void**", "ppMemBarriers")]),
Mike Stroyanfb80d5f2014-12-04 11:08:39 +0000828
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600829 Proto("void", "CmdBeginQuery",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600830 [Param("VkCmdBuffer", "cmdBuffer"),
831 Param("VkQueryPool", "queryPool"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600832 Param("uint32_t", "slot"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600833 Param("VkFlags", "flags")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800834
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600835 Proto("void", "CmdEndQuery",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600836 [Param("VkCmdBuffer", "cmdBuffer"),
837 Param("VkQueryPool", "queryPool"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600838 Param("uint32_t", "slot")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800839
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600840 Proto("void", "CmdResetQueryPool",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600841 [Param("VkCmdBuffer", "cmdBuffer"),
842 Param("VkQueryPool", "queryPool"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600843 Param("uint32_t", "startQuery"),
844 Param("uint32_t", "queryCount")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800845
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600846 Proto("void", "CmdWriteTimestamp",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600847 [Param("VkCmdBuffer", "cmdBuffer"),
848 Param("VkTimestampType", "timestampType"),
849 Param("VkBuffer", "destBuffer"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600850 Param("VkDeviceSize", "destOffset")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800851
Courtney Goeltzenleuchter1dbc8e22015-04-15 18:21:13 -0600852 Proto("void", "CmdCopyQueryPoolResults",
853 [Param("VkCmdBuffer", "cmdBuffer"),
854 Param("VkQueryPool", "queryPool"),
855 Param("uint32_t", "startQuery"),
856 Param("uint32_t", "queryCount"),
857 Param("VkBuffer", "destBuffer"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600858 Param("VkDeviceSize", "destOffset"),
859 Param("VkDeviceSize", "destStride"),
Courtney Goeltzenleuchter1dbc8e22015-04-15 18:21:13 -0600860 Param("VkFlags", "flags")]),
861
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600862 Proto("void", "CmdInitAtomicCounters",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600863 [Param("VkCmdBuffer", "cmdBuffer"),
864 Param("VkPipelineBindPoint", "pipelineBindPoint"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600865 Param("uint32_t", "startCounter"),
866 Param("uint32_t", "counterCount"),
867 Param("const uint32_t*", "pData")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800868
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600869 Proto("void", "CmdLoadAtomicCounters",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600870 [Param("VkCmdBuffer", "cmdBuffer"),
871 Param("VkPipelineBindPoint", "pipelineBindPoint"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600872 Param("uint32_t", "startCounter"),
873 Param("uint32_t", "counterCount"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600874 Param("VkBuffer", "srcBuffer"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600875 Param("VkDeviceSize", "srcOffset")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800876
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600877 Proto("void", "CmdSaveAtomicCounters",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600878 [Param("VkCmdBuffer", "cmdBuffer"),
879 Param("VkPipelineBindPoint", "pipelineBindPoint"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600880 Param("uint32_t", "startCounter"),
881 Param("uint32_t", "counterCount"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600882 Param("VkBuffer", "destBuffer"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600883 Param("VkDeviceSize", "destOffset")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800884
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600885 Proto("VkResult", "CreateFramebuffer",
886 [Param("VkDevice", "device"),
887 Param("const VkFramebufferCreateInfo*", "pCreateInfo"),
888 Param("VkFramebuffer*", "pFramebuffer")]),
Jeremy Hayesd65ae082015-01-14 16:17:08 -0700889
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600890 Proto("VkResult", "CreateRenderPass",
891 [Param("VkDevice", "device"),
892 Param("const VkRenderPassCreateInfo*", "pCreateInfo"),
893 Param("VkRenderPass*", "pRenderPass")]),
Jeremy Hayesd65ae082015-01-14 16:17:08 -0700894
Jon Ashburne13f1982015-02-02 09:58:11 -0700895 Proto("void", "CmdBeginRenderPass",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600896 [Param("VkCmdBuffer", "cmdBuffer"),
897 Param("const VkRenderPassBegin*", "pRenderPassBegin")]),
Jon Ashburne13f1982015-02-02 09:58:11 -0700898
899 Proto("void", "CmdEndRenderPass",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600900 [Param("VkCmdBuffer", "cmdBuffer"),
901 Param("VkRenderPass", "renderPass")]),
Jon Ashburne13f1982015-02-02 09:58:11 -0700902
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600903 Proto("VkResult", "DbgSetValidationLevel",
904 [Param("VkDevice", "device"),
905 Param("VkValidationLevel", "validationLevel")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800906
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600907 Proto("VkResult", "DbgRegisterMsgCallback",
908 [Param("VkInstance", "instance"),
Courtney Goeltzenleuchterd8e229c2015-04-08 15:36:08 -0600909 Param("VK_DBG_MSG_CALLBACK_FUNCTION", "pfnMsgCallback"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600910 Param("void*", "pUserData")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800911
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600912 Proto("VkResult", "DbgUnregisterMsgCallback",
913 [Param("VkInstance", "instance"),
Courtney Goeltzenleuchterd8e229c2015-04-08 15:36:08 -0600914 Param("VK_DBG_MSG_CALLBACK_FUNCTION", "pfnMsgCallback")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800915
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600916 Proto("VkResult", "DbgSetMessageFilter",
917 [Param("VkDevice", "device"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600918 Param("int32_t", "msgCode"),
Courtney Goeltzenleuchterd8e229c2015-04-08 15:36:08 -0600919 Param("VK_DBG_MSG_FILTER", "filter")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800920
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600921 Proto("VkResult", "DbgSetObjectTag",
Mike Stroyanb050c682015-04-17 12:36:38 -0600922 [Param("VkDevice", "device"),
923 Param("VkObject", "object"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600924 Param("size_t", "tagSize"),
925 Param("const void*", "pTag")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800926
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600927 Proto("VkResult", "DbgSetGlobalOption",
928 [Param("VkInstance", "instance"),
Courtney Goeltzenleuchterd8e229c2015-04-08 15:36:08 -0600929 Param("VK_DBG_GLOBAL_OPTION", "dbgOption"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600930 Param("size_t", "dataSize"),
931 Param("const void*", "pData")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800932
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600933 Proto("VkResult", "DbgSetDeviceOption",
934 [Param("VkDevice", "device"),
Courtney Goeltzenleuchterd8e229c2015-04-08 15:36:08 -0600935 Param("VK_DBG_DEVICE_OPTION", "dbgOption"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600936 Param("size_t", "dataSize"),
937 Param("const void*", "pData")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800938
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600939 Proto("void", "CmdDbgMarkerBegin",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600940 [Param("VkCmdBuffer", "cmdBuffer"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600941 Param("const char*", "pMarker")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800942
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600943 Proto("void", "CmdDbgMarkerEnd",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600944 [Param("VkCmdBuffer", "cmdBuffer")]),
Chia-I Wue442dc32015-01-01 09:31:15 +0800945 ],
Chia-I Wufb2559d2014-08-01 11:19:52 +0800946)
947
Chia-I Wuf8693382015-04-16 22:02:10 +0800948wsi_lunarg = Extension(
949 name="VK_WSI_LunarG",
950 headers=["vk_wsi_lunarg.h"],
951 objects=[
952 "VkDisplayWSI",
953 "VkSwapChainWSI",
954 ],
Chia-I Wue442dc32015-01-01 09:31:15 +0800955 protos=[
Chia-I Wuf8693382015-04-16 22:02:10 +0800956 Proto("VkResult", "GetDisplayInfoWSI",
957 [Param("VkDisplayWSI", "display"),
958 Param("VkDisplayInfoTypeWSI", "infoType"),
959 Param("size_t*", "pDataSize"),
960 Param("void*", "pData")]),
Chia-I Wu6bdf0192014-09-13 13:36:06 +0800961
Chia-I Wuf8693382015-04-16 22:02:10 +0800962 Proto("VkResult", "CreateSwapChainWSI",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600963 [Param("VkDevice", "device"),
Chia-I Wuf8693382015-04-16 22:02:10 +0800964 Param("const VkSwapChainCreateInfoWSI*", "pCreateInfo"),
965 Param("VkSwapChainWSI*", "pSwapChain")]),
Chia-I Wu6dee8b82014-09-23 10:37:23 +0800966
Chia-I Wuf8693382015-04-16 22:02:10 +0800967 Proto("VkResult", "DestroySwapChainWSI",
968 [Param("VkSwapChainWSI", "swapChain")]),
Chia-I Wu6dee8b82014-09-23 10:37:23 +0800969
Chia-I Wuf8693382015-04-16 22:02:10 +0800970 Proto("VkResult", "GetSwapChainInfoWSI",
971 [Param("VkSwapChainWSI", "swapChain"),
972 Param("VkSwapChainInfoTypeWSI", "infoType"),
973 Param("size_t*", "pDataSize"),
974 Param("void*", "pData")]),
975
976 Proto("VkResult", "QueuePresentWSI",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600977 [Param("VkQueue", "queue"),
Chia-I Wuf8693382015-04-16 22:02:10 +0800978 Param("const VkPresentInfoWSI*", "pPresentInfo")]),
Chia-I Wue442dc32015-01-01 09:31:15 +0800979 ],
Chia-I Wu6dee8b82014-09-23 10:37:23 +0800980)
981
Chia-I Wuf8693382015-04-16 22:02:10 +0800982extensions = [core, wsi_lunarg]
Chia-I Wuc4f24e82015-01-01 08:46:31 +0800983
Tobin Ehlis7e65d752015-01-15 17:51:52 -0700984object_root_list = [
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600985 "VkInstance",
Tony Barbourd1c35722015-04-16 15:59:00 -0600986 "VkPhysicalDevice",
Chia-I Wuf8693382015-04-16 22:02:10 +0800987 "VkDisplayWSI",
988 "VkSwapChainWSI",
Tobin Ehlis7e65d752015-01-15 17:51:52 -0700989]
990
991object_base_list = [
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600992 "VkDevice",
993 "VkQueue",
Tony Barbourd1c35722015-04-16 15:59:00 -0600994 "VkDeviceMemory",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600995 "VkObject"
Tobin Ehlis7e65d752015-01-15 17:51:52 -0700996]
997
998object_list = [
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600999 "VkBuffer",
1000 "VkBufferView",
1001 "VkImage",
1002 "VkImageView",
1003 "VkColorAttachmentView",
1004 "VkDepthStencilView",
1005 "VkShader",
1006 "VkPipeline",
Mark Lobodzinski0fadf5f2015-04-17 14:11:39 -05001007 "VkPipelineLayout",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001008 "VkSampler",
1009 "VkDescriptorSet",
1010 "VkDescriptorSetLayout",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001011 "VkDescriptorPool",
1012 "VkDynamicStateObject",
1013 "VkCmdBuffer",
1014 "VkFence",
1015 "VkSemaphore",
1016 "VkEvent",
1017 "VkQueryPool",
1018 "VkFramebuffer",
1019 "VkRenderPass"
Tobin Ehlis7e65d752015-01-15 17:51:52 -07001020]
1021
1022object_dynamic_state_list = [
Courtney Goeltzenleuchter502744a2015-04-10 16:24:50 -06001023 "VkDynamicVpState",
1024 "VkDynamicRsState",
1025 "VkDynamicCbState",
1026 "VkDynamicDsState"
Tobin Ehlis7e65d752015-01-15 17:51:52 -07001027]
1028
1029object_type_list = object_root_list + object_base_list + object_list + object_dynamic_state_list
1030
Mike Stroyanb050c682015-04-17 12:36:38 -06001031object_parent_list = ["VkObject", "VkDynamicStateObject"]
Tobin Ehlis7e65d752015-01-15 17:51:52 -07001032
Chia-I Wuc4f24e82015-01-01 08:46:31 +08001033headers = []
Chia-I Wue86d8ab2015-01-04 14:46:22 +08001034objects = []
Chia-I Wuc4f24e82015-01-01 08:46:31 +08001035protos = []
1036for ext in extensions:
1037 headers.extend(ext.headers)
Chia-I Wue86d8ab2015-01-04 14:46:22 +08001038 objects.extend(ext.objects)
Chia-I Wuc4f24e82015-01-01 08:46:31 +08001039 protos.extend(ext.protos)
Chia-I Wu6dee8b82014-09-23 10:37:23 +08001040
Chia-I Wu9a4ceb12015-01-01 14:45:58 +08001041proto_names = [proto.name for proto in protos]
Chia-I Wu900a2572014-08-01 14:44:16 +08001042
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001043def parse_vk_h(filename):
Chia-I Wu509a4122015-01-04 14:08:46 +08001044 # read object and protoype typedefs
1045 object_lines = []
1046 proto_lines = []
1047 with open(filename, "r") as fp:
1048 for line in fp:
1049 line = line.strip()
Courtney Goeltzenleuchterd8e229c2015-04-08 15:36:08 -06001050 if line.startswith("VK_DEFINE"):
Chia-I Wu509a4122015-01-04 14:08:46 +08001051 begin = line.find("(") + 1
1052 end = line.find(",")
1053 # extract the object type
1054 object_lines.append(line[begin:end])
1055 if line.startswith("typedef") and line.endswith(");"):
1056 # drop leading "typedef " and trailing ");"
1057 proto_lines.append(line[8:-2])
1058
1059 # parse proto_lines to protos
1060 protos = []
1061 for line in proto_lines:
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001062 first, rest = line.split(" (VKAPI *PFN_vk")
1063 second, third = rest.split(")(")
Chia-I Wu509a4122015-01-04 14:08:46 +08001064
1065 # get the return type, no space before "*"
1066 proto_ret = "*".join([t.rstrip() for t in first.split("*")])
1067
1068 # get the name
1069 proto_name = second.strip()
1070
1071 # get the list of params
1072 param_strs = third.split(", ")
1073 params = []
1074 for s in param_strs:
1075 ty, name = s.rsplit(" ", 1)
1076
1077 # no space before "*"
1078 ty = "*".join([t.rstrip() for t in ty.split("*")])
1079 # attach [] to ty
1080 idx = name.rfind("[")
1081 if idx >= 0:
1082 ty += name[idx:]
1083 name = name[:idx]
1084
1085 params.append(Param(ty, name))
1086
1087 protos.append(Proto(proto_ret, proto_name, params))
1088
1089 # make them an extension and print
Courtney Goeltzenleuchterd8e229c2015-04-08 15:36:08 -06001090 ext = Extension("VK_CORE",
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001091 headers=["vulkan.h", "vkDbg.h"],
Chia-I Wu509a4122015-01-04 14:08:46 +08001092 objects=object_lines,
1093 protos=protos)
1094 print("core =", str(ext))
1095
1096 print("")
Jon Ashburnbacb0f52015-04-06 10:58:22 -06001097 print("typedef struct VkLayerDispatchTable_")
Chia-I Wu509a4122015-01-04 14:08:46 +08001098 print("{")
1099 for proto in ext.protos:
Courtney Goeltzenleuchterd8e229c2015-04-08 15:36:08 -06001100 print(" vk%sType %s;" % (proto.name, proto.name))
Jon Ashburnbacb0f52015-04-06 10:58:22 -06001101 print("} VkLayerDispatchTable;")
Chia-I Wu509a4122015-01-04 14:08:46 +08001102
1103if __name__ == "__main__":
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001104 parse_vk_h("include/vulkan.h")