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", |
Chia-I Wu | 08accc6 | 2015-07-07 11:50:03 +0800 | [diff] [blame^] | 197 | "VkAttachmentView", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 198 | "VkShader", |
| 199 | "VkPipeline", |
Jon Ashburn | c669cc6 | 2015-07-09 15:02:25 -0600 | [diff] [blame] | 200 | "VkPipelineCache", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 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"), |
Courtney Goeltzenleuchter | 110fdf9 | 2015-06-29 15:39:26 -0600 | [diff] [blame] | 284 | Param("const char*", "pLayerName"), |
| 285 | Param("uint32_t*", "pCount"), |
Tony Barbour | 59a4732 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 286 | Param("VkExtensionProperties*", "pProperties")]), |
| 287 | |
Courtney Goeltzenleuchter | 110fdf9 | 2015-06-29 15:39:26 -0600 | [diff] [blame] | 288 | Proto("VkResult", "GetPhysicalDeviceLayerProperties", |
Tony Barbour | 59a4732 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 289 | [Param("VkPhysicalDevice", "gpu"), |
Courtney Goeltzenleuchter | 110fdf9 | 2015-06-29 15:39:26 -0600 | [diff] [blame] | 290 | Param("const char*", "pLayerName"), |
| 291 | Param("uint32_t*", "pCount"), |
| 292 | Param("VkLayerProperties*", "pProperties")]), |
Tony Barbour | 59a4732 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 293 | |
| 294 | Proto("VkResult", "GetGlobalExtensionProperties", |
Courtney Goeltzenleuchter | 110fdf9 | 2015-06-29 15:39:26 -0600 | [diff] [blame] | 295 | [Param("const char*", "pLayerName"), |
| 296 | Param("uint32_t*", "pCount"), |
Tony Barbour | 59a4732 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 297 | Param("VkExtensionProperties*", "pProperties")]), |
| 298 | |
Courtney Goeltzenleuchter | 110fdf9 | 2015-06-29 15:39:26 -0600 | [diff] [blame] | 299 | Proto("VkResult", "GetGlobalLayerProperties", |
| 300 | [Param("uint32_t*", "pCount"), |
| 301 | Param("VkExtensionProperties*", "pProperties")]), |
Tobin Ehlis | 0193901 | 2015-04-16 12:51:37 -0600 | [diff] [blame] | 302 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 303 | Proto("VkResult", "GetDeviceQueue", |
| 304 | [Param("VkDevice", "device"), |
Courtney Goeltzenleuchter | 18248e6 | 2015-03-05 18:09:39 -0700 | [diff] [blame] | 305 | Param("uint32_t", "queueNodeIndex"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 306 | Param("uint32_t", "queueIndex"), |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 307 | Param("VkQueue*", "pQueue")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 308 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 309 | Proto("VkResult", "QueueSubmit", |
| 310 | [Param("VkQueue", "queue"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 311 | Param("uint32_t", "cmdBufferCount"), |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 312 | Param("const VkCmdBuffer*", "pCmdBuffers"), |
| 313 | Param("VkFence", "fence")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 314 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 315 | Proto("VkResult", "QueueWaitIdle", |
| 316 | [Param("VkQueue", "queue")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 317 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 318 | Proto("VkResult", "DeviceWaitIdle", |
| 319 | [Param("VkDevice", "device")]), |
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", "AllocMemory", |
| 322 | [Param("VkDevice", "device"), |
Courtney Goeltzenleuchter | 95487bc | 2015-04-14 18:48:46 -0600 | [diff] [blame] | 323 | Param("const VkMemoryAllocInfo*", "pAllocInfo"), |
Tony Barbour | d1c3572 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 324 | Param("VkDeviceMemory*", "pMem")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 325 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 326 | Proto("VkResult", "FreeMemory", |
Mike Stroyan | b050c68 | 2015-04-17 12:36:38 -0600 | [diff] [blame] | 327 | [Param("VkDevice", "device"), |
| 328 | Param("VkDeviceMemory", "mem")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 329 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 330 | Proto("VkResult", "MapMemory", |
Mike Stroyan | b050c68 | 2015-04-17 12:36:38 -0600 | [diff] [blame] | 331 | [Param("VkDevice", "device"), |
| 332 | Param("VkDeviceMemory", "mem"), |
Tony Barbour | 71a8512 | 2015-04-16 19:09:28 -0600 | [diff] [blame] | 333 | Param("VkDeviceSize", "offset"), |
| 334 | Param("VkDeviceSize", "size"), |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 335 | Param("VkFlags", "flags"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 336 | Param("void**", "ppData")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 337 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 338 | Proto("VkResult", "UnmapMemory", |
Mike Stroyan | b050c68 | 2015-04-17 12:36:38 -0600 | [diff] [blame] | 339 | [Param("VkDevice", "device"), |
| 340 | Param("VkDeviceMemory", "mem")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 341 | |
Courtney Goeltzenleuchter | f69f8a2 | 2015-04-29 17:16:21 -0600 | [diff] [blame] | 342 | Proto("VkResult", "FlushMappedMemoryRanges", |
Mike Stroyan | b050c68 | 2015-04-17 12:36:38 -0600 | [diff] [blame] | 343 | [Param("VkDevice", "device"), |
Courtney Goeltzenleuchter | f69f8a2 | 2015-04-29 17:16:21 -0600 | [diff] [blame] | 344 | Param("uint32_t", "memRangeCount"), |
| 345 | Param("const VkMappedMemoryRange*", "pMemRanges")]), |
| 346 | |
| 347 | Proto("VkResult", "InvalidateMappedMemoryRanges", |
| 348 | [Param("VkDevice", "device"), |
| 349 | Param("uint32_t", "memRangeCount"), |
| 350 | Param("const VkMappedMemoryRange*", "pMemRanges")]), |
Tony Barbour | b125054 | 2015-04-16 19:23:13 -0600 | [diff] [blame] | 351 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 352 | Proto("VkResult", "DestroyObject", |
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")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 356 | |
Tony Barbour | 59a4732 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 357 | Proto("VkResult", "GetObjectMemoryRequirements", |
Mike Stroyan | b050c68 | 2015-04-17 12:36:38 -0600 | [diff] [blame] | 358 | [Param("VkDevice", "device"), |
Mark Lobodzinski | 2306535 | 2015-05-29 09:32:35 -0500 | [diff] [blame] | 359 | Param("VkObjectType", "objType"), |
Mike Stroyan | b050c68 | 2015-04-17 12:36:38 -0600 | [diff] [blame] | 360 | Param("VkObject", "object"), |
Tony Barbour | 59a4732 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 361 | Param("VkMemoryRequirements*", "pMemoryRequirements")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 362 | |
Mark Lobodzinski | 942b172 | 2015-05-11 17:21:15 -0500 | [diff] [blame] | 363 | Proto("VkResult", "BindObjectMemory", |
| 364 | [Param("VkDevice", "device"), |
Mark Lobodzinski | 2306535 | 2015-05-29 09:32:35 -0500 | [diff] [blame] | 365 | Param("VkObjectType", "objType"), |
Mark Lobodzinski | 40f7f40 | 2015-04-16 11:44:05 -0500 | [diff] [blame] | 366 | Param("VkObject", "object"), |
Tony Barbour | d1c3572 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 367 | Param("VkDeviceMemory", "mem"), |
| 368 | Param("VkDeviceSize", "offset")]), |
Chia-I Wu | 1a28fe0 | 2015-01-01 07:55:04 +0800 | [diff] [blame] | 369 | |
Mark Lobodzinski | 16e8bef | 2015-07-03 15:58:09 -0600 | [diff] [blame] | 370 | Proto("VkResult", "GetImageSparseMemoryRequirements", |
| 371 | [Param("VkDevice", "device"), |
| 372 | Param("VkImage", "image"), |
| 373 | Param("uint32_t*", "pNumRequirements"), |
| 374 | Param("VkSparseImageMemoryRequirements*", "pSparseMemoryRequirements"),]), |
| 375 | |
| 376 | Proto("VkResult", "GetPhysicalDeviceSparseImageFormatProperties", |
| 377 | [Param("VkPhysicalDevice", "physicalDevice"), |
| 378 | Param("VkFormat", "format"), |
| 379 | Param("VkImageType", "type"), |
| 380 | Param("uint32_t", "samples"), |
| 381 | Param("VkImageUsageFlags", "usage"), |
| 382 | Param("VkImageTiling", "tiling"), |
| 383 | Param("uint32_t*", "pNumProperties"), |
| 384 | Param("VkSparseImageFormatProperties*", "pProperties"),]), |
| 385 | |
Mark Lobodzinski | 942b172 | 2015-05-11 17:21:15 -0500 | [diff] [blame] | 386 | Proto("VkResult", "QueueBindSparseBufferMemory", |
Mark Lobodzinski | 40f7f40 | 2015-04-16 11:44:05 -0500 | [diff] [blame] | 387 | [Param("VkQueue", "queue"), |
Mark Lobodzinski | 942b172 | 2015-05-11 17:21:15 -0500 | [diff] [blame] | 388 | Param("VkBuffer", "buffer"), |
Mark Lobodzinski | 16e8bef | 2015-07-03 15:58:09 -0600 | [diff] [blame] | 389 | Param("uint32_t", "numBindings"), |
| 390 | Param("const VkSparseMemoryBindInfo*", "pBindInfo"),]), |
| 391 | |
| 392 | Proto("VkResult", "QueueBindSparseImageOpaqueMemory", |
| 393 | [Param("VkQueue", "queue"), |
| 394 | Param("VkImage", "image"), |
| 395 | Param("uint32_t", "numBindings"), |
| 396 | Param("const VkSparseMemoryBindInfo*", "pBindInfo"),]), |
Chia-I Wu | 1a28fe0 | 2015-01-01 07:55:04 +0800 | [diff] [blame] | 397 | |
Mark Lobodzinski | 942b172 | 2015-05-11 17:21:15 -0500 | [diff] [blame] | 398 | Proto("VkResult", "QueueBindSparseImageMemory", |
Mark Lobodzinski | 40f7f40 | 2015-04-16 11:44:05 -0500 | [diff] [blame] | 399 | [Param("VkQueue", "queue"), |
| 400 | Param("VkImage", "image"), |
Mark Lobodzinski | 16e8bef | 2015-07-03 15:58:09 -0600 | [diff] [blame] | 401 | Param("uint32_t", "numBindings"), |
| 402 | Param("const VkSparseImageMemoryBindInfo*", "pBindInfo"),]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 403 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 404 | Proto("VkResult", "CreateFence", |
| 405 | [Param("VkDevice", "device"), |
| 406 | Param("const VkFenceCreateInfo*", "pCreateInfo"), |
| 407 | Param("VkFence*", "pFence")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 408 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 409 | Proto("VkResult", "ResetFences", |
| 410 | [Param("VkDevice", "device"), |
Mark Lobodzinski | 148e158 | 2015-04-07 16:07:57 -0500 | [diff] [blame] | 411 | Param("uint32_t", "fenceCount"), |
Courtney Goeltzenleuchter | 2bf8f90 | 2015-06-18 17:28:20 -0600 | [diff] [blame] | 412 | Param("const VkFence*", "pFences")]), |
Mark Lobodzinski | 148e158 | 2015-04-07 16:07:57 -0500 | [diff] [blame] | 413 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 414 | Proto("VkResult", "GetFenceStatus", |
Mike Stroyan | b050c68 | 2015-04-17 12:36:38 -0600 | [diff] [blame] | 415 | [Param("VkDevice", "device"), |
| 416 | Param("VkFence", "fence")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 417 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 418 | Proto("VkResult", "WaitForFences", |
| 419 | [Param("VkDevice", "device"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 420 | Param("uint32_t", "fenceCount"), |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 421 | Param("const VkFence*", "pFences"), |
Courtney Goeltzenleuchter | cd2a099 | 2015-07-09 11:44:38 -0600 | [diff] [blame] | 422 | Param("VkBool32", "waitAll"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 423 | Param("uint64_t", "timeout")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 424 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 425 | Proto("VkResult", "CreateSemaphore", |
| 426 | [Param("VkDevice", "device"), |
| 427 | Param("const VkSemaphoreCreateInfo*", "pCreateInfo"), |
| 428 | Param("VkSemaphore*", "pSemaphore")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 429 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 430 | Proto("VkResult", "QueueSignalSemaphore", |
| 431 | [Param("VkQueue", "queue"), |
| 432 | Param("VkSemaphore", "semaphore")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 433 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 434 | Proto("VkResult", "QueueWaitSemaphore", |
| 435 | [Param("VkQueue", "queue"), |
| 436 | Param("VkSemaphore", "semaphore")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 437 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 438 | Proto("VkResult", "CreateEvent", |
| 439 | [Param("VkDevice", "device"), |
| 440 | Param("const VkEventCreateInfo*", "pCreateInfo"), |
| 441 | Param("VkEvent*", "pEvent")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 442 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 443 | Proto("VkResult", "GetEventStatus", |
Mike Stroyan | b050c68 | 2015-04-17 12:36:38 -0600 | [diff] [blame] | 444 | [Param("VkDevice", "device"), |
| 445 | Param("VkEvent", "event")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 446 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 447 | Proto("VkResult", "SetEvent", |
Mike Stroyan | b050c68 | 2015-04-17 12:36:38 -0600 | [diff] [blame] | 448 | [Param("VkDevice", "device"), |
| 449 | Param("VkEvent", "event")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 450 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 451 | Proto("VkResult", "ResetEvent", |
Mike Stroyan | b050c68 | 2015-04-17 12:36:38 -0600 | [diff] [blame] | 452 | [Param("VkDevice", "device"), |
| 453 | Param("VkEvent", "event")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 454 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 455 | Proto("VkResult", "CreateQueryPool", |
| 456 | [Param("VkDevice", "device"), |
| 457 | Param("const VkQueryPoolCreateInfo*", "pCreateInfo"), |
| 458 | Param("VkQueryPool*", "pQueryPool")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 459 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 460 | Proto("VkResult", "GetQueryPoolResults", |
Mike Stroyan | b050c68 | 2015-04-17 12:36:38 -0600 | [diff] [blame] | 461 | [Param("VkDevice", "device"), |
| 462 | Param("VkQueryPool", "queryPool"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 463 | Param("uint32_t", "startQuery"), |
| 464 | Param("uint32_t", "queryCount"), |
| 465 | Param("size_t*", "pDataSize"), |
Tony Barbour | d1c3572 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 466 | Param("void*", "pData"), |
| 467 | Param("VkQueryResultFlags", "flags")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 468 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 469 | Proto("VkResult", "CreateBuffer", |
| 470 | [Param("VkDevice", "device"), |
Courtney Goeltzenleuchter | 95487bc | 2015-04-14 18:48:46 -0600 | [diff] [blame] | 471 | Param("const VkBufferCreateInfo*", "pCreateInfo"), |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 472 | Param("VkBuffer*", "pBuffer")]), |
Chia-I Wu | 1a28fe0 | 2015-01-01 07:55:04 +0800 | [diff] [blame] | 473 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 474 | Proto("VkResult", "CreateBufferView", |
| 475 | [Param("VkDevice", "device"), |
Courtney Goeltzenleuchter | 95487bc | 2015-04-14 18:48:46 -0600 | [diff] [blame] | 476 | Param("const VkBufferViewCreateInfo*", "pCreateInfo"), |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 477 | Param("VkBufferView*", "pView")]), |
Chia-I Wu | 1a28fe0 | 2015-01-01 07:55:04 +0800 | [diff] [blame] | 478 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 479 | Proto("VkResult", "CreateImage", |
| 480 | [Param("VkDevice", "device"), |
| 481 | Param("const VkImageCreateInfo*", "pCreateInfo"), |
| 482 | Param("VkImage*", "pImage")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 483 | |
Tony Barbour | 59a4732 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 484 | Proto("VkResult", "GetImageSubresourceLayout", |
Mike Stroyan | b050c68 | 2015-04-17 12:36:38 -0600 | [diff] [blame] | 485 | [Param("VkDevice", "device"), |
| 486 | Param("VkImage", "image"), |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 487 | Param("const VkImageSubresource*", "pSubresource"), |
Tony Barbour | 59a4732 | 2015-06-24 16:06:58 -0600 | [diff] [blame] | 488 | Param("VkSubresourceLayout*", "pLayout")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 489 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 490 | Proto("VkResult", "CreateImageView", |
| 491 | [Param("VkDevice", "device"), |
| 492 | Param("const VkImageViewCreateInfo*", "pCreateInfo"), |
| 493 | Param("VkImageView*", "pView")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 494 | |
Chia-I Wu | 08accc6 | 2015-07-07 11:50:03 +0800 | [diff] [blame^] | 495 | Proto("VkResult", "CreateAttachmentView", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 496 | [Param("VkDevice", "device"), |
Chia-I Wu | 08accc6 | 2015-07-07 11:50:03 +0800 | [diff] [blame^] | 497 | Param("const VkAttachmentViewCreateInfo*", "pCreateInfo"), |
| 498 | Param("VkAttachmentView*", "pView")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 499 | |
Courtney Goeltzenleuchter | 2d2cb68 | 2015-06-24 18:24:19 -0600 | [diff] [blame] | 500 | Proto("VkResult", "CreateShaderModule", |
| 501 | [Param("VkDevice", "device"), |
| 502 | Param("const VkShaderModuleCreateInfo*", "pCreateInfo"), |
| 503 | Param("VkShaderModule*", "pShaderModule")]), |
| 504 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 505 | Proto("VkResult", "CreateShader", |
| 506 | [Param("VkDevice", "device"), |
| 507 | Param("const VkShaderCreateInfo*", "pCreateInfo"), |
| 508 | Param("VkShader*", "pShader")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 509 | |
Jon Ashburn | c669cc6 | 2015-07-09 15:02:25 -0600 | [diff] [blame] | 510 | Proto("VkResult", "CreatePipelineCache", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 511 | [Param("VkDevice", "device"), |
Jon Ashburn | c669cc6 | 2015-07-09 15:02:25 -0600 | [diff] [blame] | 512 | Param("const VkPipelineCacheCreateInfo*", "pCreateInfo"), |
| 513 | Param("VkPipelineCache*", "pPipelineCache")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 514 | |
Jon Ashburn | c669cc6 | 2015-07-09 15:02:25 -0600 | [diff] [blame] | 515 | Proto("VkResult", "DestroyPipelineCache", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 516 | [Param("VkDevice", "device"), |
Jon Ashburn | c669cc6 | 2015-07-09 15:02:25 -0600 | [diff] [blame] | 517 | Param("VkPipelineCache", "pipelineCache")]), |
Courtney Goeltzenleuchter | 0d40f15 | 2015-03-25 15:37:49 -0600 | [diff] [blame] | 518 | |
Jon Ashburn | c669cc6 | 2015-07-09 15:02:25 -0600 | [diff] [blame] | 519 | Proto("size_t", "GetPipelineCacheSize", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 520 | [Param("VkDevice", "device"), |
Jon Ashburn | c669cc6 | 2015-07-09 15:02:25 -0600 | [diff] [blame] | 521 | Param("VkPipelineCache", "pipelineCache")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 522 | |
Jon Ashburn | c669cc6 | 2015-07-09 15:02:25 -0600 | [diff] [blame] | 523 | Proto("VkResult", "GetPipelineCacheData", |
Mike Stroyan | b050c68 | 2015-04-17 12:36:38 -0600 | [diff] [blame] | 524 | [Param("VkDevice", "device"), |
Jon Ashburn | c669cc6 | 2015-07-09 15:02:25 -0600 | [diff] [blame] | 525 | Param("VkPipelineCache", "pipelineCache"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 526 | Param("void*", "pData")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 527 | |
Jon Ashburn | c669cc6 | 2015-07-09 15:02:25 -0600 | [diff] [blame] | 528 | Proto("VkResult", "MergePipelineCaches", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 529 | [Param("VkDevice", "device"), |
Jon Ashburn | c669cc6 | 2015-07-09 15:02:25 -0600 | [diff] [blame] | 530 | Param("VkPipelineCache", "destCache"), |
| 531 | Param("uint32_t", "srcCacheCount"), |
| 532 | Param("const VkPipelineCache*", "pSrcCaches")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 533 | |
Jon Ashburn | c669cc6 | 2015-07-09 15:02:25 -0600 | [diff] [blame] | 534 | Proto("VkResult", "CreateGraphicsPipelines", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 535 | [Param("VkDevice", "device"), |
Jon Ashburn | c669cc6 | 2015-07-09 15:02:25 -0600 | [diff] [blame] | 536 | Param("VkPipelineCache", "pipelineCache"), |
| 537 | Param("uint32_t", "count"), |
| 538 | Param("const VkGraphicsPipelineCreateInfo*", "pCreateInfos"), |
| 539 | Param("VkPipeline*", "pPipelines")]), |
| 540 | |
| 541 | Proto("VkResult", "CreateComputePipelines", |
| 542 | [Param("VkDevice", "device"), |
| 543 | Param("VkPipelineCache", "pipelineCache"), |
| 544 | Param("uint32_t", "count"), |
| 545 | Param("const VkComputePipelineCreateInfo*", "pCreateInfos"), |
| 546 | Param("VkPipeline*", "pPipelines")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 547 | |
Mark Lobodzinski | 0fadf5f | 2015-04-17 14:11:39 -0500 | [diff] [blame] | 548 | Proto("VkResult", "CreatePipelineLayout", |
| 549 | [Param("VkDevice", "device"), |
| 550 | Param("const VkPipelineLayoutCreateInfo*", "pCreateInfo"), |
| 551 | Param("VkPipelineLayout*", "pPipelineLayout")]), |
| 552 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 553 | Proto("VkResult", "CreateSampler", |
| 554 | [Param("VkDevice", "device"), |
| 555 | Param("const VkSamplerCreateInfo*", "pCreateInfo"), |
| 556 | Param("VkSampler*", "pSampler")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 557 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 558 | Proto("VkResult", "CreateDescriptorSetLayout", |
| 559 | [Param("VkDevice", "device"), |
| 560 | Param("const VkDescriptorSetLayoutCreateInfo*", "pCreateInfo"), |
| 561 | Param("VkDescriptorSetLayout*", "pSetLayout")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 562 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 563 | Proto("VkResult", "CreateDescriptorPool", |
| 564 | [Param("VkDevice", "device"), |
| 565 | Param("VkDescriptorPoolUsage", "poolUsage"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 566 | Param("uint32_t", "maxSets"), |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 567 | Param("const VkDescriptorPoolCreateInfo*", "pCreateInfo"), |
| 568 | Param("VkDescriptorPool*", "pDescriptorPool")]), |
Chia-I Wu | 11078b0 | 2015-01-04 16:27:24 +0800 | [diff] [blame] | 569 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 570 | Proto("VkResult", "ResetDescriptorPool", |
Mike Stroyan | b050c68 | 2015-04-17 12:36:38 -0600 | [diff] [blame] | 571 | [Param("VkDevice", "device"), |
| 572 | Param("VkDescriptorPool", "descriptorPool")]), |
Chia-I Wu | 11078b0 | 2015-01-04 16:27:24 +0800 | [diff] [blame] | 573 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 574 | Proto("VkResult", "AllocDescriptorSets", |
Mike Stroyan | b050c68 | 2015-04-17 12:36:38 -0600 | [diff] [blame] | 575 | [Param("VkDevice", "device"), |
| 576 | Param("VkDescriptorPool", "descriptorPool"), |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 577 | Param("VkDescriptorSetUsage", "setUsage"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 578 | Param("uint32_t", "count"), |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 579 | Param("const VkDescriptorSetLayout*", "pSetLayouts"), |
| 580 | Param("VkDescriptorSet*", "pDescriptorSets"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 581 | Param("uint32_t*", "pCount")]), |
Chia-I Wu | 11078b0 | 2015-01-04 16:27:24 +0800 | [diff] [blame] | 582 | |
Chia-I Wu | 9d00ed7 | 2015-05-25 16:27:55 +0800 | [diff] [blame] | 583 | Proto("VkResult", "UpdateDescriptorSets", |
Mike Stroyan | b050c68 | 2015-04-17 12:36:38 -0600 | [diff] [blame] | 584 | [Param("VkDevice", "device"), |
Chia-I Wu | 9d00ed7 | 2015-05-25 16:27:55 +0800 | [diff] [blame] | 585 | Param("uint32_t", "writeCount"), |
| 586 | Param("const VkWriteDescriptorSet*", "pDescriptorWrites"), |
| 587 | Param("uint32_t", "copyCount"), |
| 588 | Param("const VkCopyDescriptorSet*", "pDescriptorCopies")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 589 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 590 | Proto("VkResult", "CreateDynamicViewportState", |
| 591 | [Param("VkDevice", "device"), |
| 592 | Param("const VkDynamicVpStateCreateInfo*", "pCreateInfo"), |
Courtney Goeltzenleuchter | 502744a | 2015-04-10 16:24:50 -0600 | [diff] [blame] | 593 | Param("VkDynamicVpState*", "pState")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 594 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 595 | Proto("VkResult", "CreateDynamicRasterState", |
| 596 | [Param("VkDevice", "device"), |
| 597 | Param("const VkDynamicRsStateCreateInfo*", "pCreateInfo"), |
Courtney Goeltzenleuchter | 502744a | 2015-04-10 16:24:50 -0600 | [diff] [blame] | 598 | Param("VkDynamicRsState*", "pState")]), |
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", "CreateDynamicColorBlendState", |
| 601 | [Param("VkDevice", "device"), |
| 602 | Param("const VkDynamicCbStateCreateInfo*", "pCreateInfo"), |
Courtney Goeltzenleuchter | 502744a | 2015-04-10 16:24:50 -0600 | [diff] [blame] | 603 | Param("VkDynamicCbState*", "pState")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 604 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 605 | Proto("VkResult", "CreateDynamicDepthStencilState", |
| 606 | [Param("VkDevice", "device"), |
| 607 | Param("const VkDynamicDsStateCreateInfo*", "pCreateInfo"), |
Courtney Goeltzenleuchter | 502744a | 2015-04-10 16:24:50 -0600 | [diff] [blame] | 608 | Param("VkDynamicDsState*", "pState")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 609 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 610 | Proto("VkResult", "CreateCommandBuffer", |
| 611 | [Param("VkDevice", "device"), |
| 612 | Param("const VkCmdBufferCreateInfo*", "pCreateInfo"), |
| 613 | Param("VkCmdBuffer*", "pCmdBuffer")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 614 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 615 | Proto("VkResult", "BeginCommandBuffer", |
| 616 | [Param("VkCmdBuffer", "cmdBuffer"), |
| 617 | Param("const VkCmdBufferBeginInfo*", "pBeginInfo")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 618 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 619 | Proto("VkResult", "EndCommandBuffer", |
| 620 | [Param("VkCmdBuffer", "cmdBuffer")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 621 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 622 | Proto("VkResult", "ResetCommandBuffer", |
| 623 | [Param("VkCmdBuffer", "cmdBuffer")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 624 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 625 | Proto("void", "CmdBindPipeline", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 626 | [Param("VkCmdBuffer", "cmdBuffer"), |
| 627 | Param("VkPipelineBindPoint", "pipelineBindPoint"), |
| 628 | Param("VkPipeline", "pipeline")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 629 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 630 | Proto("void", "CmdBindDynamicStateObject", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 631 | [Param("VkCmdBuffer", "cmdBuffer"), |
| 632 | Param("VkStateBindPoint", "stateBindPoint"), |
| 633 | Param("VkDynamicStateObject", "state")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 634 | |
Chia-I Wu | 53f07d7 | 2015-03-28 15:23:55 +0800 | [diff] [blame] | 635 | Proto("void", "CmdBindDescriptorSets", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 636 | [Param("VkCmdBuffer", "cmdBuffer"), |
| 637 | Param("VkPipelineBindPoint", "pipelineBindPoint"), |
Mark Lobodzinski | f2093b6 | 2015-06-15 13:21:21 -0600 | [diff] [blame] | 638 | Param("VkPipelineLayout", "layout"), |
Cody Northrop | d4c1a50 | 2015-04-16 13:41:56 -0600 | [diff] [blame] | 639 | Param("uint32_t", "firstSet"), |
| 640 | Param("uint32_t", "setCount"), |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 641 | Param("const VkDescriptorSet*", "pDescriptorSets"), |
Cody Northrop | d4c1a50 | 2015-04-16 13:41:56 -0600 | [diff] [blame] | 642 | Param("uint32_t", "dynamicOffsetCount"), |
| 643 | Param("const uint32_t*", "pDynamicOffsets")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 644 | |
Courtney Goeltzenleuchter | f68ad72 | 2015-04-16 13:38:46 -0600 | [diff] [blame] | 645 | Proto("void", "CmdBindVertexBuffers", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 646 | [Param("VkCmdBuffer", "cmdBuffer"), |
Courtney Goeltzenleuchter | f68ad72 | 2015-04-16 13:38:46 -0600 | [diff] [blame] | 647 | Param("uint32_t", "startBinding"), |
| 648 | Param("uint32_t", "bindingCount"), |
| 649 | Param("const VkBuffer*", "pBuffers"), |
Tony Barbour | d1c3572 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 650 | Param("const VkDeviceSize*", "pOffsets")]), |
| 651 | |
Chia-I Wu | 7a42e12 | 2014-11-08 10:48:20 +0800 | [diff] [blame] | 652 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 653 | Proto("void", "CmdBindIndexBuffer", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 654 | [Param("VkCmdBuffer", "cmdBuffer"), |
| 655 | Param("VkBuffer", "buffer"), |
Tony Barbour | d1c3572 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 656 | Param("VkDeviceSize", "offset"), |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 657 | Param("VkIndexType", "indexType")]), |
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", "CmdDraw", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 660 | [Param("VkCmdBuffer", "cmdBuffer"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 661 | Param("uint32_t", "firstVertex"), |
| 662 | Param("uint32_t", "vertexCount"), |
| 663 | Param("uint32_t", "firstInstance"), |
| 664 | Param("uint32_t", "instanceCount")]), |
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", "CmdDrawIndexed", |
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", "firstIndex"), |
| 669 | Param("uint32_t", "indexCount"), |
| 670 | Param("int32_t", "vertexOffset"), |
| 671 | Param("uint32_t", "firstInstance"), |
| 672 | Param("uint32_t", "instanceCount")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 673 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 674 | Proto("void", "CmdDrawIndirect", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 675 | [Param("VkCmdBuffer", "cmdBuffer"), |
| 676 | Param("VkBuffer", "buffer"), |
Tony Barbour | d1c3572 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 677 | Param("VkDeviceSize", "offset"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 678 | Param("uint32_t", "count"), |
| 679 | Param("uint32_t", "stride")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 680 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 681 | Proto("void", "CmdDrawIndexedIndirect", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 682 | [Param("VkCmdBuffer", "cmdBuffer"), |
| 683 | Param("VkBuffer", "buffer"), |
Tony Barbour | d1c3572 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 684 | Param("VkDeviceSize", "offset"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 685 | Param("uint32_t", "count"), |
| 686 | Param("uint32_t", "stride")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 687 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 688 | Proto("void", "CmdDispatch", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 689 | [Param("VkCmdBuffer", "cmdBuffer"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 690 | Param("uint32_t", "x"), |
| 691 | Param("uint32_t", "y"), |
| 692 | Param("uint32_t", "z")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 693 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 694 | Proto("void", "CmdDispatchIndirect", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 695 | [Param("VkCmdBuffer", "cmdBuffer"), |
| 696 | Param("VkBuffer", "buffer"), |
Tony Barbour | d1c3572 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 697 | Param("VkDeviceSize", "offset")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 698 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 699 | Proto("void", "CmdCopyBuffer", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 700 | [Param("VkCmdBuffer", "cmdBuffer"), |
| 701 | Param("VkBuffer", "srcBuffer"), |
| 702 | Param("VkBuffer", "destBuffer"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 703 | Param("uint32_t", "regionCount"), |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 704 | Param("const VkBufferCopy*", "pRegions")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 705 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 706 | Proto("void", "CmdCopyImage", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 707 | [Param("VkCmdBuffer", "cmdBuffer"), |
| 708 | Param("VkImage", "srcImage"), |
| 709 | Param("VkImageLayout", "srcImageLayout"), |
| 710 | Param("VkImage", "destImage"), |
| 711 | Param("VkImageLayout", "destImageLayout"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 712 | Param("uint32_t", "regionCount"), |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 713 | Param("const VkImageCopy*", "pRegions")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 714 | |
Courtney Goeltzenleuchter | 89299fa | 2015-03-08 17:02:18 -0600 | [diff] [blame] | 715 | Proto("void", "CmdBlitImage", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 716 | [Param("VkCmdBuffer", "cmdBuffer"), |
| 717 | Param("VkImage", "srcImage"), |
| 718 | Param("VkImageLayout", "srcImageLayout"), |
| 719 | Param("VkImage", "destImage"), |
| 720 | Param("VkImageLayout", "destImageLayout"), |
Courtney Goeltzenleuchter | 89299fa | 2015-03-08 17:02:18 -0600 | [diff] [blame] | 721 | Param("uint32_t", "regionCount"), |
Mark Lobodzinski | ee5eef1 | 2015-05-22 14:43:25 -0500 | [diff] [blame] | 722 | Param("const VkImageBlit*", "pRegions"), |
| 723 | Param("VkTexFilter", "filter")]), |
Courtney Goeltzenleuchter | 89299fa | 2015-03-08 17:02:18 -0600 | [diff] [blame] | 724 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 725 | Proto("void", "CmdCopyBufferToImage", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 726 | [Param("VkCmdBuffer", "cmdBuffer"), |
| 727 | Param("VkBuffer", "srcBuffer"), |
| 728 | Param("VkImage", "destImage"), |
| 729 | Param("VkImageLayout", "destImageLayout"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 730 | Param("uint32_t", "regionCount"), |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 731 | Param("const VkBufferImageCopy*", "pRegions")]), |
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", "CmdCopyImageToBuffer", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 734 | [Param("VkCmdBuffer", "cmdBuffer"), |
| 735 | Param("VkImage", "srcImage"), |
| 736 | Param("VkImageLayout", "srcImageLayout"), |
| 737 | Param("VkBuffer", "destBuffer"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 738 | Param("uint32_t", "regionCount"), |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 739 | Param("const VkBufferImageCopy*", "pRegions")]), |
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", "CmdUpdateBuffer", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 742 | [Param("VkCmdBuffer", "cmdBuffer"), |
| 743 | Param("VkBuffer", "destBuffer"), |
Tony Barbour | d1c3572 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 744 | Param("VkDeviceSize", "destOffset"), |
| 745 | Param("VkDeviceSize", "dataSize"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 746 | Param("const uint32_t*", "pData")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 747 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 748 | Proto("void", "CmdFillBuffer", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 749 | [Param("VkCmdBuffer", "cmdBuffer"), |
| 750 | Param("VkBuffer", "destBuffer"), |
Tony Barbour | d1c3572 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 751 | Param("VkDeviceSize", "destOffset"), |
| 752 | Param("VkDeviceSize", "fillSize"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 753 | Param("uint32_t", "data")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 754 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 755 | Proto("void", "CmdClearColorImage", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 756 | [Param("VkCmdBuffer", "cmdBuffer"), |
| 757 | Param("VkImage", "image"), |
| 758 | Param("VkImageLayout", "imageLayout"), |
Chris Forbes | f0796e1 | 2015-06-24 14:34:53 +1200 | [diff] [blame] | 759 | Param("const VkClearColorValue*", "pColor"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 760 | Param("uint32_t", "rangeCount"), |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 761 | Param("const VkImageSubresourceRange*", "pRanges")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 762 | |
Chris Forbes | d9be82b | 2015-06-22 17:21:59 +1200 | [diff] [blame] | 763 | Proto("void", "CmdClearDepthStencilImage", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 764 | [Param("VkCmdBuffer", "cmdBuffer"), |
| 765 | Param("VkImage", "image"), |
| 766 | Param("VkImageLayout", "imageLayout"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 767 | Param("float", "depth"), |
| 768 | Param("uint32_t", "stencil"), |
| 769 | Param("uint32_t", "rangeCount"), |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 770 | Param("const VkImageSubresourceRange*", "pRanges")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 771 | |
Chris Forbes | d9be82b | 2015-06-22 17:21:59 +1200 | [diff] [blame] | 772 | Proto("void", "CmdClearColorAttachment", |
| 773 | [Param("VkCmdBuffer", "cmdBuffer"), |
| 774 | Param("uint32_t", "colorAttachment"), |
| 775 | Param("VkImageLayout", "imageLayout"), |
Chris Forbes | f0796e1 | 2015-06-24 14:34:53 +1200 | [diff] [blame] | 776 | Param("const VkClearColorValue*", "pColor"), |
Chris Forbes | d9be82b | 2015-06-22 17:21:59 +1200 | [diff] [blame] | 777 | Param("uint32_t", "rectCount"), |
| 778 | Param("const VkRect3D*", "pRects")]), |
| 779 | |
| 780 | Proto("void", "CmdClearDepthStencilAttachment", |
| 781 | [Param("VkCmdBuffer", "cmdBuffer"), |
| 782 | Param("VkImageAspectFlags", "imageAspectMask"), |
| 783 | Param("VkImageLayout", "imageLayout"), |
| 784 | Param("float", "depth"), |
| 785 | Param("uint32_t", "stencil"), |
| 786 | Param("uint32_t", "rectCount"), |
| 787 | Param("const VkRect3D*", "pRects")]), |
| 788 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 789 | Proto("void", "CmdResolveImage", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 790 | [Param("VkCmdBuffer", "cmdBuffer"), |
| 791 | Param("VkImage", "srcImage"), |
| 792 | Param("VkImageLayout", "srcImageLayout"), |
| 793 | Param("VkImage", "destImage"), |
| 794 | Param("VkImageLayout", "destImageLayout"), |
Tony Barbour | 6865d4a | 2015-04-13 15:02:52 -0600 | [diff] [blame] | 795 | Param("uint32_t", "regionCount"), |
| 796 | Param("const VkImageResolve*", "pRegions")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 797 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 798 | Proto("void", "CmdSetEvent", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 799 | [Param("VkCmdBuffer", "cmdBuffer"), |
| 800 | Param("VkEvent", "event"), |
Tony Barbour | 0b2cfb2 | 2015-06-29 16:20:35 -0600 | [diff] [blame] | 801 | Param("VkPipelineStageFlags", "stageMask")]), |
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", "CmdResetEvent", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 804 | [Param("VkCmdBuffer", "cmdBuffer"), |
| 805 | Param("VkEvent", "event"), |
Tony Barbour | 0b2cfb2 | 2015-06-29 16:20:35 -0600 | [diff] [blame] | 806 | Param("VkPipelineStageFlags", "stageMask")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 807 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 808 | Proto("void", "CmdWaitEvents", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 809 | [Param("VkCmdBuffer", "cmdBuffer"), |
Tony Barbour | d1c3572 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 810 | Param("uint32_t", "eventCount"), |
| 811 | Param("const VkEvent*", "pEvents"), |
Tony Barbour | 0b2cfb2 | 2015-06-29 16:20:35 -0600 | [diff] [blame] | 812 | Param("VkPipelineStageFlags", "sourceStageMask"), |
| 813 | Param("VkPipelineStageFlags", "destStageMask"), |
Tony Barbour | d1c3572 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 814 | Param("uint32_t", "memBarrierCount"), |
| 815 | Param("const void**", "ppMemBarriers")]), |
Mike Stroyan | fb80d5f | 2014-12-04 11:08:39 +0000 | [diff] [blame] | 816 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 817 | Proto("void", "CmdPipelineBarrier", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 818 | [Param("VkCmdBuffer", "cmdBuffer"), |
Tony Barbour | 0b2cfb2 | 2015-06-29 16:20:35 -0600 | [diff] [blame] | 819 | Param("VkPipelineStageFlags", "sourceStageMask"), |
| 820 | Param("VkPipelineStageFlags", "destStageMask"), |
Courtney Goeltzenleuchter | cd2a099 | 2015-07-09 11:44:38 -0600 | [diff] [blame] | 821 | Param("VkBool32", "byRegion"), |
Tony Barbour | d1c3572 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 822 | Param("uint32_t", "memBarrierCount"), |
| 823 | Param("const void**", "ppMemBarriers")]), |
Mike Stroyan | fb80d5f | 2014-12-04 11:08:39 +0000 | [diff] [blame] | 824 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 825 | Proto("void", "CmdBeginQuery", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 826 | [Param("VkCmdBuffer", "cmdBuffer"), |
| 827 | Param("VkQueryPool", "queryPool"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 828 | Param("uint32_t", "slot"), |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 829 | Param("VkFlags", "flags")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 830 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 831 | Proto("void", "CmdEndQuery", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 832 | [Param("VkCmdBuffer", "cmdBuffer"), |
| 833 | Param("VkQueryPool", "queryPool"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 834 | Param("uint32_t", "slot")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 835 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 836 | Proto("void", "CmdResetQueryPool", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 837 | [Param("VkCmdBuffer", "cmdBuffer"), |
| 838 | Param("VkQueryPool", "queryPool"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 839 | Param("uint32_t", "startQuery"), |
| 840 | Param("uint32_t", "queryCount")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 841 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 842 | Proto("void", "CmdWriteTimestamp", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 843 | [Param("VkCmdBuffer", "cmdBuffer"), |
| 844 | Param("VkTimestampType", "timestampType"), |
| 845 | Param("VkBuffer", "destBuffer"), |
Tony Barbour | d1c3572 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 846 | Param("VkDeviceSize", "destOffset")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 847 | |
Courtney Goeltzenleuchter | 1dbc8e2 | 2015-04-15 18:21:13 -0600 | [diff] [blame] | 848 | Proto("void", "CmdCopyQueryPoolResults", |
| 849 | [Param("VkCmdBuffer", "cmdBuffer"), |
| 850 | Param("VkQueryPool", "queryPool"), |
| 851 | Param("uint32_t", "startQuery"), |
| 852 | Param("uint32_t", "queryCount"), |
| 853 | Param("VkBuffer", "destBuffer"), |
Tony Barbour | d1c3572 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 854 | Param("VkDeviceSize", "destOffset"), |
| 855 | Param("VkDeviceSize", "destStride"), |
Courtney Goeltzenleuchter | 1dbc8e2 | 2015-04-15 18:21:13 -0600 | [diff] [blame] | 856 | Param("VkFlags", "flags")]), |
| 857 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 858 | Proto("VkResult", "CreateFramebuffer", |
| 859 | [Param("VkDevice", "device"), |
| 860 | Param("const VkFramebufferCreateInfo*", "pCreateInfo"), |
| 861 | Param("VkFramebuffer*", "pFramebuffer")]), |
Jeremy Hayes | d65ae08 | 2015-01-14 16:17:08 -0700 | [diff] [blame] | 862 | |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 863 | Proto("VkResult", "CreateRenderPass", |
| 864 | [Param("VkDevice", "device"), |
| 865 | Param("const VkRenderPassCreateInfo*", "pCreateInfo"), |
| 866 | Param("VkRenderPass*", "pRenderPass")]), |
Jeremy Hayes | d65ae08 | 2015-01-14 16:17:08 -0700 | [diff] [blame] | 867 | |
Jon Ashburn | e13f198 | 2015-02-02 09:58:11 -0700 | [diff] [blame] | 868 | Proto("void", "CmdBeginRenderPass", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 869 | [Param("VkCmdBuffer", "cmdBuffer"), |
Chia-I Wu | 08accc6 | 2015-07-07 11:50:03 +0800 | [diff] [blame^] | 870 | Param("const VkRenderPassBeginInfo*", "pRenderPassBegin"), |
| 871 | Param("VkRenderPassContents", "contents")]), |
| 872 | |
| 873 | Proto("void", "CmdNextSubpass", |
| 874 | [Param("VkCmdBuffer", "cmdBuffer"), |
| 875 | Param("VkRenderPassContents", "contents")]), |
Jon Ashburn | e13f198 | 2015-02-02 09:58:11 -0700 | [diff] [blame] | 876 | |
| 877 | Proto("void", "CmdEndRenderPass", |
Chia-I Wu | 0b50a1c | 2015-06-26 15:34:39 +0800 | [diff] [blame] | 878 | [Param("VkCmdBuffer", "cmdBuffer")]), |
| 879 | |
| 880 | Proto("void", "CmdExecuteCommands", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 881 | [Param("VkCmdBuffer", "cmdBuffer"), |
Chia-I Wu | 0b50a1c | 2015-06-26 15:34:39 +0800 | [diff] [blame] | 882 | Param("uint32_t", "cmdBuffersCount"), |
| 883 | Param("const VkCmdBuffer*", "pCmdBuffers")]), |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 884 | ], |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 885 | ) |
| 886 | |
Chia-I Wu | f869338 | 2015-04-16 22:02:10 +0800 | [diff] [blame] | 887 | wsi_lunarg = Extension( |
| 888 | name="VK_WSI_LunarG", |
| 889 | headers=["vk_wsi_lunarg.h"], |
| 890 | objects=[ |
| 891 | "VkDisplayWSI", |
| 892 | "VkSwapChainWSI", |
Courtney Goeltzenleuchter | f579fa6 | 2015-06-10 17:39:03 -0600 | [diff] [blame] | 893 | "VkDbgMsgCallback", |
Chia-I Wu | f869338 | 2015-04-16 22:02:10 +0800 | [diff] [blame] | 894 | ], |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 895 | protos=[ |
Chia-I Wu | f869338 | 2015-04-16 22:02:10 +0800 | [diff] [blame] | 896 | Proto("VkResult", "CreateSwapChainWSI", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 897 | [Param("VkDevice", "device"), |
Chia-I Wu | f869338 | 2015-04-16 22:02:10 +0800 | [diff] [blame] | 898 | Param("const VkSwapChainCreateInfoWSI*", "pCreateInfo"), |
| 899 | Param("VkSwapChainWSI*", "pSwapChain")]), |
Chia-I Wu | 6dee8b8 | 2014-09-23 10:37:23 +0800 | [diff] [blame] | 900 | |
Chia-I Wu | f869338 | 2015-04-16 22:02:10 +0800 | [diff] [blame] | 901 | Proto("VkResult", "DestroySwapChainWSI", |
| 902 | [Param("VkSwapChainWSI", "swapChain")]), |
Chia-I Wu | 6dee8b8 | 2014-09-23 10:37:23 +0800 | [diff] [blame] | 903 | |
Chia-I Wu | f869338 | 2015-04-16 22:02:10 +0800 | [diff] [blame] | 904 | Proto("VkResult", "GetSwapChainInfoWSI", |
| 905 | [Param("VkSwapChainWSI", "swapChain"), |
| 906 | Param("VkSwapChainInfoTypeWSI", "infoType"), |
| 907 | Param("size_t*", "pDataSize"), |
| 908 | Param("void*", "pData")]), |
| 909 | |
| 910 | Proto("VkResult", "QueuePresentWSI", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 911 | [Param("VkQueue", "queue"), |
Chia-I Wu | f869338 | 2015-04-16 22:02:10 +0800 | [diff] [blame] | 912 | Param("const VkPresentInfoWSI*", "pPresentInfo")]), |
Courtney Goeltzenleuchter | f579fa6 | 2015-06-10 17:39:03 -0600 | [diff] [blame] | 913 | |
| 914 | # Proto("VkResult", "DbgCreateMsgCallback", |
| 915 | # [Param("VkInstance", "instance"), |
| 916 | # Param("VkFlags", "msgFlags"), |
| 917 | # Param("PFN_vkDbgMsgCallback", "pfnMsgCallback"), |
| 918 | # Param("void*", "pUserData"), |
| 919 | # Param("VkDbgMsgCallback*", "pMsgCallback")]), |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 920 | ], |
Chia-I Wu | 6dee8b8 | 2014-09-23 10:37:23 +0800 | [diff] [blame] | 921 | ) |
| 922 | |
Chia-I Wu | f869338 | 2015-04-16 22:02:10 +0800 | [diff] [blame] | 923 | extensions = [core, wsi_lunarg] |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 924 | |
Tobin Ehlis | 7e65d75 | 2015-01-15 17:51:52 -0700 | [diff] [blame] | 925 | object_root_list = [ |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 926 | "VkInstance", |
Tony Barbour | d1c3572 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 927 | "VkPhysicalDevice", |
Chia-I Wu | f869338 | 2015-04-16 22:02:10 +0800 | [diff] [blame] | 928 | "VkDisplayWSI", |
| 929 | "VkSwapChainWSI", |
Tobin Ehlis | 7e65d75 | 2015-01-15 17:51:52 -0700 | [diff] [blame] | 930 | ] |
| 931 | |
| 932 | object_base_list = [ |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 933 | "VkDevice", |
| 934 | "VkQueue", |
Tony Barbour | d1c3572 | 2015-04-16 15:59:00 -0600 | [diff] [blame] | 935 | "VkDeviceMemory", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 936 | "VkObject" |
Tobin Ehlis | 7e65d75 | 2015-01-15 17:51:52 -0700 | [diff] [blame] | 937 | ] |
| 938 | |
| 939 | object_list = [ |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 940 | "VkBuffer", |
| 941 | "VkBufferView", |
| 942 | "VkImage", |
| 943 | "VkImageView", |
Chia-I Wu | 08accc6 | 2015-07-07 11:50:03 +0800 | [diff] [blame^] | 944 | "VkAttachmentView", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 945 | "VkShader", |
| 946 | "VkPipeline", |
Jon Ashburn | c669cc6 | 2015-07-09 15:02:25 -0600 | [diff] [blame] | 947 | "VkPipelineCache", |
Mark Lobodzinski | 0fadf5f | 2015-04-17 14:11:39 -0500 | [diff] [blame] | 948 | "VkPipelineLayout", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 949 | "VkSampler", |
| 950 | "VkDescriptorSet", |
| 951 | "VkDescriptorSetLayout", |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 952 | "VkDescriptorPool", |
| 953 | "VkDynamicStateObject", |
| 954 | "VkCmdBuffer", |
| 955 | "VkFence", |
| 956 | "VkSemaphore", |
| 957 | "VkEvent", |
| 958 | "VkQueryPool", |
| 959 | "VkFramebuffer", |
| 960 | "VkRenderPass" |
Tobin Ehlis | 7e65d75 | 2015-01-15 17:51:52 -0700 | [diff] [blame] | 961 | ] |
| 962 | |
| 963 | object_dynamic_state_list = [ |
Courtney Goeltzenleuchter | 502744a | 2015-04-10 16:24:50 -0600 | [diff] [blame] | 964 | "VkDynamicVpState", |
| 965 | "VkDynamicRsState", |
| 966 | "VkDynamicCbState", |
| 967 | "VkDynamicDsState" |
Tobin Ehlis | 7e65d75 | 2015-01-15 17:51:52 -0700 | [diff] [blame] | 968 | ] |
| 969 | |
| 970 | object_type_list = object_root_list + object_base_list + object_list + object_dynamic_state_list |
| 971 | |
Mike Stroyan | b050c68 | 2015-04-17 12:36:38 -0600 | [diff] [blame] | 972 | object_parent_list = ["VkObject", "VkDynamicStateObject"] |
Tobin Ehlis | 7e65d75 | 2015-01-15 17:51:52 -0700 | [diff] [blame] | 973 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 974 | headers = [] |
Chia-I Wu | e86d8ab | 2015-01-04 14:46:22 +0800 | [diff] [blame] | 975 | objects = [] |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 976 | protos = [] |
| 977 | for ext in extensions: |
| 978 | headers.extend(ext.headers) |
Chia-I Wu | e86d8ab | 2015-01-04 14:46:22 +0800 | [diff] [blame] | 979 | objects.extend(ext.objects) |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 980 | protos.extend(ext.protos) |
Chia-I Wu | 6dee8b8 | 2014-09-23 10:37:23 +0800 | [diff] [blame] | 981 | |
Chia-I Wu | 9a4ceb1 | 2015-01-01 14:45:58 +0800 | [diff] [blame] | 982 | proto_names = [proto.name for proto in protos] |
Chia-I Wu | 900a257 | 2014-08-01 14:44:16 +0800 | [diff] [blame] | 983 | |
Courtney Goeltzenleuchter | f53c3cb | 2015-04-14 14:55:44 -0600 | [diff] [blame] | 984 | def parse_vk_h(filename): |
Chia-I Wu | 509a412 | 2015-01-04 14:08:46 +0800 | [diff] [blame] | 985 | # read object and protoype typedefs |
| 986 | object_lines = [] |
| 987 | proto_lines = [] |
| 988 | with open(filename, "r") as fp: |
| 989 | for line in fp: |
| 990 | line = line.strip() |
Courtney Goeltzenleuchter | d8e229c | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 991 | if line.startswith("VK_DEFINE"): |
Chia-I Wu | 509a412 | 2015-01-04 14:08:46 +0800 | [diff] [blame] | 992 | begin = line.find("(") + 1 |
| 993 | end = line.find(",") |
| 994 | # extract the object type |
| 995 | object_lines.append(line[begin:end]) |
| 996 | if line.startswith("typedef") and line.endswith(");"): |
| 997 | # drop leading "typedef " and trailing ");" |
| 998 | proto_lines.append(line[8:-2]) |
| 999 | |
| 1000 | # parse proto_lines to protos |
| 1001 | protos = [] |
| 1002 | for line in proto_lines: |
Courtney Goeltzenleuchter | fb4efc6 | 2015-04-10 08:34:15 -0600 | [diff] [blame] | 1003 | first, rest = line.split(" (VKAPI *PFN_vk") |
| 1004 | second, third = rest.split(")(") |
Chia-I Wu | 509a412 | 2015-01-04 14:08:46 +0800 | [diff] [blame] | 1005 | |
| 1006 | # get the return type, no space before "*" |
| 1007 | proto_ret = "*".join([t.rstrip() for t in first.split("*")]) |
| 1008 | |
| 1009 | # get the name |
| 1010 | proto_name = second.strip() |
| 1011 | |
| 1012 | # get the list of params |
| 1013 | param_strs = third.split(", ") |
| 1014 | params = [] |
| 1015 | for s in param_strs: |
| 1016 | ty, name = s.rsplit(" ", 1) |
| 1017 | |
| 1018 | # no space before "*" |
| 1019 | ty = "*".join([t.rstrip() for t in ty.split("*")]) |
| 1020 | # attach [] to ty |
| 1021 | idx = name.rfind("[") |
| 1022 | if idx >= 0: |
| 1023 | ty += name[idx:] |
| 1024 | name = name[:idx] |
| 1025 | |
| 1026 | params.append(Param(ty, name)) |
| 1027 | |
| 1028 | protos.append(Proto(proto_ret, proto_name, params)) |
| 1029 | |
| 1030 | # make them an extension and print |
Courtney Goeltzenleuchter | d8e229c | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 1031 | ext = Extension("VK_CORE", |
Courtney Goeltzenleuchter | f579fa6 | 2015-06-10 17:39:03 -0600 | [diff] [blame] | 1032 | headers=["vulkan.h", "vk_debug_report_lunarg.h"], |
Chia-I Wu | 509a412 | 2015-01-04 14:08:46 +0800 | [diff] [blame] | 1033 | objects=object_lines, |
| 1034 | protos=protos) |
| 1035 | print("core =", str(ext)) |
| 1036 | |
| 1037 | print("") |
Jon Ashburn | bacb0f5 | 2015-04-06 10:58:22 -0600 | [diff] [blame] | 1038 | print("typedef struct VkLayerDispatchTable_") |
Chia-I Wu | 509a412 | 2015-01-04 14:08:46 +0800 | [diff] [blame] | 1039 | print("{") |
| 1040 | for proto in ext.protos: |
Courtney Goeltzenleuchter | d8e229c | 2015-04-08 15:36:08 -0600 | [diff] [blame] | 1041 | print(" vk%sType %s;" % (proto.name, proto.name)) |
Jon Ashburn | bacb0f5 | 2015-04-06 10:58:22 -0600 | [diff] [blame] | 1042 | print("} VkLayerDispatchTable;") |
Chia-I Wu | 509a412 | 2015-01-04 14:08:46 +0800 | [diff] [blame] | 1043 | |
| 1044 | if __name__ == "__main__": |
Courtney Goeltzenleuchter | f53c3cb | 2015-04-14 14:55:44 -0600 | [diff] [blame] | 1045 | parse_vk_h("include/vulkan.h") |