blob: ef1b66b6f38df6890937aeb99dc3f14c05c8a5f5 [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",
212 "VkDynamicRasterState",
213 "VkDynamicColorBlendState",
214 "VkDynamicDepthStencilState",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600215 "VkRenderPass",
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600216 "VkFramebuffer",
Chia-I Wue86d8ab2015-01-04 14:46:22 +0800217 ],
Chia-I Wue442dc32015-01-01 09:31:15 +0800218 protos=[
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600219 Proto("VkResult", "CreateInstance",
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -0600220 [Param("const VkInstanceCreateInfo*", "pCreateInfo"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600221 Param("VkInstance*", "pInstance")]),
Jon Ashburn1beab2d2015-01-26 14:51:40 -0700222
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600223 Proto("VkResult", "DestroyInstance",
224 [Param("VkInstance", "instance")]),
Jon Ashburn1beab2d2015-01-26 14:51:40 -0700225
Jon Ashburn83a64252015-04-15 11:31:12 -0600226 Proto("VkResult", "EnumeratePhysicalDevices",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600227 [Param("VkInstance", "instance"),
Jon Ashburn83a64252015-04-15 11:31:12 -0600228 Param("uint32_t*", "pPhysicalDeviceCount"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600229 Param("VkPhysicalDevice*", "pPhysicalDevices")]),
Jon Ashburn1beab2d2015-01-26 14:51:40 -0700230
Chris Forbesbc0bb772015-06-21 22:55:02 +1200231 Proto("VkResult", "GetPhysicalDeviceFeatures",
232 [Param("VkPhysicalDevice", "physicalDevice"),
233 Param("VkPhysicalDeviceFeatures*", "pFeatures")]),
234
Courtney Goeltzenleuchter2caec862015-07-12 12:52:09 -0600235 Proto("VkResult", "GetPhysicalDeviceFormatProperties",
Chris Forbesbc0bb772015-06-21 22:55:02 +1200236 [Param("VkPhysicalDevice", "physicalDevice"),
237 Param("VkFormat", "format"),
238 Param("VkFormatProperties*", "pFormatInfo")]),
239
Jon Ashburn42540ef2015-07-23 18:48:20 -0600240 Proto("VkResult", "GetPhysicalDeviceImageFormatProperties",
241 [Param("VkPhysicalDevice", "physicalDevice"),
242 Param("VkFormat", "format"),
243 Param("VkImageType", "type"),
244 Param("VkImageTiling", "tiling"),
245 Param("VkImageUsageFlags", "usage"),
246 Param("VkImageFormatProperties*", "pImageFormatProperties")]),
247
Chris Forbesbc0bb772015-06-21 22:55:02 +1200248 Proto("VkResult", "GetPhysicalDeviceLimits",
249 [Param("VkPhysicalDevice", "physicalDevice"),
250 Param("VkPhysicalDeviceLimits*", "pLimits")]),
251
Courtney Goeltzenleuchter2d3ba632015-07-12 14:35:22 -0600252 Proto("PFN_vkVoidFunction", "GetInstanceProcAddr",
Jon Ashburnb0fbe912015-05-06 10:15:07 -0600253 [Param("VkInstance", "instance"),
254 Param("const char*", "pName")]),
255
Courtney Goeltzenleuchter2d3ba632015-07-12 14:35:22 -0600256 Proto("PFN_vkVoidFunction", "GetDeviceProcAddr",
Jon Ashburn8d1b0b52015-05-18 13:20:15 -0600257 [Param("VkDevice", "device"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600258 Param("const char*", "pName")]),
Chia-I Wuf2ffc522015-01-04 14:51:06 +0800259
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600260 Proto("VkResult", "CreateDevice",
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600261 [Param("VkPhysicalDevice", "physicalDevice"),
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -0600262 Param("const VkDeviceCreateInfo*", "pCreateInfo"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600263 Param("VkDevice*", "pDevice")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800264
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600265 Proto("VkResult", "DestroyDevice",
266 [Param("VkDevice", "device")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800267
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600268 Proto("VkResult", "GetPhysicalDeviceProperties",
269 [Param("VkPhysicalDevice", "physicalDevice"),
270 Param("VkPhysicalDeviceProperties*", "pProperties")]),
Tony Barbour59a47322015-06-24 16:06:58 -0600271
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600272 Proto("VkResult", "GetPhysicalDeviceQueueCount",
273 [Param("VkPhysicalDevice", "physicalDevice"),
274 Param("uint32_t*", "pCount")]),
275
276 Proto("VkResult", "GetPhysicalDeviceQueueProperties",
277 [Param("VkPhysicalDevice", "physicalDevice"),
278 Param("uint32_t", "count"),
279 Param("VkPhysicalDeviceQueueProperties*", "pQueueProperties")]),
280
281 Proto("VkResult", "GetPhysicalDeviceMemoryProperties",
282 [Param("VkPhysicalDevice", "physicalDevice"),
283 Param("VkPhysicalDeviceMemoryProperties*", "pMemoryProperties")]),
Tony Barbour59a47322015-06-24 16:06:58 -0600284
285 Proto("VkResult", "GetGlobalExtensionProperties",
Courtney Goeltzenleuchter110fdf92015-06-29 15:39:26 -0600286 [Param("const char*", "pLayerName"),
287 Param("uint32_t*", "pCount"),
Tony Barbour59a47322015-06-24 16:06:58 -0600288 Param("VkExtensionProperties*", "pProperties")]),
289
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600290 Proto("VkResult", "GetPhysicalDeviceExtensionProperties",
291 [Param("VkPhysicalDevice", "physicalDevice"),
292 Param("const char*", "pLayerName"),
293 Param("uint32_t", "*pCount"),
294 Param("VkExtensionProperties*", "pProperties")]),
295
Courtney Goeltzenleuchter110fdf92015-06-29 15:39:26 -0600296 Proto("VkResult", "GetGlobalLayerProperties",
297 [Param("uint32_t*", "pCount"),
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600298 Param("VkLayerProperties*", "pProperties")]),
299
300 Proto("VkResult", "GetPhysicalDeviceLayerProperties",
301 [Param("VkPhysicalDevice", "physicalDevice"),
302 Param("uint32_t", "*pCount"),
303 Param("VkLayerProperties*", "pProperties")]),
Tobin Ehlis01939012015-04-16 12:51:37 -0600304
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600305 Proto("VkResult", "GetDeviceQueue",
306 [Param("VkDevice", "device"),
Courtney Goeltzenleuchter18248e62015-03-05 18:09:39 -0700307 Param("uint32_t", "queueNodeIndex"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600308 Param("uint32_t", "queueIndex"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600309 Param("VkQueue*", "pQueue")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800310
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600311 Proto("VkResult", "QueueSubmit",
312 [Param("VkQueue", "queue"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600313 Param("uint32_t", "cmdBufferCount"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600314 Param("const VkCmdBuffer*", "pCmdBuffers"),
315 Param("VkFence", "fence")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800316
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600317 Proto("VkResult", "QueueWaitIdle",
318 [Param("VkQueue", "queue")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800319
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600320 Proto("VkResult", "DeviceWaitIdle",
321 [Param("VkDevice", "device")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800322
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600323 Proto("VkResult", "AllocMemory",
324 [Param("VkDevice", "device"),
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -0600325 Param("const VkMemoryAllocInfo*", "pAllocInfo"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600326 Param("VkDeviceMemory*", "pMem")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800327
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600328 Proto("VkResult", "FreeMemory",
Mike Stroyanb050c682015-04-17 12:36:38 -0600329 [Param("VkDevice", "device"),
330 Param("VkDeviceMemory", "mem")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800331
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600332 Proto("VkResult", "MapMemory",
Mike Stroyanb050c682015-04-17 12:36:38 -0600333 [Param("VkDevice", "device"),
334 Param("VkDeviceMemory", "mem"),
Tony Barbour71a85122015-04-16 19:09:28 -0600335 Param("VkDeviceSize", "offset"),
336 Param("VkDeviceSize", "size"),
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600337 Param("VkMemoryMapFlags", "flags"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600338 Param("void**", "ppData")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800339
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600340 Proto("VkResult", "UnmapMemory",
Mike Stroyanb050c682015-04-17 12:36:38 -0600341 [Param("VkDevice", "device"),
342 Param("VkDeviceMemory", "mem")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800343
Courtney Goeltzenleuchterf69f8a22015-04-29 17:16:21 -0600344 Proto("VkResult", "FlushMappedMemoryRanges",
Mike Stroyanb050c682015-04-17 12:36:38 -0600345 [Param("VkDevice", "device"),
Courtney Goeltzenleuchterf69f8a22015-04-29 17:16:21 -0600346 Param("uint32_t", "memRangeCount"),
347 Param("const VkMappedMemoryRange*", "pMemRanges")]),
348
349 Proto("VkResult", "InvalidateMappedMemoryRanges",
350 [Param("VkDevice", "device"),
351 Param("uint32_t", "memRangeCount"),
352 Param("const VkMappedMemoryRange*", "pMemRanges")]),
Tony Barbourb1250542015-04-16 19:23:13 -0600353
Courtney Goeltzenleuchterfb71f222015-07-09 21:57:28 -0600354 Proto("VkResult", "GetDeviceMemoryCommitment",
355 [Param("VkDevice", "device"),
356 Param("VkDeviceMemory", "memory"),
357 Param("VkDeviceSize*", "pCommittedMemoryInBytes")]),
358
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600359 Proto("VkResult", "BindBufferMemory",
360 [Param("VkDevice", "device"),
361 Param("VkBuffer", "buffer"),
362 Param("VkDeviceMemory", "mem"),
363 Param("VkDeviceSize", "memOffset")]),
364
365 Proto("VkResult", "BindImageMemory",
366 [Param("VkDevice", "device"),
367 Param("VkImage", "image"),
368 Param("VkDeviceMemory", "mem"),
369 Param("VkDeviceSize", "memOffset")]),
370
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600371 Proto("VkResult", "GetBufferMemoryRequirements",
Mike Stroyanb050c682015-04-17 12:36:38 -0600372 [Param("VkDevice", "device"),
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600373 Param("VkBuffer", "buffer"),
Tony Barbour59a47322015-06-24 16:06:58 -0600374 Param("VkMemoryRequirements*", "pMemoryRequirements")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800375
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600376 Proto("VkResult", "GetImageMemoryRequirements",
Mark Lobodzinski942b1722015-05-11 17:21:15 -0500377 [Param("VkDevice", "device"),
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600378 Param("VkImage", "image"),
379 Param("VkMemoryRequirements*", "pMemoryRequirements")]),
380
Mark Lobodzinski16e8bef2015-07-03 15:58:09 -0600381 Proto("VkResult", "GetImageSparseMemoryRequirements",
382 [Param("VkDevice", "device"),
383 Param("VkImage", "image"),
384 Param("uint32_t*", "pNumRequirements"),
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600385 Param("VkSparseImageMemoryRequirements*", "pSparseMemoryRequirements")]),
Mark Lobodzinski16e8bef2015-07-03 15:58:09 -0600386
387 Proto("VkResult", "GetPhysicalDeviceSparseImageFormatProperties",
388 [Param("VkPhysicalDevice", "physicalDevice"),
389 Param("VkFormat", "format"),
390 Param("VkImageType", "type"),
391 Param("uint32_t", "samples"),
392 Param("VkImageUsageFlags", "usage"),
393 Param("VkImageTiling", "tiling"),
394 Param("uint32_t*", "pNumProperties"),
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600395 Param("VkSparseImageFormatProperties*", "pProperties")]),
Mark Lobodzinski16e8bef2015-07-03 15:58:09 -0600396
Mark Lobodzinski942b1722015-05-11 17:21:15 -0500397 Proto("VkResult", "QueueBindSparseBufferMemory",
Mark Lobodzinski40f7f402015-04-16 11:44:05 -0500398 [Param("VkQueue", "queue"),
Mark Lobodzinski942b1722015-05-11 17:21:15 -0500399 Param("VkBuffer", "buffer"),
Mark Lobodzinski16e8bef2015-07-03 15:58:09 -0600400 Param("uint32_t", "numBindings"),
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600401 Param("const VkSparseMemoryBindInfo*", "pBindInfo")]),
Mark Lobodzinski16e8bef2015-07-03 15:58:09 -0600402
403 Proto("VkResult", "QueueBindSparseImageOpaqueMemory",
404 [Param("VkQueue", "queue"),
405 Param("VkImage", "image"),
406 Param("uint32_t", "numBindings"),
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600407 Param("const VkSparseMemoryBindInfo*", "pBindInfo")]),
Chia-I Wu1a28fe02015-01-01 07:55:04 +0800408
Mark Lobodzinski942b1722015-05-11 17:21:15 -0500409 Proto("VkResult", "QueueBindSparseImageMemory",
Mark Lobodzinski40f7f402015-04-16 11:44:05 -0500410 [Param("VkQueue", "queue"),
411 Param("VkImage", "image"),
Mark Lobodzinski16e8bef2015-07-03 15:58:09 -0600412 Param("uint32_t", "numBindings"),
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600413 Param("const VkSparseImageMemoryBindInfo*", "pBindInfo")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800414
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600415 Proto("VkResult", "CreateFence",
416 [Param("VkDevice", "device"),
417 Param("const VkFenceCreateInfo*", "pCreateInfo"),
418 Param("VkFence*", "pFence")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800419
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600420 Proto("VkResult", "DestroyFence",
421 [Param("VkDevice", "device"),
422 Param("VkFence", "fence")]),
423
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600424 Proto("VkResult", "ResetFences",
425 [Param("VkDevice", "device"),
Mark Lobodzinski148e1582015-04-07 16:07:57 -0500426 Param("uint32_t", "fenceCount"),
Courtney Goeltzenleuchter2bf8f902015-06-18 17:28:20 -0600427 Param("const VkFence*", "pFences")]),
Mark Lobodzinski148e1582015-04-07 16:07:57 -0500428
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600429 Proto("VkResult", "GetFenceStatus",
Mike Stroyanb050c682015-04-17 12:36:38 -0600430 [Param("VkDevice", "device"),
431 Param("VkFence", "fence")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800432
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600433 Proto("VkResult", "WaitForFences",
434 [Param("VkDevice", "device"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600435 Param("uint32_t", "fenceCount"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600436 Param("const VkFence*", "pFences"),
Courtney Goeltzenleuchtercd2a0992015-07-09 11:44:38 -0600437 Param("VkBool32", "waitAll"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600438 Param("uint64_t", "timeout")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800439
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600440 Proto("VkResult", "CreateSemaphore",
441 [Param("VkDevice", "device"),
442 Param("const VkSemaphoreCreateInfo*", "pCreateInfo"),
443 Param("VkSemaphore*", "pSemaphore")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800444
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600445 Proto("VkResult", "DestroySemaphore",
446 [Param("VkDevice", "device"),
447 Param("VkSemaphore", "semaphore")]),
448
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600449 Proto("VkResult", "QueueSignalSemaphore",
450 [Param("VkQueue", "queue"),
451 Param("VkSemaphore", "semaphore")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800452
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600453 Proto("VkResult", "QueueWaitSemaphore",
454 [Param("VkQueue", "queue"),
455 Param("VkSemaphore", "semaphore")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800456
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600457 Proto("VkResult", "CreateEvent",
458 [Param("VkDevice", "device"),
459 Param("const VkEventCreateInfo*", "pCreateInfo"),
460 Param("VkEvent*", "pEvent")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800461
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600462 Proto("VkResult", "DestroyEvent",
463 [Param("VkDevice", "device"),
464 Param("VkEvent", "event")]),
465
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600466 Proto("VkResult", "GetEventStatus",
Mike Stroyanb050c682015-04-17 12:36:38 -0600467 [Param("VkDevice", "device"),
468 Param("VkEvent", "event")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800469
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600470 Proto("VkResult", "SetEvent",
Mike Stroyanb050c682015-04-17 12:36:38 -0600471 [Param("VkDevice", "device"),
472 Param("VkEvent", "event")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800473
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600474 Proto("VkResult", "ResetEvent",
Mike Stroyanb050c682015-04-17 12:36:38 -0600475 [Param("VkDevice", "device"),
476 Param("VkEvent", "event")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800477
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600478 Proto("VkResult", "CreateQueryPool",
479 [Param("VkDevice", "device"),
480 Param("const VkQueryPoolCreateInfo*", "pCreateInfo"),
481 Param("VkQueryPool*", "pQueryPool")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800482
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600483 Proto("VkResult", "DestroyQueryPool",
484 [Param("VkDevice", "device"),
485 Param("VkQueryPool", "queryPool")]),
486
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600487 Proto("VkResult", "GetQueryPoolResults",
Mike Stroyanb050c682015-04-17 12:36:38 -0600488 [Param("VkDevice", "device"),
489 Param("VkQueryPool", "queryPool"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600490 Param("uint32_t", "startQuery"),
491 Param("uint32_t", "queryCount"),
492 Param("size_t*", "pDataSize"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600493 Param("void*", "pData"),
494 Param("VkQueryResultFlags", "flags")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800495
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600496 Proto("VkResult", "CreateBuffer",
497 [Param("VkDevice", "device"),
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -0600498 Param("const VkBufferCreateInfo*", "pCreateInfo"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600499 Param("VkBuffer*", "pBuffer")]),
Chia-I Wu1a28fe02015-01-01 07:55:04 +0800500
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600501 Proto("VkResult", "DestroyBuffer",
502 [Param("VkDevice", "device"),
503 Param("VkBuffer", "buffer")]),
504
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600505 Proto("VkResult", "CreateBufferView",
506 [Param("VkDevice", "device"),
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -0600507 Param("const VkBufferViewCreateInfo*", "pCreateInfo"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600508 Param("VkBufferView*", "pView")]),
Chia-I Wu1a28fe02015-01-01 07:55:04 +0800509
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600510 Proto("VkResult", "DestroyBufferView",
511 [Param("VkDevice", "device"),
512 Param("VkBufferView", "bufferView")]),
513
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600514 Proto("VkResult", "CreateImage",
515 [Param("VkDevice", "device"),
516 Param("const VkImageCreateInfo*", "pCreateInfo"),
517 Param("VkImage*", "pImage")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800518
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600519 Proto("VkResult", "DestroyImage",
520 [Param("VkDevice", "device"),
521 Param("VkImage", "image")]),
522
Tony Barbour59a47322015-06-24 16:06:58 -0600523 Proto("VkResult", "GetImageSubresourceLayout",
Mike Stroyanb050c682015-04-17 12:36:38 -0600524 [Param("VkDevice", "device"),
525 Param("VkImage", "image"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600526 Param("const VkImageSubresource*", "pSubresource"),
Tony Barbour59a47322015-06-24 16:06:58 -0600527 Param("VkSubresourceLayout*", "pLayout")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800528
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600529 Proto("VkResult", "CreateImageView",
530 [Param("VkDevice", "device"),
531 Param("const VkImageViewCreateInfo*", "pCreateInfo"),
532 Param("VkImageView*", "pView")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800533
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600534 Proto("VkResult", "DestroyImageView",
535 [Param("VkDevice", "device"),
536 Param("VkImageView", "imageView")]),
537
Chia-I Wu08accc62015-07-07 11:50:03 +0800538 Proto("VkResult", "CreateAttachmentView",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600539 [Param("VkDevice", "device"),
Chia-I Wu08accc62015-07-07 11:50:03 +0800540 Param("const VkAttachmentViewCreateInfo*", "pCreateInfo"),
541 Param("VkAttachmentView*", "pView")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800542
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600543 Proto("VkResult", "DestroyAttachmentView",
544 [Param("VkDevice", "device"),
545 Param("VkAttachmentView", "attachmentView")]),
546
Courtney Goeltzenleuchter2d2cb682015-06-24 18:24:19 -0600547 Proto("VkResult", "CreateShaderModule",
548 [Param("VkDevice", "device"),
549 Param("const VkShaderModuleCreateInfo*", "pCreateInfo"),
550 Param("VkShaderModule*", "pShaderModule")]),
551
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600552 Proto("VkResult", "DestroyShaderModule",
553 [Param("VkDevice", "device"),
554 Param("VkShaderModule", "shaderModule")]),
555
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600556 Proto("VkResult", "CreateShader",
557 [Param("VkDevice", "device"),
558 Param("const VkShaderCreateInfo*", "pCreateInfo"),
559 Param("VkShader*", "pShader")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800560
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600561 Proto("VkResult", "DestroyShader",
562 [Param("VkDevice", "device"),
563 Param("VkShader", "shader")]),
564
Jon Ashburnc669cc62015-07-09 15:02:25 -0600565 Proto("VkResult", "CreatePipelineCache",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600566 [Param("VkDevice", "device"),
Jon Ashburnc669cc62015-07-09 15:02:25 -0600567 Param("const VkPipelineCacheCreateInfo*", "pCreateInfo"),
568 Param("VkPipelineCache*", "pPipelineCache")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800569
Jon Ashburnc669cc62015-07-09 15:02:25 -0600570 Proto("VkResult", "DestroyPipelineCache",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600571 [Param("VkDevice", "device"),
Jon Ashburnc669cc62015-07-09 15:02:25 -0600572 Param("VkPipelineCache", "pipelineCache")]),
Courtney Goeltzenleuchter0d40f152015-03-25 15:37:49 -0600573
Jon Ashburnc669cc62015-07-09 15:02:25 -0600574 Proto("size_t", "GetPipelineCacheSize",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600575 [Param("VkDevice", "device"),
Jon Ashburnc669cc62015-07-09 15:02:25 -0600576 Param("VkPipelineCache", "pipelineCache")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800577
Jon Ashburnc669cc62015-07-09 15:02:25 -0600578 Proto("VkResult", "GetPipelineCacheData",
Mike Stroyanb050c682015-04-17 12:36:38 -0600579 [Param("VkDevice", "device"),
Jon Ashburnc669cc62015-07-09 15:02:25 -0600580 Param("VkPipelineCache", "pipelineCache"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600581 Param("void*", "pData")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800582
Jon Ashburnc669cc62015-07-09 15:02:25 -0600583 Proto("VkResult", "MergePipelineCaches",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600584 [Param("VkDevice", "device"),
Jon Ashburnc669cc62015-07-09 15:02:25 -0600585 Param("VkPipelineCache", "destCache"),
586 Param("uint32_t", "srcCacheCount"),
587 Param("const VkPipelineCache*", "pSrcCaches")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800588
Jon Ashburnc669cc62015-07-09 15:02:25 -0600589 Proto("VkResult", "CreateGraphicsPipelines",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600590 [Param("VkDevice", "device"),
Jon Ashburnc669cc62015-07-09 15:02:25 -0600591 Param("VkPipelineCache", "pipelineCache"),
592 Param("uint32_t", "count"),
593 Param("const VkGraphicsPipelineCreateInfo*", "pCreateInfos"),
594 Param("VkPipeline*", "pPipelines")]),
595
596 Proto("VkResult", "CreateComputePipelines",
597 [Param("VkDevice", "device"),
598 Param("VkPipelineCache", "pipelineCache"),
599 Param("uint32_t", "count"),
600 Param("const VkComputePipelineCreateInfo*", "pCreateInfos"),
601 Param("VkPipeline*", "pPipelines")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800602
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600603 Proto("VkResult", "DestroyPipeline",
604 [Param("VkDevice", "device"),
605 Param("VkPipeline", "pipeline")]),
606
Mark Lobodzinski0fadf5f2015-04-17 14:11:39 -0500607 Proto("VkResult", "CreatePipelineLayout",
608 [Param("VkDevice", "device"),
609 Param("const VkPipelineLayoutCreateInfo*", "pCreateInfo"),
610 Param("VkPipelineLayout*", "pPipelineLayout")]),
611
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600612 Proto("VkResult", "DestroyPipelineLayout",
613 [Param("VkDevice", "device"),
614 Param("VkPipelineLayout", "pipelineLayout")]),
615
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600616 Proto("VkResult", "CreateSampler",
617 [Param("VkDevice", "device"),
618 Param("const VkSamplerCreateInfo*", "pCreateInfo"),
619 Param("VkSampler*", "pSampler")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800620
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600621 Proto("VkResult", "DestroySampler",
622 [Param("VkDevice", "device"),
623 Param("VkSampler", "sampler")]),
624
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600625 Proto("VkResult", "CreateDescriptorSetLayout",
626 [Param("VkDevice", "device"),
627 Param("const VkDescriptorSetLayoutCreateInfo*", "pCreateInfo"),
628 Param("VkDescriptorSetLayout*", "pSetLayout")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800629
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600630 Proto("VkResult", "DestroyDescriptorSetLayout",
631 [Param("VkDevice", "device"),
632 Param("VkDescriptorSetLayout", "descriptorSetLayout")]),
633
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600634 Proto("VkResult", "CreateDescriptorPool",
635 [Param("VkDevice", "device"),
636 Param("VkDescriptorPoolUsage", "poolUsage"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600637 Param("uint32_t", "maxSets"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600638 Param("const VkDescriptorPoolCreateInfo*", "pCreateInfo"),
639 Param("VkDescriptorPool*", "pDescriptorPool")]),
Chia-I Wu11078b02015-01-04 16:27:24 +0800640
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600641 Proto("VkResult", "DestroyDescriptorPool",
642 [Param("VkDevice", "device"),
643 Param("VkDescriptorPool", "descriptorPool")]),
644
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600645 Proto("VkResult", "ResetDescriptorPool",
Mike Stroyanb050c682015-04-17 12:36:38 -0600646 [Param("VkDevice", "device"),
647 Param("VkDescriptorPool", "descriptorPool")]),
Chia-I Wu11078b02015-01-04 16:27:24 +0800648
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600649 Proto("VkResult", "AllocDescriptorSets",
Mike Stroyanb050c682015-04-17 12:36:38 -0600650 [Param("VkDevice", "device"),
651 Param("VkDescriptorPool", "descriptorPool"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600652 Param("VkDescriptorSetUsage", "setUsage"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600653 Param("uint32_t", "count"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600654 Param("const VkDescriptorSetLayout*", "pSetLayouts"),
Cody Northrop1e4f8022015-08-03 12:47:29 -0600655 Param("VkDescriptorSet*", "pDescriptorSets")]),
Chia-I Wu11078b02015-01-04 16:27:24 +0800656
Tony Barbour34ec6922015-07-10 10:50:45 -0600657 Proto("VkResult", "FreeDescriptorSets",
658 [Param("VkDevice", "device"),
659 Param("VkDescriptorPool", "descriptorPool"),
660 Param("uint32_t", "count"),
661 Param("const VkDescriptorSet*", "pDescriptorSets")]),
662
Chia-I Wu9d00ed72015-05-25 16:27:55 +0800663 Proto("VkResult", "UpdateDescriptorSets",
Mike Stroyanb050c682015-04-17 12:36:38 -0600664 [Param("VkDevice", "device"),
Chia-I Wu9d00ed72015-05-25 16:27:55 +0800665 Param("uint32_t", "writeCount"),
666 Param("const VkWriteDescriptorSet*", "pDescriptorWrites"),
667 Param("uint32_t", "copyCount"),
668 Param("const VkCopyDescriptorSet*", "pDescriptorCopies")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800669
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600670 Proto("VkResult", "CreateDynamicViewportState",
671 [Param("VkDevice", "device"),
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600672 Param("const VkDynamicViewportStateCreateInfo*", "pCreateInfo"),
673 Param("VkDynamicViewportState*", "pState")]),
674
675 Proto("VkResult", "DestroyDynamicViewportState",
676 [Param("VkDevice", "device"),
677 Param("VkDynamicViewportState", "dynamicViewportState")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800678
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600679 Proto("VkResult", "CreateDynamicRasterState",
680 [Param("VkDevice", "device"),
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600681 Param("const VkDynamicRasterStateCreateInfo*", "pCreateInfo"),
682 Param("VkDynamicRasterState*", "pState")]),
683
684 Proto("VkResult", "DestroyDynamicRasterState",
685 [Param("VkDevice", "device"),
686 Param("VkDynamicRasterState", "dynamicRasterState")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800687
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600688 Proto("VkResult", "CreateDynamicColorBlendState",
689 [Param("VkDevice", "device"),
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600690 Param("const VkDynamicColorBlendStateCreateInfo*", "pCreateInfo"),
691 Param("VkDynamicColorBlendState*", "pState")]),
692
693 Proto("VkResult", "DestroyDynamicColorBlendState",
694 [Param("VkDevice", "device"),
695 Param("VkDynamicColorBlendState", "dynamicColorBlendState")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800696
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600697 Proto("VkResult", "CreateDynamicDepthStencilState",
698 [Param("VkDevice", "device"),
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600699 Param("const VkDynamicDepthStencilStateCreateInfo*", "pCreateInfo"),
700 Param("VkDynamicDepthStencilState*", "pState")]),
701
702 Proto("VkResult", "DestroyDynamicDepthStencilState",
703 [Param("VkDevice", "device"),
704 Param("VkDynamicDepthStencilState", "dynamicDepthStencilState")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800705
Cody Northrope62183e2015-07-09 18:08:05 -0600706 Proto("VkResult", "CreateCommandPool",
707 [Param("VkDevice", "device"),
708 Param("const VkCmdPoolCreateInfo*", "pCreateInfo"),
709 Param("VkCmdPool*", "pCmdPool")]),
710
711 Proto("VkResult", "DestroyCommandPool",
712 [Param("VkDevice", "device"),
713 Param("VkCmdPool", "cmdPool")]),
714
715 Proto("VkResult", "ResetCommandPool",
716 [Param("VkDevice", "device"),
717 Param("VkCmdPool", "cmdPool"),
718 Param("VkCmdPoolResetFlags", "flags")]),
719
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600720 Proto("VkResult", "CreateCommandBuffer",
721 [Param("VkDevice", "device"),
722 Param("const VkCmdBufferCreateInfo*", "pCreateInfo"),
723 Param("VkCmdBuffer*", "pCmdBuffer")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800724
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600725 Proto("VkResult", "DestroyCommandBuffer",
726 [Param("VkDevice", "device"),
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600727 Param("VkCmdBuffer", "commandBuffer")]),
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600728
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600729 Proto("VkResult", "BeginCommandBuffer",
730 [Param("VkCmdBuffer", "cmdBuffer"),
731 Param("const VkCmdBufferBeginInfo*", "pBeginInfo")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800732
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600733 Proto("VkResult", "EndCommandBuffer",
734 [Param("VkCmdBuffer", "cmdBuffer")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800735
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600736 Proto("VkResult", "ResetCommandBuffer",
Cody Northrope62183e2015-07-09 18:08:05 -0600737 [Param("VkCmdBuffer", "cmdBuffer"),
738 Param("VkCmdBufferResetFlags", "flags")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800739
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600740 Proto("void", "CmdBindPipeline",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600741 [Param("VkCmdBuffer", "cmdBuffer"),
742 Param("VkPipelineBindPoint", "pipelineBindPoint"),
743 Param("VkPipeline", "pipeline")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800744
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600745 Proto("void", "CmdBindDynamicViewportState",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600746 [Param("VkCmdBuffer", "cmdBuffer"),
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600747 Param("VkDynamicViewportState", "dynamicViewportState")]),
748
749 Proto("void", "CmdBindDynamicRasterState",
750 [Param("VkCmdBuffer", "cmdBuffer"),
751 Param("VkDynamicRasterState", "dynamicRasterState")]),
752
753 Proto("void", "CmdBindDynamicColorBlendState",
754 [Param("VkCmdBuffer", "cmdBuffer"),
755 Param("VkDynamicColorBlendState", "dynamicColorBlendState")]),
756
757 Proto("void", "CmdBindDynamicDepthStencilState",
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600758 [Param("VkCmdBuffer", "cmdBuffer"),
759 Param("VkDynamicDepthStencilState", "dynamicDepthStencilState")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800760
Chia-I Wu53f07d72015-03-28 15:23:55 +0800761 Proto("void", "CmdBindDescriptorSets",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600762 [Param("VkCmdBuffer", "cmdBuffer"),
763 Param("VkPipelineBindPoint", "pipelineBindPoint"),
Mark Lobodzinskif2093b62015-06-15 13:21:21 -0600764 Param("VkPipelineLayout", "layout"),
Cody Northropd4c1a502015-04-16 13:41:56 -0600765 Param("uint32_t", "firstSet"),
766 Param("uint32_t", "setCount"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600767 Param("const VkDescriptorSet*", "pDescriptorSets"),
Cody Northropd4c1a502015-04-16 13:41:56 -0600768 Param("uint32_t", "dynamicOffsetCount"),
769 Param("const uint32_t*", "pDynamicOffsets")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800770
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600771 Proto("void", "CmdBindIndexBuffer",
772 [Param("VkCmdBuffer", "cmdBuffer"),
773 Param("VkBuffer", "buffer"),
774 Param("VkDeviceSize", "offset"),
775 Param("VkIndexType", "indexType")]),
776
Courtney Goeltzenleuchterf68ad722015-04-16 13:38:46 -0600777 Proto("void", "CmdBindVertexBuffers",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600778 [Param("VkCmdBuffer", "cmdBuffer"),
Courtney Goeltzenleuchterf68ad722015-04-16 13:38:46 -0600779 Param("uint32_t", "startBinding"),
780 Param("uint32_t", "bindingCount"),
781 Param("const VkBuffer*", "pBuffers"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600782 Param("const VkDeviceSize*", "pOffsets")]),
783
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600784 Proto("void", "CmdDraw",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600785 [Param("VkCmdBuffer", "cmdBuffer"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600786 Param("uint32_t", "firstVertex"),
787 Param("uint32_t", "vertexCount"),
788 Param("uint32_t", "firstInstance"),
789 Param("uint32_t", "instanceCount")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800790
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600791 Proto("void", "CmdDrawIndexed",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600792 [Param("VkCmdBuffer", "cmdBuffer"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600793 Param("uint32_t", "firstIndex"),
794 Param("uint32_t", "indexCount"),
795 Param("int32_t", "vertexOffset"),
796 Param("uint32_t", "firstInstance"),
797 Param("uint32_t", "instanceCount")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800798
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600799 Proto("void", "CmdDrawIndirect",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600800 [Param("VkCmdBuffer", "cmdBuffer"),
801 Param("VkBuffer", "buffer"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600802 Param("VkDeviceSize", "offset"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600803 Param("uint32_t", "count"),
804 Param("uint32_t", "stride")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800805
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600806 Proto("void", "CmdDrawIndexedIndirect",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600807 [Param("VkCmdBuffer", "cmdBuffer"),
808 Param("VkBuffer", "buffer"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600809 Param("VkDeviceSize", "offset"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600810 Param("uint32_t", "count"),
811 Param("uint32_t", "stride")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800812
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600813 Proto("void", "CmdDispatch",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600814 [Param("VkCmdBuffer", "cmdBuffer"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600815 Param("uint32_t", "x"),
816 Param("uint32_t", "y"),
817 Param("uint32_t", "z")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800818
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600819 Proto("void", "CmdDispatchIndirect",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600820 [Param("VkCmdBuffer", "cmdBuffer"),
821 Param("VkBuffer", "buffer"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600822 Param("VkDeviceSize", "offset")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800823
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600824 Proto("void", "CmdCopyBuffer",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600825 [Param("VkCmdBuffer", "cmdBuffer"),
826 Param("VkBuffer", "srcBuffer"),
827 Param("VkBuffer", "destBuffer"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600828 Param("uint32_t", "regionCount"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600829 Param("const VkBufferCopy*", "pRegions")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800830
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600831 Proto("void", "CmdCopyImage",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600832 [Param("VkCmdBuffer", "cmdBuffer"),
833 Param("VkImage", "srcImage"),
834 Param("VkImageLayout", "srcImageLayout"),
835 Param("VkImage", "destImage"),
836 Param("VkImageLayout", "destImageLayout"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600837 Param("uint32_t", "regionCount"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600838 Param("const VkImageCopy*", "pRegions")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800839
Courtney Goeltzenleuchter89299fa2015-03-08 17:02:18 -0600840 Proto("void", "CmdBlitImage",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600841 [Param("VkCmdBuffer", "cmdBuffer"),
842 Param("VkImage", "srcImage"),
843 Param("VkImageLayout", "srcImageLayout"),
844 Param("VkImage", "destImage"),
845 Param("VkImageLayout", "destImageLayout"),
Courtney Goeltzenleuchter89299fa2015-03-08 17:02:18 -0600846 Param("uint32_t", "regionCount"),
Mark Lobodzinskiee5eef12015-05-22 14:43:25 -0500847 Param("const VkImageBlit*", "pRegions"),
848 Param("VkTexFilter", "filter")]),
Courtney Goeltzenleuchter89299fa2015-03-08 17:02:18 -0600849
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600850 Proto("void", "CmdCopyBufferToImage",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600851 [Param("VkCmdBuffer", "cmdBuffer"),
852 Param("VkBuffer", "srcBuffer"),
853 Param("VkImage", "destImage"),
854 Param("VkImageLayout", "destImageLayout"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600855 Param("uint32_t", "regionCount"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600856 Param("const VkBufferImageCopy*", "pRegions")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800857
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600858 Proto("void", "CmdCopyImageToBuffer",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600859 [Param("VkCmdBuffer", "cmdBuffer"),
860 Param("VkImage", "srcImage"),
861 Param("VkImageLayout", "srcImageLayout"),
862 Param("VkBuffer", "destBuffer"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600863 Param("uint32_t", "regionCount"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600864 Param("const VkBufferImageCopy*", "pRegions")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800865
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600866 Proto("void", "CmdUpdateBuffer",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600867 [Param("VkCmdBuffer", "cmdBuffer"),
868 Param("VkBuffer", "destBuffer"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600869 Param("VkDeviceSize", "destOffset"),
870 Param("VkDeviceSize", "dataSize"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600871 Param("const uint32_t*", "pData")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800872
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600873 Proto("void", "CmdFillBuffer",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600874 [Param("VkCmdBuffer", "cmdBuffer"),
875 Param("VkBuffer", "destBuffer"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600876 Param("VkDeviceSize", "destOffset"),
877 Param("VkDeviceSize", "fillSize"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600878 Param("uint32_t", "data")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800879
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600880 Proto("void", "CmdClearColorImage",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600881 [Param("VkCmdBuffer", "cmdBuffer"),
882 Param("VkImage", "image"),
883 Param("VkImageLayout", "imageLayout"),
Chris Forbesf0796e12015-06-24 14:34:53 +1200884 Param("const VkClearColorValue*", "pColor"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600885 Param("uint32_t", "rangeCount"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600886 Param("const VkImageSubresourceRange*", "pRanges")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800887
Chris Forbesd9be82b2015-06-22 17:21:59 +1200888 Proto("void", "CmdClearDepthStencilImage",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600889 [Param("VkCmdBuffer", "cmdBuffer"),
890 Param("VkImage", "image"),
891 Param("VkImageLayout", "imageLayout"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600892 Param("float", "depth"),
893 Param("uint32_t", "stencil"),
894 Param("uint32_t", "rangeCount"),
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600895 Param("const VkImageSubresourceRange*", "pRanges")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800896
Chris Forbesd9be82b2015-06-22 17:21:59 +1200897 Proto("void", "CmdClearColorAttachment",
898 [Param("VkCmdBuffer", "cmdBuffer"),
899 Param("uint32_t", "colorAttachment"),
900 Param("VkImageLayout", "imageLayout"),
Chris Forbesf0796e12015-06-24 14:34:53 +1200901 Param("const VkClearColorValue*", "pColor"),
Chris Forbesd9be82b2015-06-22 17:21:59 +1200902 Param("uint32_t", "rectCount"),
903 Param("const VkRect3D*", "pRects")]),
904
905 Proto("void", "CmdClearDepthStencilAttachment",
906 [Param("VkCmdBuffer", "cmdBuffer"),
907 Param("VkImageAspectFlags", "imageAspectMask"),
908 Param("VkImageLayout", "imageLayout"),
909 Param("float", "depth"),
910 Param("uint32_t", "stencil"),
911 Param("uint32_t", "rectCount"),
912 Param("const VkRect3D*", "pRects")]),
913
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600914 Proto("void", "CmdResolveImage",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600915 [Param("VkCmdBuffer", "cmdBuffer"),
916 Param("VkImage", "srcImage"),
917 Param("VkImageLayout", "srcImageLayout"),
918 Param("VkImage", "destImage"),
919 Param("VkImageLayout", "destImageLayout"),
Tony Barbour6865d4a2015-04-13 15:02:52 -0600920 Param("uint32_t", "regionCount"),
921 Param("const VkImageResolve*", "pRegions")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800922
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600923 Proto("void", "CmdSetEvent",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600924 [Param("VkCmdBuffer", "cmdBuffer"),
925 Param("VkEvent", "event"),
Tony Barbour0b2cfb22015-06-29 16:20:35 -0600926 Param("VkPipelineStageFlags", "stageMask")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800927
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600928 Proto("void", "CmdResetEvent",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600929 [Param("VkCmdBuffer", "cmdBuffer"),
930 Param("VkEvent", "event"),
Tony Barbour0b2cfb22015-06-29 16:20:35 -0600931 Param("VkPipelineStageFlags", "stageMask")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800932
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600933 Proto("void", "CmdWaitEvents",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600934 [Param("VkCmdBuffer", "cmdBuffer"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600935 Param("uint32_t", "eventCount"),
936 Param("const VkEvent*", "pEvents"),
Tony Barbour0b2cfb22015-06-29 16:20:35 -0600937 Param("VkPipelineStageFlags", "sourceStageMask"),
938 Param("VkPipelineStageFlags", "destStageMask"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600939 Param("uint32_t", "memBarrierCount"),
Courtney Goeltzenleuchterdbd20322015-07-12 12:58:58 -0600940 Param("const void* const*", "ppMemBarriers")]),
Mike Stroyanfb80d5f2014-12-04 11:08:39 +0000941
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600942 Proto("void", "CmdPipelineBarrier",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600943 [Param("VkCmdBuffer", "cmdBuffer"),
Courtney Goeltzenleuchterceebbb12015-07-12 13:07:46 -0600944 Param("VkPipelineStageFlags", "srcStageMask"),
Tony Barbour0b2cfb22015-06-29 16:20:35 -0600945 Param("VkPipelineStageFlags", "destStageMask"),
Courtney Goeltzenleuchtercd2a0992015-07-09 11:44:38 -0600946 Param("VkBool32", "byRegion"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600947 Param("uint32_t", "memBarrierCount"),
Courtney Goeltzenleuchterceebbb12015-07-12 13:07:46 -0600948 Param("const void* const*", "ppMemBarriers")]),
Mike Stroyanfb80d5f2014-12-04 11:08:39 +0000949
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600950 Proto("void", "CmdBeginQuery",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600951 [Param("VkCmdBuffer", "cmdBuffer"),
952 Param("VkQueryPool", "queryPool"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600953 Param("uint32_t", "slot"),
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600954 Param("VkQueryControlFlags", "flags")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800955
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600956 Proto("void", "CmdEndQuery",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600957 [Param("VkCmdBuffer", "cmdBuffer"),
958 Param("VkQueryPool", "queryPool"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600959 Param("uint32_t", "slot")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800960
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600961 Proto("void", "CmdResetQueryPool",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600962 [Param("VkCmdBuffer", "cmdBuffer"),
963 Param("VkQueryPool", "queryPool"),
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600964 Param("uint32_t", "startQuery"),
965 Param("uint32_t", "queryCount")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800966
Mark Lobodzinski17caf572015-01-29 08:55:56 -0600967 Proto("void", "CmdWriteTimestamp",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600968 [Param("VkCmdBuffer", "cmdBuffer"),
969 Param("VkTimestampType", "timestampType"),
970 Param("VkBuffer", "destBuffer"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600971 Param("VkDeviceSize", "destOffset")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800972
Courtney Goeltzenleuchter1dbc8e22015-04-15 18:21:13 -0600973 Proto("void", "CmdCopyQueryPoolResults",
974 [Param("VkCmdBuffer", "cmdBuffer"),
975 Param("VkQueryPool", "queryPool"),
976 Param("uint32_t", "startQuery"),
977 Param("uint32_t", "queryCount"),
978 Param("VkBuffer", "destBuffer"),
Tony Barbourd1c35722015-04-16 15:59:00 -0600979 Param("VkDeviceSize", "destOffset"),
980 Param("VkDeviceSize", "destStride"),
Tobin Ehlisa30e7e52015-07-06 14:02:36 -0600981 Param("VkQueryResultFlags", "flags")]),
Courtney Goeltzenleuchter1dbc8e22015-04-15 18:21:13 -0600982
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600983 Proto("VkResult", "CreateFramebuffer",
984 [Param("VkDevice", "device"),
985 Param("const VkFramebufferCreateInfo*", "pCreateInfo"),
986 Param("VkFramebuffer*", "pFramebuffer")]),
Jeremy Hayesd65ae082015-01-14 16:17:08 -0700987
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600988 Proto("VkResult", "DestroyFramebuffer",
989 [Param("VkDevice", "device"),
990 Param("VkFramebuffer", "framebuffer")]),
991
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600992 Proto("VkResult", "CreateRenderPass",
993 [Param("VkDevice", "device"),
994 Param("const VkRenderPassCreateInfo*", "pCreateInfo"),
995 Param("VkRenderPass*", "pRenderPass")]),
Jeremy Hayesd65ae082015-01-14 16:17:08 -0700996
Tony Barbour1d2cd3f2015-07-03 10:33:54 -0600997 Proto("VkResult", "DestroyRenderPass",
998 [Param("VkDevice", "device"),
999 Param("VkRenderPass", "renderPass")]),
1000
Courtney Goeltzenleuchtera97e2ea2015-07-27 13:47:08 -06001001 Proto("VkResult", "GetRenderAreaGranularity",
1002 [Param("VkDevice", "device"),
1003 Param("VkRenderPass", "renderPass"),
1004 Param("VkExtent2D*", "pGranularity")]),
1005
Jon Ashburne13f1982015-02-02 09:58:11 -07001006 Proto("void", "CmdBeginRenderPass",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001007 [Param("VkCmdBuffer", "cmdBuffer"),
Chia-I Wu08accc62015-07-07 11:50:03 +08001008 Param("const VkRenderPassBeginInfo*", "pRenderPassBegin"),
1009 Param("VkRenderPassContents", "contents")]),
1010
1011 Proto("void", "CmdNextSubpass",
1012 [Param("VkCmdBuffer", "cmdBuffer"),
1013 Param("VkRenderPassContents", "contents")]),
Jon Ashburne13f1982015-02-02 09:58:11 -07001014
Courtney Goeltzenleuchterab7db3b2015-07-27 14:04:01 -06001015 Proto("void", "CmdPushConstants",
1016 [Param("VkCmdBuffer", "cmdBuffer"),
1017 Param("VkPipelineLayout", "layout"),
1018 Param("VkShaderStageFlags", "stageFlags"),
1019 Param("uint32_t", "start"),
1020 Param("uint32_t", "length"),
1021 Param("const void*", "values")]),
1022
Jon Ashburne13f1982015-02-02 09:58:11 -07001023 Proto("void", "CmdEndRenderPass",
Chia-I Wu0b50a1c2015-06-26 15:34:39 +08001024 [Param("VkCmdBuffer", "cmdBuffer")]),
1025
1026 Proto("void", "CmdExecuteCommands",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001027 [Param("VkCmdBuffer", "cmdBuffer"),
Chia-I Wu0b50a1c2015-06-26 15:34:39 +08001028 Param("uint32_t", "cmdBuffersCount"),
1029 Param("const VkCmdBuffer*", "pCmdBuffers")]),
Chia-I Wue442dc32015-01-01 09:31:15 +08001030 ],
Chia-I Wufb2559d2014-08-01 11:19:52 +08001031)
1032
Ian Elliott1064fe32015-07-06 14:31:32 -06001033wsi_swapchain = Extension(
1034 name="VK_WSI_swapchain",
1035 headers=["vk_wsi_swapchain.h"],
Chia-I Wuf8693382015-04-16 22:02:10 +08001036 objects=[
Courtney Goeltzenleuchterf579fa62015-06-10 17:39:03 -06001037 "VkDbgMsgCallback",
Chia-I Wuf8693382015-04-16 22:02:10 +08001038 ],
Chia-I Wue442dc32015-01-01 09:31:15 +08001039 protos=[
Ian Elliott1064fe32015-07-06 14:31:32 -06001040 Proto("VkResult", "GetPhysicalDeviceSurfaceSupportWSI",
1041 [Param("VkPhysicalDevice", "physicalDevice"),
1042 Param("uint32_t", "queueNodeIndex"),
1043 Param("VkSurfaceDescriptionWSI*", "pSurfaceDescription"),
1044 Param("VkBool32*", "pSupported")]),
1045 ],
1046)
1047
1048wsi_device_swapchain = Extension(
1049 name="VK_WSI_device_swapchain",
1050 headers=["vk_wsi_device_swapchain.h"],
1051 objects=[
1052 "VkDbgMsgCallback",
1053 ],
1054 protos=[
1055 Proto("VkResult", "GetSurfaceInfoWSI",
1056 [Param("VkDevice", "device"),
1057 Param("VkSurfaceDescriptionWSI*", "pSurfaceDescription"),
1058 Param("VkSurfaceInfoTypeWSI", "infoType"),
1059 Param("size_t*", "pDataSize"),
1060 Param("void*", "pData")]),
1061
Chia-I Wuf8693382015-04-16 22:02:10 +08001062 Proto("VkResult", "CreateSwapChainWSI",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001063 [Param("VkDevice", "device"),
Chia-I Wuf8693382015-04-16 22:02:10 +08001064 Param("const VkSwapChainCreateInfoWSI*", "pCreateInfo"),
1065 Param("VkSwapChainWSI*", "pSwapChain")]),
Chia-I Wu6dee8b82014-09-23 10:37:23 +08001066
Chia-I Wuf8693382015-04-16 22:02:10 +08001067 Proto("VkResult", "DestroySwapChainWSI",
Ian Elliott1064fe32015-07-06 14:31:32 -06001068 [Param("VkDevice", "device"),
1069 Param("VkSwapChainWSI", "swapChain")]),
Chia-I Wu6dee8b82014-09-23 10:37:23 +08001070
Chia-I Wuf8693382015-04-16 22:02:10 +08001071 Proto("VkResult", "GetSwapChainInfoWSI",
Ian Elliott1064fe32015-07-06 14:31:32 -06001072 [Param("VkDevice", "device"),
1073 Param("VkSwapChainWSI", "swapChain"),
Chia-I Wuf8693382015-04-16 22:02:10 +08001074 Param("VkSwapChainInfoTypeWSI", "infoType"),
1075 Param("size_t*", "pDataSize"),
1076 Param("void*", "pData")]),
1077
Ian Elliott1064fe32015-07-06 14:31:32 -06001078 Proto("VkResult", "AcquireNextImageWSI",
1079 [Param("VkDevice", "device"),
1080 Param("VkSwapChainWSI", "swapChain"),
1081 Param("uint64_t", "timeout"),
1082 Param("VkSemaphore", "semaphore"),
1083 Param("uint32_t*", "pImageIndex")]),
1084
Chia-I Wuf8693382015-04-16 22:02:10 +08001085 Proto("VkResult", "QueuePresentWSI",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001086 [Param("VkQueue", "queue"),
Ian Elliott1064fe32015-07-06 14:31:32 -06001087 Param("VkPresentInfoWSI*", "pPresentInfo")]),
Chia-I Wue442dc32015-01-01 09:31:15 +08001088 ],
Chia-I Wu6dee8b82014-09-23 10:37:23 +08001089)
1090
Ian Elliott1064fe32015-07-06 14:31:32 -06001091extensions = [core, wsi_swapchain, wsi_device_swapchain]
Chia-I Wuc4f24e82015-01-01 08:46:31 +08001092
Tobin Ehlisa30e7e52015-07-06 14:02:36 -06001093object_dispatch_list = [
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001094 "VkInstance",
Tony Barbourd1c35722015-04-16 15:59:00 -06001095 "VkPhysicalDevice",
Tobin Ehlisa30e7e52015-07-06 14:02:36 -06001096 "VkDevice",
1097 "VkQueue",
1098 "VkCmdBuffer",
Chia-I Wuf8693382015-04-16 22:02:10 +08001099 "VkDisplayWSI",
1100 "VkSwapChainWSI",
Tobin Ehlis7e65d752015-01-15 17:51:52 -07001101]
1102
Tobin Ehlisa30e7e52015-07-06 14:02:36 -06001103object_non_dispatch_list = [
Cody Northrope62183e2015-07-09 18:08:05 -06001104 "VkCmdPool",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001105 "VkFence",
Tobin Ehlisa30e7e52015-07-06 14:02:36 -06001106 "VkDeviceMemory",
1107 "VkBuffer",
1108 "VkImage",
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001109 "VkSemaphore",
1110 "VkEvent",
1111 "VkQueryPool",
Tobin Ehlisa30e7e52015-07-06 14:02:36 -06001112 "VkBufferView",
1113 "VkImageView",
1114 "VkAttachmentView",
1115 "VkShaderModule",
1116 "VkShader",
1117 "VkPipelineCache",
1118 "VkPipelineLayout",
1119 "VkPipeline",
1120 "VkDescriptorSetLayout",
1121 "VkSampler",
1122 "VkDescriptorPool",
1123 "VkDescriptorSet",
Tony Barbour1d2cd3f2015-07-03 10:33:54 -06001124 "VkDynamicViewportState",
1125 "VkDynamicRasterState",
1126 "VkDynamicColorBlendState",
Tobin Ehlisa30e7e52015-07-06 14:02:36 -06001127 "VkDynamicDepthStencilState",
1128 "VkRenderPass",
1129 "VkFramebuffer",
Tobin Ehlis7e65d752015-01-15 17:51:52 -07001130]
1131
Tobin Ehlisa30e7e52015-07-06 14:02:36 -06001132object_type_list = object_dispatch_list + object_non_dispatch_list
Tobin Ehlis7e65d752015-01-15 17:51:52 -07001133
Chia-I Wuc4f24e82015-01-01 08:46:31 +08001134headers = []
Chia-I Wue86d8ab2015-01-04 14:46:22 +08001135objects = []
Chia-I Wuc4f24e82015-01-01 08:46:31 +08001136protos = []
1137for ext in extensions:
1138 headers.extend(ext.headers)
Chia-I Wue86d8ab2015-01-04 14:46:22 +08001139 objects.extend(ext.objects)
Chia-I Wuc4f24e82015-01-01 08:46:31 +08001140 protos.extend(ext.protos)
Chia-I Wu6dee8b82014-09-23 10:37:23 +08001141
Chia-I Wu9a4ceb12015-01-01 14:45:58 +08001142proto_names = [proto.name for proto in protos]
Chia-I Wu900a2572014-08-01 14:44:16 +08001143
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001144def parse_vk_h(filename):
Chia-I Wu509a4122015-01-04 14:08:46 +08001145 # read object and protoype typedefs
1146 object_lines = []
1147 proto_lines = []
1148 with open(filename, "r") as fp:
1149 for line in fp:
1150 line = line.strip()
Courtney Goeltzenleuchterd8e229c2015-04-08 15:36:08 -06001151 if line.startswith("VK_DEFINE"):
Chia-I Wu509a4122015-01-04 14:08:46 +08001152 begin = line.find("(") + 1
1153 end = line.find(",")
1154 # extract the object type
1155 object_lines.append(line[begin:end])
1156 if line.startswith("typedef") and line.endswith(");"):
1157 # drop leading "typedef " and trailing ");"
1158 proto_lines.append(line[8:-2])
1159
1160 # parse proto_lines to protos
1161 protos = []
1162 for line in proto_lines:
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -06001163 first, rest = line.split(" (VKAPI *PFN_vk")
1164 second, third = rest.split(")(")
Chia-I Wu509a4122015-01-04 14:08:46 +08001165
1166 # get the return type, no space before "*"
1167 proto_ret = "*".join([t.rstrip() for t in first.split("*")])
1168
1169 # get the name
1170 proto_name = second.strip()
1171
1172 # get the list of params
1173 param_strs = third.split(", ")
1174 params = []
1175 for s in param_strs:
1176 ty, name = s.rsplit(" ", 1)
1177
1178 # no space before "*"
1179 ty = "*".join([t.rstrip() for t in ty.split("*")])
1180 # attach [] to ty
1181 idx = name.rfind("[")
1182 if idx >= 0:
1183 ty += name[idx:]
1184 name = name[:idx]
1185
1186 params.append(Param(ty, name))
1187
1188 protos.append(Proto(proto_ret, proto_name, params))
1189
1190 # make them an extension and print
Courtney Goeltzenleuchterd8e229c2015-04-08 15:36:08 -06001191 ext = Extension("VK_CORE",
Courtney Goeltzenleuchterf579fa62015-06-10 17:39:03 -06001192 headers=["vulkan.h", "vk_debug_report_lunarg.h"],
Chia-I Wu509a4122015-01-04 14:08:46 +08001193 objects=object_lines,
1194 protos=protos)
1195 print("core =", str(ext))
1196
1197 print("")
Jon Ashburnbacb0f52015-04-06 10:58:22 -06001198 print("typedef struct VkLayerDispatchTable_")
Chia-I Wu509a4122015-01-04 14:08:46 +08001199 print("{")
1200 for proto in ext.protos:
Courtney Goeltzenleuchterd8e229c2015-04-08 15:36:08 -06001201 print(" vk%sType %s;" % (proto.name, proto.name))
Jon Ashburnbacb0f52015-04-06 10:58:22 -06001202 print("} VkLayerDispatchTable;")
Chia-I Wu509a4122015-01-04 14:08:46 +08001203
1204if __name__ == "__main__":
Courtney Goeltzenleuchterf53c3cb2015-04-14 14:55:44 -06001205 parse_vk_h("include/vulkan.h")