blob: bbae148ea52bc70574f3e45099f9f60ef8a1676e [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",
Cody Northrope62183e2015-07-09 18:08:05 -0600191 "VkCmdPool",
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600192 "VkFence",
Tony Barbourd1c35722015-04-16 15:59:00 -0600193 "VkDeviceMemory",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600194 "VkBuffer",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600195 "VkImage",
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600196 "VkSemaphore",
197 "VkEvent",
198 "VkQueryPool",
199 "VkBufferView",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600200 "VkImageView",
Chia-I Wu08accc62015-07-07 11:50:03 +0800201 "VkAttachmentView",
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600202 "VkShaderModule",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600203 "VkShader",
Tony Barboura05dbaa2015-07-09 17:31:46 -0600204 "VkPipelineCache",
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600205 "VkPipelineLayout",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600206 "VkPipeline",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600207 "VkDescriptorSetLayout",
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600208 "VkSampler",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600209 "VkDescriptorPool",
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600210 "VkDescriptorSet",
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600211 "VkDynamicViewportState",
Cody Northrop271ba752015-08-26 10:01:32 -0600212 "VkDynamicLineWidthState",
213 "VkDynamicDepthBiasState",
214 "VkDynamicBlendState",
215 "VkDynamicDepthBoundsState",
Cody Northrop82485a82015-08-18 15:21:16 -0600216 "VkDynamicStencilState",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600217 "VkRenderPass",
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600218 "VkFramebuffer",
Chia-I Wue86d8ab2015-01-04 14:46:22 +0800219 ],
Chia-I Wue442dc32015-01-01 09:31:15 +0800220 protos=[
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600221 Proto("VkResult", "CreateInstance",
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -0600222 [Param("const VkInstanceCreateInfo*", "pCreateInfo"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600223 Param("VkInstance*", "pInstance")]),
Jon Ashburn1beab2d2015-01-26 14:51:40 -0700224
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600225 Proto("VkResult", "DestroyInstance",
226 [Param("VkInstance", "instance")]),
Jon Ashburn1beab2d2015-01-26 14:51:40 -0700227
Jon Ashburn83a64252015-04-15 11:31:12 -0600228 Proto("VkResult", "EnumeratePhysicalDevices",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600229 [Param("VkInstance", "instance"),
Jon Ashburn83a64252015-04-15 11:31:12 -0600230 Param("uint32_t*", "pPhysicalDeviceCount"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600231 Param("VkPhysicalDevice*", "pPhysicalDevices")]),
Jon Ashburn1beab2d2015-01-26 14:51:40 -0700232
Chris Forbesbc0bb772015-06-21 22:55:02 +1200233 Proto("VkResult", "GetPhysicalDeviceFeatures",
234 [Param("VkPhysicalDevice", "physicalDevice"),
235 Param("VkPhysicalDeviceFeatures*", "pFeatures")]),
236
Courtney Goeltzenleuchter2caec862015-07-12 12:52:09 -0600237 Proto("VkResult", "GetPhysicalDeviceFormatProperties",
Chris Forbesbc0bb772015-06-21 22:55:02 +1200238 [Param("VkPhysicalDevice", "physicalDevice"),
239 Param("VkFormat", "format"),
Jon Ashburnea65e492015-08-06 17:27:49 -0600240 Param("VkFormatProperties*", "pFormatProperties")]),
Chris Forbesbc0bb772015-06-21 22:55:02 +1200241
Jon Ashburn42540ef2015-07-23 18:48:20 -0600242 Proto("VkResult", "GetPhysicalDeviceImageFormatProperties",
243 [Param("VkPhysicalDevice", "physicalDevice"),
244 Param("VkFormat", "format"),
245 Param("VkImageType", "type"),
246 Param("VkImageTiling", "tiling"),
247 Param("VkImageUsageFlags", "usage"),
248 Param("VkImageFormatProperties*", "pImageFormatProperties")]),
249
Chris Forbesbc0bb772015-06-21 22:55:02 +1200250 Proto("VkResult", "GetPhysicalDeviceLimits",
251 [Param("VkPhysicalDevice", "physicalDevice"),
252 Param("VkPhysicalDeviceLimits*", "pLimits")]),
253
Courtney Goeltzenleuchter2d3ba632015-07-12 14:35:22 -0600254 Proto("PFN_vkVoidFunction", "GetInstanceProcAddr",
Jon Ashburnb0fbe912015-05-06 10:15:07 -0600255 [Param("VkInstance", "instance"),
256 Param("const char*", "pName")]),
257
Courtney Goeltzenleuchter2d3ba632015-07-12 14:35:22 -0600258 Proto("PFN_vkVoidFunction", "GetDeviceProcAddr",
Jon Ashburn8d1b0b52015-05-18 13:20:15 -0600259 [Param("VkDevice", "device"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600260 Param("const char*", "pName")]),
Chia-I Wuf2ffc522015-01-04 14:51:06 +0800261
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600262 Proto("VkResult", "CreateDevice",
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600263 [Param("VkPhysicalDevice", "physicalDevice"),
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -0600264 Param("const VkDeviceCreateInfo*", "pCreateInfo"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600265 Param("VkDevice*", "pDevice")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800266
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600267 Proto("VkResult", "DestroyDevice",
268 [Param("VkDevice", "device")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800269
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600270 Proto("VkResult", "GetPhysicalDeviceProperties",
271 [Param("VkPhysicalDevice", "physicalDevice"),
272 Param("VkPhysicalDeviceProperties*", "pProperties")]),
Tony Barbour59a47322015-06-24 16:06:58 -0600273
Cody Northropd0802882015-08-03 17:04:53 -0600274 Proto("VkResult", "GetPhysicalDeviceQueueFamilyProperties",
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600275 [Param("VkPhysicalDevice", "physicalDevice"),
Cody Northropd0802882015-08-03 17:04:53 -0600276 Param("uint32_t*", "pCount"),
277 Param("VkQueueFamilyProperties*", "pQueueFamilyProperties")]),
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600278
279 Proto("VkResult", "GetPhysicalDeviceMemoryProperties",
280 [Param("VkPhysicalDevice", "physicalDevice"),
281 Param("VkPhysicalDeviceMemoryProperties*", "pMemoryProperties")]),
Tony Barbour59a47322015-06-24 16:06:58 -0600282
283 Proto("VkResult", "GetGlobalExtensionProperties",
Courtney Goeltzenleuchter110fdf92015-06-29 15:39:26 -0600284 [Param("const char*", "pLayerName"),
285 Param("uint32_t*", "pCount"),
Tony Barbour59a47322015-06-24 16:06:58 -0600286 Param("VkExtensionProperties*", "pProperties")]),
287
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600288 Proto("VkResult", "GetPhysicalDeviceExtensionProperties",
289 [Param("VkPhysicalDevice", "physicalDevice"),
290 Param("const char*", "pLayerName"),
Jon Ashburnea65e492015-08-06 17:27:49 -0600291 Param("uint32_t*", "pCount"),
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600292 Param("VkExtensionProperties*", "pProperties")]),
293
Courtney Goeltzenleuchter110fdf92015-06-29 15:39:26 -0600294 Proto("VkResult", "GetGlobalLayerProperties",
295 [Param("uint32_t*", "pCount"),
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600296 Param("VkLayerProperties*", "pProperties")]),
297
298 Proto("VkResult", "GetPhysicalDeviceLayerProperties",
299 [Param("VkPhysicalDevice", "physicalDevice"),
Jon Ashburnea65e492015-08-06 17:27:49 -0600300 Param("uint32_t*", "pCount"),
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600301 Param("VkLayerProperties*", "pProperties")]),
Tobin Ehlis01939012015-04-16 12:51:37 -0600302
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600303 Proto("VkResult", "GetDeviceQueue",
304 [Param("VkDevice", "device"),
Jon Ashburnea65e492015-08-06 17:27:49 -0600305 Param("uint32_t", "queueFamilyIndex"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600306 Param("uint32_t", "queueIndex"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600307 Param("VkQueue*", "pQueue")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800308
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600309 Proto("VkResult", "QueueSubmit",
310 [Param("VkQueue", "queue"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600311 Param("uint32_t", "cmdBufferCount"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600312 Param("const VkCmdBuffer*", "pCmdBuffers"),
313 Param("VkFence", "fence")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800314
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600315 Proto("VkResult", "QueueWaitIdle",
316 [Param("VkQueue", "queue")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800317
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600318 Proto("VkResult", "DeviceWaitIdle",
319 [Param("VkDevice", "device")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800320
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600321 Proto("VkResult", "AllocMemory",
322 [Param("VkDevice", "device"),
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -0600323 Param("const VkMemoryAllocInfo*", "pAllocInfo"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600324 Param("VkDeviceMemory*", "pMem")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800325
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600326 Proto("VkResult", "FreeMemory",
Mike Stroyanb050c682015-04-17 12:36:38 -0600327 [Param("VkDevice", "device"),
328 Param("VkDeviceMemory", "mem")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800329
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600330 Proto("VkResult", "MapMemory",
Mike Stroyanb050c682015-04-17 12:36:38 -0600331 [Param("VkDevice", "device"),
332 Param("VkDeviceMemory", "mem"),
Tony Barbour71a85122015-04-16 19:09:28 -0600333 Param("VkDeviceSize", "offset"),
334 Param("VkDeviceSize", "size"),
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600335 Param("VkMemoryMapFlags", "flags"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600336 Param("void**", "ppData")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800337
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600338 Proto("VkResult", "UnmapMemory",
Mike Stroyanb050c682015-04-17 12:36:38 -0600339 [Param("VkDevice", "device"),
340 Param("VkDeviceMemory", "mem")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800341
Courtney Goeltzenleuchterf69f8a22015-04-29 17:16:21 -0600342 Proto("VkResult", "FlushMappedMemoryRanges",
Mike Stroyanb050c682015-04-17 12:36:38 -0600343 [Param("VkDevice", "device"),
Courtney Goeltzenleuchterf69f8a22015-04-29 17:16:21 -0600344 Param("uint32_t", "memRangeCount"),
345 Param("const VkMappedMemoryRange*", "pMemRanges")]),
346
347 Proto("VkResult", "InvalidateMappedMemoryRanges",
348 [Param("VkDevice", "device"),
349 Param("uint32_t", "memRangeCount"),
350 Param("const VkMappedMemoryRange*", "pMemRanges")]),
Tony Barbourb1250542015-04-16 19:23:13 -0600351
Courtney Goeltzenleuchterfb71f222015-07-09 21:57:28 -0600352 Proto("VkResult", "GetDeviceMemoryCommitment",
353 [Param("VkDevice", "device"),
354 Param("VkDeviceMemory", "memory"),
355 Param("VkDeviceSize*", "pCommittedMemoryInBytes")]),
356
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600357 Proto("VkResult", "BindBufferMemory",
358 [Param("VkDevice", "device"),
359 Param("VkBuffer", "buffer"),
360 Param("VkDeviceMemory", "mem"),
361 Param("VkDeviceSize", "memOffset")]),
362
363 Proto("VkResult", "BindImageMemory",
364 [Param("VkDevice", "device"),
365 Param("VkImage", "image"),
366 Param("VkDeviceMemory", "mem"),
367 Param("VkDeviceSize", "memOffset")]),
368
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600369 Proto("VkResult", "GetBufferMemoryRequirements",
Mike Stroyanb050c682015-04-17 12:36:38 -0600370 [Param("VkDevice", "device"),
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600371 Param("VkBuffer", "buffer"),
Tony Barbour59a47322015-06-24 16:06:58 -0600372 Param("VkMemoryRequirements*", "pMemoryRequirements")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800373
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600374 Proto("VkResult", "GetImageMemoryRequirements",
Mark Lobodzinski942b1722015-05-11 17:21:15 -0500375 [Param("VkDevice", "device"),
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600376 Param("VkImage", "image"),
377 Param("VkMemoryRequirements*", "pMemoryRequirements")]),
378
Mark Lobodzinski16e8bef2015-07-03 15:58:09 -0600379 Proto("VkResult", "GetImageSparseMemoryRequirements",
380 [Param("VkDevice", "device"),
381 Param("VkImage", "image"),
382 Param("uint32_t*", "pNumRequirements"),
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600383 Param("VkSparseImageMemoryRequirements*", "pSparseMemoryRequirements")]),
Mark Lobodzinski16e8bef2015-07-03 15:58:09 -0600384
385 Proto("VkResult", "GetPhysicalDeviceSparseImageFormatProperties",
386 [Param("VkPhysicalDevice", "physicalDevice"),
387 Param("VkFormat", "format"),
388 Param("VkImageType", "type"),
389 Param("uint32_t", "samples"),
390 Param("VkImageUsageFlags", "usage"),
391 Param("VkImageTiling", "tiling"),
392 Param("uint32_t*", "pNumProperties"),
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600393 Param("VkSparseImageFormatProperties*", "pProperties")]),
Mark Lobodzinski16e8bef2015-07-03 15:58:09 -0600394
Mark Lobodzinski942b1722015-05-11 17:21:15 -0500395 Proto("VkResult", "QueueBindSparseBufferMemory",
Mark Lobodzinski40f7f402015-04-16 11:44:05 -0500396 [Param("VkQueue", "queue"),
Mark Lobodzinski942b1722015-05-11 17:21:15 -0500397 Param("VkBuffer", "buffer"),
Mark Lobodzinski16e8bef2015-07-03 15:58:09 -0600398 Param("uint32_t", "numBindings"),
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600399 Param("const VkSparseMemoryBindInfo*", "pBindInfo")]),
Mark Lobodzinski16e8bef2015-07-03 15:58:09 -0600400
401 Proto("VkResult", "QueueBindSparseImageOpaqueMemory",
402 [Param("VkQueue", "queue"),
403 Param("VkImage", "image"),
404 Param("uint32_t", "numBindings"),
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600405 Param("const VkSparseMemoryBindInfo*", "pBindInfo")]),
Chia-I Wu1a28fe02015-01-01 07:55:04 +0800406
Mark Lobodzinski942b1722015-05-11 17:21:15 -0500407 Proto("VkResult", "QueueBindSparseImageMemory",
Mark Lobodzinski40f7f402015-04-16 11:44:05 -0500408 [Param("VkQueue", "queue"),
409 Param("VkImage", "image"),
Mark Lobodzinski16e8bef2015-07-03 15:58:09 -0600410 Param("uint32_t", "numBindings"),
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600411 Param("const VkSparseImageMemoryBindInfo*", "pBindInfo")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800412
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600413 Proto("VkResult", "CreateFence",
414 [Param("VkDevice", "device"),
415 Param("const VkFenceCreateInfo*", "pCreateInfo"),
416 Param("VkFence*", "pFence")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800417
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600418 Proto("VkResult", "DestroyFence",
419 [Param("VkDevice", "device"),
420 Param("VkFence", "fence")]),
421
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600422 Proto("VkResult", "ResetFences",
423 [Param("VkDevice", "device"),
Mark Lobodzinski148e1582015-04-07 16:07:57 -0500424 Param("uint32_t", "fenceCount"),
Courtney Goeltzenleuchter2bf8f902015-06-18 17:28:20 -0600425 Param("const VkFence*", "pFences")]),
Mark Lobodzinski148e1582015-04-07 16:07:57 -0500426
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600427 Proto("VkResult", "GetFenceStatus",
Mike Stroyanb050c682015-04-17 12:36:38 -0600428 [Param("VkDevice", "device"),
429 Param("VkFence", "fence")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800430
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600431 Proto("VkResult", "WaitForFences",
432 [Param("VkDevice", "device"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600433 Param("uint32_t", "fenceCount"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600434 Param("const VkFence*", "pFences"),
Courtney Goeltzenleuchtercd2a0992015-07-09 11:44:38 -0600435 Param("VkBool32", "waitAll"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600436 Param("uint64_t", "timeout")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800437
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600438 Proto("VkResult", "CreateSemaphore",
439 [Param("VkDevice", "device"),
440 Param("const VkSemaphoreCreateInfo*", "pCreateInfo"),
441 Param("VkSemaphore*", "pSemaphore")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800442
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600443 Proto("VkResult", "DestroySemaphore",
444 [Param("VkDevice", "device"),
445 Param("VkSemaphore", "semaphore")]),
446
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600447 Proto("VkResult", "QueueSignalSemaphore",
448 [Param("VkQueue", "queue"),
449 Param("VkSemaphore", "semaphore")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800450
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600451 Proto("VkResult", "QueueWaitSemaphore",
452 [Param("VkQueue", "queue"),
453 Param("VkSemaphore", "semaphore")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800454
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600455 Proto("VkResult", "CreateEvent",
456 [Param("VkDevice", "device"),
457 Param("const VkEventCreateInfo*", "pCreateInfo"),
458 Param("VkEvent*", "pEvent")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800459
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600460 Proto("VkResult", "DestroyEvent",
461 [Param("VkDevice", "device"),
462 Param("VkEvent", "event")]),
463
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600464 Proto("VkResult", "GetEventStatus",
Mike Stroyanb050c682015-04-17 12:36:38 -0600465 [Param("VkDevice", "device"),
466 Param("VkEvent", "event")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800467
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600468 Proto("VkResult", "SetEvent",
Mike Stroyanb050c682015-04-17 12:36:38 -0600469 [Param("VkDevice", "device"),
470 Param("VkEvent", "event")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800471
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600472 Proto("VkResult", "ResetEvent",
Mike Stroyanb050c682015-04-17 12:36:38 -0600473 [Param("VkDevice", "device"),
474 Param("VkEvent", "event")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800475
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600476 Proto("VkResult", "CreateQueryPool",
477 [Param("VkDevice", "device"),
478 Param("const VkQueryPoolCreateInfo*", "pCreateInfo"),
479 Param("VkQueryPool*", "pQueryPool")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800480
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600481 Proto("VkResult", "DestroyQueryPool",
482 [Param("VkDevice", "device"),
483 Param("VkQueryPool", "queryPool")]),
484
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600485 Proto("VkResult", "GetQueryPoolResults",
Mike Stroyanb050c682015-04-17 12:36:38 -0600486 [Param("VkDevice", "device"),
487 Param("VkQueryPool", "queryPool"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600488 Param("uint32_t", "startQuery"),
489 Param("uint32_t", "queryCount"),
490 Param("size_t*", "pDataSize"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600491 Param("void*", "pData"),
492 Param("VkQueryResultFlags", "flags")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800493
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600494 Proto("VkResult", "CreateBuffer",
495 [Param("VkDevice", "device"),
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -0600496 Param("const VkBufferCreateInfo*", "pCreateInfo"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600497 Param("VkBuffer*", "pBuffer")]),
Chia-I Wu1a28fe02015-01-01 07:55:04 +0800498
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600499 Proto("VkResult", "DestroyBuffer",
500 [Param("VkDevice", "device"),
501 Param("VkBuffer", "buffer")]),
502
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600503 Proto("VkResult", "CreateBufferView",
504 [Param("VkDevice", "device"),
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -0600505 Param("const VkBufferViewCreateInfo*", "pCreateInfo"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600506 Param("VkBufferView*", "pView")]),
Chia-I Wu1a28fe02015-01-01 07:55:04 +0800507
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600508 Proto("VkResult", "DestroyBufferView",
509 [Param("VkDevice", "device"),
510 Param("VkBufferView", "bufferView")]),
511
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600512 Proto("VkResult", "CreateImage",
513 [Param("VkDevice", "device"),
514 Param("const VkImageCreateInfo*", "pCreateInfo"),
515 Param("VkImage*", "pImage")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800516
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600517 Proto("VkResult", "DestroyImage",
518 [Param("VkDevice", "device"),
519 Param("VkImage", "image")]),
520
Tony Barbour59a47322015-06-24 16:06:58 -0600521 Proto("VkResult", "GetImageSubresourceLayout",
Mike Stroyanb050c682015-04-17 12:36:38 -0600522 [Param("VkDevice", "device"),
523 Param("VkImage", "image"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600524 Param("const VkImageSubresource*", "pSubresource"),
Tony Barbour59a47322015-06-24 16:06:58 -0600525 Param("VkSubresourceLayout*", "pLayout")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800526
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600527 Proto("VkResult", "CreateImageView",
528 [Param("VkDevice", "device"),
529 Param("const VkImageViewCreateInfo*", "pCreateInfo"),
530 Param("VkImageView*", "pView")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800531
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600532 Proto("VkResult", "DestroyImageView",
533 [Param("VkDevice", "device"),
534 Param("VkImageView", "imageView")]),
535
Chia-I Wu08accc62015-07-07 11:50:03 +0800536 Proto("VkResult", "CreateAttachmentView",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600537 [Param("VkDevice", "device"),
Chia-I Wu08accc62015-07-07 11:50:03 +0800538 Param("const VkAttachmentViewCreateInfo*", "pCreateInfo"),
539 Param("VkAttachmentView*", "pView")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800540
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600541 Proto("VkResult", "DestroyAttachmentView",
542 [Param("VkDevice", "device"),
543 Param("VkAttachmentView", "attachmentView")]),
544
Courtney Goeltzenleuchter2d2cb682015-06-24 18:24:19 -0600545 Proto("VkResult", "CreateShaderModule",
546 [Param("VkDevice", "device"),
547 Param("const VkShaderModuleCreateInfo*", "pCreateInfo"),
548 Param("VkShaderModule*", "pShaderModule")]),
549
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600550 Proto("VkResult", "DestroyShaderModule",
551 [Param("VkDevice", "device"),
552 Param("VkShaderModule", "shaderModule")]),
553
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600554 Proto("VkResult", "CreateShader",
555 [Param("VkDevice", "device"),
556 Param("const VkShaderCreateInfo*", "pCreateInfo"),
557 Param("VkShader*", "pShader")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800558
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600559 Proto("VkResult", "DestroyShader",
560 [Param("VkDevice", "device"),
561 Param("VkShader", "shader")]),
562
Jon Ashburnc669cc62015-07-09 15:02:25 -0600563 Proto("VkResult", "CreatePipelineCache",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600564 [Param("VkDevice", "device"),
Jon Ashburnc669cc62015-07-09 15:02:25 -0600565 Param("const VkPipelineCacheCreateInfo*", "pCreateInfo"),
566 Param("VkPipelineCache*", "pPipelineCache")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800567
Jon Ashburnc669cc62015-07-09 15:02:25 -0600568 Proto("VkResult", "DestroyPipelineCache",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600569 [Param("VkDevice", "device"),
Jon Ashburnc669cc62015-07-09 15:02:25 -0600570 Param("VkPipelineCache", "pipelineCache")]),
Courtney Goeltzenleuchter0d40f152015-03-25 15:37:49 -0600571
Jon Ashburnc669cc62015-07-09 15:02:25 -0600572 Proto("size_t", "GetPipelineCacheSize",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600573 [Param("VkDevice", "device"),
Jon Ashburnc669cc62015-07-09 15:02:25 -0600574 Param("VkPipelineCache", "pipelineCache")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800575
Jon Ashburnc669cc62015-07-09 15:02:25 -0600576 Proto("VkResult", "GetPipelineCacheData",
Mike Stroyanb050c682015-04-17 12:36:38 -0600577 [Param("VkDevice", "device"),
Jon Ashburnc669cc62015-07-09 15:02:25 -0600578 Param("VkPipelineCache", "pipelineCache"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600579 Param("void*", "pData")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800580
Jon Ashburnc669cc62015-07-09 15:02:25 -0600581 Proto("VkResult", "MergePipelineCaches",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600582 [Param("VkDevice", "device"),
Jon Ashburnc669cc62015-07-09 15:02:25 -0600583 Param("VkPipelineCache", "destCache"),
584 Param("uint32_t", "srcCacheCount"),
585 Param("const VkPipelineCache*", "pSrcCaches")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800586
Jon Ashburnc669cc62015-07-09 15:02:25 -0600587 Proto("VkResult", "CreateGraphicsPipelines",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600588 [Param("VkDevice", "device"),
Jon Ashburnc669cc62015-07-09 15:02:25 -0600589 Param("VkPipelineCache", "pipelineCache"),
590 Param("uint32_t", "count"),
591 Param("const VkGraphicsPipelineCreateInfo*", "pCreateInfos"),
592 Param("VkPipeline*", "pPipelines")]),
593
594 Proto("VkResult", "CreateComputePipelines",
595 [Param("VkDevice", "device"),
596 Param("VkPipelineCache", "pipelineCache"),
597 Param("uint32_t", "count"),
598 Param("const VkComputePipelineCreateInfo*", "pCreateInfos"),
599 Param("VkPipeline*", "pPipelines")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800600
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600601 Proto("VkResult", "DestroyPipeline",
602 [Param("VkDevice", "device"),
603 Param("VkPipeline", "pipeline")]),
604
Mark Lobodzinski0fadf5f2015-04-17 14:11:39 -0500605 Proto("VkResult", "CreatePipelineLayout",
606 [Param("VkDevice", "device"),
607 Param("const VkPipelineLayoutCreateInfo*", "pCreateInfo"),
608 Param("VkPipelineLayout*", "pPipelineLayout")]),
609
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600610 Proto("VkResult", "DestroyPipelineLayout",
611 [Param("VkDevice", "device"),
612 Param("VkPipelineLayout", "pipelineLayout")]),
613
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600614 Proto("VkResult", "CreateSampler",
615 [Param("VkDevice", "device"),
616 Param("const VkSamplerCreateInfo*", "pCreateInfo"),
617 Param("VkSampler*", "pSampler")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800618
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600619 Proto("VkResult", "DestroySampler",
620 [Param("VkDevice", "device"),
621 Param("VkSampler", "sampler")]),
622
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600623 Proto("VkResult", "CreateDescriptorSetLayout",
624 [Param("VkDevice", "device"),
625 Param("const VkDescriptorSetLayoutCreateInfo*", "pCreateInfo"),
626 Param("VkDescriptorSetLayout*", "pSetLayout")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800627
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600628 Proto("VkResult", "DestroyDescriptorSetLayout",
629 [Param("VkDevice", "device"),
630 Param("VkDescriptorSetLayout", "descriptorSetLayout")]),
631
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600632 Proto("VkResult", "CreateDescriptorPool",
633 [Param("VkDevice", "device"),
634 Param("VkDescriptorPoolUsage", "poolUsage"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600635 Param("uint32_t", "maxSets"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600636 Param("const VkDescriptorPoolCreateInfo*", "pCreateInfo"),
637 Param("VkDescriptorPool*", "pDescriptorPool")]),
Chia-I Wu11078b02015-01-04 16:27:24 +0800638
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600639 Proto("VkResult", "DestroyDescriptorPool",
640 [Param("VkDevice", "device"),
641 Param("VkDescriptorPool", "descriptorPool")]),
642
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600643 Proto("VkResult", "ResetDescriptorPool",
Mike Stroyanb050c682015-04-17 12:36:38 -0600644 [Param("VkDevice", "device"),
645 Param("VkDescriptorPool", "descriptorPool")]),
Chia-I Wu11078b02015-01-04 16:27:24 +0800646
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600647 Proto("VkResult", "AllocDescriptorSets",
Mike Stroyanb050c682015-04-17 12:36:38 -0600648 [Param("VkDevice", "device"),
649 Param("VkDescriptorPool", "descriptorPool"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600650 Param("VkDescriptorSetUsage", "setUsage"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600651 Param("uint32_t", "count"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600652 Param("const VkDescriptorSetLayout*", "pSetLayouts"),
Cody Northrop1e4f8022015-08-03 12:47:29 -0600653 Param("VkDescriptorSet*", "pDescriptorSets")]),
Chia-I Wu11078b02015-01-04 16:27:24 +0800654
Tony Barbour34ec6922015-07-10 10:50:45 -0600655 Proto("VkResult", "FreeDescriptorSets",
656 [Param("VkDevice", "device"),
657 Param("VkDescriptorPool", "descriptorPool"),
658 Param("uint32_t", "count"),
659 Param("const VkDescriptorSet*", "pDescriptorSets")]),
660
Chia-I Wu9d00ed72015-05-25 16:27:55 +0800661 Proto("VkResult", "UpdateDescriptorSets",
Mike Stroyanb050c682015-04-17 12:36:38 -0600662 [Param("VkDevice", "device"),
Chia-I Wu9d00ed72015-05-25 16:27:55 +0800663 Param("uint32_t", "writeCount"),
664 Param("const VkWriteDescriptorSet*", "pDescriptorWrites"),
665 Param("uint32_t", "copyCount"),
666 Param("const VkCopyDescriptorSet*", "pDescriptorCopies")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800667
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600668 Proto("VkResult", "CreateDynamicViewportState",
669 [Param("VkDevice", "device"),
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600670 Param("const VkDynamicViewportStateCreateInfo*", "pCreateInfo"),
671 Param("VkDynamicViewportState*", "pState")]),
672
673 Proto("VkResult", "DestroyDynamicViewportState",
674 [Param("VkDevice", "device"),
675 Param("VkDynamicViewportState", "dynamicViewportState")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800676
Cody Northrop271ba752015-08-26 10:01:32 -0600677 Proto("VkResult", "CreateDynamicLineWidthState",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600678 [Param("VkDevice", "device"),
Cody Northrop271ba752015-08-26 10:01:32 -0600679 Param("const VkDynamicLineWidthStateCreateInfo*", "pCreateInfo"),
680 Param("VkDynamicLineWidthState*", "pState")]),
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600681
Cody Northrop271ba752015-08-26 10:01:32 -0600682 Proto("VkResult", "DestroyDynamicLineWidthState",
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600683 [Param("VkDevice", "device"),
Cody Northrop271ba752015-08-26 10:01:32 -0600684 Param("VkDynamicLineWidthState", "dynamicLineWidthState")]),
Cody Northrop12365112015-08-17 11:10:49 -0600685
Cody Northrop271ba752015-08-26 10:01:32 -0600686 Proto("VkResult", "CreateDynamicDepthBiasState",
Cody Northrop12365112015-08-17 11:10:49 -0600687 [Param("VkDevice", "device"),
Cody Northrop271ba752015-08-26 10:01:32 -0600688 Param("const VkDynamicDepthBiasStateCreateInfo*", "pCreateInfo"),
689 Param("VkDynamicDepthBiasState*", "pState")]),
Cody Northrop12365112015-08-17 11:10:49 -0600690
Cody Northrop271ba752015-08-26 10:01:32 -0600691 Proto("VkResult", "DestroyDynamicDepthBiasState",
Cody Northrop12365112015-08-17 11:10:49 -0600692 [Param("VkDevice", "device"),
Cody Northrop271ba752015-08-26 10:01:32 -0600693 Param("VkDynamicDepthBiasState", "dynamicDepthBiasState")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800694
Cody Northrop271ba752015-08-26 10:01:32 -0600695 Proto("VkResult", "CreateDynamicBlendState",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600696 [Param("VkDevice", "device"),
Cody Northrop271ba752015-08-26 10:01:32 -0600697 Param("const VkDynamicBlendStateCreateInfo*", "pCreateInfo"),
698 Param("VkDynamicBlendState*", "pState")]),
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600699
Cody Northrop271ba752015-08-26 10:01:32 -0600700 Proto("VkResult", "DestroyDynamicBlendState",
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600701 [Param("VkDevice", "device"),
Cody Northrop271ba752015-08-26 10:01:32 -0600702 Param("VkDynamicBlendState", "DynamicBlendState")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800703
Cody Northrop271ba752015-08-26 10:01:32 -0600704 Proto("VkResult", "CreateDynamicDepthBoundsState",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600705 [Param("VkDevice", "device"),
Cody Northrop271ba752015-08-26 10:01:32 -0600706 Param("const VkDynamicDepthBoundsStateCreateInfo*", "pCreateInfo"),
707 Param("VkDynamicDepthBoundsState*", "pState")]),
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600708
Cody Northrop271ba752015-08-26 10:01:32 -0600709 Proto("VkResult", "DestroyDynamicDepthBoundsState",
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600710 [Param("VkDevice", "device"),
Cody Northrop271ba752015-08-26 10:01:32 -0600711 Param("VkDynamicDepthBoundsState", "dynamicDepthBoundsState")]),
Cody Northrop82485a82015-08-18 15:21:16 -0600712
713 Proto("VkResult", "CreateDynamicStencilState",
714 [Param("VkDevice", "device"),
715 Param("const VkDynamicStencilStateCreateInfo*", "pCreateInfoFront"),
716 Param("const VkDynamicStencilStateCreateInfo*", "pCreateInfoBack"),
717 Param("VkDynamicStencilState*", "pState")]),
718
719 Proto("VkResult", "DestroyDynamicStencilState",
720 [Param("VkDevice", "device"),
721 Param("VkDynamicStencilState", "dynamicStencilState")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800722
Cody Northrope62183e2015-07-09 18:08:05 -0600723 Proto("VkResult", "CreateCommandPool",
724 [Param("VkDevice", "device"),
725 Param("const VkCmdPoolCreateInfo*", "pCreateInfo"),
726 Param("VkCmdPool*", "pCmdPool")]),
727
728 Proto("VkResult", "DestroyCommandPool",
729 [Param("VkDevice", "device"),
730 Param("VkCmdPool", "cmdPool")]),
731
732 Proto("VkResult", "ResetCommandPool",
733 [Param("VkDevice", "device"),
734 Param("VkCmdPool", "cmdPool"),
735 Param("VkCmdPoolResetFlags", "flags")]),
736
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600737 Proto("VkResult", "CreateCommandBuffer",
738 [Param("VkDevice", "device"),
739 Param("const VkCmdBufferCreateInfo*", "pCreateInfo"),
740 Param("VkCmdBuffer*", "pCmdBuffer")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800741
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600742 Proto("VkResult", "DestroyCommandBuffer",
743 [Param("VkDevice", "device"),
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600744 Param("VkCmdBuffer", "commandBuffer")]),
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600745
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600746 Proto("VkResult", "BeginCommandBuffer",
747 [Param("VkCmdBuffer", "cmdBuffer"),
748 Param("const VkCmdBufferBeginInfo*", "pBeginInfo")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800749
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600750 Proto("VkResult", "EndCommandBuffer",
751 [Param("VkCmdBuffer", "cmdBuffer")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800752
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600753 Proto("VkResult", "ResetCommandBuffer",
Cody Northrope62183e2015-07-09 18:08:05 -0600754 [Param("VkCmdBuffer", "cmdBuffer"),
755 Param("VkCmdBufferResetFlags", "flags")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800756
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600757 Proto("void", "CmdBindPipeline",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600758 [Param("VkCmdBuffer", "cmdBuffer"),
759 Param("VkPipelineBindPoint", "pipelineBindPoint"),
760 Param("VkPipeline", "pipeline")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800761
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600762 Proto("void", "CmdBindDynamicViewportState",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600763 [Param("VkCmdBuffer", "cmdBuffer"),
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600764 Param("VkDynamicViewportState", "dynamicViewportState")]),
765
Cody Northrop271ba752015-08-26 10:01:32 -0600766 Proto("void", "CmdBindDynamicLineWidthState",
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600767 [Param("VkCmdBuffer", "cmdBuffer"),
Cody Northrop271ba752015-08-26 10:01:32 -0600768 Param("VkDynamicLineWidthState", "dynamicLineWidthState")]),
Cody Northrop12365112015-08-17 11:10:49 -0600769
Cody Northrop271ba752015-08-26 10:01:32 -0600770 Proto("void", "CmdBindDynamicDepthBiasState",
Cody Northrop12365112015-08-17 11:10:49 -0600771 [Param("VkCmdBuffer", "cmdBuffer"),
Cody Northrop271ba752015-08-26 10:01:32 -0600772 Param("VkDynamicDepthBiasState", "dynamicDepthBiasState")]),
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600773
Cody Northrop271ba752015-08-26 10:01:32 -0600774 Proto("void", "CmdBindDynamicBlendState",
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600775 [Param("VkCmdBuffer", "cmdBuffer"),
Cody Northrop271ba752015-08-26 10:01:32 -0600776 Param("VkDynamicBlendState", "DynamicBlendState")]),
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600777
Cody Northrop271ba752015-08-26 10:01:32 -0600778 Proto("void", "CmdBindDynamicDepthBoundsState",
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600779 [Param("VkCmdBuffer", "cmdBuffer"),
Cody Northrop271ba752015-08-26 10:01:32 -0600780 Param("VkDynamicDepthBoundsState", "dynamicDepthBoundsState")]),
Cody Northrop82485a82015-08-18 15:21:16 -0600781
782 Proto("void", "CmdBindDynamicStencilState",
783 [Param("VkCmdBuffer", "cmdBuffer"),
784 Param("VkDynamicStencilState", "dynamicStencilState")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800785
Chia-I Wu53f07d72015-03-28 15:23:55 +0800786 Proto("void", "CmdBindDescriptorSets",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600787 [Param("VkCmdBuffer", "cmdBuffer"),
788 Param("VkPipelineBindPoint", "pipelineBindPoint"),
Mark Lobodzinskif2093b62015-06-15 13:21:21 -0600789 Param("VkPipelineLayout", "layout"),
Cody Northropd4c1a502015-04-16 13:41:56 -0600790 Param("uint32_t", "firstSet"),
791 Param("uint32_t", "setCount"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600792 Param("const VkDescriptorSet*", "pDescriptorSets"),
Cody Northropd4c1a502015-04-16 13:41:56 -0600793 Param("uint32_t", "dynamicOffsetCount"),
794 Param("const uint32_t*", "pDynamicOffsets")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800795
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600796 Proto("void", "CmdBindIndexBuffer",
797 [Param("VkCmdBuffer", "cmdBuffer"),
798 Param("VkBuffer", "buffer"),
799 Param("VkDeviceSize", "offset"),
800 Param("VkIndexType", "indexType")]),
801
Courtney Goeltzenleuchterf68ad722015-04-16 13:38:46 -0600802 Proto("void", "CmdBindVertexBuffers",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600803 [Param("VkCmdBuffer", "cmdBuffer"),
Courtney Goeltzenleuchterf68ad722015-04-16 13:38:46 -0600804 Param("uint32_t", "startBinding"),
805 Param("uint32_t", "bindingCount"),
806 Param("const VkBuffer*", "pBuffers"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600807 Param("const VkDeviceSize*", "pOffsets")]),
808
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600809 Proto("void", "CmdDraw",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600810 [Param("VkCmdBuffer", "cmdBuffer"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600811 Param("uint32_t", "firstVertex"),
812 Param("uint32_t", "vertexCount"),
813 Param("uint32_t", "firstInstance"),
814 Param("uint32_t", "instanceCount")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800815
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600816 Proto("void", "CmdDrawIndexed",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600817 [Param("VkCmdBuffer", "cmdBuffer"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600818 Param("uint32_t", "firstIndex"),
819 Param("uint32_t", "indexCount"),
820 Param("int32_t", "vertexOffset"),
821 Param("uint32_t", "firstInstance"),
822 Param("uint32_t", "instanceCount")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800823
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600824 Proto("void", "CmdDrawIndirect",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600825 [Param("VkCmdBuffer", "cmdBuffer"),
826 Param("VkBuffer", "buffer"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600827 Param("VkDeviceSize", "offset"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600828 Param("uint32_t", "count"),
829 Param("uint32_t", "stride")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800830
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600831 Proto("void", "CmdDrawIndexedIndirect",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600832 [Param("VkCmdBuffer", "cmdBuffer"),
833 Param("VkBuffer", "buffer"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600834 Param("VkDeviceSize", "offset"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600835 Param("uint32_t", "count"),
836 Param("uint32_t", "stride")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800837
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600838 Proto("void", "CmdDispatch",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600839 [Param("VkCmdBuffer", "cmdBuffer"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600840 Param("uint32_t", "x"),
841 Param("uint32_t", "y"),
842 Param("uint32_t", "z")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800843
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600844 Proto("void", "CmdDispatchIndirect",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600845 [Param("VkCmdBuffer", "cmdBuffer"),
846 Param("VkBuffer", "buffer"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600847 Param("VkDeviceSize", "offset")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800848
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600849 Proto("void", "CmdCopyBuffer",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600850 [Param("VkCmdBuffer", "cmdBuffer"),
851 Param("VkBuffer", "srcBuffer"),
852 Param("VkBuffer", "destBuffer"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600853 Param("uint32_t", "regionCount"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600854 Param("const VkBufferCopy*", "pRegions")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800855
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600856 Proto("void", "CmdCopyImage",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600857 [Param("VkCmdBuffer", "cmdBuffer"),
858 Param("VkImage", "srcImage"),
859 Param("VkImageLayout", "srcImageLayout"),
860 Param("VkImage", "destImage"),
861 Param("VkImageLayout", "destImageLayout"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600862 Param("uint32_t", "regionCount"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600863 Param("const VkImageCopy*", "pRegions")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800864
Courtney Goeltzenleuchter89299fa2015-03-08 17:02:18 -0600865 Proto("void", "CmdBlitImage",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600866 [Param("VkCmdBuffer", "cmdBuffer"),
867 Param("VkImage", "srcImage"),
868 Param("VkImageLayout", "srcImageLayout"),
869 Param("VkImage", "destImage"),
870 Param("VkImageLayout", "destImageLayout"),
Courtney Goeltzenleuchter89299fa2015-03-08 17:02:18 -0600871 Param("uint32_t", "regionCount"),
Mark Lobodzinskiee5eef12015-05-22 14:43:25 -0500872 Param("const VkImageBlit*", "pRegions"),
873 Param("VkTexFilter", "filter")]),
Courtney Goeltzenleuchter89299fa2015-03-08 17:02:18 -0600874
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600875 Proto("void", "CmdCopyBufferToImage",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600876 [Param("VkCmdBuffer", "cmdBuffer"),
877 Param("VkBuffer", "srcBuffer"),
878 Param("VkImage", "destImage"),
879 Param("VkImageLayout", "destImageLayout"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600880 Param("uint32_t", "regionCount"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600881 Param("const VkBufferImageCopy*", "pRegions")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800882
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600883 Proto("void", "CmdCopyImageToBuffer",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600884 [Param("VkCmdBuffer", "cmdBuffer"),
885 Param("VkImage", "srcImage"),
886 Param("VkImageLayout", "srcImageLayout"),
887 Param("VkBuffer", "destBuffer"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600888 Param("uint32_t", "regionCount"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600889 Param("const VkBufferImageCopy*", "pRegions")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800890
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600891 Proto("void", "CmdUpdateBuffer",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600892 [Param("VkCmdBuffer", "cmdBuffer"),
893 Param("VkBuffer", "destBuffer"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600894 Param("VkDeviceSize", "destOffset"),
895 Param("VkDeviceSize", "dataSize"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600896 Param("const uint32_t*", "pData")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800897
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600898 Proto("void", "CmdFillBuffer",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600899 [Param("VkCmdBuffer", "cmdBuffer"),
900 Param("VkBuffer", "destBuffer"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600901 Param("VkDeviceSize", "destOffset"),
902 Param("VkDeviceSize", "fillSize"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600903 Param("uint32_t", "data")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800904
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600905 Proto("void", "CmdClearColorImage",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600906 [Param("VkCmdBuffer", "cmdBuffer"),
907 Param("VkImage", "image"),
908 Param("VkImageLayout", "imageLayout"),
Chris Forbesf0796e12015-06-24 14:34:53 +1200909 Param("const VkClearColorValue*", "pColor"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600910 Param("uint32_t", "rangeCount"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600911 Param("const VkImageSubresourceRange*", "pRanges")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800912
Chris Forbesd9be82b2015-06-22 17:21:59 +1200913 Proto("void", "CmdClearDepthStencilImage",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600914 [Param("VkCmdBuffer", "cmdBuffer"),
915 Param("VkImage", "image"),
916 Param("VkImageLayout", "imageLayout"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600917 Param("float", "depth"),
918 Param("uint32_t", "stencil"),
919 Param("uint32_t", "rangeCount"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600920 Param("const VkImageSubresourceRange*", "pRanges")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800921
Chris Forbesd9be82b2015-06-22 17:21:59 +1200922 Proto("void", "CmdClearColorAttachment",
923 [Param("VkCmdBuffer", "cmdBuffer"),
924 Param("uint32_t", "colorAttachment"),
925 Param("VkImageLayout", "imageLayout"),
Chris Forbesf0796e12015-06-24 14:34:53 +1200926 Param("const VkClearColorValue*", "pColor"),
Chris Forbesd9be82b2015-06-22 17:21:59 +1200927 Param("uint32_t", "rectCount"),
928 Param("const VkRect3D*", "pRects")]),
929
930 Proto("void", "CmdClearDepthStencilAttachment",
931 [Param("VkCmdBuffer", "cmdBuffer"),
932 Param("VkImageAspectFlags", "imageAspectMask"),
933 Param("VkImageLayout", "imageLayout"),
934 Param("float", "depth"),
935 Param("uint32_t", "stencil"),
936 Param("uint32_t", "rectCount"),
937 Param("const VkRect3D*", "pRects")]),
938
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600939 Proto("void", "CmdResolveImage",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600940 [Param("VkCmdBuffer", "cmdBuffer"),
941 Param("VkImage", "srcImage"),
942 Param("VkImageLayout", "srcImageLayout"),
943 Param("VkImage", "destImage"),
944 Param("VkImageLayout", "destImageLayout"),
Tony Barbour6865d4a2015-04-13 15:02:52 -0600945 Param("uint32_t", "regionCount"),
946 Param("const VkImageResolve*", "pRegions")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800947
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600948 Proto("void", "CmdSetEvent",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600949 [Param("VkCmdBuffer", "cmdBuffer"),
950 Param("VkEvent", "event"),
Tony Barbour0b2cfb22015-06-29 16:20:35 -0600951 Param("VkPipelineStageFlags", "stageMask")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800952
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600953 Proto("void", "CmdResetEvent",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600954 [Param("VkCmdBuffer", "cmdBuffer"),
955 Param("VkEvent", "event"),
Tony Barbour0b2cfb22015-06-29 16:20:35 -0600956 Param("VkPipelineStageFlags", "stageMask")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800957
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600958 Proto("void", "CmdWaitEvents",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600959 [Param("VkCmdBuffer", "cmdBuffer"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600960 Param("uint32_t", "eventCount"),
961 Param("const VkEvent*", "pEvents"),
Jon Ashburnea65e492015-08-06 17:27:49 -0600962 Param("VkPipelineStageFlags", "srcStageMask"),
Tony Barbour0b2cfb22015-06-29 16:20:35 -0600963 Param("VkPipelineStageFlags", "destStageMask"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600964 Param("uint32_t", "memBarrierCount"),
Courtney Goeltzenleuchterdbd20322015-07-12 12:58:58 -0600965 Param("const void* const*", "ppMemBarriers")]),
Mike Stroyanfb80d5f2014-12-04 11:08:39 +0000966
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600967 Proto("void", "CmdPipelineBarrier",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600968 [Param("VkCmdBuffer", "cmdBuffer"),
Courtney Goeltzenleuchterceebbb12015-07-12 13:07:46 -0600969 Param("VkPipelineStageFlags", "srcStageMask"),
Tony Barbour0b2cfb22015-06-29 16:20:35 -0600970 Param("VkPipelineStageFlags", "destStageMask"),
Courtney Goeltzenleuchtercd2a0992015-07-09 11:44:38 -0600971 Param("VkBool32", "byRegion"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600972 Param("uint32_t", "memBarrierCount"),
Courtney Goeltzenleuchterceebbb12015-07-12 13:07:46 -0600973 Param("const void* const*", "ppMemBarriers")]),
Mike Stroyanfb80d5f2014-12-04 11:08:39 +0000974
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600975 Proto("void", "CmdBeginQuery",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600976 [Param("VkCmdBuffer", "cmdBuffer"),
977 Param("VkQueryPool", "queryPool"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600978 Param("uint32_t", "slot"),
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600979 Param("VkQueryControlFlags", "flags")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800980
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600981 Proto("void", "CmdEndQuery",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600982 [Param("VkCmdBuffer", "cmdBuffer"),
983 Param("VkQueryPool", "queryPool"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600984 Param("uint32_t", "slot")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800985
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600986 Proto("void", "CmdResetQueryPool",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600987 [Param("VkCmdBuffer", "cmdBuffer"),
988 Param("VkQueryPool", "queryPool"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600989 Param("uint32_t", "startQuery"),
990 Param("uint32_t", "queryCount")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800991
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600992 Proto("void", "CmdWriteTimestamp",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600993 [Param("VkCmdBuffer", "cmdBuffer"),
994 Param("VkTimestampType", "timestampType"),
995 Param("VkBuffer", "destBuffer"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600996 Param("VkDeviceSize", "destOffset")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800997
Courtney Goeltzenleuchter1dbc8e22015-04-15 18:21:13 -0600998 Proto("void", "CmdCopyQueryPoolResults",
999 [Param("VkCmdBuffer", "cmdBuffer"),
1000 Param("VkQueryPool", "queryPool"),
1001 Param("uint32_t", "startQuery"),
1002 Param("uint32_t", "queryCount"),
1003 Param("VkBuffer", "destBuffer"),
Tony Barbourd1c35722015-04-16 15:59:00 -06001004 Param("VkDeviceSize", "destOffset"),
1005 Param("VkDeviceSize", "destStride"),
Tobin Ehlisa30e7e52015-07-06 14:02:36 -06001006 Param("VkQueryResultFlags", "flags")]),
Courtney Goeltzenleuchter1dbc8e22015-04-15 18:21:13 -06001007
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001008 Proto("VkResult", "CreateFramebuffer",
1009 [Param("VkDevice", "device"),
1010 Param("const VkFramebufferCreateInfo*", "pCreateInfo"),
1011 Param("VkFramebuffer*", "pFramebuffer")]),
Jeremy Hayesd65ae082015-01-14 16:17:08 -07001012
Tony Barbour1d2cd3f2015-07-03 10:33:54 -06001013 Proto("VkResult", "DestroyFramebuffer",
1014 [Param("VkDevice", "device"),
1015 Param("VkFramebuffer", "framebuffer")]),
1016
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001017 Proto("VkResult", "CreateRenderPass",
1018 [Param("VkDevice", "device"),
1019 Param("const VkRenderPassCreateInfo*", "pCreateInfo"),
1020 Param("VkRenderPass*", "pRenderPass")]),
Jeremy Hayesd65ae082015-01-14 16:17:08 -07001021
Tony Barbour1d2cd3f2015-07-03 10:33:54 -06001022 Proto("VkResult", "DestroyRenderPass",
1023 [Param("VkDevice", "device"),
1024 Param("VkRenderPass", "renderPass")]),
1025
Courtney Goeltzenleuchtera97e2ea2015-07-27 13:47:08 -06001026 Proto("VkResult", "GetRenderAreaGranularity",
1027 [Param("VkDevice", "device"),
1028 Param("VkRenderPass", "renderPass"),
1029 Param("VkExtent2D*", "pGranularity")]),
1030
Jon Ashburne13f1982015-02-02 09:58:11 -07001031 Proto("void", "CmdBeginRenderPass",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001032 [Param("VkCmdBuffer", "cmdBuffer"),
Chia-I Wu08accc62015-07-07 11:50:03 +08001033 Param("const VkRenderPassBeginInfo*", "pRenderPassBegin"),
1034 Param("VkRenderPassContents", "contents")]),
1035
1036 Proto("void", "CmdNextSubpass",
1037 [Param("VkCmdBuffer", "cmdBuffer"),
1038 Param("VkRenderPassContents", "contents")]),
Jon Ashburne13f1982015-02-02 09:58:11 -07001039
Courtney Goeltzenleuchterab7db3b2015-07-27 14:04:01 -06001040 Proto("void", "CmdPushConstants",
1041 [Param("VkCmdBuffer", "cmdBuffer"),
1042 Param("VkPipelineLayout", "layout"),
1043 Param("VkShaderStageFlags", "stageFlags"),
1044 Param("uint32_t", "start"),
1045 Param("uint32_t", "length"),
1046 Param("const void*", "values")]),
1047
Jon Ashburne13f1982015-02-02 09:58:11 -07001048 Proto("void", "CmdEndRenderPass",
Chia-I Wu0b50a1c2015-06-26 15:34:39 +08001049 [Param("VkCmdBuffer", "cmdBuffer")]),
1050
1051 Proto("void", "CmdExecuteCommands",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001052 [Param("VkCmdBuffer", "cmdBuffer"),
Chia-I Wu0b50a1c2015-06-26 15:34:39 +08001053 Param("uint32_t", "cmdBuffersCount"),
1054 Param("const VkCmdBuffer*", "pCmdBuffers")]),
Chia-I Wue442dc32015-01-01 09:31:15 +08001055 ],
Chia-I Wufb2559d2014-08-01 11:19:52 +08001056)
1057
Ian Elliott1064fe32015-07-06 14:31:32 -06001058wsi_swapchain = Extension(
1059 name="VK_WSI_swapchain",
1060 headers=["vk_wsi_swapchain.h"],
Jon Ashburnea65e492015-08-06 17:27:49 -06001061 objects=[],
Chia-I Wue442dc32015-01-01 09:31:15 +08001062 protos=[
Ian Elliott1064fe32015-07-06 14:31:32 -06001063 Proto("VkResult", "GetPhysicalDeviceSurfaceSupportWSI",
1064 [Param("VkPhysicalDevice", "physicalDevice"),
Jon Ashburnea65e492015-08-06 17:27:49 -06001065 Param("uint32_t", "queueFamilyIndex"),
1066 Param("const VkSurfaceDescriptionWSI*", "pSurfaceDescription"),
Ian Elliott1064fe32015-07-06 14:31:32 -06001067 Param("VkBool32*", "pSupported")]),
1068 ],
1069)
1070
1071wsi_device_swapchain = Extension(
1072 name="VK_WSI_device_swapchain",
1073 headers=["vk_wsi_device_swapchain.h"],
Jon Ashburnea65e492015-08-06 17:27:49 -06001074 objects=["VkSwapChainWSI"],
Ian Elliott1064fe32015-07-06 14:31:32 -06001075 protos=[
Ian Elliottfe14cda2015-08-06 17:05:06 -06001076 Proto("VkResult", "GetSurfacePropertiesWSI",
Ian Elliott1064fe32015-07-06 14:31:32 -06001077 [Param("VkDevice", "device"),
Ian Elliottfe14cda2015-08-06 17:05:06 -06001078 Param("const VkSurfaceDescriptionWSI*", "pSurfaceDescription"),
1079 Param("VkSurfacePropertiesWSI*", "pSurfaceProperties")]),
1080
1081 Proto("VkResult", "GetSurfaceFormatsWSI",
1082 [Param("VkDevice", "device"),
1083 Param("const VkSurfaceDescriptionWSI*", "pSurfaceDescription"),
1084 Param("uint32_t*", "pCount"),
1085 Param("VkSurfaceFormatWSI*", "pSurfaceFormats")]),
1086
1087 Proto("VkResult", "GetSurfacePresentModesWSI",
1088 [Param("VkDevice", "device"),
1089 Param("const VkSurfaceDescriptionWSI*", "pSurfaceDescription"),
1090 Param("uint32_t*", "pCount"),
1091 Param("VkPresentModeWSI*", "pPresentModes")]),
Ian Elliott1064fe32015-07-06 14:31:32 -06001092
Chia-I Wuf8693382015-04-16 22:02:10 +08001093 Proto("VkResult", "CreateSwapChainWSI",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001094 [Param("VkDevice", "device"),
Chia-I Wuf8693382015-04-16 22:02:10 +08001095 Param("const VkSwapChainCreateInfoWSI*", "pCreateInfo"),
1096 Param("VkSwapChainWSI*", "pSwapChain")]),
Chia-I Wu6dee8b82014-09-23 10:37:23 +08001097
Chia-I Wuf8693382015-04-16 22:02:10 +08001098 Proto("VkResult", "DestroySwapChainWSI",
Ian Elliott1064fe32015-07-06 14:31:32 -06001099 [Param("VkDevice", "device"),
Jon Ashburnea65e492015-08-06 17:27:49 -06001100 Param("VkSwapChainWSI", "swapChain")]),
Chia-I Wu6dee8b82014-09-23 10:37:23 +08001101
Ian Elliottfe14cda2015-08-06 17:05:06 -06001102 Proto("VkResult", "GetSwapChainImagesWSI",
Ian Elliott1064fe32015-07-06 14:31:32 -06001103 [Param("VkDevice", "device"),
Ian Elliottfe14cda2015-08-06 17:05:06 -06001104 Param("VkSwapChainWSI", "swapChain"),
1105 Param("uint32_t*", "pCount"),
1106 Param("VkImage*", "pSwapChainImages")]),
Chia-I Wuf8693382015-04-16 22:02:10 +08001107
Ian Elliott1064fe32015-07-06 14:31:32 -06001108 Proto("VkResult", "AcquireNextImageWSI",
1109 [Param("VkDevice", "device"),
Jon Ashburnea65e492015-08-06 17:27:49 -06001110 Param("VkSwapChainWSI", "swapChain"),
Ian Elliott1064fe32015-07-06 14:31:32 -06001111 Param("uint64_t", "timeout"),
1112 Param("VkSemaphore", "semaphore"),
1113 Param("uint32_t*", "pImageIndex")]),
1114
Chia-I Wuf8693382015-04-16 22:02:10 +08001115 Proto("VkResult", "QueuePresentWSI",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001116 [Param("VkQueue", "queue"),
Ian Elliott1064fe32015-07-06 14:31:32 -06001117 Param("VkPresentInfoWSI*", "pPresentInfo")]),
Chia-I Wue442dc32015-01-01 09:31:15 +08001118 ],
Chia-I Wu6dee8b82014-09-23 10:37:23 +08001119)
Jon Ashburnea65e492015-08-06 17:27:49 -06001120debug_report_lunarg = Extension(
1121 name="VK_DEBUG_REPORT_LunarG",
1122 headers=["vk_debug_report_lunarg.h"],
1123 objects=[
1124 "VkDbgMsgCallback",
1125 ],
1126 protos=[
1127 Proto("VkResult", "DbgCreateMsgCallback",
1128 [Param("VkInstance", "instance"),
1129 Param("VkFlags", "msgFlags"),
1130 Param("const PFN_vkDbgMsgCallback", "pfnMsgCallback"),
1131 Param("void*", "pUserData"),
1132 Param("VkDbgMsgCallback*", "pMsgCallback")]),
1133
1134 Proto("VkResult", "DbgDestroyMsgCallback",
1135 [Param("VkInstance", "instance"),
1136 Param("VkDbgMsgCallback", "msgCallback")]),
1137 ],
1138)
Tobin Ehlisd1aa3b22015-08-27 17:41:42 -06001139debug_marker_lunarg = Extension(
1140 name="VK_DEBUG_MARKER_LunarG",
1141 headers=["vk_debug_marker_lunarg.h"],
1142 objects=[],
1143 protos=[
1144 Proto("void", "CmdDbgMarkerBegin",
1145 [Param("VkCmdBuffer", "cmdBuffer"),
1146 Param("const char*", "pMarker")]),
Chia-I Wu6dee8b82014-09-23 10:37:23 +08001147
Tobin Ehlisd1aa3b22015-08-27 17:41:42 -06001148 Proto("void", "CmdDbgMarkerEnd",
1149 [Param("VkCmdBuffer", "cmdBuffer")]),
1150
1151 Proto("VkResult", "DbgSetObjectTag",
1152 [Param("VkDevice", "device"),
1153 Param("VkDbgObjectType", "objType"),
1154 Param("uint64_t", "object"),
1155 Param("size_t", "tagSize"),
1156 Param("const void*", "pTag")]),
1157
1158 Proto("VkResult", "DbgSetObjectName",
1159 [Param("VkDevice", "device"),
1160 Param("VkDbgObjectType", "objType"),
1161 Param("uint64_t", "object"),
1162 Param("size_t", "nameSize"),
1163 Param("const char*", "pName")]),
1164 ],
1165)
Ian Elliott1064fe32015-07-06 14:31:32 -06001166extensions = [core, wsi_swapchain, wsi_device_swapchain]
Tobin Ehlisd1aa3b22015-08-27 17:41:42 -06001167extensions_all = [core, wsi_swapchain, wsi_device_swapchain, debug_report_lunarg, debug_marker_lunarg]
Tobin Ehlisa30e7e52015-07-06 14:02:36 -06001168object_dispatch_list = [
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001169 "VkInstance",
Tony Barbourd1c35722015-04-16 15:59:00 -06001170 "VkPhysicalDevice",
Tobin Ehlisa30e7e52015-07-06 14:02:36 -06001171 "VkDevice",
1172 "VkQueue",
1173 "VkCmdBuffer",
Tobin Ehlis7e65d752015-01-15 17:51:52 -07001174]
1175
Tobin Ehlisa30e7e52015-07-06 14:02:36 -06001176object_non_dispatch_list = [
Cody Northrope62183e2015-07-09 18:08:05 -06001177 "VkCmdPool",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001178 "VkFence",
Tobin Ehlisa30e7e52015-07-06 14:02:36 -06001179 "VkDeviceMemory",
1180 "VkBuffer",
1181 "VkImage",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001182 "VkSemaphore",
1183 "VkEvent",
1184 "VkQueryPool",
Tobin Ehlisa30e7e52015-07-06 14:02:36 -06001185 "VkBufferView",
1186 "VkImageView",
1187 "VkAttachmentView",
1188 "VkShaderModule",
1189 "VkShader",
1190 "VkPipelineCache",
1191 "VkPipelineLayout",
1192 "VkPipeline",
1193 "VkDescriptorSetLayout",
1194 "VkSampler",
1195 "VkDescriptorPool",
1196 "VkDescriptorSet",
Tony Barbour1d2cd3f2015-07-03 10:33:54 -06001197 "VkDynamicViewportState",
Cody Northrop271ba752015-08-26 10:01:32 -06001198 "VkDynamicLineWidthState",
1199 "VkDynamicDepthBiasState",
1200 "VkDynamicBlendState",
1201 "VkDynamicDepthBoundsState",
Cody Northrop82485a82015-08-18 15:21:16 -06001202 "VkDynamicStencilState",
Tobin Ehlisa30e7e52015-07-06 14:02:36 -06001203 "VkRenderPass",
1204 "VkFramebuffer",
Jon Ashburnea65e492015-08-06 17:27:49 -06001205 "VkSwapChainWSI",
1206 "VkDbgMsgCallback",
Tobin Ehlis7e65d752015-01-15 17:51:52 -07001207]
1208
Tobin Ehlisa30e7e52015-07-06 14:02:36 -06001209object_type_list = object_dispatch_list + object_non_dispatch_list
Tobin Ehlis7e65d752015-01-15 17:51:52 -07001210
Chia-I Wuc4f24e82015-01-01 08:46:31 +08001211headers = []
Chia-I Wue86d8ab2015-01-04 14:46:22 +08001212objects = []
Chia-I Wuc4f24e82015-01-01 08:46:31 +08001213protos = []
1214for ext in extensions:
1215 headers.extend(ext.headers)
Chia-I Wue86d8ab2015-01-04 14:46:22 +08001216 objects.extend(ext.objects)
Chia-I Wuc4f24e82015-01-01 08:46:31 +08001217 protos.extend(ext.protos)
Chia-I Wu6dee8b82014-09-23 10:37:23 +08001218
Chia-I Wu9a4ceb12015-01-01 14:45:58 +08001219proto_names = [proto.name for proto in protos]
Chia-I Wu900a2572014-08-01 14:44:16 +08001220
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001221def parse_vk_h(filename):
Chia-I Wu509a4122015-01-04 14:08:46 +08001222 # read object and protoype typedefs
1223 object_lines = []
1224 proto_lines = []
1225 with open(filename, "r") as fp:
1226 for line in fp:
1227 line = line.strip()
Courtney Goeltzenleuchterd8e229c2015-04-08 15:36:08 -06001228 if line.startswith("VK_DEFINE"):
Chia-I Wu509a4122015-01-04 14:08:46 +08001229 begin = line.find("(") + 1
1230 end = line.find(",")
1231 # extract the object type
1232 object_lines.append(line[begin:end])
1233 if line.startswith("typedef") and line.endswith(");"):
1234 # drop leading "typedef " and trailing ");"
1235 proto_lines.append(line[8:-2])
1236
1237 # parse proto_lines to protos
1238 protos = []
1239 for line in proto_lines:
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001240 first, rest = line.split(" (VKAPI *PFN_vk")
1241 second, third = rest.split(")(")
Chia-I Wu509a4122015-01-04 14:08:46 +08001242
1243 # get the return type, no space before "*"
1244 proto_ret = "*".join([t.rstrip() for t in first.split("*")])
1245
1246 # get the name
1247 proto_name = second.strip()
1248
1249 # get the list of params
1250 param_strs = third.split(", ")
1251 params = []
1252 for s in param_strs:
1253 ty, name = s.rsplit(" ", 1)
1254
1255 # no space before "*"
1256 ty = "*".join([t.rstrip() for t in ty.split("*")])
1257 # attach [] to ty
1258 idx = name.rfind("[")
1259 if idx >= 0:
1260 ty += name[idx:]
1261 name = name[:idx]
1262
1263 params.append(Param(ty, name))
1264
1265 protos.append(Proto(proto_ret, proto_name, params))
1266
1267 # make them an extension and print
Courtney Goeltzenleuchterd8e229c2015-04-08 15:36:08 -06001268 ext = Extension("VK_CORE",
Courtney Goeltzenleuchterf579fa62015-06-10 17:39:03 -06001269 headers=["vulkan.h", "vk_debug_report_lunarg.h"],
Chia-I Wu509a4122015-01-04 14:08:46 +08001270 objects=object_lines,
1271 protos=protos)
1272 print("core =", str(ext))
1273
1274 print("")
Jon Ashburnbacb0f52015-04-06 10:58:22 -06001275 print("typedef struct VkLayerDispatchTable_")
Chia-I Wu509a4122015-01-04 14:08:46 +08001276 print("{")
1277 for proto in ext.protos:
Courtney Goeltzenleuchterd8e229c2015-04-08 15:36:08 -06001278 print(" vk%sType %s;" % (proto.name, proto.name))
Jon Ashburnbacb0f52015-04-06 10:58:22 -06001279 print("} VkLayerDispatchTable;")
Chia-I Wu509a4122015-01-04 14:08:46 +08001280
1281if __name__ == "__main__":
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001282 parse_vk_h("include/vulkan.h")