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