Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 1 | """XGL API description""" |
| 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=""): |
| 102 | """Return a named declaration in C, with xgl.h formatting.""" |
| 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): |
| 134 | """Return the params that are simple XGL objects and are inputs.""" |
| 135 | return [param for param in self.params if param.ty in objects] |
| 136 | |
| 137 | def object_out_params(self): |
| 138 | """Return the params that are simple XGL objects and are outputs.""" |
| 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 | |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 181 | # XGL core API |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 182 | core = Extension( |
| 183 | name="XGL_CORE", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 184 | headers=["xgl.h", "xglDbg.h"], |
Chia-I Wu | e86d8ab | 2015-01-04 14:46:22 +0800 | [diff] [blame] | 185 | objects=[ |
Jon Ashburn | 1beab2d | 2015-01-26 14:51:40 -0700 | [diff] [blame] | 186 | "XGL_INSTANCE", |
Chia-I Wu | e86d8ab | 2015-01-04 14:46:22 +0800 | [diff] [blame] | 187 | "XGL_PHYSICAL_GPU", |
| 188 | "XGL_BASE_OBJECT", |
| 189 | "XGL_DEVICE", |
| 190 | "XGL_QUEUE", |
| 191 | "XGL_GPU_MEMORY", |
| 192 | "XGL_OBJECT", |
Chia-I Wu | 1a28fe0 | 2015-01-01 07:55:04 +0800 | [diff] [blame] | 193 | "XGL_BUFFER", |
| 194 | "XGL_BUFFER_VIEW", |
Chia-I Wu | e86d8ab | 2015-01-04 14:46:22 +0800 | [diff] [blame] | 195 | "XGL_IMAGE", |
| 196 | "XGL_IMAGE_VIEW", |
| 197 | "XGL_COLOR_ATTACHMENT_VIEW", |
| 198 | "XGL_DEPTH_STENCIL_VIEW", |
| 199 | "XGL_SHADER", |
| 200 | "XGL_PIPELINE", |
Chia-I Wu | e86d8ab | 2015-01-04 14:46:22 +0800 | [diff] [blame] | 201 | "XGL_SAMPLER", |
| 202 | "XGL_DESCRIPTOR_SET", |
Chia-I Wu | 11078b0 | 2015-01-04 16:27:24 +0800 | [diff] [blame] | 203 | "XGL_DESCRIPTOR_SET_LAYOUT", |
| 204 | "XGL_DESCRIPTOR_REGION", |
Tony Barbour | f52346d | 2015-01-16 14:27:35 -0700 | [diff] [blame] | 205 | "XGL_DYNAMIC_STATE_OBJECT", |
| 206 | "XGL_DYNAMIC_VP_STATE_OBJECT", |
| 207 | "XGL_DYNAMIC_RS_STATE_OBJECT", |
| 208 | "XGL_DYNAMIC_CB_STATE_OBJECT", |
| 209 | "XGL_DYNAMIC_DS_STATE_OBJECT", |
Chia-I Wu | e86d8ab | 2015-01-04 14:46:22 +0800 | [diff] [blame] | 210 | "XGL_CMD_BUFFER", |
| 211 | "XGL_FENCE", |
| 212 | "XGL_QUEUE_SEMAPHORE", |
| 213 | "XGL_EVENT", |
| 214 | "XGL_QUERY_POOL", |
Jeremy Hayes | d65ae08 | 2015-01-14 16:17:08 -0700 | [diff] [blame] | 215 | "XGL_FRAMEBUFFER", |
Chia-I Wu | 1a28fe0 | 2015-01-01 07:55:04 +0800 | [diff] [blame] | 216 | "XGL_RENDER_PASS", |
Chia-I Wu | e86d8ab | 2015-01-04 14:46:22 +0800 | [diff] [blame] | 217 | ], |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 218 | protos=[ |
Jon Ashburn | 1beab2d | 2015-01-26 14:51:40 -0700 | [diff] [blame] | 219 | Proto("XGL_RESULT", "CreateInstance", |
| 220 | [Param("const XGL_APPLICATION_INFO*", "pAppInfo"), |
| 221 | Param("const XGL_ALLOC_CALLBACKS*", "pAllocCb"), |
| 222 | Param("XGL_INSTANCE*", "pInstance")]), |
| 223 | |
| 224 | Proto("XGL_RESULT", "DestroyInstance", |
Tobin Ehlis | 7e65d75 | 2015-01-15 17:51:52 -0700 | [diff] [blame] | 225 | [Param("XGL_INSTANCE", "instance")]), |
Jon Ashburn | 1beab2d | 2015-01-26 14:51:40 -0700 | [diff] [blame] | 226 | |
| 227 | Proto("XGL_RESULT", "EnumerateGpus", |
| 228 | [Param("XGL_INSTANCE", "instance"), |
| 229 | Param("uint32_t", "maxGpus"), |
| 230 | Param("uint32_t*", "pGpuCount"), |
| 231 | Param("XGL_PHYSICAL_GPU*", "pGpus")]), |
| 232 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 233 | Proto("XGL_RESULT", "GetGpuInfo", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 234 | [Param("XGL_PHYSICAL_GPU", "gpu"), |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 235 | Param("XGL_PHYSICAL_GPU_INFO_TYPE", "infoType"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 236 | Param("size_t*", "pDataSize"), |
| 237 | Param("void*", "pData")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 238 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 239 | Proto("void*", "GetProcAddr", |
Chia-I Wu | f2ffc52 | 2015-01-04 14:51:06 +0800 | [diff] [blame] | 240 | [Param("XGL_PHYSICAL_GPU", "gpu"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 241 | Param("const char*", "pName")]), |
Chia-I Wu | f2ffc52 | 2015-01-04 14:51:06 +0800 | [diff] [blame] | 242 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 243 | Proto("XGL_RESULT", "CreateDevice", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 244 | [Param("XGL_PHYSICAL_GPU", "gpu"), |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 245 | Param("const XGL_DEVICE_CREATE_INFO*", "pCreateInfo"), |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 246 | Param("XGL_DEVICE*", "pDevice")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 247 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 248 | Proto("XGL_RESULT", "DestroyDevice", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 249 | [Param("XGL_DEVICE", "device")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 250 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 251 | Proto("XGL_RESULT", "GetExtensionSupport", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 252 | [Param("XGL_PHYSICAL_GPU", "gpu"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 253 | Param("const char*", "pExtName")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 254 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 255 | Proto("XGL_RESULT", "EnumerateLayers", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 256 | [Param("XGL_PHYSICAL_GPU", "gpu"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 257 | Param("size_t", "maxLayerCount"), |
| 258 | Param("size_t", "maxStringSize"), |
| 259 | Param("size_t*", "pOutLayerCount"), |
| 260 | Param("char* const*", "pOutLayers"), |
| 261 | Param("void*", "pReserved")]), |
Jon Ashburn | f7bcf9b | 2014-10-15 15:30:23 -0600 | [diff] [blame] | 262 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 263 | Proto("XGL_RESULT", "GetDeviceQueue", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 264 | [Param("XGL_DEVICE", "device"), |
Courtney Goeltzenleuchter | 18248e6 | 2015-03-05 18:09:39 -0700 | [diff] [blame] | 265 | Param("uint32_t", "queueNodeIndex"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 266 | Param("uint32_t", "queueIndex"), |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 267 | Param("XGL_QUEUE*", "pQueue")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 268 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 269 | Proto("XGL_RESULT", "QueueSubmit", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 270 | [Param("XGL_QUEUE", "queue"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 271 | Param("uint32_t", "cmdBufferCount"), |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 272 | Param("const XGL_CMD_BUFFER*", "pCmdBuffers"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 273 | Param("uint32_t", "memRefCount"), |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 274 | Param("const XGL_MEMORY_REF*", "pMemRefs"), |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 275 | Param("XGL_FENCE", "fence")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 276 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 277 | Proto("XGL_RESULT", "QueueSetGlobalMemReferences", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 278 | [Param("XGL_QUEUE", "queue"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 279 | Param("uint32_t", "memRefCount"), |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 280 | Param("const XGL_MEMORY_REF*", "pMemRefs")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 281 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 282 | Proto("XGL_RESULT", "QueueWaitIdle", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 283 | [Param("XGL_QUEUE", "queue")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 284 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 285 | Proto("XGL_RESULT", "DeviceWaitIdle", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 286 | [Param("XGL_DEVICE", "device")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 287 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 288 | Proto("XGL_RESULT", "AllocMemory", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 289 | [Param("XGL_DEVICE", "device"), |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 290 | Param("const XGL_MEMORY_ALLOC_INFO*", "pAllocInfo"), |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 291 | Param("XGL_GPU_MEMORY*", "pMem")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 292 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 293 | Proto("XGL_RESULT", "FreeMemory", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 294 | [Param("XGL_GPU_MEMORY", "mem")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 295 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 296 | Proto("XGL_RESULT", "SetMemoryPriority", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 297 | [Param("XGL_GPU_MEMORY", "mem"), |
| 298 | Param("XGL_MEMORY_PRIORITY", "priority")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 299 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 300 | Proto("XGL_RESULT", "MapMemory", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 301 | [Param("XGL_GPU_MEMORY", "mem"), |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 302 | Param("XGL_FLAGS", "flags"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 303 | Param("void**", "ppData")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 304 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 305 | Proto("XGL_RESULT", "UnmapMemory", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 306 | [Param("XGL_GPU_MEMORY", "mem")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 307 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 308 | Proto("XGL_RESULT", "PinSystemMemory", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 309 | [Param("XGL_DEVICE", "device"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 310 | Param("const void*", "pSysMem"), |
| 311 | Param("size_t", "memSize"), |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 312 | Param("XGL_GPU_MEMORY*", "pMem")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 313 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 314 | Proto("XGL_RESULT", "GetMultiGpuCompatibility", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 315 | [Param("XGL_PHYSICAL_GPU", "gpu0"), |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 316 | Param("XGL_PHYSICAL_GPU", "gpu1"), |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 317 | Param("XGL_GPU_COMPATIBILITY_INFO*", "pInfo")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 318 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 319 | Proto("XGL_RESULT", "OpenSharedMemory", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 320 | [Param("XGL_DEVICE", "device"), |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 321 | Param("const XGL_MEMORY_OPEN_INFO*", "pOpenInfo"), |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 322 | Param("XGL_GPU_MEMORY*", "pMem")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 323 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 324 | Proto("XGL_RESULT", "OpenSharedQueueSemaphore", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 325 | [Param("XGL_DEVICE", "device"), |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 326 | Param("const XGL_QUEUE_SEMAPHORE_OPEN_INFO*", "pOpenInfo"), |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 327 | Param("XGL_QUEUE_SEMAPHORE*", "pSemaphore")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 328 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 329 | Proto("XGL_RESULT", "OpenPeerMemory", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 330 | [Param("XGL_DEVICE", "device"), |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 331 | Param("const XGL_PEER_MEMORY_OPEN_INFO*", "pOpenInfo"), |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 332 | Param("XGL_GPU_MEMORY*", "pMem")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 333 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 334 | Proto("XGL_RESULT", "OpenPeerImage", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 335 | [Param("XGL_DEVICE", "device"), |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 336 | Param("const XGL_PEER_IMAGE_OPEN_INFO*", "pOpenInfo"), |
| 337 | Param("XGL_IMAGE*", "pImage"), |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 338 | Param("XGL_GPU_MEMORY*", "pMem")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 339 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 340 | Proto("XGL_RESULT", "DestroyObject", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 341 | [Param("XGL_OBJECT", "object")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 342 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 343 | Proto("XGL_RESULT", "GetObjectInfo", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 344 | [Param("XGL_BASE_OBJECT", "object"), |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 345 | Param("XGL_OBJECT_INFO_TYPE", "infoType"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 346 | Param("size_t*", "pDataSize"), |
| 347 | Param("void*", "pData")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 348 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 349 | Proto("XGL_RESULT", "BindObjectMemory", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 350 | [Param("XGL_OBJECT", "object"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 351 | Param("uint32_t", "allocationIdx"), |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 352 | Param("XGL_GPU_MEMORY", "mem"), |
Mark Lobodzinski | d47a1c4 | 2015-02-03 16:44:20 -0600 | [diff] [blame] | 353 | Param("XGL_GPU_SIZE", "offset")]), |
Chia-I Wu | 1a28fe0 | 2015-01-01 07:55:04 +0800 | [diff] [blame] | 354 | |
| 355 | Proto("XGL_RESULT", "BindObjectMemoryRange", |
| 356 | [Param("XGL_OBJECT", "object"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 357 | Param("uint32_t", "allocationIdx"), |
Chia-I Wu | 1a28fe0 | 2015-01-01 07:55:04 +0800 | [diff] [blame] | 358 | Param("XGL_GPU_SIZE", "rangeOffset"), |
| 359 | Param("XGL_GPU_SIZE", "rangeSize"), |
| 360 | Param("XGL_GPU_MEMORY", "mem"), |
| 361 | Param("XGL_GPU_SIZE", "memOffset")]), |
| 362 | |
| 363 | Proto("XGL_RESULT", "BindImageMemoryRange", |
| 364 | [Param("XGL_IMAGE", "image"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 365 | Param("uint32_t", "allocationIdx"), |
Chia-I Wu | 1a28fe0 | 2015-01-01 07:55:04 +0800 | [diff] [blame] | 366 | Param("const XGL_IMAGE_MEMORY_BIND_INFO*", "bindInfo"), |
| 367 | Param("XGL_GPU_MEMORY", "mem"), |
| 368 | Param("XGL_GPU_SIZE", "memOffset")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 369 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 370 | Proto("XGL_RESULT", "CreateFence", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 371 | [Param("XGL_DEVICE", "device"), |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 372 | Param("const XGL_FENCE_CREATE_INFO*", "pCreateInfo"), |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 373 | Param("XGL_FENCE*", "pFence")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 374 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 375 | Proto("XGL_RESULT", "GetFenceStatus", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 376 | [Param("XGL_FENCE", "fence")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 377 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 378 | Proto("XGL_RESULT", "WaitForFences", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 379 | [Param("XGL_DEVICE", "device"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 380 | Param("uint32_t", "fenceCount"), |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 381 | Param("const XGL_FENCE*", "pFences"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 382 | Param("bool32_t", "waitAll"), |
| 383 | Param("uint64_t", "timeout")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 384 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 385 | Proto("XGL_RESULT", "CreateQueueSemaphore", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 386 | [Param("XGL_DEVICE", "device"), |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 387 | Param("const XGL_QUEUE_SEMAPHORE_CREATE_INFO*", "pCreateInfo"), |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 388 | Param("XGL_QUEUE_SEMAPHORE*", "pSemaphore")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 389 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 390 | Proto("XGL_RESULT", "SignalQueueSemaphore", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 391 | [Param("XGL_QUEUE", "queue"), |
| 392 | Param("XGL_QUEUE_SEMAPHORE", "semaphore")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 393 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 394 | Proto("XGL_RESULT", "WaitQueueSemaphore", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 395 | [Param("XGL_QUEUE", "queue"), |
| 396 | Param("XGL_QUEUE_SEMAPHORE", "semaphore")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 397 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 398 | Proto("XGL_RESULT", "CreateEvent", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 399 | [Param("XGL_DEVICE", "device"), |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 400 | Param("const XGL_EVENT_CREATE_INFO*", "pCreateInfo"), |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 401 | Param("XGL_EVENT*", "pEvent")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 402 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 403 | Proto("XGL_RESULT", "GetEventStatus", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 404 | [Param("XGL_EVENT", "event")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 405 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 406 | Proto("XGL_RESULT", "SetEvent", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 407 | [Param("XGL_EVENT", "event")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 408 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 409 | Proto("XGL_RESULT", "ResetEvent", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 410 | [Param("XGL_EVENT", "event")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 411 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 412 | Proto("XGL_RESULT", "CreateQueryPool", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 413 | [Param("XGL_DEVICE", "device"), |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 414 | Param("const XGL_QUERY_POOL_CREATE_INFO*", "pCreateInfo"), |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 415 | Param("XGL_QUERY_POOL*", "pQueryPool")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 416 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 417 | Proto("XGL_RESULT", "GetQueryPoolResults", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 418 | [Param("XGL_QUERY_POOL", "queryPool"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 419 | Param("uint32_t", "startQuery"), |
| 420 | Param("uint32_t", "queryCount"), |
| 421 | Param("size_t*", "pDataSize"), |
| 422 | Param("void*", "pData")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 423 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 424 | Proto("XGL_RESULT", "GetFormatInfo", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 425 | [Param("XGL_DEVICE", "device"), |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 426 | Param("XGL_FORMAT", "format"), |
| 427 | Param("XGL_FORMAT_INFO_TYPE", "infoType"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 428 | Param("size_t*", "pDataSize"), |
| 429 | Param("void*", "pData")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 430 | |
Chia-I Wu | 1a28fe0 | 2015-01-01 07:55:04 +0800 | [diff] [blame] | 431 | Proto("XGL_RESULT", "CreateBuffer", |
| 432 | [Param("XGL_DEVICE", "device"), |
| 433 | Param("const XGL_BUFFER_CREATE_INFO*", "pCreateInfo"), |
| 434 | Param("XGL_BUFFER*", "pBuffer")]), |
| 435 | |
| 436 | Proto("XGL_RESULT", "CreateBufferView", |
| 437 | [Param("XGL_DEVICE", "device"), |
| 438 | Param("const XGL_BUFFER_VIEW_CREATE_INFO*", "pCreateInfo"), |
| 439 | Param("XGL_BUFFER_VIEW*", "pView")]), |
| 440 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 441 | Proto("XGL_RESULT", "CreateImage", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 442 | [Param("XGL_DEVICE", "device"), |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 443 | Param("const XGL_IMAGE_CREATE_INFO*", "pCreateInfo"), |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 444 | Param("XGL_IMAGE*", "pImage")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 445 | |
Mark Lobodzinski | 58c2018 | 2015-01-28 13:29:48 -0600 | [diff] [blame] | 446 | Proto("XGL_RESULT", "SetFastClearColor", |
Tobin Ehlis | 7e65d75 | 2015-01-15 17:51:52 -0700 | [diff] [blame] | 447 | [Param("XGL_IMAGE", "image"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 448 | Param("const float[4]", "color")]), |
Mark Lobodzinski | 58c2018 | 2015-01-28 13:29:48 -0600 | [diff] [blame] | 449 | |
| 450 | Proto("XGL_RESULT", "SetFastClearDepth", |
Tobin Ehlis | 7e65d75 | 2015-01-15 17:51:52 -0700 | [diff] [blame] | 451 | [Param("XGL_IMAGE", "image"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 452 | Param("float", "depth")]), |
Mark Lobodzinski | 58c2018 | 2015-01-28 13:29:48 -0600 | [diff] [blame] | 453 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 454 | Proto("XGL_RESULT", "GetImageSubresourceInfo", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 455 | [Param("XGL_IMAGE", "image"), |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 456 | Param("const XGL_IMAGE_SUBRESOURCE*", "pSubresource"), |
| 457 | Param("XGL_SUBRESOURCE_INFO_TYPE", "infoType"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 458 | Param("size_t*", "pDataSize"), |
| 459 | Param("void*", "pData")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 460 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 461 | Proto("XGL_RESULT", "CreateImageView", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 462 | [Param("XGL_DEVICE", "device"), |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 463 | Param("const XGL_IMAGE_VIEW_CREATE_INFO*", "pCreateInfo"), |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 464 | Param("XGL_IMAGE_VIEW*", "pView")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 465 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 466 | Proto("XGL_RESULT", "CreateColorAttachmentView", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 467 | [Param("XGL_DEVICE", "device"), |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 468 | Param("const XGL_COLOR_ATTACHMENT_VIEW_CREATE_INFO*", "pCreateInfo"), |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 469 | Param("XGL_COLOR_ATTACHMENT_VIEW*", "pView")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 470 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 471 | Proto("XGL_RESULT", "CreateDepthStencilView", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 472 | [Param("XGL_DEVICE", "device"), |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 473 | Param("const XGL_DEPTH_STENCIL_VIEW_CREATE_INFO*", "pCreateInfo"), |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 474 | Param("XGL_DEPTH_STENCIL_VIEW*", "pView")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 475 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 476 | Proto("XGL_RESULT", "CreateShader", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 477 | [Param("XGL_DEVICE", "device"), |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 478 | Param("const XGL_SHADER_CREATE_INFO*", "pCreateInfo"), |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 479 | Param("XGL_SHADER*", "pShader")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 480 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 481 | Proto("XGL_RESULT", "CreateGraphicsPipeline", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 482 | [Param("XGL_DEVICE", "device"), |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 483 | Param("const XGL_GRAPHICS_PIPELINE_CREATE_INFO*", "pCreateInfo"), |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 484 | Param("XGL_PIPELINE*", "pPipeline")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 485 | |
Courtney Goeltzenleuchter | 0d40f15 | 2015-03-25 15:37:49 -0600 | [diff] [blame^] | 486 | Proto("XGL_RESULT", "CreateGraphicsPipelineDerivative", |
| 487 | [Param("XGL_DEVICE", "device"), |
| 488 | Param("const XGL_GRAPHICS_PIPELINE_CREATE_INFO*", "pCreateInfo"), |
| 489 | Param("XGL_PIPELINE", "basePipeline"), |
| 490 | Param("XGL_PIPELINE*", "pPipeline")]), |
| 491 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 492 | Proto("XGL_RESULT", "CreateComputePipeline", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 493 | [Param("XGL_DEVICE", "device"), |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 494 | Param("const XGL_COMPUTE_PIPELINE_CREATE_INFO*", "pCreateInfo"), |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 495 | Param("XGL_PIPELINE*", "pPipeline")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 496 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 497 | Proto("XGL_RESULT", "StorePipeline", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 498 | [Param("XGL_PIPELINE", "pipeline"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 499 | Param("size_t*", "pDataSize"), |
| 500 | Param("void*", "pData")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 501 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 502 | Proto("XGL_RESULT", "LoadPipeline", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 503 | [Param("XGL_DEVICE", "device"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 504 | Param("size_t", "dataSize"), |
| 505 | Param("const void*", "pData"), |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 506 | Param("XGL_PIPELINE*", "pPipeline")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 507 | |
Courtney Goeltzenleuchter | 0d40f15 | 2015-03-25 15:37:49 -0600 | [diff] [blame^] | 508 | Proto("XGL_RESULT", "LoadPipelineDerivative", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 509 | [Param("XGL_DEVICE", "device"), |
Courtney Goeltzenleuchter | 0d40f15 | 2015-03-25 15:37:49 -0600 | [diff] [blame^] | 510 | Param("size_t", "dataSize"), |
| 511 | Param("const void*", "pData"), |
| 512 | Param("XGL_PIPELINE", "basePipeline"), |
| 513 | Param("XGL_PIPELINE*", "pPipeline")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 514 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 515 | Proto("XGL_RESULT", "CreateSampler", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 516 | [Param("XGL_DEVICE", "device"), |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 517 | Param("const XGL_SAMPLER_CREATE_INFO*", "pCreateInfo"), |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 518 | Param("XGL_SAMPLER*", "pSampler")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 519 | |
Chia-I Wu | 11078b0 | 2015-01-04 16:27:24 +0800 | [diff] [blame] | 520 | Proto("XGL_RESULT", "CreateDescriptorSetLayout", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 521 | [Param("XGL_DEVICE", "device"), |
Chia-I Wu | 11078b0 | 2015-01-04 16:27:24 +0800 | [diff] [blame] | 522 | Param("XGL_FLAGS", "stageFlags"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 523 | Param("const uint32_t*", "pSetBindPoints"), |
Chia-I Wu | 11078b0 | 2015-01-04 16:27:24 +0800 | [diff] [blame] | 524 | Param("XGL_DESCRIPTOR_SET_LAYOUT", "priorSetLayout"), |
| 525 | Param("const XGL_DESCRIPTOR_SET_LAYOUT_CREATE_INFO*", "pSetLayoutInfoList"), |
| 526 | Param("XGL_DESCRIPTOR_SET_LAYOUT*", "pSetLayout")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 527 | |
Chia-I Wu | 11078b0 | 2015-01-04 16:27:24 +0800 | [diff] [blame] | 528 | Proto("XGL_RESULT", "BeginDescriptorRegionUpdate", |
| 529 | [Param("XGL_DEVICE", "device"), |
| 530 | Param("XGL_DESCRIPTOR_UPDATE_MODE", "updateMode")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 531 | |
Chia-I Wu | 11078b0 | 2015-01-04 16:27:24 +0800 | [diff] [blame] | 532 | Proto("XGL_RESULT", "EndDescriptorRegionUpdate", |
| 533 | [Param("XGL_DEVICE", "device"), |
| 534 | Param("XGL_CMD_BUFFER", "cmd")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 535 | |
Chia-I Wu | 11078b0 | 2015-01-04 16:27:24 +0800 | [diff] [blame] | 536 | Proto("XGL_RESULT", "CreateDescriptorRegion", |
| 537 | [Param("XGL_DEVICE", "device"), |
| 538 | Param("XGL_DESCRIPTOR_REGION_USAGE", "regionUsage"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 539 | Param("uint32_t", "maxSets"), |
Chia-I Wu | 11078b0 | 2015-01-04 16:27:24 +0800 | [diff] [blame] | 540 | Param("const XGL_DESCRIPTOR_REGION_CREATE_INFO*", "pCreateInfo"), |
| 541 | Param("XGL_DESCRIPTOR_REGION*", "pDescriptorRegion")]), |
| 542 | |
| 543 | Proto("XGL_RESULT", "ClearDescriptorRegion", |
| 544 | [Param("XGL_DESCRIPTOR_REGION", "descriptorRegion")]), |
| 545 | |
| 546 | Proto("XGL_RESULT", "AllocDescriptorSets", |
| 547 | [Param("XGL_DESCRIPTOR_REGION", "descriptorRegion"), |
| 548 | Param("XGL_DESCRIPTOR_SET_USAGE", "setUsage"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 549 | Param("uint32_t", "count"), |
Chia-I Wu | 11078b0 | 2015-01-04 16:27:24 +0800 | [diff] [blame] | 550 | Param("const XGL_DESCRIPTOR_SET_LAYOUT*", "pSetLayouts"), |
| 551 | Param("XGL_DESCRIPTOR_SET*", "pDescriptorSets"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 552 | Param("uint32_t*", "pCount")]), |
Chia-I Wu | 11078b0 | 2015-01-04 16:27:24 +0800 | [diff] [blame] | 553 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 554 | Proto("void", "ClearDescriptorSets", |
Chia-I Wu | 11078b0 | 2015-01-04 16:27:24 +0800 | [diff] [blame] | 555 | [Param("XGL_DESCRIPTOR_REGION", "descriptorRegion"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 556 | Param("uint32_t", "count"), |
Chia-I Wu | 11078b0 | 2015-01-04 16:27:24 +0800 | [diff] [blame] | 557 | Param("const XGL_DESCRIPTOR_SET*", "pDescriptorSets")]), |
| 558 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 559 | Proto("void", "UpdateDescriptors", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 560 | [Param("XGL_DESCRIPTOR_SET", "descriptorSet"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 561 | Param("const void*", "pUpdateChain")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 562 | |
Tony Barbour | f52346d | 2015-01-16 14:27:35 -0700 | [diff] [blame] | 563 | Proto("XGL_RESULT", "CreateDynamicViewportState", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 564 | [Param("XGL_DEVICE", "device"), |
Tony Barbour | f52346d | 2015-01-16 14:27:35 -0700 | [diff] [blame] | 565 | Param("const XGL_DYNAMIC_VP_STATE_CREATE_INFO*", "pCreateInfo"), |
| 566 | Param("XGL_DYNAMIC_VP_STATE_OBJECT*", "pState")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 567 | |
Tony Barbour | f52346d | 2015-01-16 14:27:35 -0700 | [diff] [blame] | 568 | Proto("XGL_RESULT", "CreateDynamicRasterState", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 569 | [Param("XGL_DEVICE", "device"), |
Tony Barbour | f52346d | 2015-01-16 14:27:35 -0700 | [diff] [blame] | 570 | Param("const XGL_DYNAMIC_RS_STATE_CREATE_INFO*", "pCreateInfo"), |
| 571 | Param("XGL_DYNAMIC_RS_STATE_OBJECT*", "pState")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 572 | |
Tony Barbour | f52346d | 2015-01-16 14:27:35 -0700 | [diff] [blame] | 573 | Proto("XGL_RESULT", "CreateDynamicColorBlendState", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 574 | [Param("XGL_DEVICE", "device"), |
Tony Barbour | f52346d | 2015-01-16 14:27:35 -0700 | [diff] [blame] | 575 | Param("const XGL_DYNAMIC_CB_STATE_CREATE_INFO*", "pCreateInfo"), |
| 576 | Param("XGL_DYNAMIC_CB_STATE_OBJECT*", "pState")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 577 | |
Tony Barbour | f52346d | 2015-01-16 14:27:35 -0700 | [diff] [blame] | 578 | Proto("XGL_RESULT", "CreateDynamicDepthStencilState", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 579 | [Param("XGL_DEVICE", "device"), |
Tony Barbour | f52346d | 2015-01-16 14:27:35 -0700 | [diff] [blame] | 580 | Param("const XGL_DYNAMIC_DS_STATE_CREATE_INFO*", "pCreateInfo"), |
| 581 | Param("XGL_DYNAMIC_DS_STATE_OBJECT*", "pState")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 582 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 583 | Proto("XGL_RESULT", "CreateCommandBuffer", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 584 | [Param("XGL_DEVICE", "device"), |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 585 | Param("const XGL_CMD_BUFFER_CREATE_INFO*", "pCreateInfo"), |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 586 | Param("XGL_CMD_BUFFER*", "pCmdBuffer")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 587 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 588 | Proto("XGL_RESULT", "BeginCommandBuffer", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 589 | [Param("XGL_CMD_BUFFER", "cmdBuffer"), |
Jeremy Hayes | d65ae08 | 2015-01-14 16:17:08 -0700 | [diff] [blame] | 590 | Param("const XGL_CMD_BUFFER_BEGIN_INFO*", "pBeginInfo")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 591 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 592 | Proto("XGL_RESULT", "EndCommandBuffer", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 593 | [Param("XGL_CMD_BUFFER", "cmdBuffer")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 594 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 595 | Proto("XGL_RESULT", "ResetCommandBuffer", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 596 | [Param("XGL_CMD_BUFFER", "cmdBuffer")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 597 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 598 | Proto("void", "CmdBindPipeline", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 599 | [Param("XGL_CMD_BUFFER", "cmdBuffer"), |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 600 | Param("XGL_PIPELINE_BIND_POINT", "pipelineBindPoint"), |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 601 | Param("XGL_PIPELINE", "pipeline")]), |
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", "CmdBindDynamicStateObject", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 604 | [Param("XGL_CMD_BUFFER", "cmdBuffer"), |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 605 | Param("XGL_STATE_BIND_POINT", "stateBindPoint"), |
Tony Barbour | f52346d | 2015-01-16 14:27:35 -0700 | [diff] [blame] | 606 | Param("XGL_DYNAMIC_STATE_OBJECT", "state")]), |
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", "CmdBindDescriptorSet", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 609 | [Param("XGL_CMD_BUFFER", "cmdBuffer"), |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 610 | Param("XGL_PIPELINE_BIND_POINT", "pipelineBindPoint"), |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 611 | Param("XGL_DESCRIPTOR_SET", "descriptorSet"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 612 | Param("const uint32_t*", "pUserData")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 613 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 614 | Proto("void", "CmdBindVertexBuffer", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 615 | [Param("XGL_CMD_BUFFER", "cmdBuffer"), |
Chia-I Wu | 1a28fe0 | 2015-01-01 07:55:04 +0800 | [diff] [blame] | 616 | Param("XGL_BUFFER", "buffer"), |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 617 | Param("XGL_GPU_SIZE", "offset"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 618 | Param("uint32_t", "binding")]), |
Chia-I Wu | 7a42e12 | 2014-11-08 10:48:20 +0800 | [diff] [blame] | 619 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 620 | Proto("void", "CmdBindIndexBuffer", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 621 | [Param("XGL_CMD_BUFFER", "cmdBuffer"), |
Chia-I Wu | 1a28fe0 | 2015-01-01 07:55:04 +0800 | [diff] [blame] | 622 | Param("XGL_BUFFER", "buffer"), |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 623 | Param("XGL_GPU_SIZE", "offset"), |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 624 | Param("XGL_INDEX_TYPE", "indexType")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 625 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 626 | Proto("void", "CmdDraw", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 627 | [Param("XGL_CMD_BUFFER", "cmdBuffer"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 628 | Param("uint32_t", "firstVertex"), |
| 629 | Param("uint32_t", "vertexCount"), |
| 630 | Param("uint32_t", "firstInstance"), |
| 631 | Param("uint32_t", "instanceCount")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 632 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 633 | Proto("void", "CmdDrawIndexed", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 634 | [Param("XGL_CMD_BUFFER", "cmdBuffer"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 635 | Param("uint32_t", "firstIndex"), |
| 636 | Param("uint32_t", "indexCount"), |
| 637 | Param("int32_t", "vertexOffset"), |
| 638 | Param("uint32_t", "firstInstance"), |
| 639 | Param("uint32_t", "instanceCount")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 640 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 641 | Proto("void", "CmdDrawIndirect", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 642 | [Param("XGL_CMD_BUFFER", "cmdBuffer"), |
Chia-I Wu | 1a28fe0 | 2015-01-01 07:55:04 +0800 | [diff] [blame] | 643 | Param("XGL_BUFFER", "buffer"), |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 644 | Param("XGL_GPU_SIZE", "offset"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 645 | Param("uint32_t", "count"), |
| 646 | Param("uint32_t", "stride")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 647 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 648 | Proto("void", "CmdDrawIndexedIndirect", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 649 | [Param("XGL_CMD_BUFFER", "cmdBuffer"), |
Chia-I Wu | 1a28fe0 | 2015-01-01 07:55:04 +0800 | [diff] [blame] | 650 | Param("XGL_BUFFER", "buffer"), |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 651 | Param("XGL_GPU_SIZE", "offset"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 652 | Param("uint32_t", "count"), |
| 653 | Param("uint32_t", "stride")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 654 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 655 | Proto("void", "CmdDispatch", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 656 | [Param("XGL_CMD_BUFFER", "cmdBuffer"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 657 | Param("uint32_t", "x"), |
| 658 | Param("uint32_t", "y"), |
| 659 | Param("uint32_t", "z")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 660 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 661 | Proto("void", "CmdDispatchIndirect", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 662 | [Param("XGL_CMD_BUFFER", "cmdBuffer"), |
Chia-I Wu | 1a28fe0 | 2015-01-01 07:55:04 +0800 | [diff] [blame] | 663 | Param("XGL_BUFFER", "buffer"), |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 664 | Param("XGL_GPU_SIZE", "offset")]), |
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", "CmdCopyBuffer", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 667 | [Param("XGL_CMD_BUFFER", "cmdBuffer"), |
Chia-I Wu | 1a28fe0 | 2015-01-01 07:55:04 +0800 | [diff] [blame] | 668 | Param("XGL_BUFFER", "srcBuffer"), |
| 669 | Param("XGL_BUFFER", "destBuffer"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 670 | Param("uint32_t", "regionCount"), |
Chia-I Wu | 1a28fe0 | 2015-01-01 07:55:04 +0800 | [diff] [blame] | 671 | Param("const XGL_BUFFER_COPY*", "pRegions")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 672 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 673 | Proto("void", "CmdCopyImage", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 674 | [Param("XGL_CMD_BUFFER", "cmdBuffer"), |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 675 | Param("XGL_IMAGE", "srcImage"), |
Courtney Goeltzenleuchter | b3efe9b | 2015-03-25 11:25:10 -0600 | [diff] [blame] | 676 | Param("XGL_IMAGE_LAYOUT", "srcImageLayout"), |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 677 | Param("XGL_IMAGE", "destImage"), |
Courtney Goeltzenleuchter | b3efe9b | 2015-03-25 11:25:10 -0600 | [diff] [blame] | 678 | Param("XGL_IMAGE_LAYOUT", "destImageLayout"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 679 | Param("uint32_t", "regionCount"), |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 680 | Param("const XGL_IMAGE_COPY*", "pRegions")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 681 | |
Courtney Goeltzenleuchter | 89299fa | 2015-03-08 17:02:18 -0600 | [diff] [blame] | 682 | Proto("void", "CmdBlitImage", |
| 683 | [Param("XGL_CMD_BUFFER", "cmdBuffer"), |
| 684 | Param("XGL_IMAGE", "srcImage"), |
Courtney Goeltzenleuchter | b3efe9b | 2015-03-25 11:25:10 -0600 | [diff] [blame] | 685 | Param("XGL_IMAGE_LAYOUT", "srcImageLayout"), |
Courtney Goeltzenleuchter | 89299fa | 2015-03-08 17:02:18 -0600 | [diff] [blame] | 686 | Param("XGL_IMAGE", "destImage"), |
Courtney Goeltzenleuchter | b3efe9b | 2015-03-25 11:25:10 -0600 | [diff] [blame] | 687 | Param("XGL_IMAGE_LAYOUT", "destImageLayout"), |
Courtney Goeltzenleuchter | 89299fa | 2015-03-08 17:02:18 -0600 | [diff] [blame] | 688 | Param("uint32_t", "regionCount"), |
| 689 | Param("const XGL_IMAGE_BLIT*", "pRegions")]), |
| 690 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 691 | Proto("void", "CmdCopyBufferToImage", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 692 | [Param("XGL_CMD_BUFFER", "cmdBuffer"), |
Chia-I Wu | 1a28fe0 | 2015-01-01 07:55:04 +0800 | [diff] [blame] | 693 | Param("XGL_BUFFER", "srcBuffer"), |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 694 | Param("XGL_IMAGE", "destImage"), |
Courtney Goeltzenleuchter | b3efe9b | 2015-03-25 11:25:10 -0600 | [diff] [blame] | 695 | Param("XGL_IMAGE_LAYOUT", "destImageLayout"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 696 | Param("uint32_t", "regionCount"), |
Chia-I Wu | 1a28fe0 | 2015-01-01 07:55:04 +0800 | [diff] [blame] | 697 | Param("const XGL_BUFFER_IMAGE_COPY*", "pRegions")]), |
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", "CmdCopyImageToBuffer", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 700 | [Param("XGL_CMD_BUFFER", "cmdBuffer"), |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 701 | Param("XGL_IMAGE", "srcImage"), |
Courtney Goeltzenleuchter | b3efe9b | 2015-03-25 11:25:10 -0600 | [diff] [blame] | 702 | Param("XGL_IMAGE_LAYOUT", "srcImageLayout"), |
Chia-I Wu | 1a28fe0 | 2015-01-01 07:55:04 +0800 | [diff] [blame] | 703 | Param("XGL_BUFFER", "destBuffer"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 704 | Param("uint32_t", "regionCount"), |
Chia-I Wu | 1a28fe0 | 2015-01-01 07:55:04 +0800 | [diff] [blame] | 705 | Param("const XGL_BUFFER_IMAGE_COPY*", "pRegions")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 706 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 707 | Proto("void", "CmdCloneImageData", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 708 | [Param("XGL_CMD_BUFFER", "cmdBuffer"), |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 709 | Param("XGL_IMAGE", "srcImage"), |
Mike Stroyan | fb80d5f | 2014-12-04 11:08:39 +0000 | [diff] [blame] | 710 | Param("XGL_IMAGE_LAYOUT", "srcImageLayout"), |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 711 | Param("XGL_IMAGE", "destImage"), |
Mike Stroyan | fb80d5f | 2014-12-04 11:08:39 +0000 | [diff] [blame] | 712 | Param("XGL_IMAGE_LAYOUT", "destImageLayout")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 713 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 714 | Proto("void", "CmdUpdateBuffer", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 715 | [Param("XGL_CMD_BUFFER", "cmdBuffer"), |
Chia-I Wu | 1a28fe0 | 2015-01-01 07:55:04 +0800 | [diff] [blame] | 716 | Param("XGL_BUFFER", "destBuffer"), |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 717 | Param("XGL_GPU_SIZE", "destOffset"), |
| 718 | Param("XGL_GPU_SIZE", "dataSize"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 719 | Param("const uint32_t*", "pData")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 720 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 721 | Proto("void", "CmdFillBuffer", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 722 | [Param("XGL_CMD_BUFFER", "cmdBuffer"), |
Chia-I Wu | 1a28fe0 | 2015-01-01 07:55:04 +0800 | [diff] [blame] | 723 | Param("XGL_BUFFER", "destBuffer"), |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 724 | Param("XGL_GPU_SIZE", "destOffset"), |
| 725 | Param("XGL_GPU_SIZE", "fillSize"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 726 | Param("uint32_t", "data")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 727 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 728 | Proto("void", "CmdClearColorImage", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 729 | [Param("XGL_CMD_BUFFER", "cmdBuffer"), |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 730 | Param("XGL_IMAGE", "image"), |
Courtney Goeltzenleuchter | b3efe9b | 2015-03-25 11:25:10 -0600 | [diff] [blame] | 731 | Param("XGL_IMAGE_LAYOUT", "imageLayout"), |
Courtney Goeltzenleuchter | d462fba | 2015-04-03 16:35:32 -0600 | [diff] [blame] | 732 | Param("XGL_CLEAR_COLOR", "color"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 733 | Param("uint32_t", "rangeCount"), |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 734 | Param("const XGL_IMAGE_SUBRESOURCE_RANGE*", "pRanges")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 735 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 736 | Proto("void", "CmdClearDepthStencil", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 737 | [Param("XGL_CMD_BUFFER", "cmdBuffer"), |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 738 | Param("XGL_IMAGE", "image"), |
Courtney Goeltzenleuchter | b3efe9b | 2015-03-25 11:25:10 -0600 | [diff] [blame] | 739 | Param("XGL_IMAGE_LAYOUT", "imageLayout"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 740 | Param("float", "depth"), |
| 741 | Param("uint32_t", "stencil"), |
| 742 | Param("uint32_t", "rangeCount"), |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 743 | Param("const XGL_IMAGE_SUBRESOURCE_RANGE*", "pRanges")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 744 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 745 | Proto("void", "CmdResolveImage", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 746 | [Param("XGL_CMD_BUFFER", "cmdBuffer"), |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 747 | Param("XGL_IMAGE", "srcImage"), |
Courtney Goeltzenleuchter | b3efe9b | 2015-03-25 11:25:10 -0600 | [diff] [blame] | 748 | Param("XGL_IMAGE_LAYOUT", "srcImageLayout"), |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 749 | Param("XGL_IMAGE", "destImage"), |
Courtney Goeltzenleuchter | b3efe9b | 2015-03-25 11:25:10 -0600 | [diff] [blame] | 750 | Param("XGL_IMAGE_LAYOUT", "destImageLayout"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 751 | Param("uint32_t", "rectCount"), |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 752 | Param("const XGL_IMAGE_RESOLVE*", "pRects")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 753 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 754 | Proto("void", "CmdSetEvent", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 755 | [Param("XGL_CMD_BUFFER", "cmdBuffer"), |
Mike Stroyan | fb80d5f | 2014-12-04 11:08:39 +0000 | [diff] [blame] | 756 | Param("XGL_EVENT", "event"), |
Courtney Goeltzenleuchter | 1e8f3be | 2015-03-24 18:02:34 -0600 | [diff] [blame] | 757 | Param("XGL_PIPE_EVENT", "pipeEvent")]), |
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", "CmdResetEvent", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 760 | [Param("XGL_CMD_BUFFER", "cmdBuffer"), |
Courtney Goeltzenleuchter | 1e8f3be | 2015-03-24 18:02:34 -0600 | [diff] [blame] | 761 | Param("XGL_EVENT", "event"), |
| 762 | Param("XGL_PIPE_EVENT", "pipeEvent")]), |
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", "CmdWaitEvents", |
Mike Stroyan | fb80d5f | 2014-12-04 11:08:39 +0000 | [diff] [blame] | 765 | [Param("XGL_CMD_BUFFER", "cmdBuffer"), |
| 766 | Param("const XGL_EVENT_WAIT_INFO*", "pWaitInfo")]), |
| 767 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 768 | Proto("void", "CmdPipelineBarrier", |
Mike Stroyan | fb80d5f | 2014-12-04 11:08:39 +0000 | [diff] [blame] | 769 | [Param("XGL_CMD_BUFFER", "cmdBuffer"), |
| 770 | Param("const XGL_PIPELINE_BARRIER*", "pBarrier")]), |
| 771 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 772 | Proto("void", "CmdBeginQuery", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 773 | [Param("XGL_CMD_BUFFER", "cmdBuffer"), |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 774 | Param("XGL_QUERY_POOL", "queryPool"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 775 | Param("uint32_t", "slot"), |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 776 | Param("XGL_FLAGS", "flags")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 777 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 778 | Proto("void", "CmdEndQuery", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 779 | [Param("XGL_CMD_BUFFER", "cmdBuffer"), |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 780 | Param("XGL_QUERY_POOL", "queryPool"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 781 | Param("uint32_t", "slot")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 782 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 783 | Proto("void", "CmdResetQueryPool", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 784 | [Param("XGL_CMD_BUFFER", "cmdBuffer"), |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 785 | Param("XGL_QUERY_POOL", "queryPool"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 786 | Param("uint32_t", "startQuery"), |
| 787 | Param("uint32_t", "queryCount")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 788 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 789 | Proto("void", "CmdWriteTimestamp", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 790 | [Param("XGL_CMD_BUFFER", "cmdBuffer"), |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 791 | Param("XGL_TIMESTAMP_TYPE", "timestampType"), |
Chia-I Wu | 1a28fe0 | 2015-01-01 07:55:04 +0800 | [diff] [blame] | 792 | Param("XGL_BUFFER", "destBuffer"), |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 793 | Param("XGL_GPU_SIZE", "destOffset")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 794 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 795 | Proto("void", "CmdInitAtomicCounters", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 796 | [Param("XGL_CMD_BUFFER", "cmdBuffer"), |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 797 | Param("XGL_PIPELINE_BIND_POINT", "pipelineBindPoint"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 798 | Param("uint32_t", "startCounter"), |
| 799 | Param("uint32_t", "counterCount"), |
| 800 | Param("const uint32_t*", "pData")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 801 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 802 | Proto("void", "CmdLoadAtomicCounters", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 803 | [Param("XGL_CMD_BUFFER", "cmdBuffer"), |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 804 | Param("XGL_PIPELINE_BIND_POINT", "pipelineBindPoint"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 805 | Param("uint32_t", "startCounter"), |
| 806 | Param("uint32_t", "counterCount"), |
Chia-I Wu | 1a28fe0 | 2015-01-01 07:55:04 +0800 | [diff] [blame] | 807 | Param("XGL_BUFFER", "srcBuffer"), |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 808 | Param("XGL_GPU_SIZE", "srcOffset")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 809 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 810 | Proto("void", "CmdSaveAtomicCounters", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 811 | [Param("XGL_CMD_BUFFER", "cmdBuffer"), |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 812 | Param("XGL_PIPELINE_BIND_POINT", "pipelineBindPoint"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 813 | Param("uint32_t", "startCounter"), |
| 814 | Param("uint32_t", "counterCount"), |
Chia-I Wu | 1a28fe0 | 2015-01-01 07:55:04 +0800 | [diff] [blame] | 815 | Param("XGL_BUFFER", "destBuffer"), |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 816 | Param("XGL_GPU_SIZE", "destOffset")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 817 | |
Jeremy Hayes | d65ae08 | 2015-01-14 16:17:08 -0700 | [diff] [blame] | 818 | Proto("XGL_RESULT", "CreateFramebuffer", |
| 819 | [Param("XGL_DEVICE", "device"), |
| 820 | Param("const XGL_FRAMEBUFFER_CREATE_INFO*", "pCreateInfo"), |
| 821 | Param("XGL_FRAMEBUFFER*", "pFramebuffer")]), |
| 822 | |
| 823 | Proto("XGL_RESULT", "CreateRenderPass", |
| 824 | [Param("XGL_DEVICE", "device"), |
| 825 | Param("const XGL_RENDER_PASS_CREATE_INFO*", "pCreateInfo"), |
| 826 | Param("XGL_RENDER_PASS*", "pRenderPass")]), |
| 827 | |
Jon Ashburn | e13f198 | 2015-02-02 09:58:11 -0700 | [diff] [blame] | 828 | Proto("void", "CmdBeginRenderPass", |
| 829 | [Param("XGL_CMD_BUFFER", "cmdBuffer"), |
Courtney Goeltzenleuchter | 69894b7 | 2015-04-03 15:25:24 -0600 | [diff] [blame] | 830 | Param("const XGL_RENDER_PASS_BEGIN*", "pRenderPassBegin")]), |
Jon Ashburn | e13f198 | 2015-02-02 09:58:11 -0700 | [diff] [blame] | 831 | |
| 832 | Proto("void", "CmdEndRenderPass", |
| 833 | [Param("XGL_CMD_BUFFER", "cmdBuffer"), |
| 834 | Param("XGL_RENDER_PASS", "renderPass")]), |
| 835 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 836 | Proto("XGL_RESULT", "DbgSetValidationLevel", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 837 | [Param("XGL_DEVICE", "device"), |
| 838 | Param("XGL_VALIDATION_LEVEL", "validationLevel")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 839 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 840 | Proto("XGL_RESULT", "DbgRegisterMsgCallback", |
Courtney Goeltzenleuchter | c80a557 | 2015-04-13 14:10:06 -0600 | [diff] [blame] | 841 | [Param("XGL_INSTANCE", "instance"), |
| 842 | Param("XGL_DBG_MSG_CALLBACK_FUNCTION", "pfnMsgCallback"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 843 | Param("void*", "pUserData")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 844 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 845 | Proto("XGL_RESULT", "DbgUnregisterMsgCallback", |
Courtney Goeltzenleuchter | c80a557 | 2015-04-13 14:10:06 -0600 | [diff] [blame] | 846 | [Param("XGL_INSTANCE", "instance"), |
| 847 | Param("XGL_DBG_MSG_CALLBACK_FUNCTION", "pfnMsgCallback")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 848 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 849 | Proto("XGL_RESULT", "DbgSetMessageFilter", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 850 | [Param("XGL_DEVICE", "device"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 851 | Param("int32_t", "msgCode"), |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 852 | Param("XGL_DBG_MSG_FILTER", "filter")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 853 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 854 | Proto("XGL_RESULT", "DbgSetObjectTag", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 855 | [Param("XGL_BASE_OBJECT", "object"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 856 | Param("size_t", "tagSize"), |
| 857 | Param("const void*", "pTag")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 858 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 859 | Proto("XGL_RESULT", "DbgSetGlobalOption", |
Courtney Goeltzenleuchter | c80a557 | 2015-04-13 14:10:06 -0600 | [diff] [blame] | 860 | [Param("XGL_INSTANCE", "instance"), |
| 861 | Param("XGL_DBG_GLOBAL_OPTION", "dbgOption"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 862 | Param("size_t", "dataSize"), |
| 863 | Param("const void*", "pData")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 864 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 865 | Proto("XGL_RESULT", "DbgSetDeviceOption", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 866 | [Param("XGL_DEVICE", "device"), |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 867 | Param("XGL_DBG_DEVICE_OPTION", "dbgOption"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 868 | Param("size_t", "dataSize"), |
| 869 | Param("const void*", "pData")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 870 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 871 | Proto("void", "CmdDbgMarkerBegin", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 872 | [Param("XGL_CMD_BUFFER", "cmdBuffer"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 873 | Param("const char*", "pMarker")]), |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 874 | |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 875 | Proto("void", "CmdDbgMarkerEnd", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 876 | [Param("XGL_CMD_BUFFER", "cmdBuffer")]), |
| 877 | ], |
Chia-I Wu | fb2559d | 2014-08-01 11:19:52 +0800 | [diff] [blame] | 878 | ) |
| 879 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 880 | wsi_x11 = Extension( |
| 881 | name="XGL_WSI_X11", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 882 | headers=["xglWsiX11Ext.h"], |
Chia-I Wu | e86d8ab | 2015-01-04 14:46:22 +0800 | [diff] [blame] | 883 | objects=[], |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 884 | protos=[ |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 885 | Proto("XGL_RESULT", "WsiX11AssociateConnection", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 886 | [Param("XGL_PHYSICAL_GPU", "gpu"), |
| 887 | Param("const XGL_WSI_X11_CONNECTION_INFO*", "pConnectionInfo")]), |
Chia-I Wu | 6bdf019 | 2014-09-13 13:36:06 +0800 | [diff] [blame] | 888 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 889 | Proto("XGL_RESULT", "WsiX11GetMSC", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 890 | [Param("XGL_DEVICE", "device"), |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 891 | Param("xcb_window_t", "window"), |
| 892 | Param("xcb_randr_crtc_t", "crtc"), |
Mark Lobodzinski | 17caf57 | 2015-01-29 08:55:56 -0600 | [diff] [blame] | 893 | Param("uint64_t*", "pMsc")]), |
Chia-I Wu | 6dee8b8 | 2014-09-23 10:37:23 +0800 | [diff] [blame] | 894 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 895 | Proto("XGL_RESULT", "WsiX11CreatePresentableImage", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 896 | [Param("XGL_DEVICE", "device"), |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 897 | Param("const XGL_WSI_X11_PRESENTABLE_IMAGE_CREATE_INFO*", "pCreateInfo"), |
| 898 | Param("XGL_IMAGE*", "pImage"), |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 899 | Param("XGL_GPU_MEMORY*", "pMem")]), |
Chia-I Wu | 6dee8b8 | 2014-09-23 10:37:23 +0800 | [diff] [blame] | 900 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 901 | Proto("XGL_RESULT", "WsiX11QueuePresent", |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 902 | [Param("XGL_QUEUE", "queue"), |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 903 | Param("const XGL_WSI_X11_PRESENT_INFO*", "pPresentInfo"), |
Chia-I Wu | e442dc3 | 2015-01-01 09:31:15 +0800 | [diff] [blame] | 904 | Param("XGL_FENCE", "fence")]), |
| 905 | ], |
Chia-I Wu | 6dee8b8 | 2014-09-23 10:37:23 +0800 | [diff] [blame] | 906 | ) |
| 907 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 908 | extensions = [core, wsi_x11] |
| 909 | |
Tobin Ehlis | 7e65d75 | 2015-01-15 17:51:52 -0700 | [diff] [blame] | 910 | object_root_list = [ |
| 911 | "XGL_INSTANCE", |
| 912 | "XGL_PHYSICAL_GPU", |
| 913 | "XGL_BASE_OBJECT" |
| 914 | ] |
| 915 | |
| 916 | object_base_list = [ |
| 917 | "XGL_DEVICE", |
| 918 | "XGL_QUEUE", |
| 919 | "XGL_GPU_MEMORY", |
| 920 | "XGL_OBJECT" |
| 921 | ] |
| 922 | |
| 923 | object_list = [ |
| 924 | "XGL_BUFFER", |
| 925 | "XGL_BUFFER_VIEW", |
| 926 | "XGL_IMAGE", |
| 927 | "XGL_IMAGE_VIEW", |
| 928 | "XGL_COLOR_ATTACHMENT_VIEW", |
| 929 | "XGL_DEPTH_STENCIL_VIEW", |
| 930 | "XGL_SHADER", |
| 931 | "XGL_PIPELINE", |
Tobin Ehlis | 7e65d75 | 2015-01-15 17:51:52 -0700 | [diff] [blame] | 932 | "XGL_SAMPLER", |
| 933 | "XGL_DESCRIPTOR_SET", |
| 934 | "XGL_DESCRIPTOR_SET_LAYOUT", |
| 935 | "XGL_DESCRIPTOR_REGION", |
| 936 | "XGL_DYNAMIC_STATE_OBJECT", |
| 937 | "XGL_CMD_BUFFER", |
| 938 | "XGL_FENCE", |
| 939 | "XGL_QUEUE_SEMAPHORE", |
| 940 | "XGL_EVENT", |
| 941 | "XGL_QUERY_POOL", |
| 942 | "XGL_FRAMEBUFFER", |
| 943 | "XGL_RENDER_PASS" |
| 944 | ] |
| 945 | |
| 946 | object_dynamic_state_list = [ |
| 947 | "XGL_DYNAMIC_VP_STATE_OBJECT", |
| 948 | "XGL_DYNAMIC_RS_STATE_OBJECT", |
| 949 | "XGL_DYNAMIC_CB_STATE_OBJECT", |
| 950 | "XGL_DYNAMIC_DS_STATE_OBJECT" |
| 951 | ] |
| 952 | |
| 953 | object_type_list = object_root_list + object_base_list + object_list + object_dynamic_state_list |
| 954 | |
| 955 | object_parent_list = ["XGL_BASE_OBJECT", "XGL_OBJECT", "XGL_DYNAMIC_STATE_OBJECT"] |
| 956 | |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 957 | headers = [] |
Chia-I Wu | e86d8ab | 2015-01-04 14:46:22 +0800 | [diff] [blame] | 958 | objects = [] |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 959 | protos = [] |
| 960 | for ext in extensions: |
| 961 | headers.extend(ext.headers) |
Chia-I Wu | e86d8ab | 2015-01-04 14:46:22 +0800 | [diff] [blame] | 962 | objects.extend(ext.objects) |
Chia-I Wu | c4f24e8 | 2015-01-01 08:46:31 +0800 | [diff] [blame] | 963 | protos.extend(ext.protos) |
Chia-I Wu | 6dee8b8 | 2014-09-23 10:37:23 +0800 | [diff] [blame] | 964 | |
Chia-I Wu | 9a4ceb1 | 2015-01-01 14:45:58 +0800 | [diff] [blame] | 965 | proto_names = [proto.name for proto in protos] |
Chia-I Wu | 900a257 | 2014-08-01 14:44:16 +0800 | [diff] [blame] | 966 | |
Chia-I Wu | 509a412 | 2015-01-04 14:08:46 +0800 | [diff] [blame] | 967 | def parse_xgl_h(filename): |
| 968 | # read object and protoype typedefs |
| 969 | object_lines = [] |
| 970 | proto_lines = [] |
| 971 | with open(filename, "r") as fp: |
| 972 | for line in fp: |
| 973 | line = line.strip() |
| 974 | if line.startswith("XGL_DEFINE"): |
| 975 | begin = line.find("(") + 1 |
| 976 | end = line.find(",") |
| 977 | # extract the object type |
| 978 | object_lines.append(line[begin:end]) |
| 979 | if line.startswith("typedef") and line.endswith(");"): |
| 980 | # drop leading "typedef " and trailing ");" |
| 981 | proto_lines.append(line[8:-2]) |
| 982 | |
| 983 | # parse proto_lines to protos |
| 984 | protos = [] |
| 985 | for line in proto_lines: |
Chia-I Wu | cde29f1 | 2015-01-13 11:03:58 +0800 | [diff] [blame] | 986 | first, rest = line.split(" (XGLAPI *xgl") |
Chia-I Wu | 509a412 | 2015-01-04 14:08:46 +0800 | [diff] [blame] | 987 | second, third = rest.split("Type)(") |
| 988 | |
| 989 | # get the return type, no space before "*" |
| 990 | proto_ret = "*".join([t.rstrip() for t in first.split("*")]) |
| 991 | |
| 992 | # get the name |
| 993 | proto_name = second.strip() |
| 994 | |
| 995 | # get the list of params |
| 996 | param_strs = third.split(", ") |
| 997 | params = [] |
| 998 | for s in param_strs: |
| 999 | ty, name = s.rsplit(" ", 1) |
| 1000 | |
| 1001 | # no space before "*" |
| 1002 | ty = "*".join([t.rstrip() for t in ty.split("*")]) |
| 1003 | # attach [] to ty |
| 1004 | idx = name.rfind("[") |
| 1005 | if idx >= 0: |
| 1006 | ty += name[idx:] |
| 1007 | name = name[:idx] |
| 1008 | |
| 1009 | params.append(Param(ty, name)) |
| 1010 | |
| 1011 | protos.append(Proto(proto_ret, proto_name, params)) |
| 1012 | |
| 1013 | # make them an extension and print |
| 1014 | ext = Extension("XGL_CORE", |
| 1015 | headers=["xgl.h", "xglDbg.h"], |
| 1016 | objects=object_lines, |
| 1017 | protos=protos) |
| 1018 | print("core =", str(ext)) |
| 1019 | |
| 1020 | print("") |
| 1021 | print("typedef struct _XGL_LAYER_DISPATCH_TABLE") |
| 1022 | print("{") |
| 1023 | for proto in ext.protos: |
Chia-I Wu | 99a7f5d | 2015-01-16 04:55:47 +0800 | [diff] [blame] | 1024 | print(" xgl%sType %s;" % (proto.name, proto.name)) |
Chia-I Wu | 509a412 | 2015-01-04 14:08:46 +0800 | [diff] [blame] | 1025 | print("} XGL_LAYER_DISPATCH_TABLE;") |
| 1026 | |
| 1027 | if __name__ == "__main__": |
| 1028 | parse_xgl_h("include/xgl.h") |