blob: dbefac96b84068fad6cef67b88ec3d9791a09c3e [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 Goeltzenleuchterf579fa62015-06-10 17:39:03 -0600184 headers=["vulkan.h", "vk_debug_report_lunarg.h"],
Chia-I Wue86d8ab2015-01-04 14:46:22 +0800185 objects=[
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600186 "VkInstance",
Tony Barbourd1c35722015-04-16 15:59:00 -0600187 "VkPhysicalDevice",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600188 "VkDevice",
189 "VkQueue",
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600190 "VkCmdBuffer",
191 "VkFence",
Tony Barbourd1c35722015-04-16 15:59:00 -0600192 "VkDeviceMemory",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600193 "VkBuffer",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600194 "VkImage",
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600195 "VkSemaphore",
196 "VkEvent",
197 "VkQueryPool",
198 "VkBufferView",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600199 "VkImageView",
Chia-I Wu08accc62015-07-07 11:50:03 +0800200 "VkAttachmentView",
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600201 "VkShaderModule",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600202 "VkShader",
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600203 "VkPipelineLayout",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600204 "VkPipeline",
Jon Ashburnc669cc62015-07-09 15:02:25 -0600205 "VkPipelineCache",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600206 "VkSampler",
207 "VkDescriptorSet",
208 "VkDescriptorSetLayout",
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600209 "VkSampler",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600210 "VkDescriptorPool",
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600211 "VkDescriptorSet",
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600212 "VkDynamicViewportState",
213 "VkDynamicRasterState",
214 "VkDynamicColorBlendState",
215 "VkDynamicDepthStencilState",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600216 "VkRenderPass",
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600217 "VkFramebuffer",
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
Chris Forbesbc0bb772015-06-21 22:55:02 +1200232 Proto("VkResult", "GetPhysicalDeviceFeatures",
233 [Param("VkPhysicalDevice", "physicalDevice"),
234 Param("VkPhysicalDeviceFeatures*", "pFeatures")]),
235
236 Proto("VkResult", "GetPhysicalDeviceFormatInfo",
237 [Param("VkPhysicalDevice", "physicalDevice"),
238 Param("VkFormat", "format"),
239 Param("VkFormatProperties*", "pFormatInfo")]),
240
241 Proto("VkResult", "GetPhysicalDeviceLimits",
242 [Param("VkPhysicalDevice", "physicalDevice"),
243 Param("VkPhysicalDeviceLimits*", "pLimits")]),
244
Jon Ashburnb0fbe912015-05-06 10:15:07 -0600245 Proto("void*", "GetInstanceProcAddr",
246 [Param("VkInstance", "instance"),
247 Param("const char*", "pName")]),
248
Jon Ashburn8d1b0b52015-05-18 13:20:15 -0600249 Proto("void*", "GetDeviceProcAddr",
250 [Param("VkDevice", "device"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600251 Param("const char*", "pName")]),
Chia-I Wuf2ffc522015-01-04 14:51:06 +0800252
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600253 Proto("VkResult", "CreateDevice",
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600254 [Param("VkPhysicalDevice", "physicalDevice"),
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -0600255 Param("const VkDeviceCreateInfo*", "pCreateInfo"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600256 Param("VkDevice*", "pDevice")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800257
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600258 Proto("VkResult", "DestroyDevice",
259 [Param("VkDevice", "device")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800260
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600261 Proto("VkResult", "GetPhysicalDeviceProperties",
262 [Param("VkPhysicalDevice", "physicalDevice"),
263 Param("VkPhysicalDeviceProperties*", "pProperties")]),
Tony Barbour59a47322015-06-24 16:06:58 -0600264
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600265 Proto("VkResult", "GetPhysicalDevicePerformance",
266 [Param("VkPhysicalDevice", "physicalDevice"),
267 Param("VkPhysicalDevicePerformance*", "pPerformance")]),
268
269 Proto("VkResult", "GetPhysicalDeviceQueueCount",
270 [Param("VkPhysicalDevice", "physicalDevice"),
271 Param("uint32_t*", "pCount")]),
272
273 Proto("VkResult", "GetPhysicalDeviceQueueProperties",
274 [Param("VkPhysicalDevice", "physicalDevice"),
275 Param("uint32_t", "count"),
276 Param("VkPhysicalDeviceQueueProperties*", "pQueueProperties")]),
277
278 Proto("VkResult", "GetPhysicalDeviceMemoryProperties",
279 [Param("VkPhysicalDevice", "physicalDevice"),
280 Param("VkPhysicalDeviceMemoryProperties*", "pMemoryProperties")]),
Tony Barbour59a47322015-06-24 16:06:58 -0600281
282 Proto("VkResult", "GetGlobalExtensionProperties",
Courtney Goeltzenleuchter110fdf92015-06-29 15:39:26 -0600283 [Param("const char*", "pLayerName"),
284 Param("uint32_t*", "pCount"),
Tony Barbour59a47322015-06-24 16:06:58 -0600285 Param("VkExtensionProperties*", "pProperties")]),
286
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600287 Proto("VkResult", "GetPhysicalDeviceExtensionProperties",
288 [Param("VkPhysicalDevice", "physicalDevice"),
289 Param("const char*", "pLayerName"),
290 Param("uint32_t", "*pCount"),
291 Param("VkExtensionProperties*", "pProperties")]),
292
Courtney Goeltzenleuchter110fdf92015-06-29 15:39:26 -0600293 Proto("VkResult", "GetGlobalLayerProperties",
294 [Param("uint32_t*", "pCount"),
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600295 Param("VkLayerProperties*", "pProperties")]),
296
297 Proto("VkResult", "GetPhysicalDeviceLayerProperties",
298 [Param("VkPhysicalDevice", "physicalDevice"),
299 Param("uint32_t", "*pCount"),
300 Param("VkLayerProperties*", "pProperties")]),
Tobin Ehlis01939012015-04-16 12:51:37 -0600301
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600302 Proto("VkResult", "GetDeviceQueue",
303 [Param("VkDevice", "device"),
Courtney Goeltzenleuchter18248e62015-03-05 18:09:39 -0700304 Param("uint32_t", "queueNodeIndex"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600305 Param("uint32_t", "queueIndex"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600306 Param("VkQueue*", "pQueue")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800307
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600308 Proto("VkResult", "QueueSubmit",
309 [Param("VkQueue", "queue"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600310 Param("uint32_t", "cmdBufferCount"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600311 Param("const VkCmdBuffer*", "pCmdBuffers"),
312 Param("VkFence", "fence")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800313
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600314 Proto("VkResult", "QueueWaitIdle",
315 [Param("VkQueue", "queue")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800316
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600317 Proto("VkResult", "DeviceWaitIdle",
318 [Param("VkDevice", "device")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800319
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600320 Proto("VkResult", "AllocMemory",
321 [Param("VkDevice", "device"),
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -0600322 Param("const VkMemoryAllocInfo*", "pAllocInfo"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600323 Param("VkDeviceMemory*", "pMem")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800324
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600325 Proto("VkResult", "FreeMemory",
Mike Stroyanb050c682015-04-17 12:36:38 -0600326 [Param("VkDevice", "device"),
327 Param("VkDeviceMemory", "mem")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800328
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600329 Proto("VkResult", "MapMemory",
Mike Stroyanb050c682015-04-17 12:36:38 -0600330 [Param("VkDevice", "device"),
331 Param("VkDeviceMemory", "mem"),
Tony Barbour71a85122015-04-16 19:09:28 -0600332 Param("VkDeviceSize", "offset"),
333 Param("VkDeviceSize", "size"),
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600334 Param("VkMemoryMapFlags", "flags"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600335 Param("void**", "ppData")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800336
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600337 Proto("VkResult", "UnmapMemory",
Mike Stroyanb050c682015-04-17 12:36:38 -0600338 [Param("VkDevice", "device"),
339 Param("VkDeviceMemory", "mem")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800340
Courtney Goeltzenleuchterf69f8a22015-04-29 17:16:21 -0600341 Proto("VkResult", "FlushMappedMemoryRanges",
Mike Stroyanb050c682015-04-17 12:36:38 -0600342 [Param("VkDevice", "device"),
Courtney Goeltzenleuchterf69f8a22015-04-29 17:16:21 -0600343 Param("uint32_t", "memRangeCount"),
344 Param("const VkMappedMemoryRange*", "pMemRanges")]),
345
346 Proto("VkResult", "InvalidateMappedMemoryRanges",
347 [Param("VkDevice", "device"),
348 Param("uint32_t", "memRangeCount"),
349 Param("const VkMappedMemoryRange*", "pMemRanges")]),
Tony Barbourb1250542015-04-16 19:23:13 -0600350
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600351 Proto("VkResult", "BindBufferMemory",
352 [Param("VkDevice", "device"),
353 Param("VkBuffer", "buffer"),
354 Param("VkDeviceMemory", "mem"),
355 Param("VkDeviceSize", "memOffset")]),
356
357 Proto("VkResult", "BindImageMemory",
358 [Param("VkDevice", "device"),
359 Param("VkImage", "image"),
360 Param("VkDeviceMemory", "mem"),
361 Param("VkDeviceSize", "memOffset")]),
362
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600363 Proto("VkResult", "GetBufferMemoryRequirements",
Mike Stroyanb050c682015-04-17 12:36:38 -0600364 [Param("VkDevice", "device"),
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600365 Param("VkBuffer", "buffer"),
Tony Barbour59a47322015-06-24 16:06:58 -0600366 Param("VkMemoryRequirements*", "pMemoryRequirements")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800367
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600368 Proto("VkResult", "GetImageMemoryRequirements",
Mark Lobodzinski942b1722015-05-11 17:21:15 -0500369 [Param("VkDevice", "device"),
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600370 Param("VkImage", "image"),
371 Param("VkMemoryRequirements*", "pMemoryRequirements")]),
372
Mark Lobodzinski16e8bef2015-07-03 15:58:09 -0600373 Proto("VkResult", "GetImageSparseMemoryRequirements",
374 [Param("VkDevice", "device"),
375 Param("VkImage", "image"),
376 Param("uint32_t*", "pNumRequirements"),
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600377 Param("VkSparseImageMemoryRequirements*", "pSparseMemoryRequirements")]),
Mark Lobodzinski16e8bef2015-07-03 15:58:09 -0600378
379 Proto("VkResult", "GetPhysicalDeviceSparseImageFormatProperties",
380 [Param("VkPhysicalDevice", "physicalDevice"),
381 Param("VkFormat", "format"),
382 Param("VkImageType", "type"),
383 Param("uint32_t", "samples"),
384 Param("VkImageUsageFlags", "usage"),
385 Param("VkImageTiling", "tiling"),
386 Param("uint32_t*", "pNumProperties"),
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600387 Param("VkSparseImageFormatProperties*", "pProperties")]),
Mark Lobodzinski16e8bef2015-07-03 15:58:09 -0600388
Mark Lobodzinski942b1722015-05-11 17:21:15 -0500389 Proto("VkResult", "QueueBindSparseBufferMemory",
Mark Lobodzinski40f7f402015-04-16 11:44:05 -0500390 [Param("VkQueue", "queue"),
Mark Lobodzinski942b1722015-05-11 17:21:15 -0500391 Param("VkBuffer", "buffer"),
Mark Lobodzinski16e8bef2015-07-03 15:58:09 -0600392 Param("uint32_t", "numBindings"),
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600393 Param("const VkSparseMemoryBindInfo*", "pBindInfo")]),
Mark Lobodzinski16e8bef2015-07-03 15:58:09 -0600394
395 Proto("VkResult", "QueueBindSparseImageOpaqueMemory",
396 [Param("VkQueue", "queue"),
397 Param("VkImage", "image"),
398 Param("uint32_t", "numBindings"),
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600399 Param("const VkSparseMemoryBindInfo*", "pBindInfo")]),
Chia-I Wu1a28fe02015-01-01 07:55:04 +0800400
Mark Lobodzinski942b1722015-05-11 17:21:15 -0500401 Proto("VkResult", "QueueBindSparseImageMemory",
Mark Lobodzinski40f7f402015-04-16 11:44:05 -0500402 [Param("VkQueue", "queue"),
403 Param("VkImage", "image"),
Mark Lobodzinski16e8bef2015-07-03 15:58:09 -0600404 Param("uint32_t", "numBindings"),
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600405 Param("const VkSparseImageMemoryBindInfo*", "pBindInfo")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800406
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600407 Proto("VkResult", "CreateFence",
408 [Param("VkDevice", "device"),
409 Param("const VkFenceCreateInfo*", "pCreateInfo"),
410 Param("VkFence*", "pFence")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800411
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600412 Proto("VkResult", "DestroyFence",
413 [Param("VkDevice", "device"),
414 Param("VkFence", "fence")]),
415
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600416 Proto("VkResult", "ResetFences",
417 [Param("VkDevice", "device"),
Mark Lobodzinski148e1582015-04-07 16:07:57 -0500418 Param("uint32_t", "fenceCount"),
Courtney Goeltzenleuchter2bf8f902015-06-18 17:28:20 -0600419 Param("const VkFence*", "pFences")]),
Mark Lobodzinski148e1582015-04-07 16:07:57 -0500420
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600421 Proto("VkResult", "GetFenceStatus",
Mike Stroyanb050c682015-04-17 12:36:38 -0600422 [Param("VkDevice", "device"),
423 Param("VkFence", "fence")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800424
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600425 Proto("VkResult", "WaitForFences",
426 [Param("VkDevice", "device"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600427 Param("uint32_t", "fenceCount"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600428 Param("const VkFence*", "pFences"),
Courtney Goeltzenleuchtercd2a0992015-07-09 11:44:38 -0600429 Param("VkBool32", "waitAll"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600430 Param("uint64_t", "timeout")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800431
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600432 Proto("VkResult", "CreateSemaphore",
433 [Param("VkDevice", "device"),
434 Param("const VkSemaphoreCreateInfo*", "pCreateInfo"),
435 Param("VkSemaphore*", "pSemaphore")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800436
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600437 Proto("VkResult", "DestroySemaphore",
438 [Param("VkDevice", "device"),
439 Param("VkSemaphore", "semaphore")]),
440
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600441 Proto("VkResult", "QueueSignalSemaphore",
442 [Param("VkQueue", "queue"),
443 Param("VkSemaphore", "semaphore")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800444
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600445 Proto("VkResult", "QueueWaitSemaphore",
446 [Param("VkQueue", "queue"),
447 Param("VkSemaphore", "semaphore")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800448
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600449 Proto("VkResult", "CreateEvent",
450 [Param("VkDevice", "device"),
451 Param("const VkEventCreateInfo*", "pCreateInfo"),
452 Param("VkEvent*", "pEvent")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800453
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600454 Proto("VkResult", "DestroyEvent",
455 [Param("VkDevice", "device"),
456 Param("VkEvent", "event")]),
457
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600458 Proto("VkResult", "GetEventStatus",
Mike Stroyanb050c682015-04-17 12:36:38 -0600459 [Param("VkDevice", "device"),
460 Param("VkEvent", "event")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800461
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600462 Proto("VkResult", "SetEvent",
Mike Stroyanb050c682015-04-17 12:36:38 -0600463 [Param("VkDevice", "device"),
464 Param("VkEvent", "event")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800465
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600466 Proto("VkResult", "ResetEvent",
Mike Stroyanb050c682015-04-17 12:36:38 -0600467 [Param("VkDevice", "device"),
468 Param("VkEvent", "event")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800469
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600470 Proto("VkResult", "CreateQueryPool",
471 [Param("VkDevice", "device"),
472 Param("const VkQueryPoolCreateInfo*", "pCreateInfo"),
473 Param("VkQueryPool*", "pQueryPool")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800474
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600475 Proto("VkResult", "DestroyQueryPool",
476 [Param("VkDevice", "device"),
477 Param("VkQueryPool", "queryPool")]),
478
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600479 Proto("VkResult", "GetQueryPoolResults",
Mike Stroyanb050c682015-04-17 12:36:38 -0600480 [Param("VkDevice", "device"),
481 Param("VkQueryPool", "queryPool"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600482 Param("uint32_t", "startQuery"),
483 Param("uint32_t", "queryCount"),
484 Param("size_t*", "pDataSize"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600485 Param("void*", "pData"),
486 Param("VkQueryResultFlags", "flags")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800487
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600488 Proto("VkResult", "CreateBuffer",
489 [Param("VkDevice", "device"),
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -0600490 Param("const VkBufferCreateInfo*", "pCreateInfo"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600491 Param("VkBuffer*", "pBuffer")]),
Chia-I Wu1a28fe02015-01-01 07:55:04 +0800492
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600493 Proto("VkResult", "DestroyBuffer",
494 [Param("VkDevice", "device"),
495 Param("VkBuffer", "buffer")]),
496
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600497 Proto("VkResult", "CreateBufferView",
498 [Param("VkDevice", "device"),
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -0600499 Param("const VkBufferViewCreateInfo*", "pCreateInfo"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600500 Param("VkBufferView*", "pView")]),
Chia-I Wu1a28fe02015-01-01 07:55:04 +0800501
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600502 Proto("VkResult", "DestroyBufferView",
503 [Param("VkDevice", "device"),
504 Param("VkBufferView", "bufferView")]),
505
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600506 Proto("VkResult", "CreateImage",
507 [Param("VkDevice", "device"),
508 Param("const VkImageCreateInfo*", "pCreateInfo"),
509 Param("VkImage*", "pImage")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800510
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600511 Proto("VkResult", "DestroyImage",
512 [Param("VkDevice", "device"),
513 Param("VkImage", "image")]),
514
Tony Barbour59a47322015-06-24 16:06:58 -0600515 Proto("VkResult", "GetImageSubresourceLayout",
Mike Stroyanb050c682015-04-17 12:36:38 -0600516 [Param("VkDevice", "device"),
517 Param("VkImage", "image"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600518 Param("const VkImageSubresource*", "pSubresource"),
Tony Barbour59a47322015-06-24 16:06:58 -0600519 Param("VkSubresourceLayout*", "pLayout")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800520
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600521 Proto("VkResult", "CreateImageView",
522 [Param("VkDevice", "device"),
523 Param("const VkImageViewCreateInfo*", "pCreateInfo"),
524 Param("VkImageView*", "pView")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800525
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600526 Proto("VkResult", "DestroyImageView",
527 [Param("VkDevice", "device"),
528 Param("VkImageView", "imageView")]),
529
Chia-I Wu08accc62015-07-07 11:50:03 +0800530 Proto("VkResult", "CreateAttachmentView",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600531 [Param("VkDevice", "device"),
Chia-I Wu08accc62015-07-07 11:50:03 +0800532 Param("const VkAttachmentViewCreateInfo*", "pCreateInfo"),
533 Param("VkAttachmentView*", "pView")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800534
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600535 Proto("VkResult", "DestroyAttachmentView",
536 [Param("VkDevice", "device"),
537 Param("VkAttachmentView", "attachmentView")]),
538
Courtney Goeltzenleuchter2d2cb682015-06-24 18:24:19 -0600539 Proto("VkResult", "CreateShaderModule",
540 [Param("VkDevice", "device"),
541 Param("const VkShaderModuleCreateInfo*", "pCreateInfo"),
542 Param("VkShaderModule*", "pShaderModule")]),
543
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600544 Proto("VkResult", "DestroyShaderModule",
545 [Param("VkDevice", "device"),
546 Param("VkShaderModule", "shaderModule")]),
547
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600548 Proto("VkResult", "CreateShader",
549 [Param("VkDevice", "device"),
550 Param("const VkShaderCreateInfo*", "pCreateInfo"),
551 Param("VkShader*", "pShader")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800552
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600553 Proto("VkResult", "DestroyShader",
554 [Param("VkDevice", "device"),
555 Param("VkShader", "shader")]),
556
Jon Ashburnc669cc62015-07-09 15:02:25 -0600557 Proto("VkResult", "CreatePipelineCache",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600558 [Param("VkDevice", "device"),
Jon Ashburnc669cc62015-07-09 15:02:25 -0600559 Param("const VkPipelineCacheCreateInfo*", "pCreateInfo"),
560 Param("VkPipelineCache*", "pPipelineCache")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800561
Jon Ashburnc669cc62015-07-09 15:02:25 -0600562 Proto("VkResult", "DestroyPipelineCache",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600563 [Param("VkDevice", "device"),
Jon Ashburnc669cc62015-07-09 15:02:25 -0600564 Param("VkPipelineCache", "pipelineCache")]),
Courtney Goeltzenleuchter0d40f152015-03-25 15:37:49 -0600565
Jon Ashburnc669cc62015-07-09 15:02:25 -0600566 Proto("size_t", "GetPipelineCacheSize",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600567 [Param("VkDevice", "device"),
Jon Ashburnc669cc62015-07-09 15:02:25 -0600568 Param("VkPipelineCache", "pipelineCache")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800569
Jon Ashburnc669cc62015-07-09 15:02:25 -0600570 Proto("VkResult", "GetPipelineCacheData",
Mike Stroyanb050c682015-04-17 12:36:38 -0600571 [Param("VkDevice", "device"),
Jon Ashburnc669cc62015-07-09 15:02:25 -0600572 Param("VkPipelineCache", "pipelineCache"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600573 Param("void*", "pData")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800574
Jon Ashburnc669cc62015-07-09 15:02:25 -0600575 Proto("VkResult", "MergePipelineCaches",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600576 [Param("VkDevice", "device"),
Jon Ashburnc669cc62015-07-09 15:02:25 -0600577 Param("VkPipelineCache", "destCache"),
578 Param("uint32_t", "srcCacheCount"),
579 Param("const VkPipelineCache*", "pSrcCaches")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800580
Jon Ashburnc669cc62015-07-09 15:02:25 -0600581 Proto("VkResult", "CreateGraphicsPipelines",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600582 [Param("VkDevice", "device"),
Jon Ashburnc669cc62015-07-09 15:02:25 -0600583 Param("VkPipelineCache", "pipelineCache"),
584 Param("uint32_t", "count"),
585 Param("const VkGraphicsPipelineCreateInfo*", "pCreateInfos"),
586 Param("VkPipeline*", "pPipelines")]),
587
588 Proto("VkResult", "CreateComputePipelines",
589 [Param("VkDevice", "device"),
590 Param("VkPipelineCache", "pipelineCache"),
591 Param("uint32_t", "count"),
592 Param("const VkComputePipelineCreateInfo*", "pCreateInfos"),
593 Param("VkPipeline*", "pPipelines")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800594
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600595 Proto("VkResult", "DestroyPipeline",
596 [Param("VkDevice", "device"),
597 Param("VkPipeline", "pipeline")]),
598
Mark Lobodzinski0fadf5f2015-04-17 14:11:39 -0500599 Proto("VkResult", "CreatePipelineLayout",
600 [Param("VkDevice", "device"),
601 Param("const VkPipelineLayoutCreateInfo*", "pCreateInfo"),
602 Param("VkPipelineLayout*", "pPipelineLayout")]),
603
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600604 Proto("VkResult", "DestroyPipelineLayout",
605 [Param("VkDevice", "device"),
606 Param("VkPipelineLayout", "pipelineLayout")]),
607
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600608 Proto("VkResult", "CreateSampler",
609 [Param("VkDevice", "device"),
610 Param("const VkSamplerCreateInfo*", "pCreateInfo"),
611 Param("VkSampler*", "pSampler")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800612
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600613 Proto("VkResult", "DestroySampler",
614 [Param("VkDevice", "device"),
615 Param("VkSampler", "sampler")]),
616
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600617 Proto("VkResult", "CreateDescriptorSetLayout",
618 [Param("VkDevice", "device"),
619 Param("const VkDescriptorSetLayoutCreateInfo*", "pCreateInfo"),
620 Param("VkDescriptorSetLayout*", "pSetLayout")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800621
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600622 Proto("VkResult", "DestroyDescriptorSetLayout",
623 [Param("VkDevice", "device"),
624 Param("VkDescriptorSetLayout", "descriptorSetLayout")]),
625
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600626 Proto("VkResult", "CreateDescriptorPool",
627 [Param("VkDevice", "device"),
628 Param("VkDescriptorPoolUsage", "poolUsage"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600629 Param("uint32_t", "maxSets"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600630 Param("const VkDescriptorPoolCreateInfo*", "pCreateInfo"),
631 Param("VkDescriptorPool*", "pDescriptorPool")]),
Chia-I Wu11078b02015-01-04 16:27:24 +0800632
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600633 Proto("VkResult", "DestroyDescriptorPool",
634 [Param("VkDevice", "device"),
635 Param("VkDescriptorPool", "descriptorPool")]),
636
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600637 Proto("VkResult", "ResetDescriptorPool",
Mike Stroyanb050c682015-04-17 12:36:38 -0600638 [Param("VkDevice", "device"),
639 Param("VkDescriptorPool", "descriptorPool")]),
Chia-I Wu11078b02015-01-04 16:27:24 +0800640
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600641 Proto("VkResult", "AllocDescriptorSets",
Mike Stroyanb050c682015-04-17 12:36:38 -0600642 [Param("VkDevice", "device"),
643 Param("VkDescriptorPool", "descriptorPool"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600644 Param("VkDescriptorSetUsage", "setUsage"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600645 Param("uint32_t", "count"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600646 Param("const VkDescriptorSetLayout*", "pSetLayouts"),
647 Param("VkDescriptorSet*", "pDescriptorSets"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600648 Param("uint32_t*", "pCount")]),
Chia-I Wu11078b02015-01-04 16:27:24 +0800649
Chia-I Wu9d00ed72015-05-25 16:27:55 +0800650 Proto("VkResult", "UpdateDescriptorSets",
Mike Stroyanb050c682015-04-17 12:36:38 -0600651 [Param("VkDevice", "device"),
Chia-I Wu9d00ed72015-05-25 16:27:55 +0800652 Param("uint32_t", "writeCount"),
653 Param("const VkWriteDescriptorSet*", "pDescriptorWrites"),
654 Param("uint32_t", "copyCount"),
655 Param("const VkCopyDescriptorSet*", "pDescriptorCopies")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800656
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600657 Proto("VkResult", "CreateDynamicViewportState",
658 [Param("VkDevice", "device"),
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600659 Param("const VkDynamicViewportStateCreateInfo*", "pCreateInfo"),
660 Param("VkDynamicViewportState*", "pState")]),
661
662 Proto("VkResult", "DestroyDynamicViewportState",
663 [Param("VkDevice", "device"),
664 Param("VkDynamicViewportState", "dynamicViewportState")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800665
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600666 Proto("VkResult", "CreateDynamicRasterState",
667 [Param("VkDevice", "device"),
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600668 Param("const VkDynamicRasterStateCreateInfo*", "pCreateInfo"),
669 Param("VkDynamicRasterState*", "pState")]),
670
671 Proto("VkResult", "DestroyDynamicRasterState",
672 [Param("VkDevice", "device"),
673 Param("VkDynamicRasterState", "dynamicRasterState")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800674
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600675 Proto("VkResult", "CreateDynamicColorBlendState",
676 [Param("VkDevice", "device"),
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600677 Param("const VkDynamicColorBlendStateCreateInfo*", "pCreateInfo"),
678 Param("VkDynamicColorBlendState*", "pState")]),
679
680 Proto("VkResult", "DestroyDynamicColorBlendState",
681 [Param("VkDevice", "device"),
682 Param("VkDynamicColorBlendState", "dynamicColorBlendState")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800683
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600684 Proto("VkResult", "CreateDynamicDepthStencilState",
685 [Param("VkDevice", "device"),
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600686 Param("const VkDynamicDepthStencilStateCreateInfo*", "pCreateInfo"),
687 Param("VkDynamicDepthStencilState*", "pState")]),
688
689 Proto("VkResult", "DestroyDynamicDepthStencilState",
690 [Param("VkDevice", "device"),
691 Param("VkDynamicDepthStencilState", "dynamicDepthStencilState")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800692
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600693 Proto("VkResult", "CreateCommandBuffer",
694 [Param("VkDevice", "device"),
695 Param("const VkCmdBufferCreateInfo*", "pCreateInfo"),
696 Param("VkCmdBuffer*", "pCmdBuffer")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800697
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600698 Proto("VkResult", "DestroyCommandBuffer",
699 [Param("VkDevice", "device"),
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600700 Param("VkCmdBuffer", "commandBuffer")]),
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600701
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600702 Proto("VkResult", "BeginCommandBuffer",
703 [Param("VkCmdBuffer", "cmdBuffer"),
704 Param("const VkCmdBufferBeginInfo*", "pBeginInfo")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800705
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600706 Proto("VkResult", "EndCommandBuffer",
707 [Param("VkCmdBuffer", "cmdBuffer")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800708
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600709 Proto("VkResult", "ResetCommandBuffer",
710 [Param("VkCmdBuffer", "cmdBuffer")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800711
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600712 Proto("void", "CmdBindPipeline",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600713 [Param("VkCmdBuffer", "cmdBuffer"),
714 Param("VkPipelineBindPoint", "pipelineBindPoint"),
715 Param("VkPipeline", "pipeline")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800716
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600717 Proto("void", "CmdBindDynamicViewportState",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600718 [Param("VkCmdBuffer", "cmdBuffer"),
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600719 Param("VkDynamicViewportState", "dynamicViewportState")]),
720
721 Proto("void", "CmdBindDynamicRasterState",
722 [Param("VkCmdBuffer", "cmdBuffer"),
723 Param("VkDynamicRasterState", "dynamicRasterState")]),
724
725 Proto("void", "CmdBindDynamicColorBlendState",
726 [Param("VkCmdBuffer", "cmdBuffer"),
727 Param("VkDynamicColorBlendState", "dynamicColorBlendState")]),
728
729 Proto("void", "CmdBindDynamicDepthStencilState",
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600730 [Param("VkCmdBuffer", "cmdBuffer"),
731 Param("VkDynamicDepthStencilState", "dynamicDepthStencilState")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800732
Chia-I Wu53f07d72015-03-28 15:23:55 +0800733 Proto("void", "CmdBindDescriptorSets",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600734 [Param("VkCmdBuffer", "cmdBuffer"),
735 Param("VkPipelineBindPoint", "pipelineBindPoint"),
Mark Lobodzinskif2093b62015-06-15 13:21:21 -0600736 Param("VkPipelineLayout", "layout"),
Cody Northropd4c1a502015-04-16 13:41:56 -0600737 Param("uint32_t", "firstSet"),
738 Param("uint32_t", "setCount"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600739 Param("const VkDescriptorSet*", "pDescriptorSets"),
Cody Northropd4c1a502015-04-16 13:41:56 -0600740 Param("uint32_t", "dynamicOffsetCount"),
741 Param("const uint32_t*", "pDynamicOffsets")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800742
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600743 Proto("void", "CmdBindIndexBuffer",
744 [Param("VkCmdBuffer", "cmdBuffer"),
745 Param("VkBuffer", "buffer"),
746 Param("VkDeviceSize", "offset"),
747 Param("VkIndexType", "indexType")]),
748
Courtney Goeltzenleuchterf68ad722015-04-16 13:38:46 -0600749 Proto("void", "CmdBindVertexBuffers",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600750 [Param("VkCmdBuffer", "cmdBuffer"),
Courtney Goeltzenleuchterf68ad722015-04-16 13:38:46 -0600751 Param("uint32_t", "startBinding"),
752 Param("uint32_t", "bindingCount"),
753 Param("const VkBuffer*", "pBuffers"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600754 Param("const VkDeviceSize*", "pOffsets")]),
755
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600756 Proto("void", "CmdDraw",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600757 [Param("VkCmdBuffer", "cmdBuffer"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600758 Param("uint32_t", "firstVertex"),
759 Param("uint32_t", "vertexCount"),
760 Param("uint32_t", "firstInstance"),
761 Param("uint32_t", "instanceCount")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800762
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600763 Proto("void", "CmdDrawIndexed",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600764 [Param("VkCmdBuffer", "cmdBuffer"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600765 Param("uint32_t", "firstIndex"),
766 Param("uint32_t", "indexCount"),
767 Param("int32_t", "vertexOffset"),
768 Param("uint32_t", "firstInstance"),
769 Param("uint32_t", "instanceCount")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800770
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600771 Proto("void", "CmdDrawIndirect",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600772 [Param("VkCmdBuffer", "cmdBuffer"),
773 Param("VkBuffer", "buffer"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600774 Param("VkDeviceSize", "offset"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600775 Param("uint32_t", "count"),
776 Param("uint32_t", "stride")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800777
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600778 Proto("void", "CmdDrawIndexedIndirect",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600779 [Param("VkCmdBuffer", "cmdBuffer"),
780 Param("VkBuffer", "buffer"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600781 Param("VkDeviceSize", "offset"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600782 Param("uint32_t", "count"),
783 Param("uint32_t", "stride")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800784
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600785 Proto("void", "CmdDispatch",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600786 [Param("VkCmdBuffer", "cmdBuffer"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600787 Param("uint32_t", "x"),
788 Param("uint32_t", "y"),
789 Param("uint32_t", "z")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800790
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600791 Proto("void", "CmdDispatchIndirect",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600792 [Param("VkCmdBuffer", "cmdBuffer"),
793 Param("VkBuffer", "buffer"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600794 Param("VkDeviceSize", "offset")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800795
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600796 Proto("void", "CmdCopyBuffer",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600797 [Param("VkCmdBuffer", "cmdBuffer"),
798 Param("VkBuffer", "srcBuffer"),
799 Param("VkBuffer", "destBuffer"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600800 Param("uint32_t", "regionCount"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600801 Param("const VkBufferCopy*", "pRegions")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800802
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600803 Proto("void", "CmdCopyImage",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600804 [Param("VkCmdBuffer", "cmdBuffer"),
805 Param("VkImage", "srcImage"),
806 Param("VkImageLayout", "srcImageLayout"),
807 Param("VkImage", "destImage"),
808 Param("VkImageLayout", "destImageLayout"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600809 Param("uint32_t", "regionCount"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600810 Param("const VkImageCopy*", "pRegions")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800811
Courtney Goeltzenleuchter89299fa2015-03-08 17:02:18 -0600812 Proto("void", "CmdBlitImage",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600813 [Param("VkCmdBuffer", "cmdBuffer"),
814 Param("VkImage", "srcImage"),
815 Param("VkImageLayout", "srcImageLayout"),
816 Param("VkImage", "destImage"),
817 Param("VkImageLayout", "destImageLayout"),
Courtney Goeltzenleuchter89299fa2015-03-08 17:02:18 -0600818 Param("uint32_t", "regionCount"),
Mark Lobodzinskiee5eef12015-05-22 14:43:25 -0500819 Param("const VkImageBlit*", "pRegions"),
820 Param("VkTexFilter", "filter")]),
Courtney Goeltzenleuchter89299fa2015-03-08 17:02:18 -0600821
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600822 Proto("void", "CmdCopyBufferToImage",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600823 [Param("VkCmdBuffer", "cmdBuffer"),
824 Param("VkBuffer", "srcBuffer"),
825 Param("VkImage", "destImage"),
826 Param("VkImageLayout", "destImageLayout"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600827 Param("uint32_t", "regionCount"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600828 Param("const VkBufferImageCopy*", "pRegions")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800829
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600830 Proto("void", "CmdCopyImageToBuffer",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600831 [Param("VkCmdBuffer", "cmdBuffer"),
832 Param("VkImage", "srcImage"),
833 Param("VkImageLayout", "srcImageLayout"),
834 Param("VkBuffer", "destBuffer"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600835 Param("uint32_t", "regionCount"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600836 Param("const VkBufferImageCopy*", "pRegions")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800837
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600838 Proto("void", "CmdUpdateBuffer",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600839 [Param("VkCmdBuffer", "cmdBuffer"),
840 Param("VkBuffer", "destBuffer"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600841 Param("VkDeviceSize", "destOffset"),
842 Param("VkDeviceSize", "dataSize"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600843 Param("const uint32_t*", "pData")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800844
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600845 Proto("void", "CmdFillBuffer",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600846 [Param("VkCmdBuffer", "cmdBuffer"),
847 Param("VkBuffer", "destBuffer"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600848 Param("VkDeviceSize", "destOffset"),
849 Param("VkDeviceSize", "fillSize"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600850 Param("uint32_t", "data")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800851
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600852 Proto("void", "CmdClearColorImage",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600853 [Param("VkCmdBuffer", "cmdBuffer"),
854 Param("VkImage", "image"),
855 Param("VkImageLayout", "imageLayout"),
Chris Forbesf0796e12015-06-24 14:34:53 +1200856 Param("const VkClearColorValue*", "pColor"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600857 Param("uint32_t", "rangeCount"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600858 Param("const VkImageSubresourceRange*", "pRanges")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800859
Chris Forbesd9be82b2015-06-22 17:21:59 +1200860 Proto("void", "CmdClearDepthStencilImage",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600861 [Param("VkCmdBuffer", "cmdBuffer"),
862 Param("VkImage", "image"),
863 Param("VkImageLayout", "imageLayout"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600864 Param("float", "depth"),
865 Param("uint32_t", "stencil"),
866 Param("uint32_t", "rangeCount"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600867 Param("const VkImageSubresourceRange*", "pRanges")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800868
Chris Forbesd9be82b2015-06-22 17:21:59 +1200869 Proto("void", "CmdClearColorAttachment",
870 [Param("VkCmdBuffer", "cmdBuffer"),
871 Param("uint32_t", "colorAttachment"),
872 Param("VkImageLayout", "imageLayout"),
Chris Forbesf0796e12015-06-24 14:34:53 +1200873 Param("const VkClearColorValue*", "pColor"),
Chris Forbesd9be82b2015-06-22 17:21:59 +1200874 Param("uint32_t", "rectCount"),
875 Param("const VkRect3D*", "pRects")]),
876
877 Proto("void", "CmdClearDepthStencilAttachment",
878 [Param("VkCmdBuffer", "cmdBuffer"),
879 Param("VkImageAspectFlags", "imageAspectMask"),
880 Param("VkImageLayout", "imageLayout"),
881 Param("float", "depth"),
882 Param("uint32_t", "stencil"),
883 Param("uint32_t", "rectCount"),
884 Param("const VkRect3D*", "pRects")]),
885
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600886 Proto("void", "CmdResolveImage",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600887 [Param("VkCmdBuffer", "cmdBuffer"),
888 Param("VkImage", "srcImage"),
889 Param("VkImageLayout", "srcImageLayout"),
890 Param("VkImage", "destImage"),
891 Param("VkImageLayout", "destImageLayout"),
Tony Barbour6865d4a2015-04-13 15:02:52 -0600892 Param("uint32_t", "regionCount"),
893 Param("const VkImageResolve*", "pRegions")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800894
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600895 Proto("void", "CmdSetEvent",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600896 [Param("VkCmdBuffer", "cmdBuffer"),
897 Param("VkEvent", "event"),
Tony Barbour0b2cfb22015-06-29 16:20:35 -0600898 Param("VkPipelineStageFlags", "stageMask")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800899
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600900 Proto("void", "CmdResetEvent",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600901 [Param("VkCmdBuffer", "cmdBuffer"),
902 Param("VkEvent", "event"),
Tony Barbour0b2cfb22015-06-29 16:20:35 -0600903 Param("VkPipelineStageFlags", "stageMask")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800904
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600905 Proto("void", "CmdWaitEvents",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600906 [Param("VkCmdBuffer", "cmdBuffer"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600907 Param("uint32_t", "eventCount"),
908 Param("const VkEvent*", "pEvents"),
Tony Barbour0b2cfb22015-06-29 16:20:35 -0600909 Param("VkPipelineStageFlags", "sourceStageMask"),
910 Param("VkPipelineStageFlags", "destStageMask"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600911 Param("uint32_t", "memBarrierCount"),
912 Param("const void**", "ppMemBarriers")]),
Mike Stroyanfb80d5f2014-12-04 11:08:39 +0000913
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600914 Proto("void", "CmdPipelineBarrier",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600915 [Param("VkCmdBuffer", "cmdBuffer"),
Tony Barbour0b2cfb22015-06-29 16:20:35 -0600916 Param("VkPipelineStageFlags", "sourceStageMask"),
917 Param("VkPipelineStageFlags", "destStageMask"),
Courtney Goeltzenleuchtercd2a0992015-07-09 11:44:38 -0600918 Param("VkBool32", "byRegion"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600919 Param("uint32_t", "memBarrierCount"),
920 Param("const void**", "ppMemBarriers")]),
Mike Stroyanfb80d5f2014-12-04 11:08:39 +0000921
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600922 Proto("void", "CmdBeginQuery",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600923 [Param("VkCmdBuffer", "cmdBuffer"),
924 Param("VkQueryPool", "queryPool"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600925 Param("uint32_t", "slot"),
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600926 Param("VkQueryControlFlags", "flags")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800927
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600928 Proto("void", "CmdEndQuery",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600929 [Param("VkCmdBuffer", "cmdBuffer"),
930 Param("VkQueryPool", "queryPool"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600931 Param("uint32_t", "slot")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800932
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600933 Proto("void", "CmdResetQueryPool",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600934 [Param("VkCmdBuffer", "cmdBuffer"),
935 Param("VkQueryPool", "queryPool"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600936 Param("uint32_t", "startQuery"),
937 Param("uint32_t", "queryCount")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800938
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600939 Proto("void", "CmdWriteTimestamp",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600940 [Param("VkCmdBuffer", "cmdBuffer"),
941 Param("VkTimestampType", "timestampType"),
942 Param("VkBuffer", "destBuffer"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600943 Param("VkDeviceSize", "destOffset")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800944
Courtney Goeltzenleuchter1dbc8e22015-04-15 18:21:13 -0600945 Proto("void", "CmdCopyQueryPoolResults",
946 [Param("VkCmdBuffer", "cmdBuffer"),
947 Param("VkQueryPool", "queryPool"),
948 Param("uint32_t", "startQuery"),
949 Param("uint32_t", "queryCount"),
950 Param("VkBuffer", "destBuffer"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600951 Param("VkDeviceSize", "destOffset"),
952 Param("VkDeviceSize", "destStride"),
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600953 Param("VkQueryResultFlags", "flags")]),
Courtney Goeltzenleuchter1dbc8e22015-04-15 18:21:13 -0600954
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600955 Proto("VkResult", "CreateFramebuffer",
956 [Param("VkDevice", "device"),
957 Param("const VkFramebufferCreateInfo*", "pCreateInfo"),
958 Param("VkFramebuffer*", "pFramebuffer")]),
Jeremy Hayesd65ae082015-01-14 16:17:08 -0700959
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600960 Proto("VkResult", "DestroyFramebuffer",
961 [Param("VkDevice", "device"),
962 Param("VkFramebuffer", "framebuffer")]),
963
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600964 Proto("VkResult", "CreateRenderPass",
965 [Param("VkDevice", "device"),
966 Param("const VkRenderPassCreateInfo*", "pCreateInfo"),
967 Param("VkRenderPass*", "pRenderPass")]),
Jeremy Hayesd65ae082015-01-14 16:17:08 -0700968
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600969 Proto("VkResult", "DestroyRenderPass",
970 [Param("VkDevice", "device"),
971 Param("VkRenderPass", "renderPass")]),
972
Jon Ashburne13f1982015-02-02 09:58:11 -0700973 Proto("void", "CmdBeginRenderPass",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600974 [Param("VkCmdBuffer", "cmdBuffer"),
Chia-I Wu08accc62015-07-07 11:50:03 +0800975 Param("const VkRenderPassBeginInfo*", "pRenderPassBegin"),
976 Param("VkRenderPassContents", "contents")]),
977
978 Proto("void", "CmdNextSubpass",
979 [Param("VkCmdBuffer", "cmdBuffer"),
980 Param("VkRenderPassContents", "contents")]),
Jon Ashburne13f1982015-02-02 09:58:11 -0700981
982 Proto("void", "CmdEndRenderPass",
Chia-I Wu0b50a1c2015-06-26 15:34:39 +0800983 [Param("VkCmdBuffer", "cmdBuffer")]),
984
985 Proto("void", "CmdExecuteCommands",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600986 [Param("VkCmdBuffer", "cmdBuffer"),
Chia-I Wu0b50a1c2015-06-26 15:34:39 +0800987 Param("uint32_t", "cmdBuffersCount"),
988 Param("const VkCmdBuffer*", "pCmdBuffers")]),
Chia-I Wue442dc32015-01-01 09:31:15 +0800989 ],
Chia-I Wufb2559d2014-08-01 11:19:52 +0800990)
991
Chia-I Wuf8693382015-04-16 22:02:10 +0800992wsi_lunarg = Extension(
993 name="VK_WSI_LunarG",
994 headers=["vk_wsi_lunarg.h"],
995 objects=[
996 "VkDisplayWSI",
997 "VkSwapChainWSI",
Courtney Goeltzenleuchterf579fa62015-06-10 17:39:03 -0600998 "VkDbgMsgCallback",
Chia-I Wuf8693382015-04-16 22:02:10 +0800999 ],
Chia-I Wue442dc32015-01-01 09:31:15 +08001000 protos=[
Chia-I Wuf8693382015-04-16 22:02:10 +08001001 Proto("VkResult", "CreateSwapChainWSI",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001002 [Param("VkDevice", "device"),
Chia-I Wuf8693382015-04-16 22:02:10 +08001003 Param("const VkSwapChainCreateInfoWSI*", "pCreateInfo"),
1004 Param("VkSwapChainWSI*", "pSwapChain")]),
Chia-I Wu6dee8b82014-09-23 10:37:23 +08001005
Chia-I Wuf8693382015-04-16 22:02:10 +08001006 Proto("VkResult", "DestroySwapChainWSI",
1007 [Param("VkSwapChainWSI", "swapChain")]),
Chia-I Wu6dee8b82014-09-23 10:37:23 +08001008
Chia-I Wuf8693382015-04-16 22:02:10 +08001009 Proto("VkResult", "GetSwapChainInfoWSI",
1010 [Param("VkSwapChainWSI", "swapChain"),
1011 Param("VkSwapChainInfoTypeWSI", "infoType"),
1012 Param("size_t*", "pDataSize"),
1013 Param("void*", "pData")]),
1014
1015 Proto("VkResult", "QueuePresentWSI",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001016 [Param("VkQueue", "queue"),
Chia-I Wuf8693382015-04-16 22:02:10 +08001017 Param("const VkPresentInfoWSI*", "pPresentInfo")]),
Courtney Goeltzenleuchterf579fa62015-06-10 17:39:03 -06001018
1019# Proto("VkResult", "DbgCreateMsgCallback",
1020# [Param("VkInstance", "instance"),
1021# Param("VkFlags", "msgFlags"),
1022# Param("PFN_vkDbgMsgCallback", "pfnMsgCallback"),
1023# Param("void*", "pUserData"),
1024# Param("VkDbgMsgCallback*", "pMsgCallback")]),
Chia-I Wue442dc32015-01-01 09:31:15 +08001025 ],
Chia-I Wu6dee8b82014-09-23 10:37:23 +08001026)
1027
Chia-I Wuf8693382015-04-16 22:02:10 +08001028extensions = [core, wsi_lunarg]
Chia-I Wuc4f24e82015-01-01 08:46:31 +08001029
Tobin Ehlisa30e7e52015-07-06 14:02:36 -06001030object_dispatch_list = [
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001031 "VkInstance",
Tony Barbourd1c35722015-04-16 15:59:00 -06001032 "VkPhysicalDevice",
Tobin Ehlisa30e7e52015-07-06 14:02:36 -06001033 "VkDevice",
1034 "VkQueue",
1035 "VkCmdBuffer",
Chia-I Wuf8693382015-04-16 22:02:10 +08001036 "VkDisplayWSI",
1037 "VkSwapChainWSI",
Tobin Ehlis7e65d752015-01-15 17:51:52 -07001038]
1039
Tobin Ehlisa30e7e52015-07-06 14:02:36 -06001040object_non_dispatch_list = [
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001041 "VkFence",
Tobin Ehlisa30e7e52015-07-06 14:02:36 -06001042 "VkDeviceMemory",
1043 "VkBuffer",
1044 "VkImage",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001045 "VkSemaphore",
1046 "VkEvent",
1047 "VkQueryPool",
Tobin Ehlisa30e7e52015-07-06 14:02:36 -06001048 "VkBufferView",
1049 "VkImageView",
1050 "VkAttachmentView",
1051 "VkShaderModule",
1052 "VkShader",
1053 "VkPipelineCache",
1054 "VkPipelineLayout",
1055 "VkPipeline",
1056 "VkDescriptorSetLayout",
1057 "VkSampler",
1058 "VkDescriptorPool",
1059 "VkDescriptorSet",
Tony Barbour1d2cd3f2015-07-03 10:33:54 -06001060 "VkDynamicViewportState",
1061 "VkDynamicRasterState",
1062 "VkDynamicColorBlendState",
Tobin Ehlisa30e7e52015-07-06 14:02:36 -06001063 "VkDynamicDepthStencilState",
1064 "VkRenderPass",
1065 "VkFramebuffer",
Tobin Ehlis7e65d752015-01-15 17:51:52 -07001066]
1067
Tobin Ehlisa30e7e52015-07-06 14:02:36 -06001068object_type_list = object_dispatch_list + object_non_dispatch_list
Tobin Ehlis7e65d752015-01-15 17:51:52 -07001069
Chia-I Wuc4f24e82015-01-01 08:46:31 +08001070headers = []
Chia-I Wue86d8ab2015-01-04 14:46:22 +08001071objects = []
Chia-I Wuc4f24e82015-01-01 08:46:31 +08001072protos = []
1073for ext in extensions:
1074 headers.extend(ext.headers)
Chia-I Wue86d8ab2015-01-04 14:46:22 +08001075 objects.extend(ext.objects)
Chia-I Wuc4f24e82015-01-01 08:46:31 +08001076 protos.extend(ext.protos)
Chia-I Wu6dee8b82014-09-23 10:37:23 +08001077
Chia-I Wu9a4ceb12015-01-01 14:45:58 +08001078proto_names = [proto.name for proto in protos]
Chia-I Wu900a2572014-08-01 14:44:16 +08001079
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001080def parse_vk_h(filename):
Chia-I Wu509a4122015-01-04 14:08:46 +08001081 # read object and protoype typedefs
1082 object_lines = []
1083 proto_lines = []
1084 with open(filename, "r") as fp:
1085 for line in fp:
1086 line = line.strip()
Courtney Goeltzenleuchterd8e229c2015-04-08 15:36:08 -06001087 if line.startswith("VK_DEFINE"):
Chia-I Wu509a4122015-01-04 14:08:46 +08001088 begin = line.find("(") + 1
1089 end = line.find(",")
1090 # extract the object type
1091 object_lines.append(line[begin:end])
1092 if line.startswith("typedef") and line.endswith(");"):
1093 # drop leading "typedef " and trailing ");"
1094 proto_lines.append(line[8:-2])
1095
1096 # parse proto_lines to protos
1097 protos = []
1098 for line in proto_lines:
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001099 first, rest = line.split(" (VKAPI *PFN_vk")
1100 second, third = rest.split(")(")
Chia-I Wu509a4122015-01-04 14:08:46 +08001101
1102 # get the return type, no space before "*"
1103 proto_ret = "*".join([t.rstrip() for t in first.split("*")])
1104
1105 # get the name
1106 proto_name = second.strip()
1107
1108 # get the list of params
1109 param_strs = third.split(", ")
1110 params = []
1111 for s in param_strs:
1112 ty, name = s.rsplit(" ", 1)
1113
1114 # no space before "*"
1115 ty = "*".join([t.rstrip() for t in ty.split("*")])
1116 # attach [] to ty
1117 idx = name.rfind("[")
1118 if idx >= 0:
1119 ty += name[idx:]
1120 name = name[:idx]
1121
1122 params.append(Param(ty, name))
1123
1124 protos.append(Proto(proto_ret, proto_name, params))
1125
1126 # make them an extension and print
Courtney Goeltzenleuchterd8e229c2015-04-08 15:36:08 -06001127 ext = Extension("VK_CORE",
Courtney Goeltzenleuchterf579fa62015-06-10 17:39:03 -06001128 headers=["vulkan.h", "vk_debug_report_lunarg.h"],
Chia-I Wu509a4122015-01-04 14:08:46 +08001129 objects=object_lines,
1130 protos=protos)
1131 print("core =", str(ext))
1132
1133 print("")
Jon Ashburnbacb0f52015-04-06 10:58:22 -06001134 print("typedef struct VkLayerDispatchTable_")
Chia-I Wu509a4122015-01-04 14:08:46 +08001135 print("{")
1136 for proto in ext.protos:
Courtney Goeltzenleuchterd8e229c2015-04-08 15:36:08 -06001137 print(" vk%sType %s;" % (proto.name, proto.name))
Jon Ashburnbacb0f52015-04-06 10:58:22 -06001138 print("} VkLayerDispatchTable;")
Chia-I Wu509a4122015-01-04 14:08:46 +08001139
1140if __name__ == "__main__":
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001141 parse_vk_h("include/vulkan.h")