blob: e7206b4806ab64ba5b50be853c98f53a355c8dcf [file] [log] [blame]
Courtney Goeltzenleuchter9cc421e2015-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 Wu41911d52015-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 Wu8f4508a2015-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 Wu82d0c6e2015-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 Wu82d0c6e2015-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 Wu2560a602015-01-04 12:00:01 +0800101 def c_pretty_decl(self, name, attr=""):
Courtney Goeltzenleuchter9cc421e2015-04-08 15:36:08 -0600102 """Return a named declaration in C, with vulkan.h formatting."""
Chia-I Wu2560a602015-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 Wu41911d52015-01-04 15:02:50 +0800133 def object_in_params(self):
Courtney Goeltzenleuchter9cc421e2015-04-08 15:36:08 -0600134 """Return the params that are simple VK objects and are inputs."""
Chia-I Wu41911d52015-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 Goeltzenleuchter9cc421e2015-04-08 15:36:08 -0600138 """Return the params that are simple VK objects and are outputs."""
Chia-I Wu41911d52015-01-04 15:02:50 +0800139 return [param for param in self.params
140 if param.dereferenced_type() in objects]
141
Chia-I Wu8f4508a2015-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 Wuec30dcb2015-01-01 08:46:31 +0800151class Extension(object):
Chia-I Wua5d442f2015-01-04 14:46:22 +0800152 def __init__(self, name, headers, objects, protos):
Chia-I Wuec30dcb2015-01-01 08:46:31 +0800153 self.name = name
154 self.headers = headers
Chia-I Wua5d442f2015-01-04 14:46:22 +0800155 self.objects = objects
Chia-I Wuec30dcb2015-01-01 08:46:31 +0800156 self.protos = protos
157
Chia-I Wu8f4508a2015-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 Goeltzenleuchter9cc421e2015-04-08 15:36:08 -0600181# VK core API
Chia-I Wuec30dcb2015-01-01 08:46:31 +0800182core = Extension(
Courtney Goeltzenleuchter9cc421e2015-04-08 15:36:08 -0600183 name="VK_CORE",
Courtney Goeltzenleuchter1c7c65d2015-06-10 17:39:03 -0600184 headers=["vulkan.h", "vk_debug_report_lunarg.h"],
Chia-I Wua5d442f2015-01-04 14:46:22 +0800185 objects=[
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600186 "VkInstance",
Tony Barbour8205d902015-04-16 15:59:00 -0600187 "VkPhysicalDevice",
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600188 "VkDevice",
189 "VkQueue",
Tobin Ehlis0b9c1952015-07-06 14:02:36 -0600190 "VkCmdBuffer",
Cody Northropf02f9f82015-07-09 18:08:05 -0600191 "VkCmdPool",
Tobin Ehlis0b9c1952015-07-06 14:02:36 -0600192 "VkFence",
Tony Barbour8205d902015-04-16 15:59:00 -0600193 "VkDeviceMemory",
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600194 "VkBuffer",
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600195 "VkImage",
Tobin Ehlis0b9c1952015-07-06 14:02:36 -0600196 "VkSemaphore",
197 "VkEvent",
198 "VkQueryPool",
199 "VkBufferView",
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600200 "VkImageView",
Chia-I Wuc278df82015-07-07 11:50:03 +0800201 "VkAttachmentView",
Tobin Ehlis0b9c1952015-07-06 14:02:36 -0600202 "VkShaderModule",
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600203 "VkShader",
Tony Barbour2a199c12015-07-09 17:31:46 -0600204 "VkPipelineCache",
Tobin Ehlis0b9c1952015-07-06 14:02:36 -0600205 "VkPipelineLayout",
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600206 "VkPipeline",
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600207 "VkDescriptorSetLayout",
Tobin Ehlis0b9c1952015-07-06 14:02:36 -0600208 "VkSampler",
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600209 "VkDescriptorPool",
Tobin Ehlis0b9c1952015-07-06 14:02:36 -0600210 "VkDescriptorSet",
Tony Barbourde4124d2015-07-03 10:33:54 -0600211 "VkDynamicViewportState",
Cody Northropf5bd2252015-08-17 11:10:49 -0600212 "VkDynamicRasterLineState",
213 "VkDynamicRasterDepthBiasState",
Tony Barbourde4124d2015-07-03 10:33:54 -0600214 "VkDynamicColorBlendState",
215 "VkDynamicDepthStencilState",
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600216 "VkRenderPass",
Tobin Ehlis0b9c1952015-07-06 14:02:36 -0600217 "VkFramebuffer",
Chia-I Wua5d442f2015-01-04 14:46:22 +0800218 ],
Chia-I Wu82d0c6e2015-01-01 09:31:15 +0800219 protos=[
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600220 Proto("VkResult", "CreateInstance",
Courtney Goeltzenleuchterddcb6192015-04-14 18:48:46 -0600221 [Param("const VkInstanceCreateInfo*", "pCreateInfo"),
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600222 Param("VkInstance*", "pInstance")]),
Jon Ashburn349508d2015-01-26 14:51:40 -0700223
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600224 Proto("VkResult", "DestroyInstance",
225 [Param("VkInstance", "instance")]),
Jon Ashburn349508d2015-01-26 14:51:40 -0700226
Jon Ashburn07b309a2015-04-15 11:31:12 -0600227 Proto("VkResult", "EnumeratePhysicalDevices",
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600228 [Param("VkInstance", "instance"),
Jon Ashburn07b309a2015-04-15 11:31:12 -0600229 Param("uint32_t*", "pPhysicalDeviceCount"),
Tony Barbour8205d902015-04-16 15:59:00 -0600230 Param("VkPhysicalDevice*", "pPhysicalDevices")]),
Jon Ashburn349508d2015-01-26 14:51:40 -0700231
Chris Forbesd7576302015-06-21 22:55:02 +1200232 Proto("VkResult", "GetPhysicalDeviceFeatures",
233 [Param("VkPhysicalDevice", "physicalDevice"),
234 Param("VkPhysicalDeviceFeatures*", "pFeatures")]),
235
Courtney Goeltzenleuchter4da96aa2015-07-12 12:52:09 -0600236 Proto("VkResult", "GetPhysicalDeviceFormatProperties",
Chris Forbesd7576302015-06-21 22:55:02 +1200237 [Param("VkPhysicalDevice", "physicalDevice"),
238 Param("VkFormat", "format"),
Jon Ashburn1a70cda2015-08-06 17:27:49 -0600239 Param("VkFormatProperties*", "pFormatProperties")]),
Chris Forbesd7576302015-06-21 22:55:02 +1200240
Jon Ashburna25465c2015-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 Forbesd7576302015-06-21 22:55:02 +1200249 Proto("VkResult", "GetPhysicalDeviceLimits",
250 [Param("VkPhysicalDevice", "physicalDevice"),
251 Param("VkPhysicalDeviceLimits*", "pLimits")]),
252
Courtney Goeltzenleuchtera4c8c712015-07-12 14:35:22 -0600253 Proto("PFN_vkVoidFunction", "GetInstanceProcAddr",
Jon Ashburn53c16772015-05-06 10:15:07 -0600254 [Param("VkInstance", "instance"),
255 Param("const char*", "pName")]),
256
Courtney Goeltzenleuchtera4c8c712015-07-12 14:35:22 -0600257 Proto("PFN_vkVoidFunction", "GetDeviceProcAddr",
Jon Ashburn1245cec2015-05-18 13:20:15 -0600258 [Param("VkDevice", "device"),
Mark Lobodzinskie2d07a52015-01-29 08:55:56 -0600259 Param("const char*", "pName")]),
Chia-I Wucc6de622015-01-04 14:51:06 +0800260
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600261 Proto("VkResult", "CreateDevice",
Tobin Ehlis0b9c1952015-07-06 14:02:36 -0600262 [Param("VkPhysicalDevice", "physicalDevice"),
Courtney Goeltzenleuchterddcb6192015-04-14 18:48:46 -0600263 Param("const VkDeviceCreateInfo*", "pCreateInfo"),
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600264 Param("VkDevice*", "pDevice")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800265
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600266 Proto("VkResult", "DestroyDevice",
267 [Param("VkDevice", "device")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800268
Tobin Ehlis0b9c1952015-07-06 14:02:36 -0600269 Proto("VkResult", "GetPhysicalDeviceProperties",
270 [Param("VkPhysicalDevice", "physicalDevice"),
271 Param("VkPhysicalDeviceProperties*", "pProperties")]),
Tony Barbour426b9052015-06-24 16:06:58 -0600272
Cody Northropef72e2a2015-08-03 17:04:53 -0600273 Proto("VkResult", "GetPhysicalDeviceQueueFamilyProperties",
Tobin Ehlis0b9c1952015-07-06 14:02:36 -0600274 [Param("VkPhysicalDevice", "physicalDevice"),
Cody Northropef72e2a2015-08-03 17:04:53 -0600275 Param("uint32_t*", "pCount"),
276 Param("VkQueueFamilyProperties*", "pQueueFamilyProperties")]),
Tobin Ehlis0b9c1952015-07-06 14:02:36 -0600277
278 Proto("VkResult", "GetPhysicalDeviceMemoryProperties",
279 [Param("VkPhysicalDevice", "physicalDevice"),
280 Param("VkPhysicalDeviceMemoryProperties*", "pMemoryProperties")]),
Tony Barbour426b9052015-06-24 16:06:58 -0600281
282 Proto("VkResult", "GetGlobalExtensionProperties",
Courtney Goeltzenleuchter18061cd2015-06-29 15:39:26 -0600283 [Param("const char*", "pLayerName"),
284 Param("uint32_t*", "pCount"),
Tony Barbour426b9052015-06-24 16:06:58 -0600285 Param("VkExtensionProperties*", "pProperties")]),
286
Tobin Ehlis0b9c1952015-07-06 14:02:36 -0600287 Proto("VkResult", "GetPhysicalDeviceExtensionProperties",
288 [Param("VkPhysicalDevice", "physicalDevice"),
289 Param("const char*", "pLayerName"),
Jon Ashburn1a70cda2015-08-06 17:27:49 -0600290 Param("uint32_t*", "pCount"),
Tobin Ehlis0b9c1952015-07-06 14:02:36 -0600291 Param("VkExtensionProperties*", "pProperties")]),
292
Courtney Goeltzenleuchter18061cd2015-06-29 15:39:26 -0600293 Proto("VkResult", "GetGlobalLayerProperties",
294 [Param("uint32_t*", "pCount"),
Tobin Ehlis0b9c1952015-07-06 14:02:36 -0600295 Param("VkLayerProperties*", "pProperties")]),
296
297 Proto("VkResult", "GetPhysicalDeviceLayerProperties",
298 [Param("VkPhysicalDevice", "physicalDevice"),
Jon Ashburn1a70cda2015-08-06 17:27:49 -0600299 Param("uint32_t*", "pCount"),
Tobin Ehlis0b9c1952015-07-06 14:02:36 -0600300 Param("VkLayerProperties*", "pProperties")]),
Tobin Ehlis0ef6ec52015-04-16 12:51:37 -0600301
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600302 Proto("VkResult", "GetDeviceQueue",
303 [Param("VkDevice", "device"),
Jon Ashburn1a70cda2015-08-06 17:27:49 -0600304 Param("uint32_t", "queueFamilyIndex"),
Mark Lobodzinskie2d07a52015-01-29 08:55:56 -0600305 Param("uint32_t", "queueIndex"),
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600306 Param("VkQueue*", "pQueue")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800307
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600308 Proto("VkResult", "QueueSubmit",
309 [Param("VkQueue", "queue"),
Mark Lobodzinskie2d07a52015-01-29 08:55:56 -0600310 Param("uint32_t", "cmdBufferCount"),
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600311 Param("const VkCmdBuffer*", "pCmdBuffers"),
312 Param("VkFence", "fence")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800313
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600314 Proto("VkResult", "QueueWaitIdle",
315 [Param("VkQueue", "queue")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800316
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600317 Proto("VkResult", "DeviceWaitIdle",
318 [Param("VkDevice", "device")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800319
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600320 Proto("VkResult", "AllocMemory",
321 [Param("VkDevice", "device"),
Courtney Goeltzenleuchterddcb6192015-04-14 18:48:46 -0600322 Param("const VkMemoryAllocInfo*", "pAllocInfo"),
Tony Barbour8205d902015-04-16 15:59:00 -0600323 Param("VkDeviceMemory*", "pMem")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800324
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600325 Proto("VkResult", "FreeMemory",
Mike Stroyan230e6252015-04-17 12:36:38 -0600326 [Param("VkDevice", "device"),
327 Param("VkDeviceMemory", "mem")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800328
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600329 Proto("VkResult", "MapMemory",
Mike Stroyan230e6252015-04-17 12:36:38 -0600330 [Param("VkDevice", "device"),
331 Param("VkDeviceMemory", "mem"),
Tony Barbour3e3420a2015-04-16 19:09:28 -0600332 Param("VkDeviceSize", "offset"),
333 Param("VkDeviceSize", "size"),
Tobin Ehlis0b9c1952015-07-06 14:02:36 -0600334 Param("VkMemoryMapFlags", "flags"),
Mark Lobodzinskie2d07a52015-01-29 08:55:56 -0600335 Param("void**", "ppData")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800336
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600337 Proto("VkResult", "UnmapMemory",
Mike Stroyan230e6252015-04-17 12:36:38 -0600338 [Param("VkDevice", "device"),
339 Param("VkDeviceMemory", "mem")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800340
Courtney Goeltzenleuchtera569a502015-04-29 17:16:21 -0600341 Proto("VkResult", "FlushMappedMemoryRanges",
Mike Stroyan230e6252015-04-17 12:36:38 -0600342 [Param("VkDevice", "device"),
Courtney Goeltzenleuchtera569a502015-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 Barbour859ceab2015-04-16 19:23:13 -0600350
Courtney Goeltzenleuchterd040c5c2015-07-09 21:57:28 -0600351 Proto("VkResult", "GetDeviceMemoryCommitment",
352 [Param("VkDevice", "device"),
353 Param("VkDeviceMemory", "memory"),
354 Param("VkDeviceSize*", "pCommittedMemoryInBytes")]),
355
Tobin Ehlis0b9c1952015-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 Barbourde4124d2015-07-03 10:33:54 -0600368 Proto("VkResult", "GetBufferMemoryRequirements",
Mike Stroyan230e6252015-04-17 12:36:38 -0600369 [Param("VkDevice", "device"),
Tony Barbourde4124d2015-07-03 10:33:54 -0600370 Param("VkBuffer", "buffer"),
Tony Barbour426b9052015-06-24 16:06:58 -0600371 Param("VkMemoryRequirements*", "pMemoryRequirements")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800372
Tony Barbourde4124d2015-07-03 10:33:54 -0600373 Proto("VkResult", "GetImageMemoryRequirements",
Mark Lobodzinskifb9f5642015-05-11 17:21:15 -0500374 [Param("VkDevice", "device"),
Tony Barbourde4124d2015-07-03 10:33:54 -0600375 Param("VkImage", "image"),
376 Param("VkMemoryRequirements*", "pMemoryRequirements")]),
377
Mark Lobodzinski83d4e6a2015-07-03 15:58:09 -0600378 Proto("VkResult", "GetImageSparseMemoryRequirements",
379 [Param("VkDevice", "device"),
380 Param("VkImage", "image"),
381 Param("uint32_t*", "pNumRequirements"),
Tobin Ehlis0b9c1952015-07-06 14:02:36 -0600382 Param("VkSparseImageMemoryRequirements*", "pSparseMemoryRequirements")]),
Mark Lobodzinski83d4e6a2015-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 Ehlis0b9c1952015-07-06 14:02:36 -0600392 Param("VkSparseImageFormatProperties*", "pProperties")]),
Mark Lobodzinski83d4e6a2015-07-03 15:58:09 -0600393
Mark Lobodzinskifb9f5642015-05-11 17:21:15 -0500394 Proto("VkResult", "QueueBindSparseBufferMemory",
Mark Lobodzinskicf26e072015-04-16 11:44:05 -0500395 [Param("VkQueue", "queue"),
Mark Lobodzinskifb9f5642015-05-11 17:21:15 -0500396 Param("VkBuffer", "buffer"),
Mark Lobodzinski83d4e6a2015-07-03 15:58:09 -0600397 Param("uint32_t", "numBindings"),
Tobin Ehlis0b9c1952015-07-06 14:02:36 -0600398 Param("const VkSparseMemoryBindInfo*", "pBindInfo")]),
Mark Lobodzinski83d4e6a2015-07-03 15:58:09 -0600399
400 Proto("VkResult", "QueueBindSparseImageOpaqueMemory",
401 [Param("VkQueue", "queue"),
402 Param("VkImage", "image"),
403 Param("uint32_t", "numBindings"),
Tobin Ehlis0b9c1952015-07-06 14:02:36 -0600404 Param("const VkSparseMemoryBindInfo*", "pBindInfo")]),
Chia-I Wu714df452015-01-01 07:55:04 +0800405
Mark Lobodzinskifb9f5642015-05-11 17:21:15 -0500406 Proto("VkResult", "QueueBindSparseImageMemory",
Mark Lobodzinskicf26e072015-04-16 11:44:05 -0500407 [Param("VkQueue", "queue"),
408 Param("VkImage", "image"),
Mark Lobodzinski83d4e6a2015-07-03 15:58:09 -0600409 Param("uint32_t", "numBindings"),
Tobin Ehlis0b9c1952015-07-06 14:02:36 -0600410 Param("const VkSparseImageMemoryBindInfo*", "pBindInfo")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800411
Courtney Goeltzenleuchter382489d2015-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 Barbourde4124d2015-07-03 10:33:54 -0600417 Proto("VkResult", "DestroyFence",
418 [Param("VkDevice", "device"),
419 Param("VkFence", "fence")]),
420
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600421 Proto("VkResult", "ResetFences",
422 [Param("VkDevice", "device"),
Mark Lobodzinskiebe814d2015-04-07 16:07:57 -0500423 Param("uint32_t", "fenceCount"),
Courtney Goeltzenleuchterf2e33ad2015-06-18 17:28:20 -0600424 Param("const VkFence*", "pFences")]),
Mark Lobodzinskiebe814d2015-04-07 16:07:57 -0500425
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600426 Proto("VkResult", "GetFenceStatus",
Mike Stroyan230e6252015-04-17 12:36:38 -0600427 [Param("VkDevice", "device"),
428 Param("VkFence", "fence")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800429
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600430 Proto("VkResult", "WaitForFences",
431 [Param("VkDevice", "device"),
Mark Lobodzinskie2d07a52015-01-29 08:55:56 -0600432 Param("uint32_t", "fenceCount"),
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600433 Param("const VkFence*", "pFences"),
Courtney Goeltzenleuchter1f41f542015-07-09 11:44:38 -0600434 Param("VkBool32", "waitAll"),
Mark Lobodzinskie2d07a52015-01-29 08:55:56 -0600435 Param("uint64_t", "timeout")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800436
Courtney Goeltzenleuchter382489d2015-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 Barbourde4124d2015-07-03 10:33:54 -0600442 Proto("VkResult", "DestroySemaphore",
443 [Param("VkDevice", "device"),
444 Param("VkSemaphore", "semaphore")]),
445
Courtney Goeltzenleuchter382489d2015-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 Goeltzenleuchter382489d2015-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 Goeltzenleuchter382489d2015-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 Barbourde4124d2015-07-03 10:33:54 -0600459 Proto("VkResult", "DestroyEvent",
460 [Param("VkDevice", "device"),
461 Param("VkEvent", "event")]),
462
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600463 Proto("VkResult", "GetEventStatus",
Mike Stroyan230e6252015-04-17 12:36:38 -0600464 [Param("VkDevice", "device"),
465 Param("VkEvent", "event")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800466
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600467 Proto("VkResult", "SetEvent",
Mike Stroyan230e6252015-04-17 12:36:38 -0600468 [Param("VkDevice", "device"),
469 Param("VkEvent", "event")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800470
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600471 Proto("VkResult", "ResetEvent",
Mike Stroyan230e6252015-04-17 12:36:38 -0600472 [Param("VkDevice", "device"),
473 Param("VkEvent", "event")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800474
Courtney Goeltzenleuchter382489d2015-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 Barbourde4124d2015-07-03 10:33:54 -0600480 Proto("VkResult", "DestroyQueryPool",
481 [Param("VkDevice", "device"),
482 Param("VkQueryPool", "queryPool")]),
483
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600484 Proto("VkResult", "GetQueryPoolResults",
Mike Stroyan230e6252015-04-17 12:36:38 -0600485 [Param("VkDevice", "device"),
486 Param("VkQueryPool", "queryPool"),
Mark Lobodzinskie2d07a52015-01-29 08:55:56 -0600487 Param("uint32_t", "startQuery"),
488 Param("uint32_t", "queryCount"),
489 Param("size_t*", "pDataSize"),
Tony Barbour8205d902015-04-16 15:59:00 -0600490 Param("void*", "pData"),
491 Param("VkQueryResultFlags", "flags")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800492
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600493 Proto("VkResult", "CreateBuffer",
494 [Param("VkDevice", "device"),
Courtney Goeltzenleuchterddcb6192015-04-14 18:48:46 -0600495 Param("const VkBufferCreateInfo*", "pCreateInfo"),
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600496 Param("VkBuffer*", "pBuffer")]),
Chia-I Wu714df452015-01-01 07:55:04 +0800497
Tony Barbourde4124d2015-07-03 10:33:54 -0600498 Proto("VkResult", "DestroyBuffer",
499 [Param("VkDevice", "device"),
500 Param("VkBuffer", "buffer")]),
501
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600502 Proto("VkResult", "CreateBufferView",
503 [Param("VkDevice", "device"),
Courtney Goeltzenleuchterddcb6192015-04-14 18:48:46 -0600504 Param("const VkBufferViewCreateInfo*", "pCreateInfo"),
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600505 Param("VkBufferView*", "pView")]),
Chia-I Wu714df452015-01-01 07:55:04 +0800506
Tony Barbourde4124d2015-07-03 10:33:54 -0600507 Proto("VkResult", "DestroyBufferView",
508 [Param("VkDevice", "device"),
509 Param("VkBufferView", "bufferView")]),
510
Courtney Goeltzenleuchter382489d2015-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 Barbourde4124d2015-07-03 10:33:54 -0600516 Proto("VkResult", "DestroyImage",
517 [Param("VkDevice", "device"),
518 Param("VkImage", "image")]),
519
Tony Barbour426b9052015-06-24 16:06:58 -0600520 Proto("VkResult", "GetImageSubresourceLayout",
Mike Stroyan230e6252015-04-17 12:36:38 -0600521 [Param("VkDevice", "device"),
522 Param("VkImage", "image"),
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600523 Param("const VkImageSubresource*", "pSubresource"),
Tony Barbour426b9052015-06-24 16:06:58 -0600524 Param("VkSubresourceLayout*", "pLayout")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800525
Courtney Goeltzenleuchter382489d2015-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 Barbourde4124d2015-07-03 10:33:54 -0600531 Proto("VkResult", "DestroyImageView",
532 [Param("VkDevice", "device"),
533 Param("VkImageView", "imageView")]),
534
Chia-I Wuc278df82015-07-07 11:50:03 +0800535 Proto("VkResult", "CreateAttachmentView",
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600536 [Param("VkDevice", "device"),
Chia-I Wuc278df82015-07-07 11:50:03 +0800537 Param("const VkAttachmentViewCreateInfo*", "pCreateInfo"),
538 Param("VkAttachmentView*", "pView")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800539
Tony Barbourde4124d2015-07-03 10:33:54 -0600540 Proto("VkResult", "DestroyAttachmentView",
541 [Param("VkDevice", "device"),
542 Param("VkAttachmentView", "attachmentView")]),
543
Courtney Goeltzenleuchter0b29b0d2015-06-24 18:24:19 -0600544 Proto("VkResult", "CreateShaderModule",
545 [Param("VkDevice", "device"),
546 Param("const VkShaderModuleCreateInfo*", "pCreateInfo"),
547 Param("VkShaderModule*", "pShaderModule")]),
548
Tony Barbourde4124d2015-07-03 10:33:54 -0600549 Proto("VkResult", "DestroyShaderModule",
550 [Param("VkDevice", "device"),
551 Param("VkShaderModule", "shaderModule")]),
552
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600553 Proto("VkResult", "CreateShader",
554 [Param("VkDevice", "device"),
555 Param("const VkShaderCreateInfo*", "pCreateInfo"),
556 Param("VkShader*", "pShader")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800557
Tony Barbourde4124d2015-07-03 10:33:54 -0600558 Proto("VkResult", "DestroyShader",
559 [Param("VkDevice", "device"),
560 Param("VkShader", "shader")]),
561
Jon Ashburn0d60d272015-07-09 15:02:25 -0600562 Proto("VkResult", "CreatePipelineCache",
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600563 [Param("VkDevice", "device"),
Jon Ashburn0d60d272015-07-09 15:02:25 -0600564 Param("const VkPipelineCacheCreateInfo*", "pCreateInfo"),
565 Param("VkPipelineCache*", "pPipelineCache")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800566
Jon Ashburn0d60d272015-07-09 15:02:25 -0600567 Proto("VkResult", "DestroyPipelineCache",
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600568 [Param("VkDevice", "device"),
Jon Ashburn0d60d272015-07-09 15:02:25 -0600569 Param("VkPipelineCache", "pipelineCache")]),
Courtney Goeltzenleuchter32876a12015-03-25 15:37:49 -0600570
Jon Ashburn0d60d272015-07-09 15:02:25 -0600571 Proto("size_t", "GetPipelineCacheSize",
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600572 [Param("VkDevice", "device"),
Jon Ashburn0d60d272015-07-09 15:02:25 -0600573 Param("VkPipelineCache", "pipelineCache")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800574
Jon Ashburn0d60d272015-07-09 15:02:25 -0600575 Proto("VkResult", "GetPipelineCacheData",
Mike Stroyan230e6252015-04-17 12:36:38 -0600576 [Param("VkDevice", "device"),
Jon Ashburn0d60d272015-07-09 15:02:25 -0600577 Param("VkPipelineCache", "pipelineCache"),
Mark Lobodzinskie2d07a52015-01-29 08:55:56 -0600578 Param("void*", "pData")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800579
Jon Ashburn0d60d272015-07-09 15:02:25 -0600580 Proto("VkResult", "MergePipelineCaches",
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600581 [Param("VkDevice", "device"),
Jon Ashburn0d60d272015-07-09 15:02:25 -0600582 Param("VkPipelineCache", "destCache"),
583 Param("uint32_t", "srcCacheCount"),
584 Param("const VkPipelineCache*", "pSrcCaches")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800585
Jon Ashburn0d60d272015-07-09 15:02:25 -0600586 Proto("VkResult", "CreateGraphicsPipelines",
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600587 [Param("VkDevice", "device"),
Jon Ashburn0d60d272015-07-09 15:02:25 -0600588 Param("VkPipelineCache", "pipelineCache"),
589 Param("uint32_t", "count"),
590 Param("const VkGraphicsPipelineCreateInfo*", "pCreateInfos"),
591 Param("VkPipeline*", "pPipelines")]),
592
593 Proto("VkResult", "CreateComputePipelines",
594 [Param("VkDevice", "device"),
595 Param("VkPipelineCache", "pipelineCache"),
596 Param("uint32_t", "count"),
597 Param("const VkComputePipelineCreateInfo*", "pCreateInfos"),
598 Param("VkPipeline*", "pPipelines")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800599
Tony Barbourde4124d2015-07-03 10:33:54 -0600600 Proto("VkResult", "DestroyPipeline",
601 [Param("VkDevice", "device"),
602 Param("VkPipeline", "pipeline")]),
603
Mark Lobodzinski556f7212015-04-17 14:11:39 -0500604 Proto("VkResult", "CreatePipelineLayout",
605 [Param("VkDevice", "device"),
606 Param("const VkPipelineLayoutCreateInfo*", "pCreateInfo"),
607 Param("VkPipelineLayout*", "pPipelineLayout")]),
608
Tony Barbourde4124d2015-07-03 10:33:54 -0600609 Proto("VkResult", "DestroyPipelineLayout",
610 [Param("VkDevice", "device"),
611 Param("VkPipelineLayout", "pipelineLayout")]),
612
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600613 Proto("VkResult", "CreateSampler",
614 [Param("VkDevice", "device"),
615 Param("const VkSamplerCreateInfo*", "pCreateInfo"),
616 Param("VkSampler*", "pSampler")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800617
Tony Barbourde4124d2015-07-03 10:33:54 -0600618 Proto("VkResult", "DestroySampler",
619 [Param("VkDevice", "device"),
620 Param("VkSampler", "sampler")]),
621
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600622 Proto("VkResult", "CreateDescriptorSetLayout",
623 [Param("VkDevice", "device"),
624 Param("const VkDescriptorSetLayoutCreateInfo*", "pCreateInfo"),
625 Param("VkDescriptorSetLayout*", "pSetLayout")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800626
Tony Barbourde4124d2015-07-03 10:33:54 -0600627 Proto("VkResult", "DestroyDescriptorSetLayout",
628 [Param("VkDevice", "device"),
629 Param("VkDescriptorSetLayout", "descriptorSetLayout")]),
630
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600631 Proto("VkResult", "CreateDescriptorPool",
632 [Param("VkDevice", "device"),
633 Param("VkDescriptorPoolUsage", "poolUsage"),
Mark Lobodzinskie2d07a52015-01-29 08:55:56 -0600634 Param("uint32_t", "maxSets"),
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600635 Param("const VkDescriptorPoolCreateInfo*", "pCreateInfo"),
636 Param("VkDescriptorPool*", "pDescriptorPool")]),
Chia-I Wuf8385062015-01-04 16:27:24 +0800637
Tony Barbourde4124d2015-07-03 10:33:54 -0600638 Proto("VkResult", "DestroyDescriptorPool",
639 [Param("VkDevice", "device"),
640 Param("VkDescriptorPool", "descriptorPool")]),
641
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600642 Proto("VkResult", "ResetDescriptorPool",
Mike Stroyan230e6252015-04-17 12:36:38 -0600643 [Param("VkDevice", "device"),
644 Param("VkDescriptorPool", "descriptorPool")]),
Chia-I Wuf8385062015-01-04 16:27:24 +0800645
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600646 Proto("VkResult", "AllocDescriptorSets",
Mike Stroyan230e6252015-04-17 12:36:38 -0600647 [Param("VkDevice", "device"),
648 Param("VkDescriptorPool", "descriptorPool"),
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600649 Param("VkDescriptorSetUsage", "setUsage"),
Mark Lobodzinskie2d07a52015-01-29 08:55:56 -0600650 Param("uint32_t", "count"),
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600651 Param("const VkDescriptorSetLayout*", "pSetLayouts"),
Cody Northropc8aa4a52015-08-03 12:47:29 -0600652 Param("VkDescriptorSet*", "pDescriptorSets")]),
Chia-I Wuf8385062015-01-04 16:27:24 +0800653
Tony Barbourb857d312015-07-10 10:50:45 -0600654 Proto("VkResult", "FreeDescriptorSets",
655 [Param("VkDevice", "device"),
656 Param("VkDescriptorPool", "descriptorPool"),
657 Param("uint32_t", "count"),
658 Param("const VkDescriptorSet*", "pDescriptorSets")]),
659
Chia-I Wu8cd8ecd2015-05-25 16:27:55 +0800660 Proto("VkResult", "UpdateDescriptorSets",
Mike Stroyan230e6252015-04-17 12:36:38 -0600661 [Param("VkDevice", "device"),
Chia-I Wu8cd8ecd2015-05-25 16:27:55 +0800662 Param("uint32_t", "writeCount"),
663 Param("const VkWriteDescriptorSet*", "pDescriptorWrites"),
664 Param("uint32_t", "copyCount"),
665 Param("const VkCopyDescriptorSet*", "pDescriptorCopies")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800666
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600667 Proto("VkResult", "CreateDynamicViewportState",
668 [Param("VkDevice", "device"),
Tony Barbourde4124d2015-07-03 10:33:54 -0600669 Param("const VkDynamicViewportStateCreateInfo*", "pCreateInfo"),
670 Param("VkDynamicViewportState*", "pState")]),
671
672 Proto("VkResult", "DestroyDynamicViewportState",
673 [Param("VkDevice", "device"),
674 Param("VkDynamicViewportState", "dynamicViewportState")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800675
Cody Northropf5bd2252015-08-17 11:10:49 -0600676 Proto("VkResult", "CreateDynamicRasterLineState",
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600677 [Param("VkDevice", "device"),
Cody Northropf5bd2252015-08-17 11:10:49 -0600678 Param("const VkDynamicRasterLineStateCreateInfo*", "pCreateInfo"),
679 Param("VkDynamicRasterLineState*", "pState")]),
Tony Barbourde4124d2015-07-03 10:33:54 -0600680
Cody Northropf5bd2252015-08-17 11:10:49 -0600681 Proto("VkResult", "DestroyDynamicRasterLineState",
Tony Barbourde4124d2015-07-03 10:33:54 -0600682 [Param("VkDevice", "device"),
Cody Northropf5bd2252015-08-17 11:10:49 -0600683 Param("VkDynamicRasterLineState", "dynamicRasterLineState")]),
684
685 Proto("VkResult", "CreateDynamicRasterDepthBiasState",
686 [Param("VkDevice", "device"),
687 Param("const VkDynamicRasterDepthBiasStateCreateInfo*", "pCreateInfo"),
688 Param("VkDynamicRasterDepthBiasState*", "pState")]),
689
690 Proto("VkResult", "DestroyDynamicRasterDepthBiasState",
691 [Param("VkDevice", "device"),
692 Param("VkDynamicRasterDepthBiasState", "dynamicRasterDepthBiasState")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800693
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600694 Proto("VkResult", "CreateDynamicColorBlendState",
695 [Param("VkDevice", "device"),
Tony Barbourde4124d2015-07-03 10:33:54 -0600696 Param("const VkDynamicColorBlendStateCreateInfo*", "pCreateInfo"),
697 Param("VkDynamicColorBlendState*", "pState")]),
698
699 Proto("VkResult", "DestroyDynamicColorBlendState",
700 [Param("VkDevice", "device"),
701 Param("VkDynamicColorBlendState", "dynamicColorBlendState")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800702
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600703 Proto("VkResult", "CreateDynamicDepthStencilState",
704 [Param("VkDevice", "device"),
Tony Barbourde4124d2015-07-03 10:33:54 -0600705 Param("const VkDynamicDepthStencilStateCreateInfo*", "pCreateInfo"),
706 Param("VkDynamicDepthStencilState*", "pState")]),
707
708 Proto("VkResult", "DestroyDynamicDepthStencilState",
709 [Param("VkDevice", "device"),
710 Param("VkDynamicDepthStencilState", "dynamicDepthStencilState")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800711
Cody Northropf02f9f82015-07-09 18:08:05 -0600712 Proto("VkResult", "CreateCommandPool",
713 [Param("VkDevice", "device"),
714 Param("const VkCmdPoolCreateInfo*", "pCreateInfo"),
715 Param("VkCmdPool*", "pCmdPool")]),
716
717 Proto("VkResult", "DestroyCommandPool",
718 [Param("VkDevice", "device"),
719 Param("VkCmdPool", "cmdPool")]),
720
721 Proto("VkResult", "ResetCommandPool",
722 [Param("VkDevice", "device"),
723 Param("VkCmdPool", "cmdPool"),
724 Param("VkCmdPoolResetFlags", "flags")]),
725
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600726 Proto("VkResult", "CreateCommandBuffer",
727 [Param("VkDevice", "device"),
728 Param("const VkCmdBufferCreateInfo*", "pCreateInfo"),
729 Param("VkCmdBuffer*", "pCmdBuffer")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800730
Tony Barbourde4124d2015-07-03 10:33:54 -0600731 Proto("VkResult", "DestroyCommandBuffer",
732 [Param("VkDevice", "device"),
Tobin Ehlis0b9c1952015-07-06 14:02:36 -0600733 Param("VkCmdBuffer", "commandBuffer")]),
Tony Barbourde4124d2015-07-03 10:33:54 -0600734
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600735 Proto("VkResult", "BeginCommandBuffer",
736 [Param("VkCmdBuffer", "cmdBuffer"),
737 Param("const VkCmdBufferBeginInfo*", "pBeginInfo")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800738
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600739 Proto("VkResult", "EndCommandBuffer",
740 [Param("VkCmdBuffer", "cmdBuffer")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800741
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600742 Proto("VkResult", "ResetCommandBuffer",
Cody Northropf02f9f82015-07-09 18:08:05 -0600743 [Param("VkCmdBuffer", "cmdBuffer"),
744 Param("VkCmdBufferResetFlags", "flags")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800745
Mark Lobodzinskie2d07a52015-01-29 08:55:56 -0600746 Proto("void", "CmdBindPipeline",
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600747 [Param("VkCmdBuffer", "cmdBuffer"),
748 Param("VkPipelineBindPoint", "pipelineBindPoint"),
749 Param("VkPipeline", "pipeline")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800750
Tony Barbourde4124d2015-07-03 10:33:54 -0600751 Proto("void", "CmdBindDynamicViewportState",
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600752 [Param("VkCmdBuffer", "cmdBuffer"),
Tony Barbourde4124d2015-07-03 10:33:54 -0600753 Param("VkDynamicViewportState", "dynamicViewportState")]),
754
Cody Northropf5bd2252015-08-17 11:10:49 -0600755 Proto("void", "CmdBindDynamicRasterLineState",
Tony Barbourde4124d2015-07-03 10:33:54 -0600756 [Param("VkCmdBuffer", "cmdBuffer"),
Cody Northropf5bd2252015-08-17 11:10:49 -0600757 Param("VkDynamicRasterLineState", "dynamicRasterLineState")]),
758
759 Proto("void", "CmdBindDynamicRasterDepthBiasState",
760 [Param("VkCmdBuffer", "cmdBuffer"),
761 Param("VkDynamicRasterDepthBiasState", "dynamicRasterDepthBiasState")]),
Tony Barbourde4124d2015-07-03 10:33:54 -0600762
763 Proto("void", "CmdBindDynamicColorBlendState",
764 [Param("VkCmdBuffer", "cmdBuffer"),
765 Param("VkDynamicColorBlendState", "dynamicColorBlendState")]),
766
767 Proto("void", "CmdBindDynamicDepthStencilState",
Tobin Ehlis0b9c1952015-07-06 14:02:36 -0600768 [Param("VkCmdBuffer", "cmdBuffer"),
769 Param("VkDynamicDepthStencilState", "dynamicDepthStencilState")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800770
Chia-I Wu862c5572015-03-28 15:23:55 +0800771 Proto("void", "CmdBindDescriptorSets",
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600772 [Param("VkCmdBuffer", "cmdBuffer"),
773 Param("VkPipelineBindPoint", "pipelineBindPoint"),
Mark Lobodzinskia65c4632015-06-15 13:21:21 -0600774 Param("VkPipelineLayout", "layout"),
Cody Northrop1a01b1d2015-04-16 13:41:56 -0600775 Param("uint32_t", "firstSet"),
776 Param("uint32_t", "setCount"),
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600777 Param("const VkDescriptorSet*", "pDescriptorSets"),
Cody Northrop1a01b1d2015-04-16 13:41:56 -0600778 Param("uint32_t", "dynamicOffsetCount"),
779 Param("const uint32_t*", "pDynamicOffsets")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800780
Tobin Ehlis0b9c1952015-07-06 14:02:36 -0600781 Proto("void", "CmdBindIndexBuffer",
782 [Param("VkCmdBuffer", "cmdBuffer"),
783 Param("VkBuffer", "buffer"),
784 Param("VkDeviceSize", "offset"),
785 Param("VkIndexType", "indexType")]),
786
Courtney Goeltzenleuchter46962942015-04-16 13:38:46 -0600787 Proto("void", "CmdBindVertexBuffers",
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600788 [Param("VkCmdBuffer", "cmdBuffer"),
Courtney Goeltzenleuchter46962942015-04-16 13:38:46 -0600789 Param("uint32_t", "startBinding"),
790 Param("uint32_t", "bindingCount"),
791 Param("const VkBuffer*", "pBuffers"),
Tony Barbour8205d902015-04-16 15:59:00 -0600792 Param("const VkDeviceSize*", "pOffsets")]),
793
Mark Lobodzinskie2d07a52015-01-29 08:55:56 -0600794 Proto("void", "CmdDraw",
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600795 [Param("VkCmdBuffer", "cmdBuffer"),
Mark Lobodzinskie2d07a52015-01-29 08:55:56 -0600796 Param("uint32_t", "firstVertex"),
797 Param("uint32_t", "vertexCount"),
798 Param("uint32_t", "firstInstance"),
799 Param("uint32_t", "instanceCount")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800800
Mark Lobodzinskie2d07a52015-01-29 08:55:56 -0600801 Proto("void", "CmdDrawIndexed",
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600802 [Param("VkCmdBuffer", "cmdBuffer"),
Mark Lobodzinskie2d07a52015-01-29 08:55:56 -0600803 Param("uint32_t", "firstIndex"),
804 Param("uint32_t", "indexCount"),
805 Param("int32_t", "vertexOffset"),
806 Param("uint32_t", "firstInstance"),
807 Param("uint32_t", "instanceCount")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800808
Mark Lobodzinskie2d07a52015-01-29 08:55:56 -0600809 Proto("void", "CmdDrawIndirect",
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600810 [Param("VkCmdBuffer", "cmdBuffer"),
811 Param("VkBuffer", "buffer"),
Tony Barbour8205d902015-04-16 15:59:00 -0600812 Param("VkDeviceSize", "offset"),
Mark Lobodzinskie2d07a52015-01-29 08:55:56 -0600813 Param("uint32_t", "count"),
814 Param("uint32_t", "stride")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800815
Mark Lobodzinskie2d07a52015-01-29 08:55:56 -0600816 Proto("void", "CmdDrawIndexedIndirect",
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600817 [Param("VkCmdBuffer", "cmdBuffer"),
818 Param("VkBuffer", "buffer"),
Tony Barbour8205d902015-04-16 15:59:00 -0600819 Param("VkDeviceSize", "offset"),
Mark Lobodzinskie2d07a52015-01-29 08:55:56 -0600820 Param("uint32_t", "count"),
821 Param("uint32_t", "stride")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800822
Mark Lobodzinskie2d07a52015-01-29 08:55:56 -0600823 Proto("void", "CmdDispatch",
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600824 [Param("VkCmdBuffer", "cmdBuffer"),
Mark Lobodzinskie2d07a52015-01-29 08:55:56 -0600825 Param("uint32_t", "x"),
826 Param("uint32_t", "y"),
827 Param("uint32_t", "z")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800828
Mark Lobodzinskie2d07a52015-01-29 08:55:56 -0600829 Proto("void", "CmdDispatchIndirect",
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600830 [Param("VkCmdBuffer", "cmdBuffer"),
831 Param("VkBuffer", "buffer"),
Tony Barbour8205d902015-04-16 15:59:00 -0600832 Param("VkDeviceSize", "offset")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800833
Mark Lobodzinskie2d07a52015-01-29 08:55:56 -0600834 Proto("void", "CmdCopyBuffer",
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600835 [Param("VkCmdBuffer", "cmdBuffer"),
836 Param("VkBuffer", "srcBuffer"),
837 Param("VkBuffer", "destBuffer"),
Mark Lobodzinskie2d07a52015-01-29 08:55:56 -0600838 Param("uint32_t", "regionCount"),
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600839 Param("const VkBufferCopy*", "pRegions")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800840
Mark Lobodzinskie2d07a52015-01-29 08:55:56 -0600841 Proto("void", "CmdCopyImage",
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600842 [Param("VkCmdBuffer", "cmdBuffer"),
843 Param("VkImage", "srcImage"),
844 Param("VkImageLayout", "srcImageLayout"),
845 Param("VkImage", "destImage"),
846 Param("VkImageLayout", "destImageLayout"),
Mark Lobodzinskie2d07a52015-01-29 08:55:56 -0600847 Param("uint32_t", "regionCount"),
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600848 Param("const VkImageCopy*", "pRegions")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800849
Courtney Goeltzenleuchterb787a1e2015-03-08 17:02:18 -0600850 Proto("void", "CmdBlitImage",
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600851 [Param("VkCmdBuffer", "cmdBuffer"),
852 Param("VkImage", "srcImage"),
853 Param("VkImageLayout", "srcImageLayout"),
854 Param("VkImage", "destImage"),
855 Param("VkImageLayout", "destImageLayout"),
Courtney Goeltzenleuchterb787a1e2015-03-08 17:02:18 -0600856 Param("uint32_t", "regionCount"),
Mark Lobodzinski20f68592015-05-22 14:43:25 -0500857 Param("const VkImageBlit*", "pRegions"),
858 Param("VkTexFilter", "filter")]),
Courtney Goeltzenleuchterb787a1e2015-03-08 17:02:18 -0600859
Mark Lobodzinskie2d07a52015-01-29 08:55:56 -0600860 Proto("void", "CmdCopyBufferToImage",
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600861 [Param("VkCmdBuffer", "cmdBuffer"),
862 Param("VkBuffer", "srcBuffer"),
863 Param("VkImage", "destImage"),
864 Param("VkImageLayout", "destImageLayout"),
Mark Lobodzinskie2d07a52015-01-29 08:55:56 -0600865 Param("uint32_t", "regionCount"),
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600866 Param("const VkBufferImageCopy*", "pRegions")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800867
Mark Lobodzinskie2d07a52015-01-29 08:55:56 -0600868 Proto("void", "CmdCopyImageToBuffer",
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600869 [Param("VkCmdBuffer", "cmdBuffer"),
870 Param("VkImage", "srcImage"),
871 Param("VkImageLayout", "srcImageLayout"),
872 Param("VkBuffer", "destBuffer"),
Mark Lobodzinskie2d07a52015-01-29 08:55:56 -0600873 Param("uint32_t", "regionCount"),
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600874 Param("const VkBufferImageCopy*", "pRegions")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800875
Mark Lobodzinskie2d07a52015-01-29 08:55:56 -0600876 Proto("void", "CmdUpdateBuffer",
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600877 [Param("VkCmdBuffer", "cmdBuffer"),
878 Param("VkBuffer", "destBuffer"),
Tony Barbour8205d902015-04-16 15:59:00 -0600879 Param("VkDeviceSize", "destOffset"),
880 Param("VkDeviceSize", "dataSize"),
Mark Lobodzinskie2d07a52015-01-29 08:55:56 -0600881 Param("const uint32_t*", "pData")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800882
Mark Lobodzinskie2d07a52015-01-29 08:55:56 -0600883 Proto("void", "CmdFillBuffer",
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600884 [Param("VkCmdBuffer", "cmdBuffer"),
885 Param("VkBuffer", "destBuffer"),
Tony Barbour8205d902015-04-16 15:59:00 -0600886 Param("VkDeviceSize", "destOffset"),
887 Param("VkDeviceSize", "fillSize"),
Mark Lobodzinskie2d07a52015-01-29 08:55:56 -0600888 Param("uint32_t", "data")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800889
Mark Lobodzinskie2d07a52015-01-29 08:55:56 -0600890 Proto("void", "CmdClearColorImage",
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600891 [Param("VkCmdBuffer", "cmdBuffer"),
892 Param("VkImage", "image"),
893 Param("VkImageLayout", "imageLayout"),
Chris Forbese3105972015-06-24 14:34:53 +1200894 Param("const VkClearColorValue*", "pColor"),
Mark Lobodzinskie2d07a52015-01-29 08:55:56 -0600895 Param("uint32_t", "rangeCount"),
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600896 Param("const VkImageSubresourceRange*", "pRanges")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800897
Chris Forbes2951d7d2015-06-22 17:21:59 +1200898 Proto("void", "CmdClearDepthStencilImage",
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600899 [Param("VkCmdBuffer", "cmdBuffer"),
900 Param("VkImage", "image"),
901 Param("VkImageLayout", "imageLayout"),
Mark Lobodzinskie2d07a52015-01-29 08:55:56 -0600902 Param("float", "depth"),
903 Param("uint32_t", "stencil"),
904 Param("uint32_t", "rangeCount"),
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600905 Param("const VkImageSubresourceRange*", "pRanges")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800906
Chris Forbes2951d7d2015-06-22 17:21:59 +1200907 Proto("void", "CmdClearColorAttachment",
908 [Param("VkCmdBuffer", "cmdBuffer"),
909 Param("uint32_t", "colorAttachment"),
910 Param("VkImageLayout", "imageLayout"),
Chris Forbese3105972015-06-24 14:34:53 +1200911 Param("const VkClearColorValue*", "pColor"),
Chris Forbes2951d7d2015-06-22 17:21:59 +1200912 Param("uint32_t", "rectCount"),
913 Param("const VkRect3D*", "pRects")]),
914
915 Proto("void", "CmdClearDepthStencilAttachment",
916 [Param("VkCmdBuffer", "cmdBuffer"),
917 Param("VkImageAspectFlags", "imageAspectMask"),
918 Param("VkImageLayout", "imageLayout"),
919 Param("float", "depth"),
920 Param("uint32_t", "stencil"),
921 Param("uint32_t", "rectCount"),
922 Param("const VkRect3D*", "pRects")]),
923
Mark Lobodzinskie2d07a52015-01-29 08:55:56 -0600924 Proto("void", "CmdResolveImage",
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600925 [Param("VkCmdBuffer", "cmdBuffer"),
926 Param("VkImage", "srcImage"),
927 Param("VkImageLayout", "srcImageLayout"),
928 Param("VkImage", "destImage"),
929 Param("VkImageLayout", "destImageLayout"),
Tony Barbour11f74372015-04-13 15:02:52 -0600930 Param("uint32_t", "regionCount"),
931 Param("const VkImageResolve*", "pRegions")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800932
Mark Lobodzinskie2d07a52015-01-29 08:55:56 -0600933 Proto("void", "CmdSetEvent",
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600934 [Param("VkCmdBuffer", "cmdBuffer"),
935 Param("VkEvent", "event"),
Tony Barbourc2e987e2015-06-29 16:20:35 -0600936 Param("VkPipelineStageFlags", "stageMask")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800937
Mark Lobodzinskie2d07a52015-01-29 08:55:56 -0600938 Proto("void", "CmdResetEvent",
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600939 [Param("VkCmdBuffer", "cmdBuffer"),
940 Param("VkEvent", "event"),
Tony Barbourc2e987e2015-06-29 16:20:35 -0600941 Param("VkPipelineStageFlags", "stageMask")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800942
Mark Lobodzinskie2d07a52015-01-29 08:55:56 -0600943 Proto("void", "CmdWaitEvents",
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600944 [Param("VkCmdBuffer", "cmdBuffer"),
Tony Barbour8205d902015-04-16 15:59:00 -0600945 Param("uint32_t", "eventCount"),
946 Param("const VkEvent*", "pEvents"),
Jon Ashburn1a70cda2015-08-06 17:27:49 -0600947 Param("VkPipelineStageFlags", "srcStageMask"),
Tony Barbourc2e987e2015-06-29 16:20:35 -0600948 Param("VkPipelineStageFlags", "destStageMask"),
Tony Barbour8205d902015-04-16 15:59:00 -0600949 Param("uint32_t", "memBarrierCount"),
Courtney Goeltzenleuchterd9ba3422015-07-12 12:58:58 -0600950 Param("const void* const*", "ppMemBarriers")]),
Mike Stroyan55658c22014-12-04 11:08:39 +0000951
Mark Lobodzinskie2d07a52015-01-29 08:55:56 -0600952 Proto("void", "CmdPipelineBarrier",
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600953 [Param("VkCmdBuffer", "cmdBuffer"),
Courtney Goeltzenleuchter82b348f2015-07-12 13:07:46 -0600954 Param("VkPipelineStageFlags", "srcStageMask"),
Tony Barbourc2e987e2015-06-29 16:20:35 -0600955 Param("VkPipelineStageFlags", "destStageMask"),
Courtney Goeltzenleuchter1f41f542015-07-09 11:44:38 -0600956 Param("VkBool32", "byRegion"),
Tony Barbour8205d902015-04-16 15:59:00 -0600957 Param("uint32_t", "memBarrierCount"),
Courtney Goeltzenleuchter82b348f2015-07-12 13:07:46 -0600958 Param("const void* const*", "ppMemBarriers")]),
Mike Stroyan55658c22014-12-04 11:08:39 +0000959
Mark Lobodzinskie2d07a52015-01-29 08:55:56 -0600960 Proto("void", "CmdBeginQuery",
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600961 [Param("VkCmdBuffer", "cmdBuffer"),
962 Param("VkQueryPool", "queryPool"),
Mark Lobodzinskie2d07a52015-01-29 08:55:56 -0600963 Param("uint32_t", "slot"),
Tobin Ehlis0b9c1952015-07-06 14:02:36 -0600964 Param("VkQueryControlFlags", "flags")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800965
Mark Lobodzinskie2d07a52015-01-29 08:55:56 -0600966 Proto("void", "CmdEndQuery",
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600967 [Param("VkCmdBuffer", "cmdBuffer"),
968 Param("VkQueryPool", "queryPool"),
Mark Lobodzinskie2d07a52015-01-29 08:55:56 -0600969 Param("uint32_t", "slot")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800970
Mark Lobodzinskie2d07a52015-01-29 08:55:56 -0600971 Proto("void", "CmdResetQueryPool",
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600972 [Param("VkCmdBuffer", "cmdBuffer"),
973 Param("VkQueryPool", "queryPool"),
Mark Lobodzinskie2d07a52015-01-29 08:55:56 -0600974 Param("uint32_t", "startQuery"),
975 Param("uint32_t", "queryCount")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800976
Mark Lobodzinskie2d07a52015-01-29 08:55:56 -0600977 Proto("void", "CmdWriteTimestamp",
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600978 [Param("VkCmdBuffer", "cmdBuffer"),
979 Param("VkTimestampType", "timestampType"),
980 Param("VkBuffer", "destBuffer"),
Tony Barbour8205d902015-04-16 15:59:00 -0600981 Param("VkDeviceSize", "destOffset")]),
Chia-I Wufb2559d2014-08-01 11:19:52 +0800982
Courtney Goeltzenleuchter98049062015-04-15 18:21:13 -0600983 Proto("void", "CmdCopyQueryPoolResults",
984 [Param("VkCmdBuffer", "cmdBuffer"),
985 Param("VkQueryPool", "queryPool"),
986 Param("uint32_t", "startQuery"),
987 Param("uint32_t", "queryCount"),
988 Param("VkBuffer", "destBuffer"),
Tony Barbour8205d902015-04-16 15:59:00 -0600989 Param("VkDeviceSize", "destOffset"),
990 Param("VkDeviceSize", "destStride"),
Tobin Ehlis0b9c1952015-07-06 14:02:36 -0600991 Param("VkQueryResultFlags", "flags")]),
Courtney Goeltzenleuchter98049062015-04-15 18:21:13 -0600992
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -0600993 Proto("VkResult", "CreateFramebuffer",
994 [Param("VkDevice", "device"),
995 Param("const VkFramebufferCreateInfo*", "pCreateInfo"),
996 Param("VkFramebuffer*", "pFramebuffer")]),
Jeremy Hayese0c3b222015-01-14 16:17:08 -0700997
Tony Barbourde4124d2015-07-03 10:33:54 -0600998 Proto("VkResult", "DestroyFramebuffer",
999 [Param("VkDevice", "device"),
1000 Param("VkFramebuffer", "framebuffer")]),
1001
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001002 Proto("VkResult", "CreateRenderPass",
1003 [Param("VkDevice", "device"),
1004 Param("const VkRenderPassCreateInfo*", "pCreateInfo"),
1005 Param("VkRenderPass*", "pRenderPass")]),
Jeremy Hayese0c3b222015-01-14 16:17:08 -07001006
Tony Barbourde4124d2015-07-03 10:33:54 -06001007 Proto("VkResult", "DestroyRenderPass",
1008 [Param("VkDevice", "device"),
1009 Param("VkRenderPass", "renderPass")]),
1010
Courtney Goeltzenleuchter07fe0662015-07-27 13:47:08 -06001011 Proto("VkResult", "GetRenderAreaGranularity",
1012 [Param("VkDevice", "device"),
1013 Param("VkRenderPass", "renderPass"),
1014 Param("VkExtent2D*", "pGranularity")]),
1015
Jon Ashburnb1dbb372015-02-02 09:58:11 -07001016 Proto("void", "CmdBeginRenderPass",
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001017 [Param("VkCmdBuffer", "cmdBuffer"),
Chia-I Wuc278df82015-07-07 11:50:03 +08001018 Param("const VkRenderPassBeginInfo*", "pRenderPassBegin"),
1019 Param("VkRenderPassContents", "contents")]),
1020
1021 Proto("void", "CmdNextSubpass",
1022 [Param("VkCmdBuffer", "cmdBuffer"),
1023 Param("VkRenderPassContents", "contents")]),
Jon Ashburnb1dbb372015-02-02 09:58:11 -07001024
Courtney Goeltzenleuchtera375b622015-07-27 14:04:01 -06001025 Proto("void", "CmdPushConstants",
1026 [Param("VkCmdBuffer", "cmdBuffer"),
1027 Param("VkPipelineLayout", "layout"),
1028 Param("VkShaderStageFlags", "stageFlags"),
1029 Param("uint32_t", "start"),
1030 Param("uint32_t", "length"),
1031 Param("const void*", "values")]),
1032
Jon Ashburnb1dbb372015-02-02 09:58:11 -07001033 Proto("void", "CmdEndRenderPass",
Chia-I Wu88eaa3b2015-06-26 15:34:39 +08001034 [Param("VkCmdBuffer", "cmdBuffer")]),
1035
1036 Proto("void", "CmdExecuteCommands",
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001037 [Param("VkCmdBuffer", "cmdBuffer"),
Chia-I Wu88eaa3b2015-06-26 15:34:39 +08001038 Param("uint32_t", "cmdBuffersCount"),
1039 Param("const VkCmdBuffer*", "pCmdBuffers")]),
Chia-I Wu82d0c6e2015-01-01 09:31:15 +08001040 ],
Chia-I Wufb2559d2014-08-01 11:19:52 +08001041)
1042
Ian Elliottb134e842015-07-06 14:31:32 -06001043wsi_swapchain = Extension(
1044 name="VK_WSI_swapchain",
1045 headers=["vk_wsi_swapchain.h"],
Jon Ashburn1a70cda2015-08-06 17:27:49 -06001046 objects=[],
Chia-I Wu82d0c6e2015-01-01 09:31:15 +08001047 protos=[
Ian Elliottb134e842015-07-06 14:31:32 -06001048 Proto("VkResult", "GetPhysicalDeviceSurfaceSupportWSI",
1049 [Param("VkPhysicalDevice", "physicalDevice"),
Jon Ashburn1a70cda2015-08-06 17:27:49 -06001050 Param("uint32_t", "queueFamilyIndex"),
1051 Param("const VkSurfaceDescriptionWSI*", "pSurfaceDescription"),
Ian Elliottb134e842015-07-06 14:31:32 -06001052 Param("VkBool32*", "pSupported")]),
1053 ],
1054)
1055
1056wsi_device_swapchain = Extension(
1057 name="VK_WSI_device_swapchain",
1058 headers=["vk_wsi_device_swapchain.h"],
Jon Ashburn1a70cda2015-08-06 17:27:49 -06001059 objects=["VkSwapChainWSI"],
Ian Elliottb134e842015-07-06 14:31:32 -06001060 protos=[
Ian Elliott73fd5952015-08-06 17:05:06 -06001061 Proto("VkResult", "GetSurfacePropertiesWSI",
Ian Elliottb134e842015-07-06 14:31:32 -06001062 [Param("VkDevice", "device"),
Ian Elliott73fd5952015-08-06 17:05:06 -06001063 Param("const VkSurfaceDescriptionWSI*", "pSurfaceDescription"),
1064 Param("VkSurfacePropertiesWSI*", "pSurfaceProperties")]),
1065
1066 Proto("VkResult", "GetSurfaceFormatsWSI",
1067 [Param("VkDevice", "device"),
1068 Param("const VkSurfaceDescriptionWSI*", "pSurfaceDescription"),
1069 Param("uint32_t*", "pCount"),
1070 Param("VkSurfaceFormatWSI*", "pSurfaceFormats")]),
1071
1072 Proto("VkResult", "GetSurfacePresentModesWSI",
1073 [Param("VkDevice", "device"),
1074 Param("const VkSurfaceDescriptionWSI*", "pSurfaceDescription"),
1075 Param("uint32_t*", "pCount"),
1076 Param("VkPresentModeWSI*", "pPresentModes")]),
Ian Elliottb134e842015-07-06 14:31:32 -06001077
Chia-I Wu5b66aa52015-04-16 22:02:10 +08001078 Proto("VkResult", "CreateSwapChainWSI",
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001079 [Param("VkDevice", "device"),
Chia-I Wu5b66aa52015-04-16 22:02:10 +08001080 Param("const VkSwapChainCreateInfoWSI*", "pCreateInfo"),
1081 Param("VkSwapChainWSI*", "pSwapChain")]),
Chia-I Wub8dceae2014-09-23 10:37:23 +08001082
Chia-I Wu5b66aa52015-04-16 22:02:10 +08001083 Proto("VkResult", "DestroySwapChainWSI",
Ian Elliottb134e842015-07-06 14:31:32 -06001084 [Param("VkDevice", "device"),
Jon Ashburn1a70cda2015-08-06 17:27:49 -06001085 Param("VkSwapChainWSI", "swapChain")]),
Chia-I Wub8dceae2014-09-23 10:37:23 +08001086
Ian Elliott73fd5952015-08-06 17:05:06 -06001087 Proto("VkResult", "GetSwapChainImagesWSI",
Ian Elliottb134e842015-07-06 14:31:32 -06001088 [Param("VkDevice", "device"),
Ian Elliott73fd5952015-08-06 17:05:06 -06001089 Param("VkSwapChainWSI", "swapChain"),
1090 Param("uint32_t*", "pCount"),
1091 Param("VkImage*", "pSwapChainImages")]),
Chia-I Wu5b66aa52015-04-16 22:02:10 +08001092
Ian Elliottb134e842015-07-06 14:31:32 -06001093 Proto("VkResult", "AcquireNextImageWSI",
1094 [Param("VkDevice", "device"),
Jon Ashburn1a70cda2015-08-06 17:27:49 -06001095 Param("VkSwapChainWSI", "swapChain"),
Ian Elliottb134e842015-07-06 14:31:32 -06001096 Param("uint64_t", "timeout"),
1097 Param("VkSemaphore", "semaphore"),
1098 Param("uint32_t*", "pImageIndex")]),
1099
Chia-I Wu5b66aa52015-04-16 22:02:10 +08001100 Proto("VkResult", "QueuePresentWSI",
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001101 [Param("VkQueue", "queue"),
Ian Elliottb134e842015-07-06 14:31:32 -06001102 Param("VkPresentInfoWSI*", "pPresentInfo")]),
Chia-I Wu82d0c6e2015-01-01 09:31:15 +08001103 ],
Chia-I Wub8dceae2014-09-23 10:37:23 +08001104)
Jon Ashburn1a70cda2015-08-06 17:27:49 -06001105debug_report_lunarg = Extension(
1106 name="VK_DEBUG_REPORT_LunarG",
1107 headers=["vk_debug_report_lunarg.h"],
1108 objects=[
1109 "VkDbgMsgCallback",
1110 ],
1111 protos=[
1112 Proto("VkResult", "DbgCreateMsgCallback",
1113 [Param("VkInstance", "instance"),
1114 Param("VkFlags", "msgFlags"),
1115 Param("const PFN_vkDbgMsgCallback", "pfnMsgCallback"),
1116 Param("void*", "pUserData"),
1117 Param("VkDbgMsgCallback*", "pMsgCallback")]),
1118
1119 Proto("VkResult", "DbgDestroyMsgCallback",
1120 [Param("VkInstance", "instance"),
1121 Param("VkDbgMsgCallback", "msgCallback")]),
1122 ],
1123)
Chia-I Wub8dceae2014-09-23 10:37:23 +08001124
Ian Elliottb134e842015-07-06 14:31:32 -06001125extensions = [core, wsi_swapchain, wsi_device_swapchain]
Jon Ashburn1a70cda2015-08-06 17:27:49 -06001126extensions_all = [core, wsi_swapchain, wsi_device_swapchain, debug_report_lunarg]
Tobin Ehlis0b9c1952015-07-06 14:02:36 -06001127object_dispatch_list = [
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001128 "VkInstance",
Tony Barbour8205d902015-04-16 15:59:00 -06001129 "VkPhysicalDevice",
Tobin Ehlis0b9c1952015-07-06 14:02:36 -06001130 "VkDevice",
1131 "VkQueue",
1132 "VkCmdBuffer",
Tobin Ehlis2f3726c2015-01-15 17:51:52 -07001133]
1134
Tobin Ehlis0b9c1952015-07-06 14:02:36 -06001135object_non_dispatch_list = [
Cody Northropf02f9f82015-07-09 18:08:05 -06001136 "VkCmdPool",
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001137 "VkFence",
Tobin Ehlis0b9c1952015-07-06 14:02:36 -06001138 "VkDeviceMemory",
1139 "VkBuffer",
1140 "VkImage",
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001141 "VkSemaphore",
1142 "VkEvent",
1143 "VkQueryPool",
Tobin Ehlis0b9c1952015-07-06 14:02:36 -06001144 "VkBufferView",
1145 "VkImageView",
1146 "VkAttachmentView",
1147 "VkShaderModule",
1148 "VkShader",
1149 "VkPipelineCache",
1150 "VkPipelineLayout",
1151 "VkPipeline",
1152 "VkDescriptorSetLayout",
1153 "VkSampler",
1154 "VkDescriptorPool",
1155 "VkDescriptorSet",
Tony Barbourde4124d2015-07-03 10:33:54 -06001156 "VkDynamicViewportState",
Cody Northropf5bd2252015-08-17 11:10:49 -06001157 "VkDynamicRasterLineState",
1158 "VkDynamicRasterDepthBiasState",
Tony Barbourde4124d2015-07-03 10:33:54 -06001159 "VkDynamicColorBlendState",
Tobin Ehlis0b9c1952015-07-06 14:02:36 -06001160 "VkDynamicDepthStencilState",
1161 "VkRenderPass",
1162 "VkFramebuffer",
Jon Ashburn1a70cda2015-08-06 17:27:49 -06001163 "VkSwapChainWSI",
1164 "VkDbgMsgCallback",
Tobin Ehlis2f3726c2015-01-15 17:51:52 -07001165]
1166
Tobin Ehlis0b9c1952015-07-06 14:02:36 -06001167object_type_list = object_dispatch_list + object_non_dispatch_list
Tobin Ehlis2f3726c2015-01-15 17:51:52 -07001168
Chia-I Wuec30dcb2015-01-01 08:46:31 +08001169headers = []
Chia-I Wua5d442f2015-01-04 14:46:22 +08001170objects = []
Chia-I Wuec30dcb2015-01-01 08:46:31 +08001171protos = []
1172for ext in extensions:
1173 headers.extend(ext.headers)
Chia-I Wua5d442f2015-01-04 14:46:22 +08001174 objects.extend(ext.objects)
Chia-I Wuec30dcb2015-01-01 08:46:31 +08001175 protos.extend(ext.protos)
Chia-I Wub8dceae2014-09-23 10:37:23 +08001176
Chia-I Wuf91902a2015-01-01 14:45:58 +08001177proto_names = [proto.name for proto in protos]
Chia-I Wu900a2572014-08-01 14:44:16 +08001178
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001179def parse_vk_h(filename):
Chia-I Wu8f4508a2015-01-04 14:08:46 +08001180 # read object and protoype typedefs
1181 object_lines = []
1182 proto_lines = []
1183 with open(filename, "r") as fp:
1184 for line in fp:
1185 line = line.strip()
Courtney Goeltzenleuchter9cc421e2015-04-08 15:36:08 -06001186 if line.startswith("VK_DEFINE"):
Chia-I Wu8f4508a2015-01-04 14:08:46 +08001187 begin = line.find("(") + 1
1188 end = line.find(",")
1189 # extract the object type
1190 object_lines.append(line[begin:end])
1191 if line.startswith("typedef") and line.endswith(");"):
1192 # drop leading "typedef " and trailing ");"
1193 proto_lines.append(line[8:-2])
1194
1195 # parse proto_lines to protos
1196 protos = []
1197 for line in proto_lines:
Courtney Goeltzenleuchter382489d2015-04-10 08:34:15 -06001198 first, rest = line.split(" (VKAPI *PFN_vk")
1199 second, third = rest.split(")(")
Chia-I Wu8f4508a2015-01-04 14:08:46 +08001200
1201 # get the return type, no space before "*"
1202 proto_ret = "*".join([t.rstrip() for t in first.split("*")])
1203
1204 # get the name
1205 proto_name = second.strip()
1206
1207 # get the list of params
1208 param_strs = third.split(", ")
1209 params = []
1210 for s in param_strs:
1211 ty, name = s.rsplit(" ", 1)
1212
1213 # no space before "*"
1214 ty = "*".join([t.rstrip() for t in ty.split("*")])
1215 # attach [] to ty
1216 idx = name.rfind("[")
1217 if idx >= 0:
1218 ty += name[idx:]
1219 name = name[:idx]
1220
1221 params.append(Param(ty, name))
1222
1223 protos.append(Proto(proto_ret, proto_name, params))
1224
1225 # make them an extension and print
Courtney Goeltzenleuchter9cc421e2015-04-08 15:36:08 -06001226 ext = Extension("VK_CORE",
Courtney Goeltzenleuchter1c7c65d2015-06-10 17:39:03 -06001227 headers=["vulkan.h", "vk_debug_report_lunarg.h"],
Chia-I Wu8f4508a2015-01-04 14:08:46 +08001228 objects=object_lines,
1229 protos=protos)
1230 print("core =", str(ext))
1231
1232 print("")
Jon Ashburn301c5f02015-04-06 10:58:22 -06001233 print("typedef struct VkLayerDispatchTable_")
Chia-I Wu8f4508a2015-01-04 14:08:46 +08001234 print("{")
1235 for proto in ext.protos:
Courtney Goeltzenleuchter9cc421e2015-04-08 15:36:08 -06001236 print(" vk%sType %s;" % (proto.name, proto.name))
Jon Ashburn301c5f02015-04-06 10:58:22 -06001237 print("} VkLayerDispatchTable;")
Chia-I Wu8f4508a2015-01-04 14:08:46 +08001238
1239if __name__ == "__main__":
Courtney Goeltzenleuchtera8c06282015-04-14 14:55:44 -06001240 parse_vk_h("include/vulkan.h")