blob: 1847bd589230873b098923cad825a22052db5b9e [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",
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600201 "VkShaderModule",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600202 "VkShader",
Tony Barboura05dbaa2015-07-09 17:31:46 -0600203 "VkPipelineCache",
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600204 "VkPipelineLayout",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600205 "VkPipeline",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600206 "VkDescriptorSetLayout",
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600207 "VkSampler",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600208 "VkDescriptorPool",
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600209 "VkDescriptorSet",
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600210 "VkDynamicViewportState",
Cody Northrop271ba752015-08-26 10:01:32 -0600211 "VkDynamicLineWidthState",
212 "VkDynamicDepthBiasState",
213 "VkDynamicBlendState",
214 "VkDynamicDepthBoundsState",
Cody Northrop82485a82015-08-18 15:21:16 -0600215 "VkDynamicStencilState",
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
Courtney Goeltzenleuchter2caec862015-07-12 12:52:09 -0600236 Proto("VkResult", "GetPhysicalDeviceFormatProperties",
Chris Forbesbc0bb772015-06-21 22:55:02 +1200237 [Param("VkPhysicalDevice", "physicalDevice"),
238 Param("VkFormat", "format"),
Jon Ashburnea65e492015-08-06 17:27:49 -0600239 Param("VkFormatProperties*", "pFormatProperties")]),
Chris Forbesbc0bb772015-06-21 22:55:02 +1200240
Jon Ashburn42540ef2015-07-23 18:48:20 -0600241 Proto("VkResult", "GetPhysicalDeviceImageFormatProperties",
242 [Param("VkPhysicalDevice", "physicalDevice"),
243 Param("VkFormat", "format"),
244 Param("VkImageType", "type"),
245 Param("VkImageTiling", "tiling"),
246 Param("VkImageUsageFlags", "usage"),
247 Param("VkImageFormatProperties*", "pImageFormatProperties")]),
248
Chris Forbesbc0bb772015-06-21 22:55:02 +1200249 Proto("VkResult", "GetPhysicalDeviceLimits",
250 [Param("VkPhysicalDevice", "physicalDevice"),
251 Param("VkPhysicalDeviceLimits*", "pLimits")]),
252
Courtney Goeltzenleuchter2d3ba632015-07-12 14:35:22 -0600253 Proto("PFN_vkVoidFunction", "GetInstanceProcAddr",
Jon Ashburnb0fbe912015-05-06 10:15:07 -0600254 [Param("VkInstance", "instance"),
255 Param("const char*", "pName")]),
256
Courtney Goeltzenleuchter2d3ba632015-07-12 14:35:22 -0600257 Proto("PFN_vkVoidFunction", "GetDeviceProcAddr",
Jon Ashburn8d1b0b52015-05-18 13:20:15 -0600258 [Param("VkDevice", "device"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600259 Param("const char*", "pName")]),
Chia-I Wuf2ffc522015-01-04 14:51:06 +0800260
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600261 Proto("VkResult", "CreateDevice",
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600262 [Param("VkPhysicalDevice", "physicalDevice"),
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -0600263 Param("const VkDeviceCreateInfo*", "pCreateInfo"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600264 Param("VkDevice*", "pDevice")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800265
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600266 Proto("VkResult", "DestroyDevice",
267 [Param("VkDevice", "device")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800268
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600269 Proto("VkResult", "GetPhysicalDeviceProperties",
270 [Param("VkPhysicalDevice", "physicalDevice"),
271 Param("VkPhysicalDeviceProperties*", "pProperties")]),
Tony Barbour59a47322015-06-24 16:06:58 -0600272
Cody Northropd0802882015-08-03 17:04:53 -0600273 Proto("VkResult", "GetPhysicalDeviceQueueFamilyProperties",
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600274 [Param("VkPhysicalDevice", "physicalDevice"),
Cody Northropd0802882015-08-03 17:04:53 -0600275 Param("uint32_t*", "pCount"),
276 Param("VkQueueFamilyProperties*", "pQueueFamilyProperties")]),
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600277
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"),
Jon Ashburnea65e492015-08-06 17:27:49 -0600290 Param("uint32_t*", "pCount"),
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600291 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"),
Jon Ashburnea65e492015-08-06 17:27:49 -0600299 Param("uint32_t*", "pCount"),
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600300 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"),
Jon Ashburnea65e492015-08-06 17:27:49 -0600304 Param("uint32_t", "queueFamilyIndex"),
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
Courtney Goeltzenleuchterfb71f222015-07-09 21:57:28 -0600351 Proto("VkResult", "GetDeviceMemoryCommitment",
352 [Param("VkDevice", "device"),
353 Param("VkDeviceMemory", "memory"),
354 Param("VkDeviceSize*", "pCommittedMemoryInBytes")]),
355
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600356 Proto("VkResult", "BindBufferMemory",
357 [Param("VkDevice", "device"),
358 Param("VkBuffer", "buffer"),
359 Param("VkDeviceMemory", "mem"),
360 Param("VkDeviceSize", "memOffset")]),
361
362 Proto("VkResult", "BindImageMemory",
363 [Param("VkDevice", "device"),
364 Param("VkImage", "image"),
365 Param("VkDeviceMemory", "mem"),
366 Param("VkDeviceSize", "memOffset")]),
367
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600368 Proto("VkResult", "GetBufferMemoryRequirements",
Mike Stroyanb050c682015-04-17 12:36:38 -0600369 [Param("VkDevice", "device"),
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600370 Param("VkBuffer", "buffer"),
Tony Barbour59a47322015-06-24 16:06:58 -0600371 Param("VkMemoryRequirements*", "pMemoryRequirements")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800372
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600373 Proto("VkResult", "GetImageMemoryRequirements",
Mark Lobodzinski942b1722015-05-11 17:21:15 -0500374 [Param("VkDevice", "device"),
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600375 Param("VkImage", "image"),
376 Param("VkMemoryRequirements*", "pMemoryRequirements")]),
377
Mark Lobodzinski16e8bef2015-07-03 15:58:09 -0600378 Proto("VkResult", "GetImageSparseMemoryRequirements",
379 [Param("VkDevice", "device"),
380 Param("VkImage", "image"),
381 Param("uint32_t*", "pNumRequirements"),
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600382 Param("VkSparseImageMemoryRequirements*", "pSparseMemoryRequirements")]),
Mark Lobodzinski16e8bef2015-07-03 15:58:09 -0600383
384 Proto("VkResult", "GetPhysicalDeviceSparseImageFormatProperties",
385 [Param("VkPhysicalDevice", "physicalDevice"),
386 Param("VkFormat", "format"),
387 Param("VkImageType", "type"),
388 Param("uint32_t", "samples"),
389 Param("VkImageUsageFlags", "usage"),
390 Param("VkImageTiling", "tiling"),
391 Param("uint32_t*", "pNumProperties"),
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600392 Param("VkSparseImageFormatProperties*", "pProperties")]),
Mark Lobodzinski16e8bef2015-07-03 15:58:09 -0600393
Mark Lobodzinski942b1722015-05-11 17:21:15 -0500394 Proto("VkResult", "QueueBindSparseBufferMemory",
Mark Lobodzinski40f7f402015-04-16 11:44:05 -0500395 [Param("VkQueue", "queue"),
Mark Lobodzinski942b1722015-05-11 17:21:15 -0500396 Param("VkBuffer", "buffer"),
Mark Lobodzinski16e8bef2015-07-03 15:58:09 -0600397 Param("uint32_t", "numBindings"),
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600398 Param("const VkSparseMemoryBindInfo*", "pBindInfo")]),
Mark Lobodzinski16e8bef2015-07-03 15:58:09 -0600399
400 Proto("VkResult", "QueueBindSparseImageOpaqueMemory",
401 [Param("VkQueue", "queue"),
402 Param("VkImage", "image"),
403 Param("uint32_t", "numBindings"),
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600404 Param("const VkSparseMemoryBindInfo*", "pBindInfo")]),
Chia-I Wu1a28fe02015-01-01 07:55:04 +0800405
Mark Lobodzinski942b1722015-05-11 17:21:15 -0500406 Proto("VkResult", "QueueBindSparseImageMemory",
Mark Lobodzinski40f7f402015-04-16 11:44:05 -0500407 [Param("VkQueue", "queue"),
408 Param("VkImage", "image"),
Mark Lobodzinski16e8bef2015-07-03 15:58:09 -0600409 Param("uint32_t", "numBindings"),
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600410 Param("const VkSparseImageMemoryBindInfo*", "pBindInfo")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800411
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600412 Proto("VkResult", "CreateFence",
413 [Param("VkDevice", "device"),
414 Param("const VkFenceCreateInfo*", "pCreateInfo"),
415 Param("VkFence*", "pFence")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800416
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600417 Proto("VkResult", "DestroyFence",
418 [Param("VkDevice", "device"),
419 Param("VkFence", "fence")]),
420
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600421 Proto("VkResult", "ResetFences",
422 [Param("VkDevice", "device"),
Mark Lobodzinski148e1582015-04-07 16:07:57 -0500423 Param("uint32_t", "fenceCount"),
Courtney Goeltzenleuchter2bf8f902015-06-18 17:28:20 -0600424 Param("const VkFence*", "pFences")]),
Mark Lobodzinski148e1582015-04-07 16:07:57 -0500425
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600426 Proto("VkResult", "GetFenceStatus",
Mike Stroyanb050c682015-04-17 12:36:38 -0600427 [Param("VkDevice", "device"),
428 Param("VkFence", "fence")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800429
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600430 Proto("VkResult", "WaitForFences",
431 [Param("VkDevice", "device"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600432 Param("uint32_t", "fenceCount"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600433 Param("const VkFence*", "pFences"),
Courtney Goeltzenleuchtercd2a0992015-07-09 11:44:38 -0600434 Param("VkBool32", "waitAll"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600435 Param("uint64_t", "timeout")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800436
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600437 Proto("VkResult", "CreateSemaphore",
438 [Param("VkDevice", "device"),
439 Param("const VkSemaphoreCreateInfo*", "pCreateInfo"),
440 Param("VkSemaphore*", "pSemaphore")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800441
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600442 Proto("VkResult", "DestroySemaphore",
443 [Param("VkDevice", "device"),
444 Param("VkSemaphore", "semaphore")]),
445
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600446 Proto("VkResult", "QueueSignalSemaphore",
447 [Param("VkQueue", "queue"),
448 Param("VkSemaphore", "semaphore")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800449
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600450 Proto("VkResult", "QueueWaitSemaphore",
451 [Param("VkQueue", "queue"),
452 Param("VkSemaphore", "semaphore")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800453
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600454 Proto("VkResult", "CreateEvent",
455 [Param("VkDevice", "device"),
456 Param("const VkEventCreateInfo*", "pCreateInfo"),
457 Param("VkEvent*", "pEvent")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800458
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600459 Proto("VkResult", "DestroyEvent",
460 [Param("VkDevice", "device"),
461 Param("VkEvent", "event")]),
462
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600463 Proto("VkResult", "GetEventStatus",
Mike Stroyanb050c682015-04-17 12:36:38 -0600464 [Param("VkDevice", "device"),
465 Param("VkEvent", "event")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800466
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600467 Proto("VkResult", "SetEvent",
Mike Stroyanb050c682015-04-17 12:36:38 -0600468 [Param("VkDevice", "device"),
469 Param("VkEvent", "event")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800470
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600471 Proto("VkResult", "ResetEvent",
Mike Stroyanb050c682015-04-17 12:36:38 -0600472 [Param("VkDevice", "device"),
473 Param("VkEvent", "event")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800474
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600475 Proto("VkResult", "CreateQueryPool",
476 [Param("VkDevice", "device"),
477 Param("const VkQueryPoolCreateInfo*", "pCreateInfo"),
478 Param("VkQueryPool*", "pQueryPool")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800479
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600480 Proto("VkResult", "DestroyQueryPool",
481 [Param("VkDevice", "device"),
482 Param("VkQueryPool", "queryPool")]),
483
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600484 Proto("VkResult", "GetQueryPoolResults",
Mike Stroyanb050c682015-04-17 12:36:38 -0600485 [Param("VkDevice", "device"),
486 Param("VkQueryPool", "queryPool"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600487 Param("uint32_t", "startQuery"),
488 Param("uint32_t", "queryCount"),
489 Param("size_t*", "pDataSize"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600490 Param("void*", "pData"),
491 Param("VkQueryResultFlags", "flags")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800492
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600493 Proto("VkResult", "CreateBuffer",
494 [Param("VkDevice", "device"),
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -0600495 Param("const VkBufferCreateInfo*", "pCreateInfo"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600496 Param("VkBuffer*", "pBuffer")]),
Chia-I Wu1a28fe02015-01-01 07:55:04 +0800497
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600498 Proto("VkResult", "DestroyBuffer",
499 [Param("VkDevice", "device"),
500 Param("VkBuffer", "buffer")]),
501
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600502 Proto("VkResult", "CreateBufferView",
503 [Param("VkDevice", "device"),
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -0600504 Param("const VkBufferViewCreateInfo*", "pCreateInfo"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600505 Param("VkBufferView*", "pView")]),
Chia-I Wu1a28fe02015-01-01 07:55:04 +0800506
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600507 Proto("VkResult", "DestroyBufferView",
508 [Param("VkDevice", "device"),
509 Param("VkBufferView", "bufferView")]),
510
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600511 Proto("VkResult", "CreateImage",
512 [Param("VkDevice", "device"),
513 Param("const VkImageCreateInfo*", "pCreateInfo"),
514 Param("VkImage*", "pImage")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800515
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600516 Proto("VkResult", "DestroyImage",
517 [Param("VkDevice", "device"),
518 Param("VkImage", "image")]),
519
Tony Barbour59a47322015-06-24 16:06:58 -0600520 Proto("VkResult", "GetImageSubresourceLayout",
Mike Stroyanb050c682015-04-17 12:36:38 -0600521 [Param("VkDevice", "device"),
522 Param("VkImage", "image"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600523 Param("const VkImageSubresource*", "pSubresource"),
Tony Barbour59a47322015-06-24 16:06:58 -0600524 Param("VkSubresourceLayout*", "pLayout")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800525
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600526 Proto("VkResult", "CreateImageView",
527 [Param("VkDevice", "device"),
528 Param("const VkImageViewCreateInfo*", "pCreateInfo"),
529 Param("VkImageView*", "pView")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800530
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600531 Proto("VkResult", "DestroyImageView",
532 [Param("VkDevice", "device"),
533 Param("VkImageView", "imageView")]),
534
Courtney Goeltzenleuchter2d2cb682015-06-24 18:24:19 -0600535 Proto("VkResult", "CreateShaderModule",
536 [Param("VkDevice", "device"),
537 Param("const VkShaderModuleCreateInfo*", "pCreateInfo"),
538 Param("VkShaderModule*", "pShaderModule")]),
539
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600540 Proto("VkResult", "DestroyShaderModule",
541 [Param("VkDevice", "device"),
542 Param("VkShaderModule", "shaderModule")]),
543
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600544 Proto("VkResult", "CreateShader",
545 [Param("VkDevice", "device"),
546 Param("const VkShaderCreateInfo*", "pCreateInfo"),
547 Param("VkShader*", "pShader")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800548
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600549 Proto("VkResult", "DestroyShader",
550 [Param("VkDevice", "device"),
551 Param("VkShader", "shader")]),
552
Jon Ashburnc669cc62015-07-09 15:02:25 -0600553 Proto("VkResult", "CreatePipelineCache",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600554 [Param("VkDevice", "device"),
Jon Ashburnc669cc62015-07-09 15:02:25 -0600555 Param("const VkPipelineCacheCreateInfo*", "pCreateInfo"),
556 Param("VkPipelineCache*", "pPipelineCache")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800557
Jon Ashburnc669cc62015-07-09 15:02:25 -0600558 Proto("VkResult", "DestroyPipelineCache",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600559 [Param("VkDevice", "device"),
Jon Ashburnc669cc62015-07-09 15:02:25 -0600560 Param("VkPipelineCache", "pipelineCache")]),
Courtney Goeltzenleuchter0d40f152015-03-25 15:37:49 -0600561
Jon Ashburnc669cc62015-07-09 15:02:25 -0600562 Proto("size_t", "GetPipelineCacheSize",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600563 [Param("VkDevice", "device"),
Jon Ashburnc669cc62015-07-09 15:02:25 -0600564 Param("VkPipelineCache", "pipelineCache")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800565
Jon Ashburnc669cc62015-07-09 15:02:25 -0600566 Proto("VkResult", "GetPipelineCacheData",
Mike Stroyanb050c682015-04-17 12:36:38 -0600567 [Param("VkDevice", "device"),
Jon Ashburnc669cc62015-07-09 15:02:25 -0600568 Param("VkPipelineCache", "pipelineCache"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600569 Param("void*", "pData")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800570
Jon Ashburnc669cc62015-07-09 15:02:25 -0600571 Proto("VkResult", "MergePipelineCaches",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600572 [Param("VkDevice", "device"),
Jon Ashburnc669cc62015-07-09 15:02:25 -0600573 Param("VkPipelineCache", "destCache"),
574 Param("uint32_t", "srcCacheCount"),
575 Param("const VkPipelineCache*", "pSrcCaches")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800576
Jon Ashburnc669cc62015-07-09 15:02:25 -0600577 Proto("VkResult", "CreateGraphicsPipelines",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600578 [Param("VkDevice", "device"),
Jon Ashburnc669cc62015-07-09 15:02:25 -0600579 Param("VkPipelineCache", "pipelineCache"),
580 Param("uint32_t", "count"),
581 Param("const VkGraphicsPipelineCreateInfo*", "pCreateInfos"),
582 Param("VkPipeline*", "pPipelines")]),
583
584 Proto("VkResult", "CreateComputePipelines",
585 [Param("VkDevice", "device"),
586 Param("VkPipelineCache", "pipelineCache"),
587 Param("uint32_t", "count"),
588 Param("const VkComputePipelineCreateInfo*", "pCreateInfos"),
589 Param("VkPipeline*", "pPipelines")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800590
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600591 Proto("VkResult", "DestroyPipeline",
592 [Param("VkDevice", "device"),
593 Param("VkPipeline", "pipeline")]),
594
Mark Lobodzinski0fadf5f2015-04-17 14:11:39 -0500595 Proto("VkResult", "CreatePipelineLayout",
596 [Param("VkDevice", "device"),
597 Param("const VkPipelineLayoutCreateInfo*", "pCreateInfo"),
598 Param("VkPipelineLayout*", "pPipelineLayout")]),
599
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600600 Proto("VkResult", "DestroyPipelineLayout",
601 [Param("VkDevice", "device"),
602 Param("VkPipelineLayout", "pipelineLayout")]),
603
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600604 Proto("VkResult", "CreateSampler",
605 [Param("VkDevice", "device"),
606 Param("const VkSamplerCreateInfo*", "pCreateInfo"),
607 Param("VkSampler*", "pSampler")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800608
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600609 Proto("VkResult", "DestroySampler",
610 [Param("VkDevice", "device"),
611 Param("VkSampler", "sampler")]),
612
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600613 Proto("VkResult", "CreateDescriptorSetLayout",
614 [Param("VkDevice", "device"),
615 Param("const VkDescriptorSetLayoutCreateInfo*", "pCreateInfo"),
616 Param("VkDescriptorSetLayout*", "pSetLayout")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800617
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600618 Proto("VkResult", "DestroyDescriptorSetLayout",
619 [Param("VkDevice", "device"),
620 Param("VkDescriptorSetLayout", "descriptorSetLayout")]),
621
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600622 Proto("VkResult", "CreateDescriptorPool",
623 [Param("VkDevice", "device"),
624 Param("VkDescriptorPoolUsage", "poolUsage"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600625 Param("uint32_t", "maxSets"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600626 Param("const VkDescriptorPoolCreateInfo*", "pCreateInfo"),
627 Param("VkDescriptorPool*", "pDescriptorPool")]),
Chia-I Wu11078b02015-01-04 16:27:24 +0800628
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600629 Proto("VkResult", "DestroyDescriptorPool",
630 [Param("VkDevice", "device"),
631 Param("VkDescriptorPool", "descriptorPool")]),
632
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600633 Proto("VkResult", "ResetDescriptorPool",
Mike Stroyanb050c682015-04-17 12:36:38 -0600634 [Param("VkDevice", "device"),
635 Param("VkDescriptorPool", "descriptorPool")]),
Chia-I Wu11078b02015-01-04 16:27:24 +0800636
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600637 Proto("VkResult", "AllocDescriptorSets",
Mike Stroyanb050c682015-04-17 12:36:38 -0600638 [Param("VkDevice", "device"),
639 Param("VkDescriptorPool", "descriptorPool"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600640 Param("VkDescriptorSetUsage", "setUsage"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600641 Param("uint32_t", "count"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600642 Param("const VkDescriptorSetLayout*", "pSetLayouts"),
Cody Northrop1e4f8022015-08-03 12:47:29 -0600643 Param("VkDescriptorSet*", "pDescriptorSets")]),
Chia-I Wu11078b02015-01-04 16:27:24 +0800644
Tony Barbour34ec6922015-07-10 10:50:45 -0600645 Proto("VkResult", "FreeDescriptorSets",
646 [Param("VkDevice", "device"),
647 Param("VkDescriptorPool", "descriptorPool"),
648 Param("uint32_t", "count"),
649 Param("const VkDescriptorSet*", "pDescriptorSets")]),
650
Chia-I Wu9d00ed72015-05-25 16:27:55 +0800651 Proto("VkResult", "UpdateDescriptorSets",
Mike Stroyanb050c682015-04-17 12:36:38 -0600652 [Param("VkDevice", "device"),
Chia-I Wu9d00ed72015-05-25 16:27:55 +0800653 Param("uint32_t", "writeCount"),
654 Param("const VkWriteDescriptorSet*", "pDescriptorWrites"),
655 Param("uint32_t", "copyCount"),
656 Param("const VkCopyDescriptorSet*", "pDescriptorCopies")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800657
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600658 Proto("VkResult", "CreateDynamicViewportState",
659 [Param("VkDevice", "device"),
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600660 Param("const VkDynamicViewportStateCreateInfo*", "pCreateInfo"),
661 Param("VkDynamicViewportState*", "pState")]),
662
663 Proto("VkResult", "DestroyDynamicViewportState",
664 [Param("VkDevice", "device"),
665 Param("VkDynamicViewportState", "dynamicViewportState")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800666
Cody Northrop271ba752015-08-26 10:01:32 -0600667 Proto("VkResult", "CreateDynamicLineWidthState",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600668 [Param("VkDevice", "device"),
Cody Northrop271ba752015-08-26 10:01:32 -0600669 Param("const VkDynamicLineWidthStateCreateInfo*", "pCreateInfo"),
670 Param("VkDynamicLineWidthState*", "pState")]),
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600671
Cody Northrop271ba752015-08-26 10:01:32 -0600672 Proto("VkResult", "DestroyDynamicLineWidthState",
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600673 [Param("VkDevice", "device"),
Cody Northrop271ba752015-08-26 10:01:32 -0600674 Param("VkDynamicLineWidthState", "dynamicLineWidthState")]),
Cody Northrop12365112015-08-17 11:10:49 -0600675
Cody Northrop271ba752015-08-26 10:01:32 -0600676 Proto("VkResult", "CreateDynamicDepthBiasState",
Cody Northrop12365112015-08-17 11:10:49 -0600677 [Param("VkDevice", "device"),
Cody Northrop271ba752015-08-26 10:01:32 -0600678 Param("const VkDynamicDepthBiasStateCreateInfo*", "pCreateInfo"),
679 Param("VkDynamicDepthBiasState*", "pState")]),
Cody Northrop12365112015-08-17 11:10:49 -0600680
Cody Northrop271ba752015-08-26 10:01:32 -0600681 Proto("VkResult", "DestroyDynamicDepthBiasState",
Cody Northrop12365112015-08-17 11:10:49 -0600682 [Param("VkDevice", "device"),
Cody Northrop271ba752015-08-26 10:01:32 -0600683 Param("VkDynamicDepthBiasState", "dynamicDepthBiasState")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800684
Cody Northrop271ba752015-08-26 10:01:32 -0600685 Proto("VkResult", "CreateDynamicBlendState",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600686 [Param("VkDevice", "device"),
Cody Northrop271ba752015-08-26 10:01:32 -0600687 Param("const VkDynamicBlendStateCreateInfo*", "pCreateInfo"),
688 Param("VkDynamicBlendState*", "pState")]),
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600689
Cody Northrop271ba752015-08-26 10:01:32 -0600690 Proto("VkResult", "DestroyDynamicBlendState",
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600691 [Param("VkDevice", "device"),
Cody Northrop271ba752015-08-26 10:01:32 -0600692 Param("VkDynamicBlendState", "DynamicBlendState")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800693
Cody Northrop271ba752015-08-26 10:01:32 -0600694 Proto("VkResult", "CreateDynamicDepthBoundsState",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600695 [Param("VkDevice", "device"),
Cody Northrop271ba752015-08-26 10:01:32 -0600696 Param("const VkDynamicDepthBoundsStateCreateInfo*", "pCreateInfo"),
697 Param("VkDynamicDepthBoundsState*", "pState")]),
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600698
Cody Northrop271ba752015-08-26 10:01:32 -0600699 Proto("VkResult", "DestroyDynamicDepthBoundsState",
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600700 [Param("VkDevice", "device"),
Cody Northrop271ba752015-08-26 10:01:32 -0600701 Param("VkDynamicDepthBoundsState", "dynamicDepthBoundsState")]),
Cody Northrop82485a82015-08-18 15:21:16 -0600702
703 Proto("VkResult", "CreateDynamicStencilState",
704 [Param("VkDevice", "device"),
705 Param("const VkDynamicStencilStateCreateInfo*", "pCreateInfoFront"),
706 Param("const VkDynamicStencilStateCreateInfo*", "pCreateInfoBack"),
707 Param("VkDynamicStencilState*", "pState")]),
708
709 Proto("VkResult", "DestroyDynamicStencilState",
710 [Param("VkDevice", "device"),
711 Param("VkDynamicStencilState", "dynamicStencilState")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800712
Cody Northrope62183e2015-07-09 18:08:05 -0600713 Proto("VkResult", "CreateCommandPool",
714 [Param("VkDevice", "device"),
715 Param("const VkCmdPoolCreateInfo*", "pCreateInfo"),
716 Param("VkCmdPool*", "pCmdPool")]),
717
718 Proto("VkResult", "DestroyCommandPool",
719 [Param("VkDevice", "device"),
720 Param("VkCmdPool", "cmdPool")]),
721
722 Proto("VkResult", "ResetCommandPool",
723 [Param("VkDevice", "device"),
724 Param("VkCmdPool", "cmdPool"),
725 Param("VkCmdPoolResetFlags", "flags")]),
726
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600727 Proto("VkResult", "CreateCommandBuffer",
728 [Param("VkDevice", "device"),
729 Param("const VkCmdBufferCreateInfo*", "pCreateInfo"),
730 Param("VkCmdBuffer*", "pCmdBuffer")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800731
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600732 Proto("VkResult", "DestroyCommandBuffer",
733 [Param("VkDevice", "device"),
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600734 Param("VkCmdBuffer", "commandBuffer")]),
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600735
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600736 Proto("VkResult", "BeginCommandBuffer",
737 [Param("VkCmdBuffer", "cmdBuffer"),
738 Param("const VkCmdBufferBeginInfo*", "pBeginInfo")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800739
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600740 Proto("VkResult", "EndCommandBuffer",
741 [Param("VkCmdBuffer", "cmdBuffer")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800742
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600743 Proto("VkResult", "ResetCommandBuffer",
Cody Northrope62183e2015-07-09 18:08:05 -0600744 [Param("VkCmdBuffer", "cmdBuffer"),
745 Param("VkCmdBufferResetFlags", "flags")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800746
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600747 Proto("void", "CmdBindPipeline",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600748 [Param("VkCmdBuffer", "cmdBuffer"),
749 Param("VkPipelineBindPoint", "pipelineBindPoint"),
750 Param("VkPipeline", "pipeline")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800751
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600752 Proto("void", "CmdBindDynamicViewportState",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600753 [Param("VkCmdBuffer", "cmdBuffer"),
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600754 Param("VkDynamicViewportState", "dynamicViewportState")]),
755
Cody Northrop271ba752015-08-26 10:01:32 -0600756 Proto("void", "CmdBindDynamicLineWidthState",
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600757 [Param("VkCmdBuffer", "cmdBuffer"),
Cody Northrop271ba752015-08-26 10:01:32 -0600758 Param("VkDynamicLineWidthState", "dynamicLineWidthState")]),
Cody Northrop12365112015-08-17 11:10:49 -0600759
Cody Northrop271ba752015-08-26 10:01:32 -0600760 Proto("void", "CmdBindDynamicDepthBiasState",
Cody Northrop12365112015-08-17 11:10:49 -0600761 [Param("VkCmdBuffer", "cmdBuffer"),
Cody Northrop271ba752015-08-26 10:01:32 -0600762 Param("VkDynamicDepthBiasState", "dynamicDepthBiasState")]),
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600763
Cody Northrop271ba752015-08-26 10:01:32 -0600764 Proto("void", "CmdBindDynamicBlendState",
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600765 [Param("VkCmdBuffer", "cmdBuffer"),
Cody Northrop271ba752015-08-26 10:01:32 -0600766 Param("VkDynamicBlendState", "DynamicBlendState")]),
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600767
Cody Northrop271ba752015-08-26 10:01:32 -0600768 Proto("void", "CmdBindDynamicDepthBoundsState",
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600769 [Param("VkCmdBuffer", "cmdBuffer"),
Cody Northrop271ba752015-08-26 10:01:32 -0600770 Param("VkDynamicDepthBoundsState", "dynamicDepthBoundsState")]),
Cody Northrop82485a82015-08-18 15:21:16 -0600771
772 Proto("void", "CmdBindDynamicStencilState",
773 [Param("VkCmdBuffer", "cmdBuffer"),
774 Param("VkDynamicStencilState", "dynamicStencilState")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800775
Chia-I Wu53f07d72015-03-28 15:23:55 +0800776 Proto("void", "CmdBindDescriptorSets",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600777 [Param("VkCmdBuffer", "cmdBuffer"),
778 Param("VkPipelineBindPoint", "pipelineBindPoint"),
Mark Lobodzinskif2093b62015-06-15 13:21:21 -0600779 Param("VkPipelineLayout", "layout"),
Cody Northropd4c1a502015-04-16 13:41:56 -0600780 Param("uint32_t", "firstSet"),
781 Param("uint32_t", "setCount"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600782 Param("const VkDescriptorSet*", "pDescriptorSets"),
Cody Northropd4c1a502015-04-16 13:41:56 -0600783 Param("uint32_t", "dynamicOffsetCount"),
784 Param("const uint32_t*", "pDynamicOffsets")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800785
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600786 Proto("void", "CmdBindIndexBuffer",
787 [Param("VkCmdBuffer", "cmdBuffer"),
788 Param("VkBuffer", "buffer"),
789 Param("VkDeviceSize", "offset"),
790 Param("VkIndexType", "indexType")]),
791
Courtney Goeltzenleuchterf68ad722015-04-16 13:38:46 -0600792 Proto("void", "CmdBindVertexBuffers",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600793 [Param("VkCmdBuffer", "cmdBuffer"),
Courtney Goeltzenleuchterf68ad722015-04-16 13:38:46 -0600794 Param("uint32_t", "startBinding"),
795 Param("uint32_t", "bindingCount"),
796 Param("const VkBuffer*", "pBuffers"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600797 Param("const VkDeviceSize*", "pOffsets")]),
798
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600799 Proto("void", "CmdDraw",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600800 [Param("VkCmdBuffer", "cmdBuffer"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600801 Param("uint32_t", "firstVertex"),
802 Param("uint32_t", "vertexCount"),
803 Param("uint32_t", "firstInstance"),
804 Param("uint32_t", "instanceCount")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800805
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600806 Proto("void", "CmdDrawIndexed",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600807 [Param("VkCmdBuffer", "cmdBuffer"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600808 Param("uint32_t", "firstIndex"),
809 Param("uint32_t", "indexCount"),
810 Param("int32_t", "vertexOffset"),
811 Param("uint32_t", "firstInstance"),
812 Param("uint32_t", "instanceCount")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800813
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600814 Proto("void", "CmdDrawIndirect",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600815 [Param("VkCmdBuffer", "cmdBuffer"),
816 Param("VkBuffer", "buffer"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600817 Param("VkDeviceSize", "offset"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600818 Param("uint32_t", "count"),
819 Param("uint32_t", "stride")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800820
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600821 Proto("void", "CmdDrawIndexedIndirect",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600822 [Param("VkCmdBuffer", "cmdBuffer"),
823 Param("VkBuffer", "buffer"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600824 Param("VkDeviceSize", "offset"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600825 Param("uint32_t", "count"),
826 Param("uint32_t", "stride")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800827
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600828 Proto("void", "CmdDispatch",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600829 [Param("VkCmdBuffer", "cmdBuffer"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600830 Param("uint32_t", "x"),
831 Param("uint32_t", "y"),
832 Param("uint32_t", "z")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800833
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600834 Proto("void", "CmdDispatchIndirect",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600835 [Param("VkCmdBuffer", "cmdBuffer"),
836 Param("VkBuffer", "buffer"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600837 Param("VkDeviceSize", "offset")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800838
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600839 Proto("void", "CmdCopyBuffer",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600840 [Param("VkCmdBuffer", "cmdBuffer"),
841 Param("VkBuffer", "srcBuffer"),
842 Param("VkBuffer", "destBuffer"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600843 Param("uint32_t", "regionCount"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600844 Param("const VkBufferCopy*", "pRegions")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800845
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600846 Proto("void", "CmdCopyImage",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600847 [Param("VkCmdBuffer", "cmdBuffer"),
848 Param("VkImage", "srcImage"),
849 Param("VkImageLayout", "srcImageLayout"),
850 Param("VkImage", "destImage"),
851 Param("VkImageLayout", "destImageLayout"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600852 Param("uint32_t", "regionCount"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600853 Param("const VkImageCopy*", "pRegions")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800854
Courtney Goeltzenleuchter89299fa2015-03-08 17:02:18 -0600855 Proto("void", "CmdBlitImage",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600856 [Param("VkCmdBuffer", "cmdBuffer"),
857 Param("VkImage", "srcImage"),
858 Param("VkImageLayout", "srcImageLayout"),
859 Param("VkImage", "destImage"),
860 Param("VkImageLayout", "destImageLayout"),
Courtney Goeltzenleuchter89299fa2015-03-08 17:02:18 -0600861 Param("uint32_t", "regionCount"),
Mark Lobodzinskiee5eef12015-05-22 14:43:25 -0500862 Param("const VkImageBlit*", "pRegions"),
863 Param("VkTexFilter", "filter")]),
Courtney Goeltzenleuchter89299fa2015-03-08 17:02:18 -0600864
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600865 Proto("void", "CmdCopyBufferToImage",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600866 [Param("VkCmdBuffer", "cmdBuffer"),
867 Param("VkBuffer", "srcBuffer"),
868 Param("VkImage", "destImage"),
869 Param("VkImageLayout", "destImageLayout"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600870 Param("uint32_t", "regionCount"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600871 Param("const VkBufferImageCopy*", "pRegions")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800872
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600873 Proto("void", "CmdCopyImageToBuffer",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600874 [Param("VkCmdBuffer", "cmdBuffer"),
875 Param("VkImage", "srcImage"),
876 Param("VkImageLayout", "srcImageLayout"),
877 Param("VkBuffer", "destBuffer"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600878 Param("uint32_t", "regionCount"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600879 Param("const VkBufferImageCopy*", "pRegions")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800880
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600881 Proto("void", "CmdUpdateBuffer",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600882 [Param("VkCmdBuffer", "cmdBuffer"),
883 Param("VkBuffer", "destBuffer"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600884 Param("VkDeviceSize", "destOffset"),
885 Param("VkDeviceSize", "dataSize"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600886 Param("const uint32_t*", "pData")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800887
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600888 Proto("void", "CmdFillBuffer",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600889 [Param("VkCmdBuffer", "cmdBuffer"),
890 Param("VkBuffer", "destBuffer"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600891 Param("VkDeviceSize", "destOffset"),
892 Param("VkDeviceSize", "fillSize"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600893 Param("uint32_t", "data")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800894
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600895 Proto("void", "CmdClearColorImage",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600896 [Param("VkCmdBuffer", "cmdBuffer"),
897 Param("VkImage", "image"),
898 Param("VkImageLayout", "imageLayout"),
Chris Forbesf0796e12015-06-24 14:34:53 +1200899 Param("const VkClearColorValue*", "pColor"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600900 Param("uint32_t", "rangeCount"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600901 Param("const VkImageSubresourceRange*", "pRanges")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800902
Chris Forbesd9be82b2015-06-22 17:21:59 +1200903 Proto("void", "CmdClearDepthStencilImage",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600904 [Param("VkCmdBuffer", "cmdBuffer"),
905 Param("VkImage", "image"),
906 Param("VkImageLayout", "imageLayout"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600907 Param("float", "depth"),
908 Param("uint32_t", "stencil"),
909 Param("uint32_t", "rangeCount"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600910 Param("const VkImageSubresourceRange*", "pRanges")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800911
Chris Forbesd9be82b2015-06-22 17:21:59 +1200912 Proto("void", "CmdClearColorAttachment",
913 [Param("VkCmdBuffer", "cmdBuffer"),
914 Param("uint32_t", "colorAttachment"),
915 Param("VkImageLayout", "imageLayout"),
Chris Forbesf0796e12015-06-24 14:34:53 +1200916 Param("const VkClearColorValue*", "pColor"),
Chris Forbesd9be82b2015-06-22 17:21:59 +1200917 Param("uint32_t", "rectCount"),
918 Param("const VkRect3D*", "pRects")]),
919
920 Proto("void", "CmdClearDepthStencilAttachment",
921 [Param("VkCmdBuffer", "cmdBuffer"),
922 Param("VkImageAspectFlags", "imageAspectMask"),
923 Param("VkImageLayout", "imageLayout"),
924 Param("float", "depth"),
925 Param("uint32_t", "stencil"),
926 Param("uint32_t", "rectCount"),
927 Param("const VkRect3D*", "pRects")]),
928
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600929 Proto("void", "CmdResolveImage",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600930 [Param("VkCmdBuffer", "cmdBuffer"),
931 Param("VkImage", "srcImage"),
932 Param("VkImageLayout", "srcImageLayout"),
933 Param("VkImage", "destImage"),
934 Param("VkImageLayout", "destImageLayout"),
Tony Barbour6865d4a2015-04-13 15:02:52 -0600935 Param("uint32_t", "regionCount"),
936 Param("const VkImageResolve*", "pRegions")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800937
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600938 Proto("void", "CmdSetEvent",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600939 [Param("VkCmdBuffer", "cmdBuffer"),
940 Param("VkEvent", "event"),
Tony Barbour0b2cfb22015-06-29 16:20:35 -0600941 Param("VkPipelineStageFlags", "stageMask")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800942
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600943 Proto("void", "CmdResetEvent",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600944 [Param("VkCmdBuffer", "cmdBuffer"),
945 Param("VkEvent", "event"),
Tony Barbour0b2cfb22015-06-29 16:20:35 -0600946 Param("VkPipelineStageFlags", "stageMask")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800947
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600948 Proto("void", "CmdWaitEvents",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600949 [Param("VkCmdBuffer", "cmdBuffer"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600950 Param("uint32_t", "eventCount"),
951 Param("const VkEvent*", "pEvents"),
Jon Ashburnea65e492015-08-06 17:27:49 -0600952 Param("VkPipelineStageFlags", "srcStageMask"),
Tony Barbour0b2cfb22015-06-29 16:20:35 -0600953 Param("VkPipelineStageFlags", "destStageMask"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600954 Param("uint32_t", "memBarrierCount"),
Courtney Goeltzenleuchterdbd20322015-07-12 12:58:58 -0600955 Param("const void* const*", "ppMemBarriers")]),
Mike Stroyanfb80d5f2014-12-04 11:08:39 +0000956
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600957 Proto("void", "CmdPipelineBarrier",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600958 [Param("VkCmdBuffer", "cmdBuffer"),
Courtney Goeltzenleuchterceebbb12015-07-12 13:07:46 -0600959 Param("VkPipelineStageFlags", "srcStageMask"),
Tony Barbour0b2cfb22015-06-29 16:20:35 -0600960 Param("VkPipelineStageFlags", "destStageMask"),
Courtney Goeltzenleuchtercd2a0992015-07-09 11:44:38 -0600961 Param("VkBool32", "byRegion"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600962 Param("uint32_t", "memBarrierCount"),
Courtney Goeltzenleuchterceebbb12015-07-12 13:07:46 -0600963 Param("const void* const*", "ppMemBarriers")]),
Mike Stroyanfb80d5f2014-12-04 11:08:39 +0000964
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600965 Proto("void", "CmdBeginQuery",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600966 [Param("VkCmdBuffer", "cmdBuffer"),
967 Param("VkQueryPool", "queryPool"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600968 Param("uint32_t", "slot"),
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600969 Param("VkQueryControlFlags", "flags")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800970
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600971 Proto("void", "CmdEndQuery",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600972 [Param("VkCmdBuffer", "cmdBuffer"),
973 Param("VkQueryPool", "queryPool"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600974 Param("uint32_t", "slot")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800975
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600976 Proto("void", "CmdResetQueryPool",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600977 [Param("VkCmdBuffer", "cmdBuffer"),
978 Param("VkQueryPool", "queryPool"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600979 Param("uint32_t", "startQuery"),
980 Param("uint32_t", "queryCount")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800981
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600982 Proto("void", "CmdWriteTimestamp",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600983 [Param("VkCmdBuffer", "cmdBuffer"),
984 Param("VkTimestampType", "timestampType"),
985 Param("VkBuffer", "destBuffer"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600986 Param("VkDeviceSize", "destOffset")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800987
Courtney Goeltzenleuchter1dbc8e22015-04-15 18:21:13 -0600988 Proto("void", "CmdCopyQueryPoolResults",
989 [Param("VkCmdBuffer", "cmdBuffer"),
990 Param("VkQueryPool", "queryPool"),
991 Param("uint32_t", "startQuery"),
992 Param("uint32_t", "queryCount"),
993 Param("VkBuffer", "destBuffer"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600994 Param("VkDeviceSize", "destOffset"),
995 Param("VkDeviceSize", "destStride"),
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600996 Param("VkQueryResultFlags", "flags")]),
Courtney Goeltzenleuchter1dbc8e22015-04-15 18:21:13 -0600997
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600998 Proto("VkResult", "CreateFramebuffer",
999 [Param("VkDevice", "device"),
1000 Param("const VkFramebufferCreateInfo*", "pCreateInfo"),
1001 Param("VkFramebuffer*", "pFramebuffer")]),
Jeremy Hayesd65ae082015-01-14 16:17:08 -07001002
Tony Barbour1d2cd3f2015-07-03 10:33:54 -06001003 Proto("VkResult", "DestroyFramebuffer",
1004 [Param("VkDevice", "device"),
1005 Param("VkFramebuffer", "framebuffer")]),
1006
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001007 Proto("VkResult", "CreateRenderPass",
1008 [Param("VkDevice", "device"),
1009 Param("const VkRenderPassCreateInfo*", "pCreateInfo"),
1010 Param("VkRenderPass*", "pRenderPass")]),
Jeremy Hayesd65ae082015-01-14 16:17:08 -07001011
Tony Barbour1d2cd3f2015-07-03 10:33:54 -06001012 Proto("VkResult", "DestroyRenderPass",
1013 [Param("VkDevice", "device"),
1014 Param("VkRenderPass", "renderPass")]),
1015
Courtney Goeltzenleuchtera97e2ea2015-07-27 13:47:08 -06001016 Proto("VkResult", "GetRenderAreaGranularity",
1017 [Param("VkDevice", "device"),
1018 Param("VkRenderPass", "renderPass"),
1019 Param("VkExtent2D*", "pGranularity")]),
1020
Jon Ashburne13f1982015-02-02 09:58:11 -07001021 Proto("void", "CmdBeginRenderPass",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001022 [Param("VkCmdBuffer", "cmdBuffer"),
Chia-I Wu08accc62015-07-07 11:50:03 +08001023 Param("const VkRenderPassBeginInfo*", "pRenderPassBegin"),
1024 Param("VkRenderPassContents", "contents")]),
1025
1026 Proto("void", "CmdNextSubpass",
1027 [Param("VkCmdBuffer", "cmdBuffer"),
1028 Param("VkRenderPassContents", "contents")]),
Jon Ashburne13f1982015-02-02 09:58:11 -07001029
Courtney Goeltzenleuchterab7db3b2015-07-27 14:04:01 -06001030 Proto("void", "CmdPushConstants",
1031 [Param("VkCmdBuffer", "cmdBuffer"),
1032 Param("VkPipelineLayout", "layout"),
1033 Param("VkShaderStageFlags", "stageFlags"),
1034 Param("uint32_t", "start"),
1035 Param("uint32_t", "length"),
1036 Param("const void*", "values")]),
1037
Jon Ashburne13f1982015-02-02 09:58:11 -07001038 Proto("void", "CmdEndRenderPass",
Chia-I Wu0b50a1c2015-06-26 15:34:39 +08001039 [Param("VkCmdBuffer", "cmdBuffer")]),
1040
1041 Proto("void", "CmdExecuteCommands",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001042 [Param("VkCmdBuffer", "cmdBuffer"),
Chia-I Wu0b50a1c2015-06-26 15:34:39 +08001043 Param("uint32_t", "cmdBuffersCount"),
1044 Param("const VkCmdBuffer*", "pCmdBuffers")]),
Chia-I Wue442dc32015-01-01 09:31:15 +08001045 ],
Chia-I Wufb2559d2014-08-01 11:19:52 +08001046)
1047
Ian Elliott7e40db92015-08-21 15:09:33 -06001048ext_khr_swapchain = Extension(
1049 name="VK_EXT_KHR_swapchain",
1050 headers=["vk_ext_khr_swapchain.h"],
Jon Ashburnea65e492015-08-06 17:27:49 -06001051 objects=[],
Chia-I Wue442dc32015-01-01 09:31:15 +08001052 protos=[
Ian Elliott7e40db92015-08-21 15:09:33 -06001053 Proto("VkResult", "GetPhysicalDeviceSurfaceSupportKHR",
Ian Elliott1064fe32015-07-06 14:31:32 -06001054 [Param("VkPhysicalDevice", "physicalDevice"),
Jon Ashburnea65e492015-08-06 17:27:49 -06001055 Param("uint32_t", "queueFamilyIndex"),
Ian Elliott7e40db92015-08-21 15:09:33 -06001056 Param("const VkSurfaceDescriptionKHR*", "pSurfaceDescription"),
Ian Elliott1064fe32015-07-06 14:31:32 -06001057 Param("VkBool32*", "pSupported")]),
1058 ],
1059)
1060
Ian Elliott7e40db92015-08-21 15:09:33 -06001061ext_khr_device_swapchain = Extension(
1062 name="VK_EXT_KHR_device_swapchain",
1063 headers=["vk_ext_khr_device_swapchain.h"],
1064 objects=["VkSwapchainKHR"],
Ian Elliott1064fe32015-07-06 14:31:32 -06001065 protos=[
Ian Elliott7e40db92015-08-21 15:09:33 -06001066 Proto("VkResult", "GetSurfacePropertiesKHR",
Ian Elliott1064fe32015-07-06 14:31:32 -06001067 [Param("VkDevice", "device"),
Ian Elliott7e40db92015-08-21 15:09:33 -06001068 Param("const VkSurfaceDescriptionKHR*", "pSurfaceDescription"),
1069 Param("VkSurfacePropertiesKHR*", "pSurfaceProperties")]),
Ian Elliottfe14cda2015-08-06 17:05:06 -06001070
Ian Elliott7e40db92015-08-21 15:09:33 -06001071 Proto("VkResult", "GetSurfaceFormatsKHR",
Ian Elliottfe14cda2015-08-06 17:05:06 -06001072 [Param("VkDevice", "device"),
Ian Elliott7e40db92015-08-21 15:09:33 -06001073 Param("const VkSurfaceDescriptionKHR*", "pSurfaceDescription"),
Ian Elliottfe14cda2015-08-06 17:05:06 -06001074 Param("uint32_t*", "pCount"),
Ian Elliott7e40db92015-08-21 15:09:33 -06001075 Param("VkSurfaceFormatKHR*", "pSurfaceFormats")]),
Ian Elliottfe14cda2015-08-06 17:05:06 -06001076
Ian Elliott7e40db92015-08-21 15:09:33 -06001077 Proto("VkResult", "GetSurfacePresentModesKHR",
Ian Elliottfe14cda2015-08-06 17:05:06 -06001078 [Param("VkDevice", "device"),
Ian Elliott7e40db92015-08-21 15:09:33 -06001079 Param("const VkSurfaceDescriptionKHR*", "pSurfaceDescription"),
Ian Elliottfe14cda2015-08-06 17:05:06 -06001080 Param("uint32_t*", "pCount"),
Ian Elliott7e40db92015-08-21 15:09:33 -06001081 Param("VkPresentModeKHR*", "pPresentModes")]),
Ian Elliott1064fe32015-07-06 14:31:32 -06001082
Ian Elliott7e40db92015-08-21 15:09:33 -06001083 Proto("VkResult", "CreateSwapchainKHR",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001084 [Param("VkDevice", "device"),
Ian Elliott7e40db92015-08-21 15:09:33 -06001085 Param("const VkSwapchainCreateInfoKHR*", "pCreateInfo"),
1086 Param("VkSwapchainKHR*", "pSwapchain")]),
Chia-I Wu6dee8b82014-09-23 10:37:23 +08001087
Ian Elliott7e40db92015-08-21 15:09:33 -06001088 Proto("VkResult", "DestroySwapchainKHR",
Ian Elliott1064fe32015-07-06 14:31:32 -06001089 [Param("VkDevice", "device"),
Ian Elliott7e40db92015-08-21 15:09:33 -06001090 Param("VkSwapchainKHR", "swapchain")]),
Chia-I Wu6dee8b82014-09-23 10:37:23 +08001091
Ian Elliott7e40db92015-08-21 15:09:33 -06001092 Proto("VkResult", "GetSwapchainImagesKHR",
Ian Elliott1064fe32015-07-06 14:31:32 -06001093 [Param("VkDevice", "device"),
Ian Elliott7e40db92015-08-21 15:09:33 -06001094 Param("VkSwapchainKHR", "swapchain"),
Ian Elliottfe14cda2015-08-06 17:05:06 -06001095 Param("uint32_t*", "pCount"),
Ian Elliott7e40db92015-08-21 15:09:33 -06001096 Param("VkImage*", "pSwapchainImages")]),
Chia-I Wuf8693382015-04-16 22:02:10 +08001097
Ian Elliott7e40db92015-08-21 15:09:33 -06001098 Proto("VkResult", "AcquireNextImageKHR",
Ian Elliott1064fe32015-07-06 14:31:32 -06001099 [Param("VkDevice", "device"),
Ian Elliott7e40db92015-08-21 15:09:33 -06001100 Param("VkSwapchainKHR", "swapchain"),
Ian Elliott1064fe32015-07-06 14:31:32 -06001101 Param("uint64_t", "timeout"),
1102 Param("VkSemaphore", "semaphore"),
1103 Param("uint32_t*", "pImageIndex")]),
1104
Ian Elliott7e40db92015-08-21 15:09:33 -06001105 Proto("VkResult", "QueuePresentKHR",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001106 [Param("VkQueue", "queue"),
Ian Elliott7e40db92015-08-21 15:09:33 -06001107 Param("VkPresentInfoKHR*", "pPresentInfo")]),
Chia-I Wue442dc32015-01-01 09:31:15 +08001108 ],
Chia-I Wu6dee8b82014-09-23 10:37:23 +08001109)
Jon Ashburnea65e492015-08-06 17:27:49 -06001110debug_report_lunarg = Extension(
1111 name="VK_DEBUG_REPORT_LunarG",
1112 headers=["vk_debug_report_lunarg.h"],
1113 objects=[
1114 "VkDbgMsgCallback",
1115 ],
1116 protos=[
1117 Proto("VkResult", "DbgCreateMsgCallback",
1118 [Param("VkInstance", "instance"),
1119 Param("VkFlags", "msgFlags"),
1120 Param("const PFN_vkDbgMsgCallback", "pfnMsgCallback"),
1121 Param("void*", "pUserData"),
1122 Param("VkDbgMsgCallback*", "pMsgCallback")]),
1123
1124 Proto("VkResult", "DbgDestroyMsgCallback",
1125 [Param("VkInstance", "instance"),
1126 Param("VkDbgMsgCallback", "msgCallback")]),
1127 ],
1128)
Tobin Ehlisd1aa3b22015-08-27 17:41:42 -06001129debug_marker_lunarg = Extension(
1130 name="VK_DEBUG_MARKER_LunarG",
1131 headers=["vk_debug_marker_lunarg.h"],
1132 objects=[],
1133 protos=[
1134 Proto("void", "CmdDbgMarkerBegin",
1135 [Param("VkCmdBuffer", "cmdBuffer"),
1136 Param("const char*", "pMarker")]),
Chia-I Wu6dee8b82014-09-23 10:37:23 +08001137
Tobin Ehlisd1aa3b22015-08-27 17:41:42 -06001138 Proto("void", "CmdDbgMarkerEnd",
1139 [Param("VkCmdBuffer", "cmdBuffer")]),
1140
1141 Proto("VkResult", "DbgSetObjectTag",
1142 [Param("VkDevice", "device"),
1143 Param("VkDbgObjectType", "objType"),
1144 Param("uint64_t", "object"),
1145 Param("size_t", "tagSize"),
1146 Param("const void*", "pTag")]),
1147
1148 Proto("VkResult", "DbgSetObjectName",
1149 [Param("VkDevice", "device"),
1150 Param("VkDbgObjectType", "objType"),
1151 Param("uint64_t", "object"),
1152 Param("size_t", "nameSize"),
1153 Param("const char*", "pName")]),
1154 ],
1155)
Ian Elliott7e40db92015-08-21 15:09:33 -06001156extensions = [core, ext_khr_swapchain, ext_khr_device_swapchain]
1157extensions_all = [core, ext_khr_swapchain, ext_khr_device_swapchain, debug_report_lunarg, debug_marker_lunarg]
Tobin Ehlisa30e7e52015-07-06 14:02:36 -06001158object_dispatch_list = [
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001159 "VkInstance",
Tony Barbourd1c35722015-04-16 15:59:00 -06001160 "VkPhysicalDevice",
Tobin Ehlisa30e7e52015-07-06 14:02:36 -06001161 "VkDevice",
1162 "VkQueue",
1163 "VkCmdBuffer",
Tobin Ehlis7e65d752015-01-15 17:51:52 -07001164]
1165
Tobin Ehlisa30e7e52015-07-06 14:02:36 -06001166object_non_dispatch_list = [
Cody Northrope62183e2015-07-09 18:08:05 -06001167 "VkCmdPool",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001168 "VkFence",
Tobin Ehlisa30e7e52015-07-06 14:02:36 -06001169 "VkDeviceMemory",
1170 "VkBuffer",
1171 "VkImage",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001172 "VkSemaphore",
1173 "VkEvent",
1174 "VkQueryPool",
Tobin Ehlisa30e7e52015-07-06 14:02:36 -06001175 "VkBufferView",
1176 "VkImageView",
Tobin Ehlisa30e7e52015-07-06 14:02:36 -06001177 "VkShaderModule",
1178 "VkShader",
1179 "VkPipelineCache",
1180 "VkPipelineLayout",
1181 "VkPipeline",
1182 "VkDescriptorSetLayout",
1183 "VkSampler",
1184 "VkDescriptorPool",
1185 "VkDescriptorSet",
Tony Barbour1d2cd3f2015-07-03 10:33:54 -06001186 "VkDynamicViewportState",
Cody Northrop271ba752015-08-26 10:01:32 -06001187 "VkDynamicLineWidthState",
1188 "VkDynamicDepthBiasState",
1189 "VkDynamicBlendState",
1190 "VkDynamicDepthBoundsState",
Cody Northrop82485a82015-08-18 15:21:16 -06001191 "VkDynamicStencilState",
Tobin Ehlisa30e7e52015-07-06 14:02:36 -06001192 "VkRenderPass",
1193 "VkFramebuffer",
Ian Elliott7e40db92015-08-21 15:09:33 -06001194 "VkSwapchainKHR",
Jon Ashburnea65e492015-08-06 17:27:49 -06001195 "VkDbgMsgCallback",
Tobin Ehlis7e65d752015-01-15 17:51:52 -07001196]
1197
Tobin Ehlisa30e7e52015-07-06 14:02:36 -06001198object_type_list = object_dispatch_list + object_non_dispatch_list
Tobin Ehlis7e65d752015-01-15 17:51:52 -07001199
Chia-I Wuc4f24e82015-01-01 08:46:31 +08001200headers = []
Chia-I Wue86d8ab2015-01-04 14:46:22 +08001201objects = []
Chia-I Wuc4f24e82015-01-01 08:46:31 +08001202protos = []
1203for ext in extensions:
1204 headers.extend(ext.headers)
Chia-I Wue86d8ab2015-01-04 14:46:22 +08001205 objects.extend(ext.objects)
Chia-I Wuc4f24e82015-01-01 08:46:31 +08001206 protos.extend(ext.protos)
Chia-I Wu6dee8b82014-09-23 10:37:23 +08001207
Chia-I Wu9a4ceb12015-01-01 14:45:58 +08001208proto_names = [proto.name for proto in protos]
Chia-I Wu900a2572014-08-01 14:44:16 +08001209
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001210def parse_vk_h(filename):
Chia-I Wu509a4122015-01-04 14:08:46 +08001211 # read object and protoype typedefs
1212 object_lines = []
1213 proto_lines = []
1214 with open(filename, "r") as fp:
1215 for line in fp:
1216 line = line.strip()
Courtney Goeltzenleuchterd8e229c2015-04-08 15:36:08 -06001217 if line.startswith("VK_DEFINE"):
Chia-I Wu509a4122015-01-04 14:08:46 +08001218 begin = line.find("(") + 1
1219 end = line.find(",")
1220 # extract the object type
1221 object_lines.append(line[begin:end])
1222 if line.startswith("typedef") and line.endswith(");"):
1223 # drop leading "typedef " and trailing ");"
1224 proto_lines.append(line[8:-2])
1225
1226 # parse proto_lines to protos
1227 protos = []
1228 for line in proto_lines:
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001229 first, rest = line.split(" (VKAPI *PFN_vk")
1230 second, third = rest.split(")(")
Chia-I Wu509a4122015-01-04 14:08:46 +08001231
1232 # get the return type, no space before "*"
1233 proto_ret = "*".join([t.rstrip() for t in first.split("*")])
1234
1235 # get the name
1236 proto_name = second.strip()
1237
1238 # get the list of params
1239 param_strs = third.split(", ")
1240 params = []
1241 for s in param_strs:
1242 ty, name = s.rsplit(" ", 1)
1243
1244 # no space before "*"
1245 ty = "*".join([t.rstrip() for t in ty.split("*")])
1246 # attach [] to ty
1247 idx = name.rfind("[")
1248 if idx >= 0:
1249 ty += name[idx:]
1250 name = name[:idx]
1251
1252 params.append(Param(ty, name))
1253
1254 protos.append(Proto(proto_ret, proto_name, params))
1255
1256 # make them an extension and print
Courtney Goeltzenleuchterd8e229c2015-04-08 15:36:08 -06001257 ext = Extension("VK_CORE",
Courtney Goeltzenleuchterf579fa62015-06-10 17:39:03 -06001258 headers=["vulkan.h", "vk_debug_report_lunarg.h"],
Chia-I Wu509a4122015-01-04 14:08:46 +08001259 objects=object_lines,
1260 protos=protos)
1261 print("core =", str(ext))
1262
1263 print("")
Jon Ashburnbacb0f52015-04-06 10:58:22 -06001264 print("typedef struct VkLayerDispatchTable_")
Chia-I Wu509a4122015-01-04 14:08:46 +08001265 print("{")
1266 for proto in ext.protos:
Courtney Goeltzenleuchterd8e229c2015-04-08 15:36:08 -06001267 print(" vk%sType %s;" % (proto.name, proto.name))
Jon Ashburnbacb0f52015-04-06 10:58:22 -06001268 print("} VkLayerDispatchTable;")
Chia-I Wu509a4122015-01-04 14:08:46 +08001269
1270if __name__ == "__main__":
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001271 parse_vk_h("include/vulkan.h")