Courtney Goeltzenleuchter | d8e229c | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 1 | """VK API description""" |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 2 | |
| 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 | |
| 23 | class 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 Wu | a5d28fa | 2015-01-04 15:02:50 +0800 | [diff] [blame] | 40 | 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 Wu | 509a412 | 2015-01-04 14:08:46 +0800 | [diff] [blame] | 62 | def __repr__(self): |
| 63 | return "Param(\"%s\", \"%s\")" % (self.ty, self.name) |
| 64 | |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 65 | class Proto(object): |
| 66 | """A function prototype.""" |
| 67 | |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 68 | def __init__(self, ret, name, params=[]): |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 69 | # the proto has only a param |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 70 | if not isinstance(params, list): |
| 71 | params = [params] |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 72 | |
| 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 Wu | af3b555 | 2015-01-04 12:00:01 +0800 | [diff] [blame] | 101 | def c_pretty_decl(self, name, attr=""): |
Courtney Goeltzenleuchter | d8e229c | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 102 | """Return a named declaration in C, with vulkan.h formatting.""" |
Chia-I Wu | af3b555 | 2015-01-04 12:00:01 +0800 | [diff] [blame] | 103 | 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 Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 121 | 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 Wu | a5d28fa | 2015-01-04 15:02:50 +0800 | [diff] [blame] | 133 | def object_in_params(self): |
Courtney Goeltzenleuchter | d8e229c | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 134 | """Return the params that are simple VK objects and are inputs.""" |
Chia-I Wu | a5d28fa | 2015-01-04 15:02:50 +0800 | [diff] [blame] | 135 | return [param for param in self.params if param.ty in objects] |
| 136 | |
| 137 | def object_out_params(self): |
Courtney Goeltzenleuchter | d8e229c | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 138 | """Return the params that are simple VK objects and are outputs.""" |
Chia-I Wu | a5d28fa | 2015-01-04 15:02:50 +0800 | [diff] [blame] | 139 | return [param for param in self.params |
| 140 | if param.dereferenced_type() in objects] |
| 141 | |
Chia-I Wu | 509a412 | 2015-01-04 14:08:46 +0800 | [diff] [blame] | 142 | 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 Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 151 | class Extension(object): |
Chia-I Wu | e86d8ab | 2015-01-04 14:46:22 +0800 | [diff] [blame] | 152 | def __init__(self, name, headers, objects, protos): |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 153 | self.name = name |
| 154 | self.headers = headers |
Chia-I Wu | e86d8ab | 2015-01-04 14:46:22 +0800 | [diff] [blame] | 155 | self.objects = objects |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 156 | self.protos = protos |
| 157 | |
Chia-I Wu | 509a412 | 2015-01-04 14:08:46 +0800 | [diff] [blame] | 158 | 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 Goeltzenleuchter | d8e229c | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 181 | # VK core API |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 182 | core = Extension( |
Courtney Goeltzenleuchter | d8e229c | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 183 | name="VK_CORE", |
Courtney Goeltzenleuchter | f579fa6 | 2015-06-10 17:39:03 -0600 | [diff] [blame] | 184 | headers=["vulkan.h", "vk_debug_report_lunarg.h"], |
Jon Ashburn | 9fd4cc4 | 2015-04-10 14:33:07 -0600 | [diff] [blame] | 185 | |
Chia-I Wu | e86d8ab | 2015-01-04 14:46:22 +0800 | [diff] [blame] | 186 | objects=[ |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 187 | "VkInstance", |
Tony Barbour | d1c3572 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 188 | "VkPhysicalDevice", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 189 | "VkDevice", |
| 190 | "VkQueue", |
Tony Barbour | d1c3572 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 191 | "VkDeviceMemory", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 192 | "VkObject", |
| 193 | "VkBuffer", |
| 194 | "VkBufferView", |
| 195 | "VkImage", |
| 196 | "VkImageView", |
| 197 | "VkColorAttachmentView", |
| 198 | "VkDepthStencilView", |
| 199 | "VkShader", |
| 200 | "VkPipeline", |
| 201 | "VkSampler", |
| 202 | "VkDescriptorSet", |
| 203 | "VkDescriptorSetLayout", |
Mark Lobodzinski | 0fadf5f | 2015-04-17 14:11:39 -0500 | [diff] [blame] | 204 | "VkPipelineLayout", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 205 | "VkDescriptorPool", |
| 206 | "VkDynamicStateObject", |
Courtney Goeltzenleuchter | 502744a | 2015-04-10 16:24:50 -0600 | [diff] [blame] | 207 | "VkDynamicVpState", |
| 208 | "VkDynamicRsState", |
| 209 | "VkDynamicCbState", |
| 210 | "VkDynamicDsState", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 211 | "VkCmdBuffer", |
| 212 | "VkFence", |
| 213 | "VkSemaphore", |
| 214 | "VkEvent", |
| 215 | "VkQueryPool", |
| 216 | "VkFramebuffer", |
| 217 | "VkRenderPass", |
Chia-I Wu | e86d8ab | 2015-01-04 14:46:22 +0800 | [diff] [blame] | 218 | ], |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 219 | protos=[ |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 220 | Proto("VkResult", "CreateInstance", |
Courtney Goeltzenleuchter | 95487bc | 2015-04-14 18:48:46 -0600 | [diff] [blame] | 221 | [Param("const VkInstanceCreateInfo*", "pCreateInfo"), |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 222 | Param("VkInstance*", "pInstance")]), |
Jon Ashburn | 1beab2d | 2015-01-26 14:51:40 -0700 | [diff] [blame] | 223 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 224 | Proto("VkResult", "DestroyInstance", |
| 225 | [Param("VkInstance", "instance")]), |
Jon Ashburn | 1beab2d | 2015-01-26 14:51:40 -0700 | [diff] [blame] | 226 | |
Jon Ashburn | 83a6425 | 2015-04-15 11:31:12 -0600 | [diff] [blame] | 227 | Proto("VkResult", "EnumeratePhysicalDevices", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 228 | [Param("VkInstance", "instance"), |
Jon Ashburn | 83a6425 | 2015-04-15 11:31:12 -0600 | [diff] [blame] | 229 | Param("uint32_t*", "pPhysicalDeviceCount"), |
Tony Barbour | d1c3572 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 230 | Param("VkPhysicalDevice*", "pPhysicalDevices")]), |
Jon Ashburn | 1beab2d | 2015-01-26 14:51:40 -0700 | [diff] [blame] | 231 | |
Tony Barbour | 59a4732 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 232 | Proto("VkResult", "GetPhysicalDeviceProperties", |
Tony Barbour | d1c3572 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 233 | [Param("VkPhysicalDevice", "gpu"), |
Tony Barbour | 59a4732 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 234 | Param("VkPhysicalDeviceProperties*", "pProperties")]), |
| 235 | |
| 236 | Proto("VkResult", "GetPhysicalDevicePerformance", |
| 237 | [Param("VkPhysicalDevice", "gpu"), |
| 238 | Param("VkPhysicalDevicePerformance*", "pPerformance")]), |
| 239 | |
| 240 | Proto("VkResult", "GetPhysicalDeviceQueueCount", |
| 241 | [Param("VkPhysicalDevice", "gpu"), |
| 242 | Param("uint32_t*", "pCount")]), |
| 243 | |
| 244 | Proto("VkResult", "GetPhysicalDeviceQueueProperties", |
| 245 | [Param("VkPhysicalDevice", "gpu"), |
| 246 | Param("uint32_t", "count"), |
| 247 | Param("VkPhysicalDeviceQueueProperties*", "pProperties")]), |
| 248 | |
| 249 | Proto("VkResult", "GetPhysicalDeviceMemoryProperties", |
| 250 | [Param("VkPhysicalDevice", "gpu"), |
| 251 | Param("VkPhysicalDeviceMemoryProperties*", "pProperties")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 252 | |
Chris Forbes | bc0bb77 | 2015-06-21 22:55:02 +1200 | [diff] [blame] | 253 | Proto("VkResult", "GetPhysicalDeviceFeatures", |
| 254 | [Param("VkPhysicalDevice", "physicalDevice"), |
| 255 | Param("VkPhysicalDeviceFeatures*", "pFeatures")]), |
| 256 | |
| 257 | Proto("VkResult", "GetPhysicalDeviceFormatInfo", |
| 258 | [Param("VkPhysicalDevice", "physicalDevice"), |
| 259 | Param("VkFormat", "format"), |
| 260 | Param("VkFormatProperties*", "pFormatInfo")]), |
| 261 | |
| 262 | Proto("VkResult", "GetPhysicalDeviceLimits", |
| 263 | [Param("VkPhysicalDevice", "physicalDevice"), |
| 264 | Param("VkPhysicalDeviceLimits*", "pLimits")]), |
| 265 | |
Jon Ashburn | b0fbe91 | 2015-05-06 10:15:07 -0600 | [diff] [blame] | 266 | Proto("void*", "GetInstanceProcAddr", |
| 267 | [Param("VkInstance", "instance"), |
| 268 | Param("const char*", "pName")]), |
| 269 | |
Jon Ashburn | 8d1b0b5 | 2015-05-18 13:20:15 -0600 | [diff] [blame] | 270 | Proto("void*", "GetDeviceProcAddr", |
| 271 | [Param("VkDevice", "device"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 272 | Param("const char*", "pName")]), |
Chia-I Wu | f2ffc52 | 2015-01-04 14:51:06 +0800 | [diff] [blame] | 273 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 274 | Proto("VkResult", "CreateDevice", |
Tony Barbour | d1c3572 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 275 | [Param("VkPhysicalDevice", "gpu"), |
Courtney Goeltzenleuchter | 95487bc | 2015-04-14 18:48:46 -0600 | [diff] [blame] | 276 | Param("const VkDeviceCreateInfo*", "pCreateInfo"), |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 277 | Param("VkDevice*", "pDevice")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 278 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 279 | Proto("VkResult", "DestroyDevice", |
| 280 | [Param("VkDevice", "device")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 281 | |
Tony Barbour | 59a4732 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 282 | Proto("VkResult", "GetPhysicalDeviceExtensionProperties", |
Tony Barbour | d1c3572 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 283 | [Param("VkPhysicalDevice", "gpu"), |
Tobin Ehlis | 0193901 | 2015-04-16 12:51:37 -0600 | [diff] [blame] | 284 | Param("uint32_t", "extensionIndex"), |
Tony Barbour | 59a4732 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 285 | Param("VkExtensionProperties*", "pProperties")]), |
| 286 | |
| 287 | Proto("VkResult", "GetPhysicalDeviceExtensionCount", |
| 288 | [Param("VkPhysicalDevice", "gpu"), |
| 289 | Param("uint32_t*", "pCount")]), |
| 290 | |
| 291 | Proto("VkResult", "GetGlobalExtensionProperties", |
| 292 | [Param("uint32_t", "extensionIndex"), |
| 293 | Param("VkExtensionProperties*", "pProperties")]), |
| 294 | |
| 295 | Proto("VkResult", "GetGlobalExtensionCount", |
| 296 | [Param("uint32_t*", "pCount")]), |
Tobin Ehlis | 0193901 | 2015-04-16 12:51:37 -0600 | [diff] [blame] | 297 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 298 | Proto("VkResult", "GetDeviceQueue", |
| 299 | [Param("VkDevice", "device"), |
Courtney Goeltzenleuchter | 18248e6 | 2015-03-05 18:09:39 -0700 | [diff] [blame] | 300 | Param("uint32_t", "queueNodeIndex"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 301 | Param("uint32_t", "queueIndex"), |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 302 | Param("VkQueue*", "pQueue")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 303 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 304 | Proto("VkResult", "QueueSubmit", |
| 305 | [Param("VkQueue", "queue"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 306 | Param("uint32_t", "cmdBufferCount"), |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 307 | Param("const VkCmdBuffer*", "pCmdBuffers"), |
| 308 | Param("VkFence", "fence")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 309 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 310 | Proto("VkResult", "QueueWaitIdle", |
| 311 | [Param("VkQueue", "queue")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 312 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 313 | Proto("VkResult", "DeviceWaitIdle", |
| 314 | [Param("VkDevice", "device")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 315 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 316 | Proto("VkResult", "AllocMemory", |
| 317 | [Param("VkDevice", "device"), |
Courtney Goeltzenleuchter | 95487bc | 2015-04-14 18:48:46 -0600 | [diff] [blame] | 318 | Param("const VkMemoryAllocInfo*", "pAllocInfo"), |
Tony Barbour | d1c3572 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 319 | Param("VkDeviceMemory*", "pMem")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 320 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 321 | Proto("VkResult", "FreeMemory", |
Mike Stroyan | b050c68 | 2015-04-17 12:36:38 -0600 | [diff] [blame] | 322 | [Param("VkDevice", "device"), |
| 323 | Param("VkDeviceMemory", "mem")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 324 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 325 | Proto("VkResult", "MapMemory", |
Mike Stroyan | b050c68 | 2015-04-17 12:36:38 -0600 | [diff] [blame] | 326 | [Param("VkDevice", "device"), |
| 327 | Param("VkDeviceMemory", "mem"), |
Tony Barbour | 71a8512 | 2015-04-16 19:09:28 -0600 | [diff] [blame] | 328 | Param("VkDeviceSize", "offset"), |
| 329 | Param("VkDeviceSize", "size"), |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 330 | Param("VkFlags", "flags"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 331 | Param("void**", "ppData")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 332 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 333 | Proto("VkResult", "UnmapMemory", |
Mike Stroyan | b050c68 | 2015-04-17 12:36:38 -0600 | [diff] [blame] | 334 | [Param("VkDevice", "device"), |
| 335 | Param("VkDeviceMemory", "mem")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 336 | |
Courtney Goeltzenleuchter | f69f8a2 | 2015-04-29 17:16:21 -0600 | [diff] [blame] | 337 | Proto("VkResult", "FlushMappedMemoryRanges", |
Mike Stroyan | b050c68 | 2015-04-17 12:36:38 -0600 | [diff] [blame] | 338 | [Param("VkDevice", "device"), |
Courtney Goeltzenleuchter | f69f8a2 | 2015-04-29 17:16:21 -0600 | [diff] [blame] | 339 | Param("uint32_t", "memRangeCount"), |
| 340 | Param("const VkMappedMemoryRange*", "pMemRanges")]), |
| 341 | |
| 342 | Proto("VkResult", "InvalidateMappedMemoryRanges", |
| 343 | [Param("VkDevice", "device"), |
| 344 | Param("uint32_t", "memRangeCount"), |
| 345 | Param("const VkMappedMemoryRange*", "pMemRanges")]), |
Tony Barbour | b125054 | 2015-04-16 19:23:13 -0600 | [diff] [blame] | 346 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 347 | Proto("VkResult", "DestroyObject", |
Mike Stroyan | b050c68 | 2015-04-17 12:36:38 -0600 | [diff] [blame] | 348 | [Param("VkDevice", "device"), |
Mark Lobodzinski | 2306535 | 2015-05-29 09:32:35 -0500 | [diff] [blame] | 349 | Param("VkObjectType", "objType"), |
Mike Stroyan | b050c68 | 2015-04-17 12:36:38 -0600 | [diff] [blame] | 350 | Param("VkObject", "object")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 351 | |
Tony Barbour | 59a4732 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 352 | Proto("VkResult", "GetObjectMemoryRequirements", |
Mike Stroyan | b050c68 | 2015-04-17 12:36:38 -0600 | [diff] [blame] | 353 | [Param("VkDevice", "device"), |
Mark Lobodzinski | 2306535 | 2015-05-29 09:32:35 -0500 | [diff] [blame] | 354 | Param("VkObjectType", "objType"), |
Mike Stroyan | b050c68 | 2015-04-17 12:36:38 -0600 | [diff] [blame] | 355 | Param("VkObject", "object"), |
Tony Barbour | 59a4732 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 356 | Param("VkMemoryRequirements*", "pMemoryRequirements")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 357 | |
Mark Lobodzinski | 942b172 | 2015-05-11 17:21:15 -0500 | [diff] [blame] | 358 | Proto("VkResult", "BindObjectMemory", |
| 359 | [Param("VkDevice", "device"), |
Mark Lobodzinski | 2306535 | 2015-05-29 09:32:35 -0500 | [diff] [blame] | 360 | Param("VkObjectType", "objType"), |
Mark Lobodzinski | 40f7f40 | 2015-04-16 11:44:05 -0500 | [diff] [blame] | 361 | Param("VkObject", "object"), |
Tony Barbour | d1c3572 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 362 | Param("VkDeviceMemory", "mem"), |
| 363 | Param("VkDeviceSize", "offset")]), |
Chia-I Wu | 1a28fe0 | 2015-01-01 07:55:04 +0800 | [diff] [blame] | 364 | |
Mark Lobodzinski | 942b172 | 2015-05-11 17:21:15 -0500 | [diff] [blame] | 365 | Proto("VkResult", "QueueBindSparseBufferMemory", |
Mark Lobodzinski | 40f7f40 | 2015-04-16 11:44:05 -0500 | [diff] [blame] | 366 | [Param("VkQueue", "queue"), |
Mark Lobodzinski | 942b172 | 2015-05-11 17:21:15 -0500 | [diff] [blame] | 367 | Param("VkBuffer", "buffer"), |
Tony Barbour | d1c3572 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 368 | Param("VkDeviceSize", "rangeOffset"), |
| 369 | Param("VkDeviceSize", "rangeSize"), |
| 370 | Param("VkDeviceMemory", "mem"), |
| 371 | Param("VkDeviceSize", "memOffset")]), |
Chia-I Wu | 1a28fe0 | 2015-01-01 07:55:04 +0800 | [diff] [blame] | 372 | |
Mark Lobodzinski | 942b172 | 2015-05-11 17:21:15 -0500 | [diff] [blame] | 373 | Proto("VkResult", "QueueBindSparseImageMemory", |
Mark Lobodzinski | 40f7f40 | 2015-04-16 11:44:05 -0500 | [diff] [blame] | 374 | [Param("VkQueue", "queue"), |
| 375 | Param("VkImage", "image"), |
Jeremy Hayes | af0d72c | 2015-04-15 15:20:03 -0600 | [diff] [blame] | 376 | Param("const VkImageMemoryBindInfo*", "pBindInfo"), |
Tony Barbour | d1c3572 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 377 | Param("VkDeviceMemory", "mem"), |
| 378 | Param("VkDeviceSize", "memOffset")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 379 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 380 | Proto("VkResult", "CreateFence", |
| 381 | [Param("VkDevice", "device"), |
| 382 | Param("const VkFenceCreateInfo*", "pCreateInfo"), |
| 383 | Param("VkFence*", "pFence")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 384 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 385 | Proto("VkResult", "ResetFences", |
| 386 | [Param("VkDevice", "device"), |
Mark Lobodzinski | 148e158 | 2015-04-07 16:07:57 -0500 | [diff] [blame] | 387 | Param("uint32_t", "fenceCount"), |
Courtney Goeltzenleuchter | 2bf8f90 | 2015-06-18 17:28:20 -0600 | [diff] [blame] | 388 | Param("const VkFence*", "pFences")]), |
Mark Lobodzinski | 148e158 | 2015-04-07 16:07:57 -0500 | [diff] [blame] | 389 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 390 | Proto("VkResult", "GetFenceStatus", |
Mike Stroyan | b050c68 | 2015-04-17 12:36:38 -0600 | [diff] [blame] | 391 | [Param("VkDevice", "device"), |
| 392 | Param("VkFence", "fence")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 393 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 394 | Proto("VkResult", "WaitForFences", |
| 395 | [Param("VkDevice", "device"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 396 | Param("uint32_t", "fenceCount"), |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 397 | Param("const VkFence*", "pFences"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 398 | Param("bool32_t", "waitAll"), |
| 399 | Param("uint64_t", "timeout")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 400 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 401 | Proto("VkResult", "CreateSemaphore", |
| 402 | [Param("VkDevice", "device"), |
| 403 | Param("const VkSemaphoreCreateInfo*", "pCreateInfo"), |
| 404 | Param("VkSemaphore*", "pSemaphore")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 405 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 406 | Proto("VkResult", "QueueSignalSemaphore", |
| 407 | [Param("VkQueue", "queue"), |
| 408 | Param("VkSemaphore", "semaphore")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 409 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 410 | Proto("VkResult", "QueueWaitSemaphore", |
| 411 | [Param("VkQueue", "queue"), |
| 412 | Param("VkSemaphore", "semaphore")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 413 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 414 | Proto("VkResult", "CreateEvent", |
| 415 | [Param("VkDevice", "device"), |
| 416 | Param("const VkEventCreateInfo*", "pCreateInfo"), |
| 417 | Param("VkEvent*", "pEvent")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 418 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 419 | Proto("VkResult", "GetEventStatus", |
Mike Stroyan | b050c68 | 2015-04-17 12:36:38 -0600 | [diff] [blame] | 420 | [Param("VkDevice", "device"), |
| 421 | Param("VkEvent", "event")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 422 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 423 | Proto("VkResult", "SetEvent", |
Mike Stroyan | b050c68 | 2015-04-17 12:36:38 -0600 | [diff] [blame] | 424 | [Param("VkDevice", "device"), |
| 425 | Param("VkEvent", "event")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 426 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 427 | Proto("VkResult", "ResetEvent", |
Mike Stroyan | b050c68 | 2015-04-17 12:36:38 -0600 | [diff] [blame] | 428 | [Param("VkDevice", "device"), |
| 429 | Param("VkEvent", "event")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 430 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 431 | Proto("VkResult", "CreateQueryPool", |
| 432 | [Param("VkDevice", "device"), |
| 433 | Param("const VkQueryPoolCreateInfo*", "pCreateInfo"), |
| 434 | Param("VkQueryPool*", "pQueryPool")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 435 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 436 | Proto("VkResult", "GetQueryPoolResults", |
Mike Stroyan | b050c68 | 2015-04-17 12:36:38 -0600 | [diff] [blame] | 437 | [Param("VkDevice", "device"), |
| 438 | Param("VkQueryPool", "queryPool"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 439 | Param("uint32_t", "startQuery"), |
| 440 | Param("uint32_t", "queryCount"), |
| 441 | Param("size_t*", "pDataSize"), |
Tony Barbour | d1c3572 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 442 | Param("void*", "pData"), |
| 443 | Param("VkQueryResultFlags", "flags")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 444 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 445 | Proto("VkResult", "CreateBuffer", |
| 446 | [Param("VkDevice", "device"), |
Courtney Goeltzenleuchter | 95487bc | 2015-04-14 18:48:46 -0600 | [diff] [blame] | 447 | Param("const VkBufferCreateInfo*", "pCreateInfo"), |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 448 | Param("VkBuffer*", "pBuffer")]), |
Chia-I Wu | 1a28fe0 | 2015-01-01 07:55:04 +0800 | [diff] [blame] | 449 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 450 | Proto("VkResult", "CreateBufferView", |
| 451 | [Param("VkDevice", "device"), |
Courtney Goeltzenleuchter | 95487bc | 2015-04-14 18:48:46 -0600 | [diff] [blame] | 452 | Param("const VkBufferViewCreateInfo*", "pCreateInfo"), |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 453 | Param("VkBufferView*", "pView")]), |
Chia-I Wu | 1a28fe0 | 2015-01-01 07:55:04 +0800 | [diff] [blame] | 454 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 455 | Proto("VkResult", "CreateImage", |
| 456 | [Param("VkDevice", "device"), |
| 457 | Param("const VkImageCreateInfo*", "pCreateInfo"), |
| 458 | Param("VkImage*", "pImage")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 459 | |
Tony Barbour | 59a4732 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 460 | Proto("VkResult", "GetImageSubresourceLayout", |
Mike Stroyan | b050c68 | 2015-04-17 12:36:38 -0600 | [diff] [blame] | 461 | [Param("VkDevice", "device"), |
| 462 | Param("VkImage", "image"), |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 463 | Param("const VkImageSubresource*", "pSubresource"), |
Tony Barbour | 59a4732 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 464 | Param("VkSubresourceLayout*", "pLayout")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 465 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 466 | Proto("VkResult", "CreateImageView", |
| 467 | [Param("VkDevice", "device"), |
| 468 | Param("const VkImageViewCreateInfo*", "pCreateInfo"), |
| 469 | Param("VkImageView*", "pView")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 470 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 471 | Proto("VkResult", "CreateColorAttachmentView", |
| 472 | [Param("VkDevice", "device"), |
| 473 | Param("const VkColorAttachmentViewCreateInfo*", "pCreateInfo"), |
| 474 | Param("VkColorAttachmentView*", "pView")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 475 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 476 | Proto("VkResult", "CreateDepthStencilView", |
| 477 | [Param("VkDevice", "device"), |
| 478 | Param("const VkDepthStencilViewCreateInfo*", "pCreateInfo"), |
| 479 | Param("VkDepthStencilView*", "pView")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 480 | |
Courtney Goeltzenleuchter | 2d2cb68 | 2015-06-24 18:24:19 -0600 | [diff] [blame^] | 481 | Proto("VkResult", "CreateShaderModule", |
| 482 | [Param("VkDevice", "device"), |
| 483 | Param("const VkShaderModuleCreateInfo*", "pCreateInfo"), |
| 484 | Param("VkShaderModule*", "pShaderModule")]), |
| 485 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 486 | Proto("VkResult", "CreateShader", |
| 487 | [Param("VkDevice", "device"), |
| 488 | Param("const VkShaderCreateInfo*", "pCreateInfo"), |
| 489 | Param("VkShader*", "pShader")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 490 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 491 | Proto("VkResult", "CreateGraphicsPipeline", |
| 492 | [Param("VkDevice", "device"), |
| 493 | Param("const VkGraphicsPipelineCreateInfo*", "pCreateInfo"), |
| 494 | Param("VkPipeline*", "pPipeline")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 495 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 496 | Proto("VkResult", "CreateGraphicsPipelineDerivative", |
| 497 | [Param("VkDevice", "device"), |
| 498 | Param("const VkGraphicsPipelineCreateInfo*", "pCreateInfo"), |
| 499 | Param("VkPipeline", "basePipeline"), |
| 500 | Param("VkPipeline*", "pPipeline")]), |
Courtney Goeltzenleuchter | 0d40f15 | 2015-03-25 15:37:49 -0600 | [diff] [blame] | 501 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 502 | Proto("VkResult", "CreateComputePipeline", |
| 503 | [Param("VkDevice", "device"), |
| 504 | Param("const VkComputePipelineCreateInfo*", "pCreateInfo"), |
| 505 | Param("VkPipeline*", "pPipeline")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 506 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 507 | Proto("VkResult", "StorePipeline", |
Mike Stroyan | b050c68 | 2015-04-17 12:36:38 -0600 | [diff] [blame] | 508 | [Param("VkDevice", "device"), |
| 509 | Param("VkPipeline", "pipeline"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 510 | Param("size_t*", "pDataSize"), |
| 511 | Param("void*", "pData")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 512 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 513 | Proto("VkResult", "LoadPipeline", |
| 514 | [Param("VkDevice", "device"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 515 | Param("size_t", "dataSize"), |
| 516 | Param("const void*", "pData"), |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 517 | Param("VkPipeline*", "pPipeline")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 518 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 519 | Proto("VkResult", "LoadPipelineDerivative", |
| 520 | [Param("VkDevice", "device"), |
Courtney Goeltzenleuchter | 0d40f15 | 2015-03-25 15:37:49 -0600 | [diff] [blame] | 521 | Param("size_t", "dataSize"), |
| 522 | Param("const void*", "pData"), |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 523 | Param("VkPipeline", "basePipeline"), |
| 524 | Param("VkPipeline*", "pPipeline")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 525 | |
Mark Lobodzinski | 0fadf5f | 2015-04-17 14:11:39 -0500 | [diff] [blame] | 526 | Proto("VkResult", "CreatePipelineLayout", |
| 527 | [Param("VkDevice", "device"), |
| 528 | Param("const VkPipelineLayoutCreateInfo*", "pCreateInfo"), |
| 529 | Param("VkPipelineLayout*", "pPipelineLayout")]), |
| 530 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 531 | Proto("VkResult", "CreateSampler", |
| 532 | [Param("VkDevice", "device"), |
| 533 | Param("const VkSamplerCreateInfo*", "pCreateInfo"), |
| 534 | Param("VkSampler*", "pSampler")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 535 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 536 | Proto("VkResult", "CreateDescriptorSetLayout", |
| 537 | [Param("VkDevice", "device"), |
| 538 | Param("const VkDescriptorSetLayoutCreateInfo*", "pCreateInfo"), |
| 539 | Param("VkDescriptorSetLayout*", "pSetLayout")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 540 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 541 | Proto("VkResult", "CreateDescriptorPool", |
| 542 | [Param("VkDevice", "device"), |
| 543 | Param("VkDescriptorPoolUsage", "poolUsage"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 544 | Param("uint32_t", "maxSets"), |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 545 | Param("const VkDescriptorPoolCreateInfo*", "pCreateInfo"), |
| 546 | Param("VkDescriptorPool*", "pDescriptorPool")]), |
Chia-I Wu | 11078b0 | 2015-01-04 16:27:24 +0800 | [diff] [blame] | 547 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 548 | Proto("VkResult", "ResetDescriptorPool", |
Mike Stroyan | b050c68 | 2015-04-17 12:36:38 -0600 | [diff] [blame] | 549 | [Param("VkDevice", "device"), |
| 550 | Param("VkDescriptorPool", "descriptorPool")]), |
Chia-I Wu | 11078b0 | 2015-01-04 16:27:24 +0800 | [diff] [blame] | 551 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 552 | Proto("VkResult", "AllocDescriptorSets", |
Mike Stroyan | b050c68 | 2015-04-17 12:36:38 -0600 | [diff] [blame] | 553 | [Param("VkDevice", "device"), |
| 554 | Param("VkDescriptorPool", "descriptorPool"), |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 555 | Param("VkDescriptorSetUsage", "setUsage"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 556 | Param("uint32_t", "count"), |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 557 | Param("const VkDescriptorSetLayout*", "pSetLayouts"), |
| 558 | Param("VkDescriptorSet*", "pDescriptorSets"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 559 | Param("uint32_t*", "pCount")]), |
Chia-I Wu | 11078b0 | 2015-01-04 16:27:24 +0800 | [diff] [blame] | 560 | |
Chia-I Wu | 9d00ed7 | 2015-05-25 16:27:55 +0800 | [diff] [blame] | 561 | Proto("VkResult", "UpdateDescriptorSets", |
Mike Stroyan | b050c68 | 2015-04-17 12:36:38 -0600 | [diff] [blame] | 562 | [Param("VkDevice", "device"), |
Chia-I Wu | 9d00ed7 | 2015-05-25 16:27:55 +0800 | [diff] [blame] | 563 | Param("uint32_t", "writeCount"), |
| 564 | Param("const VkWriteDescriptorSet*", "pDescriptorWrites"), |
| 565 | Param("uint32_t", "copyCount"), |
| 566 | Param("const VkCopyDescriptorSet*", "pDescriptorCopies")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 567 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 568 | Proto("VkResult", "CreateDynamicViewportState", |
| 569 | [Param("VkDevice", "device"), |
| 570 | Param("const VkDynamicVpStateCreateInfo*", "pCreateInfo"), |
Courtney Goeltzenleuchter | 502744a | 2015-04-10 16:24:50 -0600 | [diff] [blame] | 571 | Param("VkDynamicVpState*", "pState")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 572 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 573 | Proto("VkResult", "CreateDynamicRasterState", |
| 574 | [Param("VkDevice", "device"), |
| 575 | Param("const VkDynamicRsStateCreateInfo*", "pCreateInfo"), |
Courtney Goeltzenleuchter | 502744a | 2015-04-10 16:24:50 -0600 | [diff] [blame] | 576 | Param("VkDynamicRsState*", "pState")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 577 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 578 | Proto("VkResult", "CreateDynamicColorBlendState", |
| 579 | [Param("VkDevice", "device"), |
| 580 | Param("const VkDynamicCbStateCreateInfo*", "pCreateInfo"), |
Courtney Goeltzenleuchter | 502744a | 2015-04-10 16:24:50 -0600 | [diff] [blame] | 581 | Param("VkDynamicCbState*", "pState")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 582 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 583 | Proto("VkResult", "CreateDynamicDepthStencilState", |
| 584 | [Param("VkDevice", "device"), |
| 585 | Param("const VkDynamicDsStateCreateInfo*", "pCreateInfo"), |
Courtney Goeltzenleuchter | 502744a | 2015-04-10 16:24:50 -0600 | [diff] [blame] | 586 | Param("VkDynamicDsState*", "pState")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 587 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 588 | Proto("VkResult", "CreateCommandBuffer", |
| 589 | [Param("VkDevice", "device"), |
| 590 | Param("const VkCmdBufferCreateInfo*", "pCreateInfo"), |
| 591 | Param("VkCmdBuffer*", "pCmdBuffer")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 592 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 593 | Proto("VkResult", "BeginCommandBuffer", |
| 594 | [Param("VkCmdBuffer", "cmdBuffer"), |
| 595 | Param("const VkCmdBufferBeginInfo*", "pBeginInfo")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 596 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 597 | Proto("VkResult", "EndCommandBuffer", |
| 598 | [Param("VkCmdBuffer", "cmdBuffer")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 599 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 600 | Proto("VkResult", "ResetCommandBuffer", |
| 601 | [Param("VkCmdBuffer", "cmdBuffer")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 602 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 603 | Proto("void", "CmdBindPipeline", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 604 | [Param("VkCmdBuffer", "cmdBuffer"), |
| 605 | Param("VkPipelineBindPoint", "pipelineBindPoint"), |
| 606 | Param("VkPipeline", "pipeline")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 607 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 608 | Proto("void", "CmdBindDynamicStateObject", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 609 | [Param("VkCmdBuffer", "cmdBuffer"), |
| 610 | Param("VkStateBindPoint", "stateBindPoint"), |
| 611 | Param("VkDynamicStateObject", "state")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 612 | |
Chia-I Wu | 53f07d7 | 2015-03-28 15:23:55 +0800 | [diff] [blame] | 613 | Proto("void", "CmdBindDescriptorSets", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 614 | [Param("VkCmdBuffer", "cmdBuffer"), |
| 615 | Param("VkPipelineBindPoint", "pipelineBindPoint"), |
Mark Lobodzinski | f2093b6 | 2015-06-15 13:21:21 -0600 | [diff] [blame] | 616 | Param("VkPipelineLayout", "layout"), |
Cody Northrop | d4c1a50 | 2015-04-16 13:41:56 -0600 | [diff] [blame] | 617 | Param("uint32_t", "firstSet"), |
| 618 | Param("uint32_t", "setCount"), |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 619 | Param("const VkDescriptorSet*", "pDescriptorSets"), |
Cody Northrop | d4c1a50 | 2015-04-16 13:41:56 -0600 | [diff] [blame] | 620 | Param("uint32_t", "dynamicOffsetCount"), |
| 621 | Param("const uint32_t*", "pDynamicOffsets")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 622 | |
Courtney Goeltzenleuchter | f68ad72 | 2015-04-16 13:38:46 -0600 | [diff] [blame] | 623 | Proto("void", "CmdBindVertexBuffers", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 624 | [Param("VkCmdBuffer", "cmdBuffer"), |
Courtney Goeltzenleuchter | f68ad72 | 2015-04-16 13:38:46 -0600 | [diff] [blame] | 625 | Param("uint32_t", "startBinding"), |
| 626 | Param("uint32_t", "bindingCount"), |
| 627 | Param("const VkBuffer*", "pBuffers"), |
Tony Barbour | d1c3572 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 628 | Param("const VkDeviceSize*", "pOffsets")]), |
| 629 | |
Chia-I Wu | 7a42e12 | 2014-11-08 10:48:20 +0800 | [diff] [blame] | 630 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 631 | Proto("void", "CmdBindIndexBuffer", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 632 | [Param("VkCmdBuffer", "cmdBuffer"), |
| 633 | Param("VkBuffer", "buffer"), |
Tony Barbour | d1c3572 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 634 | Param("VkDeviceSize", "offset"), |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 635 | Param("VkIndexType", "indexType")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 636 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 637 | Proto("void", "CmdDraw", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 638 | [Param("VkCmdBuffer", "cmdBuffer"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 639 | Param("uint32_t", "firstVertex"), |
| 640 | Param("uint32_t", "vertexCount"), |
| 641 | Param("uint32_t", "firstInstance"), |
| 642 | Param("uint32_t", "instanceCount")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 643 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 644 | Proto("void", "CmdDrawIndexed", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 645 | [Param("VkCmdBuffer", "cmdBuffer"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 646 | Param("uint32_t", "firstIndex"), |
| 647 | Param("uint32_t", "indexCount"), |
| 648 | Param("int32_t", "vertexOffset"), |
| 649 | Param("uint32_t", "firstInstance"), |
| 650 | Param("uint32_t", "instanceCount")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 651 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 652 | Proto("void", "CmdDrawIndirect", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 653 | [Param("VkCmdBuffer", "cmdBuffer"), |
| 654 | Param("VkBuffer", "buffer"), |
Tony Barbour | d1c3572 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 655 | Param("VkDeviceSize", "offset"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 656 | Param("uint32_t", "count"), |
| 657 | Param("uint32_t", "stride")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 658 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 659 | Proto("void", "CmdDrawIndexedIndirect", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 660 | [Param("VkCmdBuffer", "cmdBuffer"), |
| 661 | Param("VkBuffer", "buffer"), |
Tony Barbour | d1c3572 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 662 | Param("VkDeviceSize", "offset"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 663 | Param("uint32_t", "count"), |
| 664 | Param("uint32_t", "stride")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 665 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 666 | Proto("void", "CmdDispatch", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 667 | [Param("VkCmdBuffer", "cmdBuffer"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 668 | Param("uint32_t", "x"), |
| 669 | Param("uint32_t", "y"), |
| 670 | Param("uint32_t", "z")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 671 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 672 | Proto("void", "CmdDispatchIndirect", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 673 | [Param("VkCmdBuffer", "cmdBuffer"), |
| 674 | Param("VkBuffer", "buffer"), |
Tony Barbour | d1c3572 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 675 | Param("VkDeviceSize", "offset")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 676 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 677 | Proto("void", "CmdCopyBuffer", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 678 | [Param("VkCmdBuffer", "cmdBuffer"), |
| 679 | Param("VkBuffer", "srcBuffer"), |
| 680 | Param("VkBuffer", "destBuffer"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 681 | Param("uint32_t", "regionCount"), |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 682 | Param("const VkBufferCopy*", "pRegions")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 683 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 684 | Proto("void", "CmdCopyImage", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 685 | [Param("VkCmdBuffer", "cmdBuffer"), |
| 686 | Param("VkImage", "srcImage"), |
| 687 | Param("VkImageLayout", "srcImageLayout"), |
| 688 | Param("VkImage", "destImage"), |
| 689 | Param("VkImageLayout", "destImageLayout"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 690 | Param("uint32_t", "regionCount"), |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 691 | Param("const VkImageCopy*", "pRegions")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 692 | |
Courtney Goeltzenleuchter | 89299fa | 2015-03-08 17:02:18 -0600 | [diff] [blame] | 693 | Proto("void", "CmdBlitImage", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 694 | [Param("VkCmdBuffer", "cmdBuffer"), |
| 695 | Param("VkImage", "srcImage"), |
| 696 | Param("VkImageLayout", "srcImageLayout"), |
| 697 | Param("VkImage", "destImage"), |
| 698 | Param("VkImageLayout", "destImageLayout"), |
Courtney Goeltzenleuchter | 89299fa | 2015-03-08 17:02:18 -0600 | [diff] [blame] | 699 | Param("uint32_t", "regionCount"), |
Mark Lobodzinski | ee5eef1 | 2015-05-22 14:43:25 -0500 | [diff] [blame] | 700 | Param("const VkImageBlit*", "pRegions"), |
| 701 | Param("VkTexFilter", "filter")]), |
Courtney Goeltzenleuchter | 89299fa | 2015-03-08 17:02:18 -0600 | [diff] [blame] | 702 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 703 | Proto("void", "CmdCopyBufferToImage", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 704 | [Param("VkCmdBuffer", "cmdBuffer"), |
| 705 | Param("VkBuffer", "srcBuffer"), |
| 706 | Param("VkImage", "destImage"), |
| 707 | Param("VkImageLayout", "destImageLayout"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 708 | Param("uint32_t", "regionCount"), |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 709 | Param("const VkBufferImageCopy*", "pRegions")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 710 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 711 | Proto("void", "CmdCopyImageToBuffer", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 712 | [Param("VkCmdBuffer", "cmdBuffer"), |
| 713 | Param("VkImage", "srcImage"), |
| 714 | Param("VkImageLayout", "srcImageLayout"), |
| 715 | Param("VkBuffer", "destBuffer"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 716 | Param("uint32_t", "regionCount"), |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 717 | Param("const VkBufferImageCopy*", "pRegions")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 718 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 719 | Proto("void", "CmdUpdateBuffer", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 720 | [Param("VkCmdBuffer", "cmdBuffer"), |
| 721 | Param("VkBuffer", "destBuffer"), |
Tony Barbour | d1c3572 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 722 | Param("VkDeviceSize", "destOffset"), |
| 723 | Param("VkDeviceSize", "dataSize"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 724 | Param("const uint32_t*", "pData")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 725 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 726 | Proto("void", "CmdFillBuffer", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 727 | [Param("VkCmdBuffer", "cmdBuffer"), |
| 728 | Param("VkBuffer", "destBuffer"), |
Tony Barbour | d1c3572 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 729 | Param("VkDeviceSize", "destOffset"), |
| 730 | Param("VkDeviceSize", "fillSize"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 731 | Param("uint32_t", "data")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 732 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 733 | Proto("void", "CmdClearColorImage", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 734 | [Param("VkCmdBuffer", "cmdBuffer"), |
| 735 | Param("VkImage", "image"), |
| 736 | Param("VkImageLayout", "imageLayout"), |
Courtney Goeltzenleuchter | d7a5cff | 2015-04-23 17:49:22 -0600 | [diff] [blame] | 737 | Param("const VkClearColor*", "pColor"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 738 | Param("uint32_t", "rangeCount"), |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 739 | Param("const VkImageSubresourceRange*", "pRanges")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 740 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 741 | Proto("void", "CmdClearDepthStencil", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 742 | [Param("VkCmdBuffer", "cmdBuffer"), |
| 743 | Param("VkImage", "image"), |
| 744 | Param("VkImageLayout", "imageLayout"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 745 | Param("float", "depth"), |
| 746 | Param("uint32_t", "stencil"), |
| 747 | Param("uint32_t", "rangeCount"), |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 748 | Param("const VkImageSubresourceRange*", "pRanges")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 749 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 750 | Proto("void", "CmdResolveImage", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 751 | [Param("VkCmdBuffer", "cmdBuffer"), |
| 752 | Param("VkImage", "srcImage"), |
| 753 | Param("VkImageLayout", "srcImageLayout"), |
| 754 | Param("VkImage", "destImage"), |
| 755 | Param("VkImageLayout", "destImageLayout"), |
Tony Barbour | 6865d4a | 2015-04-13 15:02:52 -0600 | [diff] [blame] | 756 | Param("uint32_t", "regionCount"), |
| 757 | Param("const VkImageResolve*", "pRegions")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 758 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 759 | Proto("void", "CmdSetEvent", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 760 | [Param("VkCmdBuffer", "cmdBuffer"), |
| 761 | Param("VkEvent", "event"), |
Tony Barbour | 0b2cfb2 | 2015-06-29 16:20:35 -0600 | [diff] [blame] | 762 | Param("VkPipelineStageFlags", "stageMask")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 763 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 764 | Proto("void", "CmdResetEvent", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 765 | [Param("VkCmdBuffer", "cmdBuffer"), |
| 766 | Param("VkEvent", "event"), |
Tony Barbour | 0b2cfb2 | 2015-06-29 16:20:35 -0600 | [diff] [blame] | 767 | Param("VkPipelineStageFlags", "stageMask")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 768 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 769 | Proto("void", "CmdWaitEvents", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 770 | [Param("VkCmdBuffer", "cmdBuffer"), |
Tony Barbour | d1c3572 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 771 | Param("uint32_t", "eventCount"), |
| 772 | Param("const VkEvent*", "pEvents"), |
Tony Barbour | 0b2cfb2 | 2015-06-29 16:20:35 -0600 | [diff] [blame] | 773 | Param("VkPipelineStageFlags", "sourceStageMask"), |
| 774 | Param("VkPipelineStageFlags", "destStageMask"), |
Tony Barbour | d1c3572 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 775 | Param("uint32_t", "memBarrierCount"), |
| 776 | Param("const void**", "ppMemBarriers")]), |
Mike Stroyan | fb80d5f | 2014-12-04 11:08:39 +0000 | [diff] [blame] | 777 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 778 | Proto("void", "CmdPipelineBarrier", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 779 | [Param("VkCmdBuffer", "cmdBuffer"), |
Tony Barbour | 0b2cfb2 | 2015-06-29 16:20:35 -0600 | [diff] [blame] | 780 | Param("VkPipelineStageFlags", "sourceStageMask"), |
| 781 | Param("VkPipelineStageFlags", "destStageMask"), |
| 782 | Param("bool32_t", "byRegion"), |
Tony Barbour | d1c3572 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 783 | Param("uint32_t", "memBarrierCount"), |
| 784 | Param("const void**", "ppMemBarriers")]), |
Mike Stroyan | fb80d5f | 2014-12-04 11:08:39 +0000 | [diff] [blame] | 785 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 786 | Proto("void", "CmdBeginQuery", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 787 | [Param("VkCmdBuffer", "cmdBuffer"), |
| 788 | Param("VkQueryPool", "queryPool"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 789 | Param("uint32_t", "slot"), |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 790 | Param("VkFlags", "flags")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 791 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 792 | Proto("void", "CmdEndQuery", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 793 | [Param("VkCmdBuffer", "cmdBuffer"), |
| 794 | Param("VkQueryPool", "queryPool"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 795 | Param("uint32_t", "slot")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 796 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 797 | Proto("void", "CmdResetQueryPool", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 798 | [Param("VkCmdBuffer", "cmdBuffer"), |
| 799 | Param("VkQueryPool", "queryPool"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 800 | Param("uint32_t", "startQuery"), |
| 801 | Param("uint32_t", "queryCount")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 802 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 803 | Proto("void", "CmdWriteTimestamp", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 804 | [Param("VkCmdBuffer", "cmdBuffer"), |
| 805 | Param("VkTimestampType", "timestampType"), |
| 806 | Param("VkBuffer", "destBuffer"), |
Tony Barbour | d1c3572 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 807 | Param("VkDeviceSize", "destOffset")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 808 | |
Courtney Goeltzenleuchter | 1dbc8e2 | 2015-04-15 18:21:13 -0600 | [diff] [blame] | 809 | Proto("void", "CmdCopyQueryPoolResults", |
| 810 | [Param("VkCmdBuffer", "cmdBuffer"), |
| 811 | Param("VkQueryPool", "queryPool"), |
| 812 | Param("uint32_t", "startQuery"), |
| 813 | Param("uint32_t", "queryCount"), |
| 814 | Param("VkBuffer", "destBuffer"), |
Tony Barbour | d1c3572 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 815 | Param("VkDeviceSize", "destOffset"), |
| 816 | Param("VkDeviceSize", "destStride"), |
Courtney Goeltzenleuchter | 1dbc8e2 | 2015-04-15 18:21:13 -0600 | [diff] [blame] | 817 | Param("VkFlags", "flags")]), |
| 818 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 819 | Proto("void", "CmdInitAtomicCounters", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 820 | [Param("VkCmdBuffer", "cmdBuffer"), |
| 821 | Param("VkPipelineBindPoint", "pipelineBindPoint"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 822 | Param("uint32_t", "startCounter"), |
| 823 | Param("uint32_t", "counterCount"), |
| 824 | Param("const uint32_t*", "pData")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 825 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 826 | Proto("void", "CmdLoadAtomicCounters", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 827 | [Param("VkCmdBuffer", "cmdBuffer"), |
| 828 | Param("VkPipelineBindPoint", "pipelineBindPoint"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 829 | Param("uint32_t", "startCounter"), |
| 830 | Param("uint32_t", "counterCount"), |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 831 | Param("VkBuffer", "srcBuffer"), |
Tony Barbour | d1c3572 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 832 | Param("VkDeviceSize", "srcOffset")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 833 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 834 | Proto("void", "CmdSaveAtomicCounters", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 835 | [Param("VkCmdBuffer", "cmdBuffer"), |
| 836 | Param("VkPipelineBindPoint", "pipelineBindPoint"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 837 | Param("uint32_t", "startCounter"), |
| 838 | Param("uint32_t", "counterCount"), |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 839 | Param("VkBuffer", "destBuffer"), |
Tony Barbour | d1c3572 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 840 | Param("VkDeviceSize", "destOffset")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 841 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 842 | Proto("VkResult", "CreateFramebuffer", |
| 843 | [Param("VkDevice", "device"), |
| 844 | Param("const VkFramebufferCreateInfo*", "pCreateInfo"), |
| 845 | Param("VkFramebuffer*", "pFramebuffer")]), |
Jeremy Hayes | d65ae08 | 2015-01-14 16:17:08 -0700 | [diff] [blame] | 846 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 847 | Proto("VkResult", "CreateRenderPass", |
| 848 | [Param("VkDevice", "device"), |
| 849 | Param("const VkRenderPassCreateInfo*", "pCreateInfo"), |
| 850 | Param("VkRenderPass*", "pRenderPass")]), |
Jeremy Hayes | d65ae08 | 2015-01-14 16:17:08 -0700 | [diff] [blame] | 851 | |
Jon Ashburn | e13f198 | 2015-02-02 09:58:11 -0700 | [diff] [blame] | 852 | Proto("void", "CmdBeginRenderPass", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 853 | [Param("VkCmdBuffer", "cmdBuffer"), |
| 854 | Param("const VkRenderPassBegin*", "pRenderPassBegin")]), |
Jon Ashburn | e13f198 | 2015-02-02 09:58:11 -0700 | [diff] [blame] | 855 | |
| 856 | Proto("void", "CmdEndRenderPass", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 857 | [Param("VkCmdBuffer", "cmdBuffer"), |
| 858 | Param("VkRenderPass", "renderPass")]), |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 859 | ], |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 860 | ) |
| 861 | |
Chia-I Wu | f869338 | 2015-04-16 22:02:10 +0800 | [diff] [blame] | 862 | wsi_lunarg = Extension( |
| 863 | name="VK_WSI_LunarG", |
| 864 | headers=["vk_wsi_lunarg.h"], |
| 865 | objects=[ |
| 866 | "VkDisplayWSI", |
| 867 | "VkSwapChainWSI", |
Courtney Goeltzenleuchter | f579fa6 | 2015-06-10 17:39:03 -0600 | [diff] [blame] | 868 | "VkDbgMsgCallback", |
Chia-I Wu | f869338 | 2015-04-16 22:02:10 +0800 | [diff] [blame] | 869 | ], |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 870 | protos=[ |
Chia-I Wu | f869338 | 2015-04-16 22:02:10 +0800 | [diff] [blame] | 871 | Proto("VkResult", "CreateSwapChainWSI", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 872 | [Param("VkDevice", "device"), |
Chia-I Wu | f869338 | 2015-04-16 22:02:10 +0800 | [diff] [blame] | 873 | Param("const VkSwapChainCreateInfoWSI*", "pCreateInfo"), |
| 874 | Param("VkSwapChainWSI*", "pSwapChain")]), |
Chia-I Wu | 6dee8b8 | 2014-09-23 10:37:23 +0800 | [diff] [blame] | 875 | |
Chia-I Wu | f869338 | 2015-04-16 22:02:10 +0800 | [diff] [blame] | 876 | Proto("VkResult", "DestroySwapChainWSI", |
| 877 | [Param("VkSwapChainWSI", "swapChain")]), |
Chia-I Wu | 6dee8b8 | 2014-09-23 10:37:23 +0800 | [diff] [blame] | 878 | |
Chia-I Wu | f869338 | 2015-04-16 22:02:10 +0800 | [diff] [blame] | 879 | Proto("VkResult", "GetSwapChainInfoWSI", |
| 880 | [Param("VkSwapChainWSI", "swapChain"), |
| 881 | Param("VkSwapChainInfoTypeWSI", "infoType"), |
| 882 | Param("size_t*", "pDataSize"), |
| 883 | Param("void*", "pData")]), |
| 884 | |
| 885 | Proto("VkResult", "QueuePresentWSI", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 886 | [Param("VkQueue", "queue"), |
Chia-I Wu | f869338 | 2015-04-16 22:02:10 +0800 | [diff] [blame] | 887 | Param("const VkPresentInfoWSI*", "pPresentInfo")]), |
Courtney Goeltzenleuchter | f579fa6 | 2015-06-10 17:39:03 -0600 | [diff] [blame] | 888 | |
| 889 | # Proto("VkResult", "DbgCreateMsgCallback", |
| 890 | # [Param("VkInstance", "instance"), |
| 891 | # Param("VkFlags", "msgFlags"), |
| 892 | # Param("PFN_vkDbgMsgCallback", "pfnMsgCallback"), |
| 893 | # Param("void*", "pUserData"), |
| 894 | # Param("VkDbgMsgCallback*", "pMsgCallback")]), |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 895 | ], |
Chia-I Wu | 6dee8b8 | 2014-09-23 10:37:23 +0800 | [diff] [blame] | 896 | ) |
| 897 | |
Chia-I Wu | f869338 | 2015-04-16 22:02:10 +0800 | [diff] [blame] | 898 | extensions = [core, wsi_lunarg] |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 899 | |
Tobin Ehlis | 7e65d75 | 2015-01-15 17:51:52 -0700 | [diff] [blame] | 900 | object_root_list = [ |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 901 | "VkInstance", |
Tony Barbour | d1c3572 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 902 | "VkPhysicalDevice", |
Chia-I Wu | f869338 | 2015-04-16 22:02:10 +0800 | [diff] [blame] | 903 | "VkDisplayWSI", |
| 904 | "VkSwapChainWSI", |
Tobin Ehlis | 7e65d75 | 2015-01-15 17:51:52 -0700 | [diff] [blame] | 905 | ] |
| 906 | |
| 907 | object_base_list = [ |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 908 | "VkDevice", |
| 909 | "VkQueue", |
Tony Barbour | d1c3572 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 910 | "VkDeviceMemory", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 911 | "VkObject" |
Tobin Ehlis | 7e65d75 | 2015-01-15 17:51:52 -0700 | [diff] [blame] | 912 | ] |
| 913 | |
| 914 | object_list = [ |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 915 | "VkBuffer", |
| 916 | "VkBufferView", |
| 917 | "VkImage", |
| 918 | "VkImageView", |
| 919 | "VkColorAttachmentView", |
| 920 | "VkDepthStencilView", |
| 921 | "VkShader", |
| 922 | "VkPipeline", |
Mark Lobodzinski | 0fadf5f | 2015-04-17 14:11:39 -0500 | [diff] [blame] | 923 | "VkPipelineLayout", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 924 | "VkSampler", |
| 925 | "VkDescriptorSet", |
| 926 | "VkDescriptorSetLayout", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 927 | "VkDescriptorPool", |
| 928 | "VkDynamicStateObject", |
| 929 | "VkCmdBuffer", |
| 930 | "VkFence", |
| 931 | "VkSemaphore", |
| 932 | "VkEvent", |
| 933 | "VkQueryPool", |
| 934 | "VkFramebuffer", |
| 935 | "VkRenderPass" |
Tobin Ehlis | 7e65d75 | 2015-01-15 17:51:52 -0700 | [diff] [blame] | 936 | ] |
| 937 | |
| 938 | object_dynamic_state_list = [ |
Courtney Goeltzenleuchter | 502744a | 2015-04-10 16:24:50 -0600 | [diff] [blame] | 939 | "VkDynamicVpState", |
| 940 | "VkDynamicRsState", |
| 941 | "VkDynamicCbState", |
| 942 | "VkDynamicDsState" |
Tobin Ehlis | 7e65d75 | 2015-01-15 17:51:52 -0700 | [diff] [blame] | 943 | ] |
| 944 | |
| 945 | object_type_list = object_root_list + object_base_list + object_list + object_dynamic_state_list |
| 946 | |
Mike Stroyan | b050c68 | 2015-04-17 12:36:38 -0600 | [diff] [blame] | 947 | object_parent_list = ["VkObject", "VkDynamicStateObject"] |
Tobin Ehlis | 7e65d75 | 2015-01-15 17:51:52 -0700 | [diff] [blame] | 948 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 949 | headers = [] |
Chia-I Wu | e86d8ab | 2015-01-04 14:46:22 +0800 | [diff] [blame] | 950 | objects = [] |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 951 | protos = [] |
| 952 | for ext in extensions: |
| 953 | headers.extend(ext.headers) |
Chia-I Wu | e86d8ab | 2015-01-04 14:46:22 +0800 | [diff] [blame] | 954 | objects.extend(ext.objects) |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 955 | protos.extend(ext.protos) |
Chia-I Wu | 6dee8b8 | 2014-09-23 10:37:23 +0800 | [diff] [blame] | 956 | |
Chia-I Wu | 9a4ceb1 | 2015-01-01 14:45:58 +0800 | [diff] [blame] | 957 | proto_names = [proto.name for proto in protos] |
Chia-I Wu | 900a257 | 2014-08-01 14:44:16 +0800 | [diff] [blame] | 958 | |
Courtney Goeltzenleuchter | f53c3cb | 2015-04-14 14:55:44 -0600 | [diff] [blame] | 959 | def parse_vk_h(filename): |
Chia-I Wu | 509a412 | 2015-01-04 14:08:46 +0800 | [diff] [blame] | 960 | # read object and protoype typedefs |
| 961 | object_lines = [] |
| 962 | proto_lines = [] |
| 963 | with open(filename, "r") as fp: |
| 964 | for line in fp: |
| 965 | line = line.strip() |
Courtney Goeltzenleuchter | d8e229c | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 966 | if line.startswith("VK_DEFINE"): |
Chia-I Wu | 509a412 | 2015-01-04 14:08:46 +0800 | [diff] [blame] | 967 | begin = line.find("(") + 1 |
| 968 | end = line.find(",") |
| 969 | # extract the object type |
| 970 | object_lines.append(line[begin:end]) |
| 971 | if line.startswith("typedef") and line.endswith(");"): |
| 972 | # drop leading "typedef " and trailing ");" |
| 973 | proto_lines.append(line[8:-2]) |
| 974 | |
| 975 | # parse proto_lines to protos |
| 976 | protos = [] |
| 977 | for line in proto_lines: |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 978 | first, rest = line.split(" (VKAPI *PFN_vk") |
| 979 | second, third = rest.split(")(") |
Chia-I Wu | 509a412 | 2015-01-04 14:08:46 +0800 | [diff] [blame] | 980 | |
| 981 | # get the return type, no space before "*" |
| 982 | proto_ret = "*".join([t.rstrip() for t in first.split("*")]) |
| 983 | |
| 984 | # get the name |
| 985 | proto_name = second.strip() |
| 986 | |
| 987 | # get the list of params |
| 988 | param_strs = third.split(", ") |
| 989 | params = [] |
| 990 | for s in param_strs: |
| 991 | ty, name = s.rsplit(" ", 1) |
| 992 | |
| 993 | # no space before "*" |
| 994 | ty = "*".join([t.rstrip() for t in ty.split("*")]) |
| 995 | # attach [] to ty |
| 996 | idx = name.rfind("[") |
| 997 | if idx >= 0: |
| 998 | ty += name[idx:] |
| 999 | name = name[:idx] |
| 1000 | |
| 1001 | params.append(Param(ty, name)) |
| 1002 | |
| 1003 | protos.append(Proto(proto_ret, proto_name, params)) |
| 1004 | |
| 1005 | # make them an extension and print |
Courtney Goeltzenleuchter | d8e229c | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 1006 | ext = Extension("VK_CORE", |
Courtney Goeltzenleuchter | f579fa6 | 2015-06-10 17:39:03 -0600 | [diff] [blame] | 1007 | headers=["vulkan.h", "vk_debug_report_lunarg.h"], |
Chia-I Wu | 509a412 | 2015-01-04 14:08:46 +0800 | [diff] [blame] | 1008 | objects=object_lines, |
| 1009 | protos=protos) |
| 1010 | print("core =", str(ext)) |
| 1011 | |
| 1012 | print("") |
Jon Ashburn | bacb0f5 | 2015-04-06 10:58:22 -0600 | [diff] [blame] | 1013 | print("typedef struct VkLayerDispatchTable_") |
Chia-I Wu | 509a412 | 2015-01-04 14:08:46 +0800 | [diff] [blame] | 1014 | print("{") |
| 1015 | for proto in ext.protos: |
Courtney Goeltzenleuchter | d8e229c | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 1016 | print(" vk%sType %s;" % (proto.name, proto.name)) |
Jon Ashburn | bacb0f5 | 2015-04-06 10:58:22 -0600 | [diff] [blame] | 1017 | print("} VkLayerDispatchTable;") |
Chia-I Wu | 509a412 | 2015-01-04 14:08:46 +0800 | [diff] [blame] | 1018 | |
| 1019 | if __name__ == "__main__": |
Courtney Goeltzenleuchter | f53c3cb | 2015-04-14 14:55:44 -0600 | [diff] [blame] | 1020 | parse_vk_h("include/vulkan.h") |