blob: 2b2685f88e8b0305db4aa1f8f56b2242e6d7631b [file] [log] [blame]
Austin Eng376f1c62017-05-30 20:03:44 -04001{
2 "_comment": [
Corentin Wallez4a9ef4e2018-07-18 11:40:26 +02003 "Copyright 2017 The Dawn Authors",
Austin Eng376f1c62017-05-30 20:03:44 -04004 "",
5 "Licensed under the Apache License, Version 2.0 (the \"License\");",
6 "you may not use this file except in compliance with the License.",
7 "You may obtain a copy of the License at",
8 "",
9 " http://www.apache.org/licenses/LICENSE-2.0",
10 "",
11 "Unless required by applicable law or agreed to in writing, software",
12 "distributed under the License is distributed on an \"AS IS\" BASIS,",
13 "WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.",
14 "See the License for the specific language governing permissions and",
15 "limitations under the License."
16 ],
Corentin Wallez6d0438c2021-03-24 20:29:42 +000017
Ben Clayton26c31f62022-01-27 18:33:47 +000018 "_doc": "See docs/dawn/codegen.md",
Corentin Wallez6d0438c2021-03-24 20:29:42 +000019
fujunwei76bda372021-11-23 08:47:35 +000020 "_metadata": {
21 "api": "WebGPU",
22 "c_prefix": "WGPU",
Shrek Shao2bf99902021-12-02 21:25:58 +000023 "namespace": "wgpu",
fujunwei3a464762021-12-05 05:29:44 +000024 "proc_table_prefix": "Dawn",
fujunweia2241d42021-12-16 04:54:38 +000025 "native_namespace": "dawn native",
Shrek Shao2bf99902021-12-02 21:25:58 +000026 "copyright_year": "2019"
fujunwei76bda372021-11-23 08:47:35 +000027 },
28
fujunwei23f71622021-12-02 07:41:21 +000029 "create instance": {
30 "category": "function",
31 "returns": "instance",
32 "args": [
fujunweic7d4f2c2021-12-07 00:46:35 +000033 {"name": "descriptor", "type": "instance descriptor", "annotation": "const*", "optional": true}
fujunwei23f71622021-12-02 07:41:21 +000034 ]
35 },
36 "proc": {
37 "category": "function pointer",
38 "returns": "void",
39 "args": []
40 },
41 "get proc address": {
42 "category": "function",
43 "returns": "proc",
44 "args": [
45 {"name": "device", "type": "device"},
46 {"name": "proc name", "type": "char", "annotation": "const*"}
47 ]
48 },
49
Kai Ninomiya4e37acc2021-09-17 21:13:33 +000050 "request adapter options": {
51 "category": "structure",
Austin Eng1a965ab2021-09-20 18:19:55 +000052 "extensible": "in",
Kai Ninomiya4e37acc2021-09-17 21:13:33 +000053 "members": [
Austin Eng5397f9f2021-12-14 23:22:46 +000054 {"name": "compatible surface", "type": "surface", "optional": true},
55 {"name": "power preference", "type": "power preference", "default": "undefined"},
Austin Eng493de1e2023-06-20 22:58:27 +000056 {"name": "backend type", "type": "backend type", "default": "undefined"},
Stephen Whiteb9e12712023-05-06 01:26:25 +000057 {"name": "force fallback adapter", "type": "bool", "default": "false"},
Corentin Wallez047bca42023-05-19 19:17:22 +000058 {"name": "compatibility mode", "type": "bool", "default": "false", "tags": ["dawn", "emscripten"]}
Kai Ninomiya4e37acc2021-09-17 21:13:33 +000059 ]
60 },
61 "request adapter status": {
62 "category": "enum",
Kai Ninomiya4e37acc2021-09-17 21:13:33 +000063 "emscripten_no_enum_table": true,
64 "values": [
65 {"value": 0, "name": "success"},
66 {"value": 1, "name": "unavailable"},
67 {"value": 2, "name": "error"},
68 {"value": 3, "name": "unknown"}
69 ]
70 },
71 "request adapter callback": {
fujunwei23f71622021-12-02 07:41:21 +000072 "category": "function pointer",
Kai Ninomiya4e37acc2021-09-17 21:13:33 +000073 "args": [
74 {"name": "status", "type": "request adapter status"},
Henry Betts5ad86f32023-07-11 09:48:38 +000075 {"name": "adapter", "type": "adapter", "optional": true},
Austin Eng5397f9f2021-12-14 23:22:46 +000076 {"name": "message", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
Loko Kung670e0bb2023-06-10 06:51:37 +000077 {"name": "userdata", "type": "void *"}
Kai Ninomiya4e37acc2021-09-17 21:13:33 +000078 ]
79 },
80 "adapter": {
81 "category": "object",
Le Hoang Quyen7971bfe2023-04-05 19:35:07 +000082 "no autolock": true,
Kai Ninomiya4e37acc2021-09-17 21:13:33 +000083 "methods": [
84 {
Le Hoang Quyen99b80812023-03-24 15:50:50 +000085 "name": "get instance",
86 "tags": ["dawn"],
87 "returns": "instance"
88 },
89 {
Kai Ninomiya7d174a12021-09-21 17:36:27 +000090 "name": "get limits",
91 "returns": "bool",
Kai Ninomiya7d174a12021-09-21 17:36:27 +000092 "args": [
93 {"name": "limits", "type": "supported limits", "annotation": "*"}
94 ]
95 },
96 {
Kai Ninomiya4e37acc2021-09-17 21:13:33 +000097 "name": "get properties",
Kai Ninomiya4e37acc2021-09-17 21:13:33 +000098 "args": [
99 {"name": "properties", "type": "adapter properties", "annotation": "*"}
100 ]
101 },
102 {
Kai Ninomiya7d174a12021-09-21 17:36:27 +0000103 "name": "has feature",
104 "returns": "bool",
Kai Ninomiya7d174a12021-09-21 17:36:27 +0000105 "args": [
106 {"name": "feature", "type": "feature name"}
107 ]
108 },
109 {
Austin Eng89ddadc2021-12-15 00:12:30 +0000110 "name": "enumerate features",
Austin Eng3ac7b9c2022-01-06 22:11:28 +0000111 "returns": "size_t",
Austin Eng89ddadc2021-12-15 00:12:30 +0000112 "args": [
113 {"name": "features", "type": "feature name", "annotation": "*"}
114 ]
115 },
116 {
Kai Ninomiya4e37acc2021-09-17 21:13:33 +0000117 "name": "request device",
118 "args": [
Corentin Wallez1260a532022-07-26 17:36:44 +0000119 {"name": "descriptor", "type": "device descriptor", "annotation": "const*", "optional": true, "no_default": true},
Corentin Walleze00c6bd2021-12-13 17:37:17 +0000120 {"name": "callback", "type": "request device callback"},
Loko Kung670e0bb2023-06-10 06:51:37 +0000121 {"name": "userdata", "type": "void *"}
Kai Ninomiya4e37acc2021-09-17 21:13:33 +0000122 ]
Austin Eng2f218e22021-12-22 19:02:23 +0000123 },
124 {
125 "name": "create device",
126 "tags": ["dawn"],
127 "returns": "device",
128 "args": [
Corentin Wallez1260a532022-07-26 17:36:44 +0000129 {"name": "descriptor", "type": "device descriptor", "annotation": "const*", "optional": true}
Austin Eng2f218e22021-12-22 19:02:23 +0000130 ]
Kai Ninomiya4e37acc2021-09-17 21:13:33 +0000131 }
132 ]
133 },
Corentin Wallezf12c9db2020-01-10 13:28:18 +0000134 "adapter properties": {
135 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +0000136 "extensible": "out",
Corentin Wallezf12c9db2020-01-10 13:28:18 +0000137 "members": [
Corentin Wallezf12c9db2020-01-10 13:28:18 +0000138 {"name": "vendor ID", "type": "uint32_t"},
Austin Eng643625a2023-08-09 00:59:33 +0000139 {"name": "vendor name", "type": "char", "annotation": "const*", "length": "strlen", "default": "nullptr"},
140 {"name": "architecture", "type": "char", "annotation": "const*", "length": "strlen", "default": "nullptr"},
Kai Ninomiya930e9182021-09-17 19:44:43 +0000141 {"name": "device ID", "type": "uint32_t"},
Austin Eng643625a2023-08-09 00:59:33 +0000142 {"name": "name", "type": "char", "annotation": "const*", "length": "strlen", "default": "nullptr"},
143 {"name": "driver description", "type": "char", "annotation": "const*", "length": "strlen", "default": "nullptr"},
Corentin Wallezf12c9db2020-01-10 13:28:18 +0000144 {"name": "adapter type", "type": "adapter type"},
Stephen Whiteb9e12712023-05-06 01:26:25 +0000145 {"name": "backend type", "type": "backend type"},
Corentin Wallez047bca42023-05-19 19:17:22 +0000146 {"name": "compatibility mode", "type": "bool", "default": "false", "tags": ["dawn", "emscripten"]}
Corentin Wallezf12c9db2020-01-10 13:28:18 +0000147 ]
148 },
149 "adapter type": {
150 "category": "enum",
Kai Ninomiya930e9182021-09-17 19:44:43 +0000151 "emscripten_no_enum_table": true,
Corentin Wallezf12c9db2020-01-10 13:28:18 +0000152 "values": [
153 {"value": 0, "name": "discrete GPU"},
154 {"value": 1, "name": "integrated GPU"},
155 {"value": 2, "name": "CPU"},
Corentin Walleza0afd312020-04-01 12:07:43 +0000156 {"value": 3, "name": "unknown"}
Corentin Wallezf12c9db2020-01-10 13:28:18 +0000157 ]
158 },
Kai Ninomiya4e37acc2021-09-17 21:13:33 +0000159 "device descriptor": {
160 "category": "structure",
Austin Eng1a965ab2021-09-20 18:19:55 +0000161 "extensible": "in",
Kai Ninomiya7d174a12021-09-21 17:36:27 +0000162 "members": [
Corentin Wallez6cd1cd92021-11-17 08:13:24 +0000163 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
Loko Kung44fc9da2023-08-16 06:11:11 +0000164 {"name": "required feature count", "type": "size_t", "default": 0},
165 {"name": "required features", "type": "feature name", "annotation": "const*", "length": "required feature count", "default": "nullptr"},
Corentin Wallezeee34492022-03-16 18:44:16 +0000166 {"name": "required limits", "type": "required limits", "annotation": "const*", "optional": true},
Brandon Jones112b7fd2023-05-17 01:52:30 +0000167 {"name": "default queue", "type": "queue descriptor"},
168 {"name": "device lost callback", "type": "device lost callback", "default": "nullptr"},
169 {"name": "device lost userdata", "type": "void *", "default": "nullptr"}
Kai Ninomiya7d174a12021-09-21 17:36:27 +0000170 ]
Kai Ninomiya4e37acc2021-09-17 21:13:33 +0000171 },
Zhaoming Jianga12ff9a2023-01-30 09:16:51 +0000172 "dawn toggles descriptor": {
173 "tags": ["dawn", "native"],
174 "category": "structure",
175 "chained": "in",
Zhaoming Jiangc7355b72023-06-21 06:10:31 +0000176 "chain roots": ["instance descriptor", "request adapter options", "device descriptor"],
Zhaoming Jianga12ff9a2023-01-30 09:16:51 +0000177 "members": [
Loko Kung44fc9da2023-08-16 06:11:11 +0000178 {"name": "enabled toggle count", "type": "size_t", "default": 0},
179 {"name": "enabled toggles", "type": "char", "annotation": "const*const*", "length": "enabled toggle count"},
180 {"name": "disabled toggle count", "type": "size_t", "default": 0},
181 {"name": "disabled toggles", "type": "char", "annotation": "const*const*", "length": "disabled toggle count"}
Zhaoming Jianga12ff9a2023-01-30 09:16:51 +0000182 ]
183 },
Loko Kung44f039d2022-03-01 22:59:40 +0000184 "dawn cache device descriptor" : {
185 "tags": ["dawn", "native"],
186 "category": "structure",
187 "chained": "in",
Corentin Walleza45561b2022-07-14 12:58:25 +0000188 "chain roots": ["device descriptor"],
Loko Kung44f039d2022-03-01 22:59:40 +0000189 "members": [
190 {"name": "isolation key", "type": "char", "annotation": "const*", "length": "strlen", "default": "\"\""}
191 ]
192 },
Corentin Walleza60799f2018-09-11 18:16:54 +0000193 "address mode": {
194 "category": "enum",
195 "values": [
Yan, Shaobo93158eb2019-01-04 04:56:08 +0000196 {"value": 0, "name": "repeat"},
Corentin Walleza0491c92019-07-08 09:36:31 +0000197 {"value": 1, "name": "mirror repeat"},
Austin Eng5f1d2e12019-04-09 15:12:50 +0000198 {"value": 2, "name": "clamp to edge"}
Corentin Walleza60799f2018-09-11 18:16:54 +0000199 ]
Austin Eng10634392017-06-01 11:30:03 -0400200 },
Corentin Wallezf12c9db2020-01-10 13:28:18 +0000201 "backend type": {
202 "category": "enum",
Kai Ninomiya930e9182021-09-17 19:44:43 +0000203 "emscripten_no_enum_table": true,
Corentin Wallezf12c9db2020-01-10 13:28:18 +0000204 "values": [
Austin Eng493de1e2023-06-20 22:58:27 +0000205 {"value": 0, "name": "undefined", "jsrepr": "undefined", "valid": false},
206 {"value": 1, "name": "null"},
207 {"value": 2, "name": "WebGPU"},
208 {"value": 3, "name": "D3D11"},
209 {"value": 4, "name": "D3D12"},
210 {"value": 5, "name": "metal"},
211 {"value": 6, "name": "vulkan"},
212 {"value": 7, "name": "openGL"},
213 {"value": 8, "name": "openGLES"}
Corentin Wallezf12c9db2020-01-10 13:28:18 +0000214 ]
215 },
Austin Eng376f1c62017-05-30 20:03:44 -0400216 "bind group": {
Brandon Jones88aeeae2021-11-19 18:26:08 +0000217 "category": "object",
218 "methods": [
219 {
220 "name": "set label",
221 "returns": "void",
Brandon Jones88aeeae2021-11-19 18:26:08 +0000222 "args": [
223 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"}
224 ]
225 }
226 ]
Austin Eng376f1c62017-05-30 20:03:44 -0400227 },
Corentin Wallezc3c66942020-04-07 07:11:12 +0000228 "bind group entry": {
Corentin Wallez6f9d21e2018-12-05 07:18:30 +0000229 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +0000230 "extensible": "in",
Corentin Wallez6f9d21e2018-12-05 07:18:30 +0000231 "members": [
232 {"name": "binding", "type": "uint32_t"},
Corentin Wallez6f0e1f92018-12-07 12:31:53 +0000233 {"name": "buffer", "type": "buffer", "optional": true},
Corentin Wallez8f938712019-07-08 19:20:22 +0000234 {"name": "offset", "type": "uint64_t", "default": "0"},
Zhaoming Jiangf304f252022-09-28 12:49:27 +0000235 {"name": "size", "type": "uint64_t", "default": "WGPU_WHOLE_SIZE"},
Corentin Wallez6f9d21e2018-12-05 07:18:30 +0000236 {"name": "sampler", "type": "sampler", "optional": true},
237 {"name": "texture view", "type": "texture view", "optional": true}
238 ]
239 },
240 "bind group descriptor": {
241 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +0000242 "extensible": "in",
Corentin Wallez6f9d21e2018-12-05 07:18:30 +0000243 "members": [
François Beaufort277d2e12019-10-03 14:56:49 +0000244 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
Corentin Wallez6f9d21e2018-12-05 07:18:30 +0000245 {"name": "layout", "type": "bind group layout"},
Loko Kung837f1512023-06-06 03:01:15 +0000246 {"name": "entry count", "type": "size_t"},
Corentin Wallez3966eb12020-04-21 07:36:30 +0000247 {"name": "entries", "type": "bind group entry", "annotation": "const*", "length": "entry count"}
Austin Eng376f1c62017-05-30 20:03:44 -0400248 ]
249 },
Austin Eng376f1c62017-05-30 20:03:44 -0400250 "bind group layout": {
Brandon Jones88aeeae2021-11-19 18:26:08 +0000251 "category": "object",
252 "methods": [
253 {
254 "name": "set label",
255 "returns": "void",
Brandon Jones88aeeae2021-11-19 18:26:08 +0000256 "args": [
257 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"}
258 ]
259 }
260 ]
Austin Eng376f1c62017-05-30 20:03:44 -0400261 },
Brandon Jones9c52c2992020-12-12 02:09:56 +0000262
263 "buffer binding type": {
264 "category": "enum",
265 "values": [
266 {"value": 0, "name": "undefined", "jsrepr": "undefined", "valid": false},
267 {"value": 1, "name": "uniform"},
268 {"value": 2, "name": "storage"},
Kai Ninomiya4e37acc2021-09-17 21:13:33 +0000269 {"value": 3, "name": "read only storage"}
Brandon Jones9c52c2992020-12-12 02:09:56 +0000270 ]
271 },
272 "buffer binding layout": {
273 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +0000274 "extensible": "in",
Brandon Jones9c52c2992020-12-12 02:09:56 +0000275 "members": [
276 {"name": "type", "type": "buffer binding type", "default": "undefined"},
277 {"name": "has dynamic offset", "type": "bool", "default": "false"},
278 {"name": "min binding size", "type": "uint64_t", "default": "0"}
279 ]
280 },
281
282 "sampler binding type": {
283 "category": "enum",
284 "values": [
285 {"value": 0, "name": "undefined", "jsrepr": "undefined", "valid": false},
286 {"value": 1, "name": "filtering"},
287 {"value": 2, "name": "non filtering"},
288 {"value": 3, "name": "comparison"}
289 ]
290 },
291 "sampler binding layout": {
292 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +0000293 "extensible": "in",
Brandon Jones9c52c2992020-12-12 02:09:56 +0000294 "members": [
295 {"name": "type", "type": "sampler binding type", "default": "undefined"}
296 ]
297 },
298
299 "texture sample type": {
300 "category": "enum",
301 "values": [
302 {"value": 0, "name": "undefined", "jsrepr": "undefined", "valid": false},
303 {"value": 1, "name": "float"},
304 {"value": 2, "name": "unfilterable float"},
305 {"value": 3, "name": "depth"},
306 {"value": 4, "name": "sint"},
307 {"value": 5, "name": "uint"}
308 ]
309 },
310 "texture binding layout": {
311 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +0000312 "extensible": "in",
Brandon Jones9c52c2992020-12-12 02:09:56 +0000313 "members": [
314 {"name": "sample type", "type": "texture sample type", "default": "undefined"},
315 {"name": "view dimension", "type": "texture view dimension", "default": "undefined"},
316 {"name": "multisampled", "type": "bool", "default": "false"}
317 ]
318 },
dan sinclair3ebe5b62023-08-21 22:57:06 +0000319 "surface capabilities": {
320 "category": "structure",
321 "tags": ["upstream"],
322 "extensible": "out",
323 "members": [
324 {"name": "format count", "type": "size_t"},
325 {"name": "formats", "type": "texture format", "annotation": "*"},
326 {"name": "present mode count", "type": "size_t"},
327 {"name": "present modes", "type": "present mode", "annotation": "*"},
328 {"name": "alpha mode count", "type": "size_t"},
329 {"name": "alpha modes", "type": "composite alpha mode", "annotation": "*"}
330 ],
331 "methods": [
332 {
333 "name": "free members",
334 "returns": "void",
335 "args": []
336 }
337 ]
338 },
339 "surface configuration": {
340 "category": "structure",
341 "tags": ["upstream"],
342 "extensible": "in",
343 "members": [
344 {"name": "device", "type": "device"},
345 {"name": "format", "type": "texture format"},
346 {"name": "usage", "type": "texture usage"},
347 {"name": "view format count", "type": "size_t"},
348 {"name": "view formats", "type": "texture format", "annotation": "const*"},
349 {"name": "alpha mode", "type": "composite alpha mode"},
350 {"name": "width", "type": "uint32_t"},
351 {"name": "height", "type": "uint32_t"},
352 {"name": "present mode", "type": "present mode"}
353 ]
354 },
Brandon Jones39633e22021-06-01 19:45:53 +0000355 "external texture binding entry": {
356 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +0000357 "chained": "in",
Corentin Walleza45561b2022-07-14 12:58:25 +0000358 "chain roots": ["bind group entry"],
Kai Ninomiya930e9182021-09-17 19:44:43 +0000359 "tags": ["dawn"],
Brandon Jones39633e22021-06-01 19:45:53 +0000360 "members": [
361 {"name": "external texture", "type": "external texture"}
362 ]
363 },
364
365 "external texture binding layout": {
366 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +0000367 "chained": "in",
Corentin Walleza45561b2022-07-14 12:58:25 +0000368 "chain roots": ["bind group layout entry"],
Kai Ninomiya930e9182021-09-17 19:44:43 +0000369 "tags": ["dawn"],
Brandon Jones39633e22021-06-01 19:45:53 +0000370 "members": []
371 },
372
Brandon Jones9c52c2992020-12-12 02:09:56 +0000373 "storage texture access": {
374 "category": "enum",
375 "values": [
376 {"value": 0, "name": "undefined", "jsrepr": "undefined", "valid": false},
Jiawei Shaobdabd112023-08-15 08:17:58 +0000377 {"value": 1, "name": "write only"},
dan sinclair3ebe5b62023-08-21 22:57:06 +0000378 {"value": 2, "name": "read only", "tags": ["dawn"]},
379 {"value": 3, "name": "read write", "tags": ["dawn"]}
Brandon Jones9c52c2992020-12-12 02:09:56 +0000380 ]
381 },
382 "storage texture binding layout": {
383 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +0000384 "extensible": "in",
Brandon Jones9c52c2992020-12-12 02:09:56 +0000385 "members": [
386 {"name": "access", "type": "storage texture access", "default": "undefined"},
387 {"name": "format", "type": "texture format", "default": "undefined"},
388 {"name": "view dimension", "type": "texture view dimension", "default": "undefined"}
389 ]
390 },
391
Corentin Wallezc3c66942020-04-07 07:11:12 +0000392 "bind group layout entry": {
Kai Ninomiya234becf2018-07-10 12:23:50 -0700393 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +0000394 "extensible": "in",
Kai Ninomiya234becf2018-07-10 12:23:50 -0700395 "members": [
396 {"name": "binding", "type": "uint32_t"},
Corentin Wallezb9b088f2019-08-27 08:42:29 +0000397 {"name": "visibility", "type": "shader stage"},
Brandon Jones9c52c2992020-12-12 02:09:56 +0000398 {"name": "buffer", "type": "buffer binding layout"},
399 {"name": "sampler", "type": "sampler binding layout"},
400 {"name": "texture", "type": "texture binding layout"},
401 {"name": "storage texture", "type": "storage texture binding layout"}
Kai Ninomiya234becf2018-07-10 12:23:50 -0700402 ]
403 },
404 "bind group layout descriptor": {
405 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +0000406 "extensible": "in",
Kai Ninomiya234becf2018-07-10 12:23:50 -0700407 "members": [
François Beaufort277d2e12019-10-03 14:56:49 +0000408 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
Loko Kung837f1512023-06-06 03:01:15 +0000409 {"name": "entry count", "type": "size_t"},
Corentin Wallez3966eb12020-04-21 07:36:30 +0000410 {"name": "entries", "type": "bind group layout entry", "annotation": "const*", "length": "entry count"}
Austin Eng376f1c62017-05-30 20:03:44 -0400411 ]
412 },
Brandon Jones0702b702021-03-11 21:19:00 +0000413 "blend component": {
Yunchao Hec35103d2018-10-29 09:06:55 +0000414 "category": "structure",
415 "extensible": false,
416 "members": [
Corentin Wallez8f938712019-07-08 19:20:22 +0000417 {"name": "operation", "type": "blend operation", "default": "add"},
418 {"name": "src factor", "type": "blend factor", "default": "one"},
419 {"name": "dst factor", "type": "blend factor", "default": "zero"}
Yunchao Hec35103d2018-10-29 09:06:55 +0000420 ]
421 },
Austin Eng94bebe52017-07-26 16:59:53 -0400422 "blend factor": {
423 "category": "enum",
424 "values": [
425 {"value": 0, "name": "zero"},
426 {"value": 1, "name": "one"},
Brandon Jones22b923c2021-04-15 18:34:29 +0000427 {"value": 2, "name": "src"},
428 {"value": 3, "name": "one minus src"},
Austin Eng94bebe52017-07-26 16:59:53 -0400429 {"value": 4, "name": "src alpha"},
430 {"value": 5, "name": "one minus src alpha"},
Brandon Jones22b923c2021-04-15 18:34:29 +0000431 {"value": 6, "name": "dst"},
432 {"value": 7, "name": "one minus dst"},
Austin Eng94bebe52017-07-26 16:59:53 -0400433 {"value": 8, "name": "dst alpha"},
434 {"value": 9, "name": "one minus dst alpha"},
435 {"value": 10, "name": "src alpha saturated"},
Brandon Jones22b923c2021-04-15 18:34:29 +0000436 {"value": 11, "name": "constant"},
Brandon Jones48c7b2b2023-07-25 21:17:28 +0000437 {"value": 12, "name": "one minus constant"},
dan sinclair3ebe5b62023-08-21 22:57:06 +0000438 {"value": 13, "name": "src1", "tags": ["dawn"]},
439 {"value": 14, "name": "one minus src1", "tags": ["dawn"]},
440 {"value": 15, "name": "src1 alpha", "tags": ["dawn"]},
441 {"value": 16, "name": "one minus src1 alpha", "tags": ["dawn"]}
Austin Eng94bebe52017-07-26 16:59:53 -0400442 ]
443 },
444 "blend operation": {
445 "category": "enum",
446 "values": [
447 {"value": 0, "name": "add"},
448 {"value": 1, "name": "subtract"},
449 {"value": 2, "name": "reverse subtract"},
450 {"value": 3, "name": "min"},
451 {"value": 4, "name": "max"}
452 ]
453 },
Corentin Walleza60799f2018-09-11 18:16:54 +0000454 "bool": {
455 "category": "native"
456 },
Austin Eng376f1c62017-05-30 20:03:44 -0400457 "buffer": {
458 "category": "object",
459 "methods": [
460 {
Corentin Wallez0d52f802020-07-14 12:30:14 +0000461 "name": "map async",
462 "args": [
Corentin Wallez3ed44f52020-07-20 16:24:20 +0000463 {"name": "mode", "type": "map mode"},
Corentin Wallez0d52f802020-07-14 12:30:14 +0000464 {"name": "offset", "type": "size_t"},
465 {"name": "size", "type": "size_t"},
Corentin Walleze00c6bd2021-12-13 17:37:17 +0000466 {"name": "callback", "type": "buffer map callback"},
Loko Kung670e0bb2023-06-10 06:51:37 +0000467 {"name": "userdata", "type": "void *"}
Corentin Wallez0d52f802020-07-14 12:30:14 +0000468 ]
469 },
470 {
Corentin Wallez1325ab12020-06-30 11:51:14 +0000471 "name": "get mapped range",
Corentin Wallezf6e70442020-07-17 18:50:37 +0000472 "returns": "void *",
473 "args": [
474 {"name": "offset", "type": "size_t", "default": 0},
Shrek Shao286061d2022-04-29 18:12:17 +0000475 {"name": "size", "type": "size_t", "default": "WGPU_WHOLE_MAP_SIZE"}
Corentin Wallezf6e70442020-07-17 18:50:37 +0000476 ]
Corentin Wallez1325ab12020-06-30 11:51:14 +0000477 },
478 {
479 "name": "get const mapped range",
Corentin Wallezf6e70442020-07-17 18:50:37 +0000480 "returns": "void const *",
481 "args": [
482 {"name": "offset", "type": "size_t", "default": 0},
Shrek Shao286061d2022-04-29 18:12:17 +0000483 {"name": "size", "type": "size_t", "default": "WGPU_WHOLE_MAP_SIZE"}
Corentin Wallezf6e70442020-07-17 18:50:37 +0000484 ]
Corentin Wallez1325ab12020-06-30 11:51:14 +0000485 },
486 {
Brandon Jonesc95e5742021-08-19 20:47:28 +0000487 "name": "set label",
488 "returns": "void",
489 "args": [
490 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"}
491 ]
492 },
493 {
Corentin Wallezd4281872022-06-08 14:46:41 +0000494 "name": "get usage",
495 "returns": "buffer usage"
496 },
497 {
498 "name": "get size",
499 "returns": "uint64_t"
500 },
501 {
Takahiro915e55a2022-12-19 19:06:51 +0000502 "name": "get map state",
503 "returns": "buffer map state"
504 },
505 {
Corentin Wallezb1c19ee2017-06-09 10:51:29 -0400506 "name": "unmap"
Austin Eng446ab442019-02-13 21:26:48 +0000507 },
508 {
509 "name": "destroy"
Austin Eng376f1c62017-05-30 20:03:44 -0400510 }
511 ]
512 },
Corentin Wallez82b65732018-08-22 15:37:29 +0200513 "buffer descriptor": {
514 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +0000515 "extensible": "in",
Corentin Wallez82b65732018-08-22 15:37:29 +0200516 "members": [
François Beaufort277d2e12019-10-03 14:56:49 +0000517 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
Corentin Wallez9e9e29f2019-08-27 08:21:39 +0000518 {"name": "usage", "type": "buffer usage"},
Corentin Wallezb2ea1912020-07-07 11:21:51 +0000519 {"name": "size", "type": "uint64_t"},
520 {"name": "mapped at creation", "type": "bool", "default": "false"}
Corentin Wallez82b65732018-08-22 15:37:29 +0200521 ]
522 },
Corentin Wallez0d52f802020-07-14 12:30:14 +0000523 "buffer map callback": {
fujunwei23f71622021-12-02 07:41:21 +0000524 "category": "function pointer",
Corentin Wallez0d52f802020-07-14 12:30:14 +0000525 "args": [
526 {"name": "status", "type": "buffer map async status"},
Loko Kung670e0bb2023-06-10 06:51:37 +0000527 {"name": "userdata", "type": "void *"}
Corentin Wallez0d52f802020-07-14 12:30:14 +0000528 ]
529 },
Corentin Wallez8565e002018-03-20 19:48:54 -0400530 "buffer map async status": {
Corentin Wallezb1c19ee2017-06-09 10:51:29 -0400531 "category": "enum",
Kai Ninomiya930e9182021-09-17 19:44:43 +0000532 "emscripten_no_enum_table": true,
Corentin Wallezb1c19ee2017-06-09 10:51:29 -0400533 "values": [
534 {"value": 0, "name": "success"},
François Beaufort8cb45812023-05-04 13:34:27 +0000535 {"value": 1, "name": "validation error"},
Corentin Wallezb1c19ee2017-06-09 10:51:29 -0400536 {"value": 2, "name": "unknown"},
Jiawei Shaoed2b4652020-09-27 02:00:52 +0000537 {"value": 3, "name": "device lost"},
538 {"value": 4, "name": "destroyed before callback"},
François Beaufortad571cf2023-04-28 17:07:45 +0000539 {"value": 5, "name": "unmapped before callback"},
540 {"value": 6, "name": "mapping already pending"},
541 {"value": 7, "name": "offset out of range"},
François Beaufort8cb45812023-05-04 13:34:27 +0000542 {"value": 8, "name": "size out of range"}
Corentin Wallezb1c19ee2017-06-09 10:51:29 -0400543 ]
544 },
Takahiro915e55a2022-12-19 19:06:51 +0000545 "buffer map state": {
546 "category": "enum",
547 "values": [
548 {"value": 0, "name": "unmapped"},
549 {"value": 1, "name": "pending"},
550 {"value": 2, "name": "mapped"}
551 ]
552 },
Corentin Wallez9e9e29f2019-08-27 08:21:39 +0000553 "buffer usage": {
Austin Eng376f1c62017-05-30 20:03:44 -0400554 "category": "bitmask",
555 "values": [
556 {"value": 0, "name": "none"},
Corentin Wallezf45bdb82017-06-05 15:42:14 -0400557 {"value": 1, "name": "map read"},
Corentin Wallez769b00f2017-06-16 15:35:12 -0400558 {"value": 2, "name": "map write"},
Corentin Wallezec053552019-07-08 10:05:46 +0000559 {"value": 4, "name": "copy src"},
560 {"value": 8, "name": "copy dst"},
Corentin Wallez769b00f2017-06-16 15:35:12 -0400561 {"value": 16, "name": "index"},
562 {"value": 32, "name": "vertex"},
563 {"value": 64, "name": "uniform"},
Idan Raiter05f7ad52019-06-10 20:56:27 +0000564 {"value": 128, "name": "storage"},
Hao Li5c89c8d2020-07-17 09:02:46 +0000565 {"value": 256, "name": "indirect"},
566 {"value": 512, "name": "query resolve"}
Austin Eng376f1c62017-05-30 20:03:44 -0400567 ]
568 },
Austin Eng376f1c62017-05-30 20:03:44 -0400569 "char": {
570 "category": "native"
571 },
Jiawei Shao5e811ae2018-12-19 08:21:13 +0000572 "color": {
573 "category": "structure",
574 "members": [
Brandon Jones670858d2020-09-22 16:51:36 +0000575 {"name": "r", "type": "double"},
576 {"name": "g", "type": "double"},
577 {"name": "b", "type": "double"},
578 {"name": "a", "type": "double"}
Jiawei Shao5e811ae2018-12-19 08:21:13 +0000579 ]
580 },
Austin Eng94bebe52017-07-26 16:59:53 -0400581 "color write mask": {
582 "category": "bitmask",
583 "values": [
584 {"value": 0, "name": "none"},
585 {"value": 1, "name": "red"},
586 {"value": 2, "name": "green"},
587 {"value": 4, "name": "blue"},
588 {"value": 8, "name": "alpha"},
589 {"value": 15, "name": "all"}
590 ]
591 },
Kai Ninomiya7d174a12021-09-21 17:36:27 +0000592 "constant entry": {
593 "category": "structure",
594 "extensible": "in",
595 "members": [
shrekshaoe99ad762021-09-28 20:15:52 +0000596 {"name": "key", "type": "char", "annotation": "const*", "length": "strlen"},
Kai Ninomiya7d174a12021-09-21 17:36:27 +0000597 {"name": "value", "type": "double"}
598 ]
599 },
Austin Eng376f1c62017-05-30 20:03:44 -0400600 "command buffer": {
Brandon Jones828f6742021-11-23 00:09:25 +0000601 "category": "object",
602 "methods": [
603 {
604 "name": "set label",
605 "returns": "void",
Brandon Jones828f6742021-11-23 00:09:25 +0000606 "args": [
607 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"}
608 ]
609 }
610 ]
Austin Eng376f1c62017-05-30 20:03:44 -0400611 },
Corentin Wallez4b90c472019-07-10 20:43:13 +0000612 "command buffer descriptor": {
613 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +0000614 "extensible": "in",
François Beaufort6ac5a922019-09-25 13:56:48 +0000615 "members": [
616 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true}
617 ]
Corentin Wallez4b90c472019-07-10 20:43:13 +0000618 },
Corentin Walleze1f0d4e2019-02-15 12:54:08 +0000619 "command encoder": {
620 "category": "object",
Le Hoang Quyen7971bfe2023-04-05 19:35:07 +0000621 "no autolock": true,
Corentin Walleze1f0d4e2019-02-15 12:54:08 +0000622 "methods": [
623 {
624 "name": "finish",
Corentin Wallez4b90c472019-07-10 20:43:13 +0000625 "returns": "command buffer",
626 "args": [
627 {"name": "descriptor", "type": "command buffer descriptor", "annotation": "const*", "optional": true}
628 ]
Corentin Walleze1f0d4e2019-02-15 12:54:08 +0000629 },
630 {
631 "name": "begin compute pass",
Corentin Wallez4b90c472019-07-10 20:43:13 +0000632 "returns": "compute pass encoder",
633 "args": [
634 {"name": "descriptor", "type": "compute pass descriptor", "annotation": "const*", "optional": true}
635 ]
Corentin Walleze1f0d4e2019-02-15 12:54:08 +0000636 },
637 {
638 "name": "begin render pass",
Corentin Wallez4b90c472019-07-10 20:43:13 +0000639 "returns": "render pass encoder",
Corentin Walleze1f0d4e2019-02-15 12:54:08 +0000640 "args": [
Corentin Wallez4b90c472019-07-10 20:43:13 +0000641 {"name": "descriptor", "type": "render pass descriptor", "annotation": "const*"}
642 ]
Corentin Walleze1f0d4e2019-02-15 12:54:08 +0000643 },
644 {
645 "name": "copy buffer to buffer",
646 "args": [
647 {"name": "source", "type": "buffer"},
Austin Engcf52d712019-04-05 20:51:29 +0000648 {"name": "source offset", "type": "uint64_t"},
Corentin Walleze1f0d4e2019-02-15 12:54:08 +0000649 {"name": "destination", "type": "buffer"},
Austin Engcf52d712019-04-05 20:51:29 +0000650 {"name": "destination offset", "type": "uint64_t"},
651 {"name": "size", "type": "uint64_t"}
Corentin Walleze1f0d4e2019-02-15 12:54:08 +0000652 ]
653 },
654 {
655 "name": "copy buffer to texture",
656 "args": [
Corentin Wallez80915842021-03-04 18:13:45 +0000657 {"name": "source", "type": "image copy buffer", "annotation": "const*"},
658 {"name": "destination", "type": "image copy texture", "annotation": "const*"},
Corentin Walleze1f0d4e2019-02-15 12:54:08 +0000659 {"name": "copy size", "type": "extent 3D", "annotation": "const*"}
660 ]
661 },
662 {
663 "name": "copy texture to buffer",
664 "args": [
Corentin Wallez80915842021-03-04 18:13:45 +0000665 {"name": "source", "type": "image copy texture", "annotation": "const*"},
666 {"name": "destination", "type": "image copy buffer", "annotation": "const*"},
Corentin Walleze1f0d4e2019-02-15 12:54:08 +0000667 {"name": "copy size", "type": "extent 3D", "annotation": "const*"}
668 ]
Brandon Jonesd3d3aa02019-03-26 11:06:23 +0000669 },
670 {
671 "name": "copy texture to texture",
672 "args": [
Corentin Wallez80915842021-03-04 18:13:45 +0000673 {"name": "source", "type": "image copy texture", "annotation": "const*"},
674 {"name": "destination", "type": "image copy texture", "annotation": "const*"},
Brandon Jonesd3d3aa02019-03-26 11:06:23 +0000675 {"name": "copy size", "type": "extent 3D", "annotation": "const*"}
676 ]
Corentin Wallezb8ea84c2019-09-10 08:20:40 +0000677 },
678 {
Brandon Jonesd3105bf2021-12-02 21:43:49 +0000679 "name": "clear buffer",
Corentin Wallez6cd1cd92021-11-17 08:13:24 +0000680 "args": [
Brandon Jonesd3105bf2021-12-02 21:43:49 +0000681 {"name": "buffer", "type": "buffer"},
682 {"name": "offset", "type": "uint64_t", "default": 0},
683 {"name": "size", "type": "uint64_t", "default": "WGPU_WHOLE_SIZE"}
Corentin Wallez6cd1cd92021-11-17 08:13:24 +0000684 ]
685 },
686 {
Austin Eng464aaeb2020-11-14 01:24:03 +0000687 "name": "inject validation error",
Kai Ninomiya930e9182021-09-17 19:44:43 +0000688 "tags": ["dawn"],
Austin Eng464aaeb2020-11-14 01:24:03 +0000689 "args": [
690 {"name": "message", "type": "char", "annotation": "const*", "length": "strlen"}
Kai Ninomiya930e9182021-09-17 19:44:43 +0000691 ]
Austin Eng464aaeb2020-11-14 01:24:03 +0000692 },
693 {
Corentin Wallezb8ea84c2019-09-10 08:20:40 +0000694 "name": "insert debug marker",
695 "args": [
Kai Ninomiya51bbbef2020-07-12 16:01:38 +0000696 {"name": "marker label", "type": "char", "annotation": "const*", "length": "strlen"}
Corentin Wallezb8ea84c2019-09-10 08:20:40 +0000697 ]
698 },
699 {
700 "name": "pop debug group",
701 "args": []
702 },
703 {
704 "name": "push debug group",
705 "args": [
706 {"name": "group label", "type": "char", "annotation": "const*", "length": "strlen"}
707 ]
Hao Li5191adc2020-07-01 10:48:16 +0000708 },
709 {
Hao Li5c89c8d2020-07-17 09:02:46 +0000710 "name": "resolve query set",
711 "args": [
712 {"name": "query set", "type": "query set"},
713 {"name": "first query", "type": "uint32_t"},
714 {"name": "query count", "type": "uint32_t"},
715 {"name": "destination", "type": "buffer"},
716 {"name": "destination offset", "type": "uint64_t"}
717 ]
718 },
719 {
Ken Rockot6237c8a2021-09-20 19:25:05 +0000720 "name": "write buffer",
Kai Ninomiya7d174a12021-09-21 17:36:27 +0000721 "tags": ["dawn"],
Ken Rockot6237c8a2021-09-20 19:25:05 +0000722 "args": [
723 {"name": "buffer", "type": "buffer"},
724 {"name": "buffer offset", "type": "uint64_t"},
725 {"name": "data", "type": "uint8_t", "annotation": "const*", "length": "size"},
726 {"name": "size", "type": "uint64_t"}
727 ]
728 },
729 {
Hao Li5191adc2020-07-01 10:48:16 +0000730 "name": "write timestamp",
731 "args": [
732 {"name": "query set", "type": "query set"},
733 {"name": "query index", "type": "uint32_t"}
734 ]
Brandon Jones828f6742021-11-23 00:09:25 +0000735 },
736 {
737 "name": "set label",
738 "returns": "void",
Brandon Jones828f6742021-11-23 00:09:25 +0000739 "args": [
740 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"}
741 ]
Corentin Walleze1f0d4e2019-02-15 12:54:08 +0000742 }
743 ]
744 },
Corentin Wallez4b90c472019-07-10 20:43:13 +0000745 "command encoder descriptor": {
746 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +0000747 "extensible": "in",
François Beaufort277d2e12019-10-03 14:56:49 +0000748 "members": [
749 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true}
750 ]
Corentin Wallez4b90c472019-07-10 20:43:13 +0000751 },
Corentin Wallez82fbccb2018-09-21 00:24:37 +0000752 "compare function": {
753 "category": "enum",
754 "values": [
Corentin Wallez5d2f2042021-04-08 18:42:47 +0000755 {"value": 0, "name": "undefined", "jsrepr": "undefined", "valid": false},
Austin Engd6a54312020-04-17 19:32:07 +0000756 {"value": 1, "name": "never"},
757 {"value": 2, "name": "less"},
758 {"value": 3, "name": "less equal"},
759 {"value": 4, "name": "greater"},
760 {"value": 5, "name": "greater equal"},
761 {"value": 6, "name": "equal"},
762 {"value": 7, "name": "not equal"},
763 {"value": 8, "name": "always"}
Corentin Wallez82fbccb2018-09-21 00:24:37 +0000764 ]
765 },
Brandon Jones6f2bbe92021-04-05 23:34:17 +0000766 "compilation info": {
767 "category": "structure",
Corentin Wallez61c85322021-11-16 09:25:35 +0000768 "extensible": "in",
Brandon Jones6f2bbe92021-04-05 23:34:17 +0000769 "members": [
Loko Kung837f1512023-06-06 03:01:15 +0000770 {"name": "message count", "type": "size_t"},
Brandon Jones6f2bbe92021-04-05 23:34:17 +0000771 {"name": "messages", "type": "compilation message", "annotation": "const*", "length": "message count"}
772 ]
773 },
774 "compilation info callback": {
fujunwei23f71622021-12-02 07:41:21 +0000775 "category": "function pointer",
Brandon Jones6f2bbe92021-04-05 23:34:17 +0000776 "args": [
777 {"name": "status", "type": "compilation info request status"},
778 {"name": "compilation info", "type": "compilation info", "annotation": "const*"},
Loko Kung670e0bb2023-06-10 06:51:37 +0000779 {"name": "userdata", "type": "void *"}
Brandon Jones6f2bbe92021-04-05 23:34:17 +0000780 ]
781 },
782 "compilation info request status": {
783 "category": "enum",
784 "values": [
785 {"value": 0, "name": "success"},
786 {"value": 1, "name": "error"},
787 {"value": 2, "name": "device lost"},
788 {"value": 3, "name": "unknown"}
789 ]
790 },
791 "compilation message": {
792 "category": "structure",
Corentin Wallez61c85322021-11-16 09:25:35 +0000793 "extensible": "in",
Brandon Jones6f2bbe92021-04-05 23:34:17 +0000794 "members": [
795 {"name": "message", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
796 {"name": "type", "type": "compilation message type"},
797 {"name": "line num", "type": "uint64_t"},
Brandon Jones83ae2ce2021-04-30 20:45:58 +0000798 {"name": "line pos", "type": "uint64_t"},
799 {"name": "offset", "type": "uint64_t"},
Jiawei Shaof7beb852023-01-10 00:03:24 +0000800 {"name": "length", "type": "uint64_t"},
801 {"name": "utf16 line pos", "type": "uint64_t"},
802 {"name": "utf16 offset", "type": "uint64_t"},
803 {"name": "utf16 length", "type": "uint64_t"}
Brandon Jones6f2bbe92021-04-05 23:34:17 +0000804 ]
805 },
806 "compilation message type": {
807 "category": "enum",
Kai Ninomiya930e9182021-09-17 19:44:43 +0000808 "emscripten_no_enum_table": true,
Brandon Jones6f2bbe92021-04-05 23:34:17 +0000809 "values": [
810 {"value": 0, "name": "error"},
811 {"value": 1, "name": "warning"},
812 {"value": 2, "name": "info"}
813 ]
814 },
Corentin Wallez4b90c472019-07-10 20:43:13 +0000815 "compute pass descriptor": {
816 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +0000817 "extensible": "in",
François Beaufort6ac5a922019-09-25 13:56:48 +0000818 "members": [
Corentin Wallez6cd1cd92021-11-17 08:13:24 +0000819 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
Loko Kung837f1512023-06-06 03:01:15 +0000820 {"name": "timestamp write count", "type": "size_t", "default": 0},
Li Hao131c4222022-03-05 01:22:52 +0000821 {"name": "timestamp writes", "type": "compute pass timestamp write", "annotation": "const*", "length": "timestamp write count"}
François Beaufort6ac5a922019-09-25 13:56:48 +0000822 ]
Corentin Wallez4b90c472019-07-10 20:43:13 +0000823 },
Corentin Wallez82fbccb2018-09-21 00:24:37 +0000824 "compute pass encoder": {
825 "category": "object",
Le Hoang Quyen7971bfe2023-04-05 19:35:07 +0000826 "no autolock": true,
Corentin Wallez82fbccb2018-09-21 00:24:37 +0000827 "methods": [
Corentin Walleze9d347e2017-06-26 16:23:03 -0400828 {
Brandon Jones11d32c82019-02-20 20:21:00 +0000829 "name": "insert debug marker",
830 "args": [
Kai Ninomiya51bbbef2020-07-12 16:01:38 +0000831 {"name": "marker label", "type": "char", "annotation": "const*", "length": "strlen"}
Brandon Jones11d32c82019-02-20 20:21:00 +0000832 ]
833 },
834 {
835 "name": "pop debug group",
836 "args": []
837 },
838 {
839 "name": "push debug group",
840 "args": [
841 {"name": "group label", "type": "char", "annotation": "const*", "length": "strlen"}
842 ]
843 },
844 {
Yan, Shaobo300eec02018-12-21 10:40:26 +0000845 "name": "set pipeline",
Austin Eng376f1c62017-05-30 20:03:44 -0400846 "args": [
Corentin Wallez82fbccb2018-09-21 00:24:37 +0000847 {"name": "pipeline", "type": "compute pipeline"}
Austin Eng376f1c62017-05-30 20:03:44 -0400848 ]
849 },
850 {
Corentin Wallez82fbccb2018-09-21 00:24:37 +0000851 "name": "set bind group",
Austin Eng376f1c62017-05-30 20:03:44 -0400852 "args": [
Corentin Wallez82fbccb2018-09-21 00:24:37 +0000853 {"name": "group index", "type": "uint32_t"},
Yunchao He6ffe72c2023-06-14 19:22:29 +0000854 {"name": "group", "type": "bind group", "optional": true},
Loko Kung837f1512023-06-06 03:01:15 +0000855 {"name": "dynamic offset count", "type": "size_t", "default": "0"},
Corentin Wallez75f554d2021-06-17 16:04:29 +0000856 {"name": "dynamic offsets", "type": "uint32_t", "annotation": "const*", "length": "dynamic offset count", "default": "nullptr"}
Corentin Wallez29ced282017-07-14 10:58:07 -0400857 ]
858 },
859 {
Hao Li5191adc2020-07-01 10:48:16 +0000860 "name": "write timestamp",
Corentin Wallez6cd1cd92021-11-17 08:13:24 +0000861 "tags": ["emscripten", "dawn"],
Hao Li5191adc2020-07-01 10:48:16 +0000862 "args": [
863 {"name": "query set", "type": "query set"},
864 {"name": "query index", "type": "uint32_t"}
865 ]
866 },
867 {
Kai Ninomiya4e37acc2021-09-17 21:13:33 +0000868 "name": "begin pipeline statistics query",
Shrek Shaoee50bc02022-02-08 20:21:40 +0000869 "tags": ["upstream", "emscripten"],
Kai Ninomiya4e37acc2021-09-17 21:13:33 +0000870 "args": [
871 {"name": "query set", "type": "query set"},
872 {"name": "query index", "type": "uint32_t"}
873 ]
874 },
875 {
Brandon Jones3daebe82022-04-29 17:51:54 +0000876 "name": "dispatch workgroups",
Corentin Walleza3c89cc2018-02-13 14:57:13 -0500877 "args": [
Brandon Jones913e1582022-01-27 09:40:02 +0000878 {"name": "workgroupCountX", "type": "uint32_t"},
879 {"name": "workgroupCountY", "type": "uint32_t", "default": "1"},
880 {"name": "workgroupCountZ", "type": "uint32_t", "default": "1"}
Corentin Walleza3c89cc2018-02-13 14:57:13 -0500881 ]
882 },
883 {
Brandon Jones3daebe82022-04-29 17:51:54 +0000884 "name": "dispatch workgroups indirect",
Idan Raiter05f7ad52019-06-10 20:56:27 +0000885 "args": [
886 {"name": "indirect buffer", "type": "buffer"},
887 {"name": "indirect offset", "type": "uint64_t"}
888 ]
889 },
890 {
Brandon Jones0fee4c12022-02-07 19:48:39 +0000891 "name": "end"
892 },
893 {
Kai Ninomiya4e37acc2021-09-17 21:13:33 +0000894 "name": "end pipeline statistics query",
Shrek Shaoee50bc02022-02-08 20:21:40 +0000895 "tags": ["upstream", "emscripten"]
Brandon Jones828f6742021-11-23 00:09:25 +0000896 },
897 {
898 "name": "set label",
899 "returns": "void",
Brandon Jones828f6742021-11-23 00:09:25 +0000900 "args": [
901 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"}
902 ]
Austin Eng376f1c62017-05-30 20:03:44 -0400903 }
904 ]
905 },
dan sinclair3ebe5b62023-08-21 22:57:06 +0000906 "composite alpha mode": {
907 "category": "enum",
908 "tags": ["upstream"],
909 "values": [
910 {"value": 0, "name": "auto"},
911 {"value": 1, "name": "opaque"},
912 {"value": 2, "name": "premultiplied"},
913 {"value": 3, "name": "unpremultiplied"},
914 {"value": 4, "name": "inherit"}
915 ]
916 },
Corentin Wallez6cd1cd92021-11-17 08:13:24 +0000917 "compute pass timestamp location": {
918 "category": "enum",
Corentin Wallez6cd1cd92021-11-17 08:13:24 +0000919 "values": [
920 {"value": 0, "name": "beginning"},
921 {"value": 1, "name": "end"}
922 ]
923 },
924 "compute pass timestamp write": {
925 "category": "structure",
Corentin Wallez6cd1cd92021-11-17 08:13:24 +0000926 "members": [
927 {"name": "query set", "type": "query set"},
928 {"name": "query index", "type": "uint32_t"},
929 {"name": "location", "type": "compute pass timestamp location"}
930 ]
931 },
Corentin Wallez29ced282017-07-14 10:58:07 -0400932 "compute pipeline": {
Austin Engf6eb8902019-11-22 17:02:22 +0000933 "category": "object",
934 "methods": [
935 {
936 "name": "get bind group layout",
937 "returns": "bind group layout",
938 "args": [
Corentin Wallez373a3ff2020-04-01 18:22:36 +0000939 {"name": "group index", "type": "uint32_t"}
Austin Engf6eb8902019-11-22 17:02:22 +0000940 ]
Brandon Jonesc1bcbbf2021-09-02 18:39:53 +0000941 },
942 {
943 "name": "set label",
944 "returns": "void",
945 "args": [
946 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"}
947 ]
Austin Engf6eb8902019-11-22 17:02:22 +0000948 }
949 ]
Corentin Wallez29ced282017-07-14 10:58:07 -0400950 },
Corentin Wallez8e335a52018-08-27 23:12:56 +0200951 "compute pipeline descriptor": {
952 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +0000953 "extensible": "in",
Corentin Wallez8e335a52018-08-27 23:12:56 +0200954 "members": [
François Beaufort277d2e12019-10-03 14:56:49 +0000955 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
Austin Engf6eb8902019-11-22 17:02:22 +0000956 {"name": "layout", "type": "pipeline layout", "optional": true},
Corentin Wallezc7203ba2021-09-14 11:42:27 +0000957 {"name": "compute", "type": "programmable stage descriptor"}
Corentin Wallez29ced282017-07-14 10:58:07 -0400958 ]
959 },
Yan483bead2021-12-14 04:51:45 +0000960 "alpha mode": {
961 "category": "enum",
962 "tags": ["dawn"],
963 "values": [
964 {"value": 0, "name": "premultiplied"},
shrekshaoa3f4a322022-07-11 18:11:14 +0000965 {"value": 1, "name": "unpremultiplied"},
966 {"value": 2, "name": "opaque"}
Yan483bead2021-12-14 04:51:45 +0000967 ]
968 },
Yan, Shaobobb913a92020-12-02 08:13:09 +0000969 "copy texture for browser options": {
970 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +0000971 "extensible": "in",
Kai Ninomiya930e9182021-09-17 19:44:43 +0000972 "tags": ["dawn"],
Yan, Shaobobb913a92020-12-02 08:13:09 +0000973 "members": [
Yan483bead2021-12-14 04:51:45 +0000974 {"name": "flip y", "type": "bool", "default": "false"},
Yan483bead2021-12-14 04:51:45 +0000975 {"name": "needs color space conversion", "type": "bool", "default": "false"},
976 {"name": "src alpha mode", "type": "alpha mode", "default": "unpremultiplied"},
Yan483bead2021-12-14 04:51:45 +0000977 {"name": "src transfer function parameters", "type": "float", "annotation": "const*",
Yan52040532021-12-15 04:08:56 +0000978 "length": 7, "optional": true},
Yan483bead2021-12-14 04:51:45 +0000979 {"name": "conversion matrix", "type": "float", "annotation": "const*",
Yan52040532021-12-15 04:08:56 +0000980 "length": 9, "optional": true},
Yan483bead2021-12-14 04:51:45 +0000981 {"name": "dst transfer function parameters", "type": "float", "annotation": "const*",
Yan52040532021-12-15 04:08:56 +0000982 "length": 7, "optional": true},
shrekshaoc6cbcdb2022-07-11 18:11:14 +0000983 {"name": "dst alpha mode", "type": "alpha mode", "default": "unpremultiplied"},
984 {"name": "internal usage", "type": "bool", "default": "false"}
Yan, Shaobobb913a92020-12-02 08:13:09 +0000985 ]
986 },
Corentin Wallez2d3c2e32021-02-22 18:27:36 +0000987 "create compute pipeline async callback": {
fujunwei23f71622021-12-02 07:41:21 +0000988 "category": "function pointer",
Jiawei Shaoae5f9502020-10-19 01:56:08 +0000989 "args": [
Corentin Wallez2d3c2e32021-02-22 18:27:36 +0000990 {"name": "status", "type": "create pipeline async status"},
Henry Betts5ad86f32023-07-11 09:48:38 +0000991 {"name": "pipeline", "type": "compute pipeline", "optional": true},
992 {"name": "message", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
Loko Kung670e0bb2023-06-10 06:51:37 +0000993 {"name": "userdata", "type": "void *"}
Jiawei Shaoae5f9502020-10-19 01:56:08 +0000994 ]
995 },
Corentin Wallez2d3c2e32021-02-22 18:27:36 +0000996 "create pipeline async status": {
Jiawei Shaoae5f9502020-10-19 01:56:08 +0000997 "category": "enum",
Kai Ninomiya930e9182021-09-17 19:44:43 +0000998 "emscripten_no_enum_table": true,
Jiawei Shaoae5f9502020-10-19 01:56:08 +0000999 "values": [
1000 {"value": 0, "name": "success"},
Corentin Walleze4b4c472023-02-08 19:36:53 +00001001 {"value": 1, "name": "validation error"},
1002 {"value": 2, "name": "internal error"},
1003 {"value": 3, "name": "device lost"},
1004 {"value": 4, "name": "device destroyed"},
Corentin Wallezc7130052023-02-17 23:24:43 +00001005 {"value": 5, "name": "unknown"}
Jiawei Shaoae5f9502020-10-19 01:56:08 +00001006 ]
1007 },
Corentin Wallez2d3c2e32021-02-22 18:27:36 +00001008 "create render pipeline async callback": {
fujunwei23f71622021-12-02 07:41:21 +00001009 "category": "function pointer",
Jiawei Shao03e14002020-10-21 04:37:41 +00001010 "args": [
Corentin Wallez2d3c2e32021-02-22 18:27:36 +00001011 {"name": "status", "type": "create pipeline async status"},
Henry Betts5ad86f32023-07-11 09:48:38 +00001012 {"name": "pipeline", "type": "render pipeline", "optional": true},
1013 {"name": "message", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
Loko Kung670e0bb2023-06-10 06:51:37 +00001014 {"name": "userdata", "type": "void *"}
Jiawei Shao03e14002020-10-21 04:37:41 +00001015 ]
1016 },
Yunchao Hec33a8c12019-04-11 18:46:54 +00001017 "cull mode": {
1018 "category": "enum",
1019 "values": [
1020 {"value": 0, "name": "none"},
1021 {"value": 1, "name": "front"},
1022 {"value": 2, "name": "back"}
1023 ]
1024 },
Austin Eng376f1c62017-05-30 20:03:44 -04001025 "device": {
1026 "category": "object",
1027 "methods": [
1028 {
Corentin Wallez6f9d21e2018-12-05 07:18:30 +00001029 "name": "create bind group",
1030 "returns": "bind group",
1031 "args": [
1032 {"name": "descriptor", "type": "bind group descriptor", "annotation": "const*"}
1033 ]
Austin Eng376f1c62017-05-30 20:03:44 -04001034 },
1035 {
Kai Ninomiya234becf2018-07-10 12:23:50 -07001036 "name": "create bind group layout",
1037 "returns": "bind group layout",
1038 "args": [
1039 {"name": "descriptor", "type": "bind group layout descriptor", "annotation": "const*"}
1040 ]
Austin Eng376f1c62017-05-30 20:03:44 -04001041 },
1042 {
Corentin Wallez82b65732018-08-22 15:37:29 +02001043 "name": "create buffer",
1044 "returns": "buffer",
1045 "args": [
1046 {"name": "descriptor", "type": "buffer descriptor", "annotation": "const*"}
1047 ]
1048 },
1049 {
Austin Engcf1fdf42020-06-15 23:42:13 +00001050 "name": "create error buffer",
1051 "returns": "buffer",
Jiawei Shao806c5832022-11-23 02:06:11 +00001052 "tags": ["dawn"],
1053 "args": [
1054 {"name": "descriptor", "type": "buffer descriptor", "annotation": "const*"}
1055 ]
Austin Engcf1fdf42020-06-15 23:42:13 +00001056 },
1057 {
Corentin Walleze1f0d4e2019-02-15 12:54:08 +00001058 "name": "create command encoder",
Corentin Wallez4b90c472019-07-10 20:43:13 +00001059 "returns": "command encoder",
1060 "args": [
1061 {"name": "descriptor", "type": "command encoder descriptor", "annotation": "const*", "optional": true}
1062 ]
Corentin Walleze1f0d4e2019-02-15 12:54:08 +00001063 },
1064 {
Corentin Wallez8e335a52018-08-27 23:12:56 +02001065 "name": "create compute pipeline",
1066 "returns": "compute pipeline",
1067 "args": [
1068 {"name": "descriptor", "type": "compute pipeline descriptor", "annotation": "const*"}
1069 ]
Corentin Wallez29ced282017-07-14 10:58:07 -04001070 },
1071 {
Corentin Wallez2d3c2e32021-02-22 18:27:36 +00001072 "name": "create compute pipeline async",
Jiawei Shaoae5f9502020-10-19 01:56:08 +00001073 "returns": "void",
1074 "args": [
1075 {"name": "descriptor", "type": "compute pipeline descriptor", "annotation": "const*"},
Corentin Walleze00c6bd2021-12-13 17:37:17 +00001076 {"name": "callback", "type": "create compute pipeline async callback"},
Loko Kung670e0bb2023-06-10 06:51:37 +00001077 {"name": "userdata", "type": "void *"}
Jiawei Shaoae5f9502020-10-19 01:56:08 +00001078 ]
1079 },
1080 {
Austin Engbffc9662021-09-17 15:36:00 +00001081 "name": "create external texture",
1082 "returns": "external texture",
Kai Ninomiya930e9182021-09-17 19:44:43 +00001083 "tags": ["dawn"],
Austin Engbffc9662021-09-17 15:36:00 +00001084 "args": [
1085 {"name": "external texture descriptor", "type": "external texture descriptor", "annotation": "const*"}
1086 ]
1087 },
1088 {
Yan,Shaobo7ce3c2d2022-06-27 02:57:40 +00001089 "name": "create error external texture",
1090 "returns": "external texture",
1091 "tags": ["dawn"]
1092 },
1093 {
Kai Ninomiyaf53f98b2018-06-27 16:21:39 -07001094 "name": "create pipeline layout",
1095 "returns": "pipeline layout",
1096 "args": [
1097 {"name": "descriptor", "type": "pipeline layout descriptor", "annotation": "const*"}
1098 ]
Austin Eng376f1c62017-05-30 20:03:44 -04001099 },
1100 {
Corentin Wallez9585c462020-07-06 18:50:00 +00001101 "name": "create query set",
1102 "returns": "query set",
1103 "args": [
1104 {"name": "descriptor", "type": "query set descriptor", "annotation": "const*"}
1105 ]
1106 },
1107 {
Corentin Wallez2d3c2e32021-02-22 18:27:36 +00001108 "name": "create render pipeline async",
Jiawei Shao03e14002020-10-21 04:37:41 +00001109 "returns": "void",
1110 "args": [
Brandon Jones41c87d92021-05-21 05:01:38 +00001111 {"name": "descriptor", "type": "render pipeline descriptor", "annotation": "const*"},
Corentin Walleze00c6bd2021-12-13 17:37:17 +00001112 {"name": "callback", "type": "create render pipeline async callback"},
Loko Kung670e0bb2023-06-10 06:51:37 +00001113 {"name": "userdata", "type": "void *"}
Jiawei Shao03e14002020-10-21 04:37:41 +00001114 ]
1115 },
1116 {
Austin Eng8a488c12019-08-13 22:12:54 +00001117 "name": "create render bundle encoder",
1118 "returns": "render bundle encoder",
1119 "args": [
1120 {"name": "descriptor", "type": "render bundle encoder descriptor", "annotation": "const*"}
1121 ]
1122 },
1123 {
Corentin Wallez9585c462020-07-06 18:50:00 +00001124 "name": "create render pipeline",
1125 "returns": "render pipeline",
1126 "args": [
1127 {"name": "descriptor", "type": "render pipeline descriptor", "annotation": "const*"}
1128 ]
1129 },
1130 {
Corentin Wallez1ae19e82018-05-17 17:09:07 -04001131 "name": "create sampler",
1132 "returns": "sampler",
1133 "args": [
shrekshaob3177d42021-01-26 02:22:58 +00001134 {"name": "descriptor", "type": "sampler descriptor", "annotation": "const*", "optional": true}
Corentin Wallez1ae19e82018-05-17 17:09:07 -04001135 ]
Austin Eng376f1c62017-05-30 20:03:44 -04001136 },
1137 {
Corentin Wallezdf671032018-08-20 17:01:20 +02001138 "name": "create shader module",
1139 "returns": "shader module",
1140 "args": [
1141 {"name": "descriptor", "type": "shader module descriptor", "annotation": "const*"}
1142 ]
Austin Eng376f1c62017-05-30 20:03:44 -04001143 },
1144 {
Jiawei Shaodaffe422023-05-25 03:32:41 +00001145 "name": "create error shader module",
1146 "returns": "shader module",
Corentin Wallez9433a8a2023-06-06 12:00:32 +00001147 "tags": ["dawn"],
Jiawei Shaodaffe422023-05-25 03:32:41 +00001148 "args": [
1149 {"name": "descriptor", "type": "shader module descriptor", "annotation": "const*"},
1150 {"name": "error message", "type": "char", "annotation": "const*", "length": "strlen"}
1151 ]
1152 },
1153 {
Corentin Wallez7be2a712019-02-15 11:15:58 +00001154 "name": "create swap chain",
dan sinclair3ebe5b62023-08-21 22:57:06 +00001155 "tags": ["dawn", "emscripten"],
Corentin Wallez74771202022-05-23 15:44:29 +00001156 "returns": "swap chain",
1157 "args": [
1158 {"name": "surface", "type": "surface"},
1159 {"name": "descriptor", "type": "swap chain descriptor", "annotation": "const*"}
1160 ]
1161 },
1162 {
Jiawei Shao425428f2018-08-27 08:44:48 +08001163 "name": "create texture",
1164 "returns": "texture",
1165 "args": [
1166 {"name": "descriptor", "type": "texture descriptor", "annotation": "const*"}
1167 ]
Austin Eng376f1c62017-05-30 20:03:44 -04001168 },
1169 {
Austin Eng5a54d9e2023-08-04 13:49:24 +00001170 "name": "import shared texture memory",
1171 "returns": "shared texture memory",
1172 "tags": ["dawn", "native"],
1173 "args": [
1174 {"name": "descriptor", "type": "shared texture memory descriptor", "annotation": "const*"}
1175 ]
1176 },
1177 {
1178 "name": "import shared fence",
1179 "returns": "shared fence",
1180 "tags": ["dawn", "native"],
1181 "args": [
1182 {"name": "descriptor", "type": "shared fence descriptor", "annotation": "const*"}
1183 ]
1184 },
1185 {
Corentin Wallez256e0262022-07-20 16:07:44 +00001186 "name": "create error texture",
1187 "returns": "texture",
1188 "tags": ["dawn"],
1189 "args": [
1190 {"name": "descriptor", "type": "texture descriptor", "annotation": "const*"}
1191 ]
1192 },
1193 {
Loko Kung2494c9b2021-12-01 17:55:30 +00001194 "name": "destroy"
Kai Ninomiya4e37acc2021-09-17 21:13:33 +00001195 },
1196 {
Austin Engbffc9662021-09-17 15:36:00 +00001197 "name": "get limits",
1198 "returns": "bool",
1199 "args": [
1200 {"name": "limits", "type": "supported limits", "annotation": "*"}
1201 ]
Corentin Wallez6d315da2021-02-04 15:33:42 +00001202 },
1203 {
Austin Eng89ddadc2021-12-15 00:12:30 +00001204 "name": "has feature",
1205 "returns": "bool",
1206 "args": [
1207 {"name": "feature", "type": "feature name"}
1208 ]
1209 },
1210 {
Austin Eng89ddadc2021-12-15 00:12:30 +00001211 "name": "enumerate features",
Austin Eng3ac7b9c2022-01-06 22:11:28 +00001212 "returns": "size_t",
Austin Eng89ddadc2021-12-15 00:12:30 +00001213 "args": [
1214 {"name": "features", "type": "feature name", "annotation": "*"}
1215 ]
1216 },
1217 {
Austin Engbf324352022-08-18 18:02:00 +00001218 "name": "get adapter",
1219 "returns": "adapter",
Austin Enga2b95582023-07-13 07:18:34 +00001220 "tags": ["dawn", "native"]
Austin Engbf324352022-08-18 18:02:00 +00001221 },
1222 {
Austin Engbffc9662021-09-17 15:36:00 +00001223 "name": "get queue",
1224 "returns": "queue"
Brandon Jones0e92e9b2021-04-01 20:46:42 +00001225 },
1226 {
Austin Enge06f01b2019-09-30 22:50:59 +00001227 "name": "inject error",
1228 "args": [
1229 {"name": "type", "type": "error type"},
Austin Eng867f7202019-10-02 06:35:38 +00001230 {"name": "message", "type": "char", "annotation": "const*", "length": "strlen"}
Austin Enge06f01b2019-09-30 22:50:59 +00001231 ],
Kai Ninomiya930e9182021-09-17 19:44:43 +00001232 "tags": ["dawn"]
Austin Enge06f01b2019-09-30 22:50:59 +00001233 },
1234 {
Loko Kung3a53edc2022-08-29 22:33:50 +00001235 "name": "force loss",
1236 "args": [
1237 {"name": "type", "type": "device lost reason"},
1238 {"name": "message", "type": "char", "annotation": "const*", "length": "strlen"}
1239 ],
Kai Ninomiya930e9182021-09-17 19:44:43 +00001240 "tags": ["dawn"]
Natasha Lee0ecc48e2020-01-15 19:02:13 +00001241 },
1242 {
Kai Ninomiya930e9182021-09-17 19:44:43 +00001243 "name": "tick",
Le Hoang Quyen7971bfe2023-04-05 19:35:07 +00001244 "no autolock": true,
Kai Ninomiya930e9182021-09-17 19:44:43 +00001245 "tags": ["dawn"]
Corentin Wallezdbb57292017-06-14 13:33:45 -04001246 },
1247 {
Austin Eng45ea7e62019-08-27 21:43:56 +00001248 "name": "set uncaptured error callback",
Le Hoang Quyen7971bfe2023-04-05 19:35:07 +00001249 "no autolock": true,
Austin Eng376f1c62017-05-30 20:03:44 -04001250 "args": [
Corentin Walleze00c6bd2021-12-13 17:37:17 +00001251 {"name": "callback", "type": "error callback"},
Loko Kung670e0bb2023-06-10 06:51:37 +00001252 {"name": "userdata", "type": "void *"}
Austin Eng376f1c62017-05-30 20:03:44 -04001253 ]
Austin Eng45238d72019-09-04 22:54:03 +00001254 },
1255 {
Zhaoming Jiangb44000e2021-06-04 07:10:56 +00001256 "name": "set logging callback",
Le Hoang Quyen7971bfe2023-04-05 19:35:07 +00001257 "no autolock": true,
Kai Ninomiya930e9182021-09-17 19:44:43 +00001258 "tags": ["dawn"],
Zhaoming Jiangb44000e2021-06-04 07:10:56 +00001259 "args": [
Corentin Walleze00c6bd2021-12-13 17:37:17 +00001260 {"name": "callback", "type": "logging callback"},
Loko Kung670e0bb2023-06-10 06:51:37 +00001261 {"name": "userdata", "type": "void *"}
Zhaoming Jiangb44000e2021-06-04 07:10:56 +00001262 ]
1263 },
1264 {
Natasha Lee9bba4a92019-12-18 18:59:20 +00001265 "name": "set device lost callback",
Le Hoang Quyen7971bfe2023-04-05 19:35:07 +00001266 "no autolock": true,
Brandon Jones112b7fd2023-05-17 01:52:30 +00001267 "tags": ["deprecated"],
Natasha Lee9bba4a92019-12-18 18:59:20 +00001268 "args": [
Corentin Walleze00c6bd2021-12-13 17:37:17 +00001269 {"name": "callback", "type": "device lost callback"},
Loko Kung670e0bb2023-06-10 06:51:37 +00001270 {"name": "userdata", "type": "void *"}
Natasha Lee9bba4a92019-12-18 18:59:20 +00001271 ]
1272 },
1273 {
Austin Eng45238d72019-09-04 22:54:03 +00001274 "name": "push error scope",
1275 "args": [
1276 {"name": "filter", "type": "error filter"}
1277 ]
1278 },
1279 {
1280 "name": "pop error scope",
Austin Eng45238d72019-09-04 22:54:03 +00001281 "args": [
Corentin Walleze00c6bd2021-12-13 17:37:17 +00001282 {"name": "callback", "type": "error callback"},
Loko Kung670e0bb2023-06-10 06:51:37 +00001283 {"name": "userdata", "type": "void *"}
Austin Eng45238d72019-09-04 22:54:03 +00001284 ]
Brandon Jones80853672022-04-12 03:28:40 +00001285 },
1286 {
1287 "name": "set label",
1288 "returns": "void",
1289 "args": [
1290 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"}
1291 ]
Corentin Wallez09631422023-01-10 15:17:26 +00001292 },
1293 {
1294 "name": "validate texture descriptor",
1295 "tags": ["dawn"],
1296 "args": [
1297 {"name": "descriptor", "type": "texture descriptor", "annotation": "const*"}
1298 ]
Le Hoang Quyen33557312023-04-20 20:42:05 +00001299 },
1300 {
1301 "name": "get supported surface usage",
Austin Enga2b95582023-07-13 07:18:34 +00001302 "tags": ["dawn", "native"],
Le Hoang Quyen33557312023-04-20 20:42:05 +00001303 "returns": "texture usage",
1304 "args": [
1305 {"name": "surface", "type": "surface"}
1306 ]
Austin Eng376f1c62017-05-30 20:03:44 -04001307 }
1308 ]
1309 },
Natasha Lee9bba4a92019-12-18 18:59:20 +00001310 "device lost callback": {
fujunwei23f71622021-12-02 07:41:21 +00001311 "category": "function pointer",
Corentin Wallez13e2e132020-01-25 09:30:40 +00001312 "args": [
Kai Ninomiya51791e02021-09-28 11:52:17 +00001313 {"name": "reason", "type": "device lost reason"},
Henry Betts5ad86f32023-07-11 09:48:38 +00001314 {"name": "message", "type": "char", "annotation": "const*", "length": "strlen"},
Loko Kung670e0bb2023-06-10 06:51:37 +00001315 {"name": "userdata", "type": "void *"}
Natasha Lee9bba4a92019-12-18 18:59:20 +00001316 ]
1317 },
Kai Ninomiya4e37acc2021-09-17 21:13:33 +00001318 "device lost reason": {
1319 "category": "enum",
1320 "emscripten_no_enum_table": true,
1321 "values": [
Kai Ninomiya51791e02021-09-28 11:52:17 +00001322 {"value": 0, "name": "undefined", "jsrepr": "undefined"},
1323 {"value": 1, "name": "destroyed"}
Kai Ninomiya4e37acc2021-09-17 21:13:33 +00001324 ]
1325 },
Brandon Jones670858d2020-09-22 16:51:36 +00001326 "double": {
1327 "category": "native"
1328 },
Austin Engcb0cb652019-08-27 21:41:56 +00001329 "error callback": {
fujunwei23f71622021-12-02 07:41:21 +00001330 "category": "function pointer",
Corentin Wallez540abab2019-11-22 13:18:22 +00001331 "args": [
1332 {"name": "type", "type": "error type"},
Henry Betts5ad86f32023-07-11 09:48:38 +00001333 {"name": "message", "type": "char", "annotation": "const*", "length": "strlen"},
Loko Kung670e0bb2023-06-10 06:51:37 +00001334 {"name": "userdata", "type": "void *"}
Corentin Wallez540abab2019-11-22 13:18:22 +00001335 ]
Austin Eng376f1c62017-05-30 20:03:44 -04001336 },
Austin Eng02fbf162021-09-13 18:49:09 +00001337 "limits": {
1338 "category": "structure",
Austin Eng02fbf162021-09-13 18:49:09 +00001339 "members": [
1340 {"name": "max texture dimension 1D", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
1341 {"name": "max texture dimension 2D", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
1342 {"name": "max texture dimension 3D", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
1343 {"name": "max texture array layers", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
1344 {"name": "max bind groups", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
Yunchao Hef3cac0d2023-06-28 15:54:24 +00001345 {"name": "max bind groups plus vertex buffers", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
Brandon Jones773800b2022-09-21 17:42:24 +00001346 {"name": "max bindings per bind group", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
Austin Eng02fbf162021-09-13 18:49:09 +00001347 {"name": "max dynamic uniform buffers per pipeline layout", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
1348 {"name": "max dynamic storage buffers per pipeline layout", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
1349 {"name": "max sampled textures per shader stage", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
1350 {"name": "max samplers per shader stage", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
1351 {"name": "max storage buffers per shader stage", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
1352 {"name": "max storage textures per shader stage", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
1353 {"name": "max uniform buffers per shader stage", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
1354 {"name": "max uniform buffer binding size", "type": "uint64_t", "default": "WGPU_LIMIT_U64_UNDEFINED"},
1355 {"name": "max storage buffer binding size", "type": "uint64_t", "default": "WGPU_LIMIT_U64_UNDEFINED"},
1356 {"name": "min uniform buffer offset alignment", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
1357 {"name": "min storage buffer offset alignment", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
1358 {"name": "max vertex buffers", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
shrekshaod1a5f932022-09-29 19:02:11 +00001359 {"name": "max buffer size", "type": "uint64_t", "default": "WGPU_LIMIT_U64_UNDEFINED"},
Austin Eng02fbf162021-09-13 18:49:09 +00001360 {"name": "max vertex attributes", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
1361 {"name": "max vertex buffer array stride", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
1362 {"name": "max inter stage shader components", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
Brandon Jones431c7a42022-06-24 17:30:29 +00001363 {"name": "max inter stage shader variables", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
Austin Engcda3d7b2022-06-13 16:48:45 +00001364 {"name": "max color attachments", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
Loko Kunge70563a2022-12-12 20:55:05 +00001365 {"name": "max color attachment bytes per sample", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
Austin Eng02fbf162021-09-13 18:49:09 +00001366 {"name": "max compute workgroup storage size", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
1367 {"name": "max compute invocations per workgroup", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
1368 {"name": "max compute workgroup size x", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
1369 {"name": "max compute workgroup size y", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
1370 {"name": "max compute workgroup size z", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
Loko Kungd2aaf762023-04-25 22:46:23 +00001371 {"name": "max compute workgroups per dimension", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"}
Austin Eng02fbf162021-09-13 18:49:09 +00001372 ]
1373 },
Austin Engbffc9662021-09-17 15:36:00 +00001374 "required limits": {
1375 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00001376 "extensible": "in",
Austin Engbffc9662021-09-17 15:36:00 +00001377 "members": [
1378 {"name": "limits", "type": "limits"}
1379 ]
1380 },
1381 "supported limits": {
1382 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00001383 "extensible": "out",
Austin Engbffc9662021-09-17 15:36:00 +00001384 "members": [
1385 {"name": "limits", "type": "limits"}
1386 ]
1387 },
Zhaoming Jiangb44000e2021-06-04 07:10:56 +00001388 "logging callback": {
fujunwei23f71622021-12-02 07:41:21 +00001389 "category": "function pointer",
Kai Ninomiya930e9182021-09-17 19:44:43 +00001390 "tags": ["dawn"],
Zhaoming Jiangb44000e2021-06-04 07:10:56 +00001391 "args": [
1392 {"name": "type", "type": "logging type"},
Henry Betts5ad86f32023-07-11 09:48:38 +00001393 {"name": "message", "type": "char", "annotation": "const*", "length": "strlen"},
Loko Kung670e0bb2023-06-10 06:51:37 +00001394 {"name": "userdata", "type": "void *"}
Zhaoming Jiangb44000e2021-06-04 07:10:56 +00001395 ]
1396 },
Austin Eng45238d72019-09-04 22:54:03 +00001397 "error filter": {
1398 "category": "enum",
1399 "values": [
Zhaoming Jiang53137bd2021-12-08 02:42:17 +00001400 {"value": 0, "name": "validation"},
Brandon Jones567f0682022-09-07 14:14:14 +00001401 {"value": 1, "name": "out of memory"},
1402 {"value": 2, "name": "internal"}
Austin Eng45238d72019-09-04 22:54:03 +00001403 ]
1404 },
Austin Engcb0cb652019-08-27 21:41:56 +00001405 "error type": {
1406 "category": "enum",
Kai Ninomiya930e9182021-09-17 19:44:43 +00001407 "emscripten_no_enum_table": true,
Austin Engcb0cb652019-08-27 21:41:56 +00001408 "values": [
1409 {"value": 0, "name": "no error"},
1410 {"value": 1, "name": "validation"},
1411 {"value": 2, "name": "out of memory"},
Brandon Jones567f0682022-09-07 14:14:14 +00001412 {"value": 3, "name": "internal"},
1413 {"value": 4, "name": "unknown"},
1414 {"value": 5, "name": "device lost"}
Austin Engcb0cb652019-08-27 21:41:56 +00001415 ]
1416 },
Zhaoming Jiangb44000e2021-06-04 07:10:56 +00001417 "logging type": {
1418 "category": "enum",
Kai Ninomiya930e9182021-09-17 19:44:43 +00001419 "tags": ["dawn"],
Zhaoming Jiangb44000e2021-06-04 07:10:56 +00001420 "values": [
1421 {"value": 0, "name": "verbose"},
1422 {"value": 1, "name": "info"},
1423 {"value": 2, "name": "warning"},
1424 {"value": 3, "name": "error"}
1425 ]
1426 },
Yan,Shaobo96a0bd52022-10-24 04:19:43 +00001427 "extent 2D": {
1428 "category": "structure",
Yan,Shaoboe8dd6812022-11-03 09:03:01 +00001429 "tags": ["dawn"],
Yan,Shaobo96a0bd52022-10-24 04:19:43 +00001430 "members": [
Yan,Shaobo2b228f352023-07-28 02:18:04 +00001431 {"name": "width", "type": "uint32_t"},
1432 {"name": "height", "type": "uint32_t"}
Yan,Shaobo96a0bd52022-10-24 04:19:43 +00001433 ]
1434 },
Corentin Wallez29353d62018-09-18 12:49:22 +00001435 "extent 3D": {
1436 "category": "structure",
1437 "members": [
Corentin Walleza736d962021-03-04 17:03:15 +00001438 {"name": "width", "type": "uint32_t"},
Corentin Wallez2931c422020-10-16 14:20:06 +00001439 {"name": "height", "type": "uint32_t", "default": 1},
Brandon Jones76e5a9f2021-05-13 17:51:23 +00001440 {"name": "depth or array layers", "type": "uint32_t", "default": 1}
Corentin Wallez29353d62018-09-18 12:49:22 +00001441 ]
1442 },
Brandon Jones0e92e9b2021-04-01 20:46:42 +00001443 "external texture": {
1444 "category": "object",
Kai Ninomiya930e9182021-09-17 19:44:43 +00001445 "tags": ["dawn"],
Brandon Jones0e92e9b2021-04-01 20:46:42 +00001446 "methods": [
1447 {
Brandon Jones88aeeae2021-11-19 18:26:08 +00001448 "name": "set label",
1449 "returns": "void",
Brandon Jones88aeeae2021-11-19 18:26:08 +00001450 "args": [
1451 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"}
1452 ]
1453 },
1454 {
Brandon Jones0e92e9b2021-04-01 20:46:42 +00001455 "name": "destroy",
1456 "returns": "void"
Yan,Shaoboe958db02023-02-24 02:09:38 +00001457 },
1458 {
1459 "name": "expire",
1460 "returns": "void"
1461 },
1462 {
1463 "name": "refresh",
1464 "returns": "void"
Brandon Jones0e92e9b2021-04-01 20:46:42 +00001465 }
1466 ]
1467 },
Brandon Jones85ceb082022-11-30 21:32:26 +00001468 "external texture rotation":{
1469 "category": "enum",
1470 "tags": ["dawn"],
1471 "values": [
1472 {"value": 0, "name": "rotate 0 degrees"},
1473 {"value": 1, "name": "rotate 90 degrees"},
1474 {"value": 2, "name": "rotate 180 degrees"},
1475 {"value": 3, "name": "rotate 270 degrees"}
1476 ]
1477 },
Brandon Jones0e92e9b2021-04-01 20:46:42 +00001478 "external texture descriptor": {
1479 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00001480 "extensible": "in",
Kai Ninomiya930e9182021-09-17 19:44:43 +00001481 "tags": ["dawn"],
Brandon Jones0e92e9b2021-04-01 20:46:42 +00001482 "members": [
Corentin Wallezd85bbb62021-10-01 15:34:25 +00001483 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
Brandon Jones0e92e9b2021-04-01 20:46:42 +00001484 {"name": "plane 0", "type": "texture view"},
Brandon Jones37b3df42022-01-25 18:09:00 +00001485 {"name": "plane 1", "type": "texture view", "optional": true},
Yan,Shaoboe8dd6812022-11-03 09:03:01 +00001486 {"name": "visible origin", "type": "origin 2D"},
1487 {"name": "visible size", "type": "extent 2D"},
jchen10ef62b582022-06-22 03:14:26 +00001488 {"name": "do yuv to rgb conversion only", "type": "bool", "default": "false"},
Brandon Jonescf4a85e2022-05-02 20:37:28 +00001489 {"name": "yuv to rgb conversion matrix", "type": "float", "annotation": "const*",
Brandon Jones136a0a42022-05-24 01:41:43 +00001490 "length": 12, "optional": true},
Brandon Jonescf4a85e2022-05-02 20:37:28 +00001491 {"name": "src transfer function parameters", "type": "float", "annotation": "const*",
Brandon Jonese61a390b2022-05-19 17:44:29 +00001492 "length": 7},
Brandon Jonescf4a85e2022-05-02 20:37:28 +00001493 {"name": "dst transfer function parameters", "type": "float", "annotation": "const*",
Brandon Jonese61a390b2022-05-19 17:44:29 +00001494 "length": 7},
Brandon Jonescf4a85e2022-05-02 20:37:28 +00001495 {"name": "gamut conversion matrix", "type": "float", "annotation": "const*",
Brandon Jones85ceb082022-11-30 21:32:26 +00001496 "length": 9},
1497 {"name": "flip y", "type": "bool", "default": "false"},
Brandon Jones713cd862023-01-04 21:27:32 +00001498 {"name": "rotation", "type": "external texture rotation", "default": "rotate 0 degrees"}
Brandon Jones0e92e9b2021-04-01 20:46:42 +00001499 ]
1500 },
Austin Eng5a54d9e2023-08-04 13:49:24 +00001501 "shared texture memory": {
1502 "category": "object",
1503 "tags": ["dawn", "native"],
1504 "methods": [
1505 {
1506 "name": "set label",
1507 "returns": "void",
1508 "args": [
1509 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"}
1510 ]
1511 },
1512 {
1513 "name": "get properties",
1514 "returns": "void",
1515 "args": [
1516 {"name": "properties", "type": "shared texture memory properties", "annotation": "*"}
1517 ]
1518 },
1519 {
1520 "name": "create texture",
1521 "returns": "texture",
1522 "args": [
Austin Eng17a8b4e2023-08-19 00:19:51 +00001523 {"name": "descriptor", "type": "texture descriptor", "annotation": "const*", "optional": true, "default": "nullptr"}
Austin Eng5a54d9e2023-08-04 13:49:24 +00001524 ]
1525 },
1526 {
1527 "name": "begin access",
Austin Engb585e7b2023-08-31 03:39:42 +00001528 "returns": "bool",
Austin Eng5a54d9e2023-08-04 13:49:24 +00001529 "args": [
1530 {"name": "texture", "type": "texture"},
1531 {"name": "descriptor", "type": "shared texture memory begin access descriptor", "annotation": "const*"}
1532 ]
1533 },
1534 {
1535 "name": "end access",
Austin Engb585e7b2023-08-31 03:39:42 +00001536 "returns": "bool",
Austin Eng5a54d9e2023-08-04 13:49:24 +00001537 "args": [
1538 {"name": "texture", "type": "texture"},
1539 {"name": "descriptor", "type": "shared texture memory end access state", "annotation": "*"}
1540 ]
1541 }
1542 ]
1543 },
1544 "shared texture memory properties": {
1545 "category": "structure",
1546 "extensible": "out",
1547 "tags": ["dawn", "native"],
1548 "members": [
1549 {"name": "usage", "type": "texture usage"},
1550 {"name": "size", "type": "extent 3D"},
1551 {"name": "format", "type": "texture format"}
1552 ]
1553 },
1554 "shared texture memory descriptor": {
1555 "category": "structure",
1556 "extensible": "in",
1557 "tags": ["dawn", "native"],
1558 "members": [
1559 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true}
1560 ]
1561 },
1562 "shared texture memory vk image descriptor": {
1563 "category": "structure",
1564 "chained": "in",
1565 "chain roots": ["shared texture memory descriptor"],
1566 "tags": ["dawn", "native"],
1567 "members": [
1568 {"name": "vk format", "type": "int32_t"},
1569 {"name": "vk usage flags", "type": "int32_t"},
1570 {"name": "vk extent 3D", "type": "extent 3D"}
1571 ]
1572 },
1573 "shared texture memory vk dedicated allocation descriptor": {
1574 "category": "structure",
1575 "chained": "in",
1576 "chain roots": ["shared texture memory descriptor"],
1577 "tags": ["dawn", "native"],
1578 "members": [
1579 {"name": "dedicated allocation", "type": "bool"}
1580 ]
1581 },
1582 "shared texture memory a hardware buffer descriptor": {
1583 "category": "structure",
1584 "chained": "in",
1585 "chain roots": ["shared texture memory descriptor"],
1586 "tags": ["dawn", "native"],
1587 "members": [
1588 {"name": "handle", "type": "void *"}
1589 ]
1590 },
1591 "shared texture memory dma buf descriptor": {
1592 "category": "structure",
1593 "chained": "in",
1594 "chain roots": ["shared texture memory descriptor"],
1595 "tags": ["dawn", "native"],
1596 "members": [
1597 {"name": "memory FD", "type": "int"},
1598 {"name": "allocation size", "type": "uint64_t"},
1599 {"name": "drm modifier", "type": "uint64_t"},
1600 {"name": "plane count", "type": "size_t"},
1601 {"name": "plane offsets", "type": "uint64_t", "annotation": "const*", "length": "plane count"},
1602 {"name": "plane strides", "type": "uint32_t", "annotation": "const*", "length": "plane count"}
1603 ]
1604 },
1605 "shared texture memory opaque FD descriptor": {
1606 "category": "structure",
1607 "chained": "in",
1608 "chain roots": ["shared texture memory descriptor"],
1609 "tags": ["dawn", "native"],
1610 "members": [
1611 {"name": "memory FD", "type": "int"},
1612 {"name": "allocation size", "type": "uint64_t"}
1613 ]
1614 },
1615 "shared texture memory zircon handle descriptor": {
1616 "category": "structure",
1617 "chained": "in",
1618 "chain roots": ["shared texture memory descriptor"],
1619 "tags": ["dawn", "native"],
1620 "members": [
1621 {"name": "memory FD", "type": "uint32_t"},
1622 {"name": "allocation size", "type": "uint64_t"}
1623 ]
1624 },
1625 "shared texture memory DXGI shared handle descriptor": {
1626 "category": "structure",
1627 "chained": "in",
1628 "chain roots": ["shared texture memory descriptor"],
1629 "tags": ["dawn", "native"],
1630 "_comment": "TODO(crbug.com/dawn/1745): improve type safety",
1631 "members": [
1632 {"name": "handle", "type": "void *"}
1633 ]
1634 },
1635 "shared texture memory IO surface descriptor": {
1636 "category": "structure",
1637 "chained": "in",
1638 "chain roots": ["shared texture memory descriptor"],
1639 "tags": ["dawn", "native"],
1640 "_comment": "TODO(crbug.com/dawn/1745): improve type safety",
1641 "members": [
1642 {"name": "io surface", "type": "void *"}
1643 ]
1644 },
1645 "shared texture memory EGL image descriptor": {
1646 "category": "structure",
1647 "chained": "in",
1648 "chain roots": ["shared texture memory descriptor"],
1649 "tags": ["dawn", "native"],
1650 "_comment": "TODO(crbug.com/dawn/1745): improve type safety",
1651 "members": [
1652 {"name": "image", "type": "void *"}
1653 ]
1654 },
1655 "shared texture memory begin access descriptor": {
1656 "category": "structure",
1657 "extensible": "in",
1658 "tags": ["dawn", "native"],
1659 "members": [
1660 {"name": "initialized", "type": "bool"},
1661 {"name": "fence count", "type": "size_t"},
1662 {"name": "fences", "type": "shared fence", "annotation": "const*", "length": "fence count"},
1663 {"name": "signaled values", "type": "uint64_t", "annotation": "const*", "length": "fence count"}
1664 ]
1665 },
1666 "shared texture memory end access state": {
1667 "category": "structure",
1668 "extensible": "out",
1669 "tags": ["dawn", "native"],
1670 "members": [
1671 {"name": "initialized", "type": "bool"},
1672 {"name": "fence count", "type": "size_t"},
1673 {"name": "fences", "type": "shared fence", "annotation": "const*", "length": "fence count"},
1674 {"name": "signaled values", "type": "uint64_t", "annotation": "const*", "length": "fence count"}
1675 ]
1676 },
1677 "shared texture memory vk image layout begin state": {
1678 "category": "structure",
1679 "chained": "in",
1680 "chain roots": ["shared texture memory begin access descriptor"],
1681 "tags": ["dawn", "native"],
1682 "_comment": "TODO(crbug.com/dawn/1745): improve type safety",
1683 "members": [
1684 {"name": "old layout", "type": "int32_t"},
1685 {"name": "new layout", "type": "int32_t"}
1686 ]
1687 },
1688 "shared texture memory vk image layout end state": {
1689 "category": "structure",
1690 "chained": "out",
1691 "chain roots": ["shared texture memory end access state"],
1692 "tags": ["dawn", "native"],
1693 "_comment": "TODO(crbug.com/dawn/1745): improve type safety",
1694 "members": [
1695 {"name": "old layout", "type": "int32_t"},
1696 {"name": "new layout", "type": "int32_t"}
1697 ]
1698 },
1699 "shared fence": {
1700 "category": "object",
1701 "tags": ["dawn", "native"],
1702 "methods": [
1703 {
1704 "name": "export info",
1705 "returns": "void",
1706 "args": [
1707 {"name": "info", "type": "shared fence export info", "annotation": "*"}
1708 ]
1709 }
1710 ]
1711 },
1712 "shared fence descriptor": {
1713 "category": "structure",
1714 "extensible": "in",
1715 "tags": ["dawn", "native"],
1716 "members": [
1717 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true}
1718 ]
1719 },
1720 "shared fence vk semaphore opaque FD descriptor": {
1721 "category": "structure",
1722 "chained": "in",
1723 "chain roots": ["shared fence descriptor"],
1724 "tags": ["dawn", "native"],
1725 "members": [
1726 {"name": "handle", "type": "int"}
1727 ]
1728 },
1729 "shared fence vk semaphore sync FD descriptor": {
1730 "category": "structure",
1731 "chained": "in",
1732 "chain roots": ["shared fence descriptor"],
1733 "tags": ["dawn", "native"],
1734 "members": [
1735 {"name": "handle", "type": "int"}
1736 ]
1737 },
1738 "shared fence vk semaphore zircon handle descriptor": {
1739 "category": "structure",
1740 "chained": "in",
1741 "chain roots": ["shared fence descriptor"],
1742 "tags": ["dawn", "native"],
1743 "members": [
1744 {"name": "handle", "type": "uint32_t"}
1745 ]
1746 },
1747 "shared fence DXGI shared handle descriptor": {
1748 "category": "structure",
1749 "chained": "in",
1750 "chain roots": ["shared fence descriptor"],
1751 "tags": ["dawn", "native"],
1752 "members": [
1753 {"name": "handle", "type": "void *"}
1754 ]
1755 },
1756 "shared fence MTL shared event descriptor": {
1757 "category": "structure",
1758 "chained": "in",
1759 "chain roots": ["shared fence descriptor"],
1760 "tags": ["dawn", "native"],
1761 "_comment": "TODO(crbug.com/dawn/1745): improve type safety",
1762 "members": [
1763 {"name": "shared event", "type": "void *"}
1764 ]
1765 },
1766 "shared fence type": {
1767 "category": "enum",
1768 "tags": ["dawn", "native"],
1769 "values": [
1770 {"value": 0, "name": "undefined", "valid": false},
1771 {"value": 1, "name": "vk semaphore opaque FD"},
1772 {"value": 2, "name": "vk semaphore sync FD"},
1773 {"value": 3, "name": "vk semaphore zircon handle"},
1774 {"value": 4, "name": "DXGI shared handle"},
1775 {"value": 5, "name": "MTL shared event"}
1776 ]
1777 },
1778 "shared fence export info": {
1779 "category": "structure",
1780 "extensible": "out",
1781 "tags": ["dawn", "native"],
1782 "members": [
1783 {"name": "type", "type": "shared fence type"}
1784 ]
1785 },
1786 "shared fence vk semaphore opaque FD export info": {
1787 "category": "structure",
1788 "chained": "out",
1789 "chain roots": ["shared fence export info"],
1790 "tags": ["dawn", "native"],
1791 "members": [
1792 {"name": "handle", "type": "int"}
1793 ]
1794 },
1795 "shared fence vk semaphore sync FD export info": {
1796 "category": "structure",
1797 "chained": "out",
1798 "chain roots": ["shared fence export info"],
1799 "tags": ["dawn", "native"],
1800 "members": [
1801 {"name": "handle", "type": "int"}
1802 ]
1803 },
1804 "shared fence vk semaphore zircon handle export info": {
1805 "category": "structure",
1806 "chained": "out",
1807 "chain roots": ["shared fence export info"],
1808 "tags": ["dawn", "native"],
1809 "members": [
1810 {"name": "handle", "type": "uint32_t"}
1811 ]
1812 },
1813 "shared fence DXGI shared handle export info": {
1814 "category": "structure",
1815 "chained": "out",
1816 "chain roots": ["shared fence export info"],
1817 "tags": ["dawn", "native"],
1818 "members": [
1819 {"name": "handle", "type": "void *"}
1820 ]
1821 },
1822 "shared fence MTL shared event export info": {
1823 "category": "structure",
1824 "chained": "out",
1825 "chain roots": ["shared fence export info"],
1826 "tags": ["dawn", "native"],
1827 "_comment": "TODO(crbug.com/dawn/1745): improve type safety",
1828 "members": [
1829 {"name": "shared event", "type": "void *"}
1830 ]
1831 },
Kai Ninomiya7d174a12021-09-21 17:36:27 +00001832 "feature name": {
1833 "category": "enum",
Kai Ninomiya7d174a12021-09-21 17:36:27 +00001834 "values": [
Austin Engd1dcb502023-08-21 22:03:00 +00001835 {"value": 0, "name": "undefined", "jsrepr": "undefined", "valid": false},
Austin Eng51d13a42022-06-13 19:18:55 +00001836 {"value": 1, "name": "depth clip control"},
Brandon Jones6d48f572022-06-14 22:48:31 +00001837 {"value": 2, "name": "depth32 float stencil8"},
1838 {"value": 3, "name": "timestamp query"},
1839 {"value": 4, "name": "pipeline statistics query"},
1840 {"value": 5, "name": "texture compression BC"},
1841 {"value": 6, "name": "texture compression ETC2"},
1842 {"value": 7, "name": "texture compression ASTC"},
1843 {"value": 8, "name": "indirect first instance"},
Zhaoming Jiang7ca82ac2022-09-08 00:11:04 +00001844 {"value": 9, "name": "shader f16"},
Takahirod4dd5472022-09-22 16:38:06 +00001845 {"value": 10, "name": "RG11B10 ufloat renderable"},
Jiawei Shaof5cee3f2023-02-11 02:53:53 +00001846 {"value": 11, "name": "BGRA8 unorm storage"},
Loko Kung9fb0eed2023-05-18 07:21:11 +00001847 {"value": 12, "name": "float32 filterable"},
Corentin Wallez7d78e3c2023-08-15 16:46:12 +00001848
Austin Eng89ddadc2021-12-15 00:12:30 +00001849 {"value": 1002, "name": "dawn internal usages", "tags": ["dawn"]},
Austin Eng2f218e22021-12-22 19:02:23 +00001850 {"value": 1003, "name": "dawn multi planar formats", "tags": ["dawn"]},
Jiawei Shao9ebba362022-05-20 08:21:00 +00001851 {"value": 1004, "name": "dawn native", "tags": ["dawn", "native"]},
Li Hao74f6bc72022-10-28 04:51:16 +00001852 {"value": 1005, "name": "chromium experimental dp4a", "tags": ["dawn"]},
Le Hoang Quyen7971bfe2023-04-05 19:35:07 +00001853 {"value": 1006, "name": "timestamp query inside passes", "tags": ["dawn"]},
Le Hoang Quyen33557312023-04-20 20:42:05 +00001854 {"value": 1007, "name": "implicit device synchronization", "tags": ["dawn", "native"]},
Sunny Sachanandanid3d226d2023-07-25 03:17:24 +00001855 {"value": 1008, "name": "surface capabilities", "tags": ["dawn", "native"]},
Le Hoang Quyenb5879ac2023-06-27 08:32:22 +00001856 {"value": 1009, "name": "transient attachments", "tags": ["dawn"]},
Brandon Jones93210ba2023-07-24 17:35:45 +00001857 {"value": 1010, "name": "MSAA render to single sampled", "tags": ["dawn"]},
Sunny Sachanandanid3d226d2023-07-25 03:17:24 +00001858 {"value": 1011, "name": "dual source blending", "tags": ["dawn"]},
Stephen White657bdc12023-08-04 02:45:37 +00001859 {"value": 1012, "name": "D3D11 multithread protected", "tags": ["dawn", "native"]},
Austin Eng5a54d9e2023-08-04 13:49:24 +00001860 {"value": 1013, "name": "ANGLE texture sharing", "tags": ["dawn", "native"]},
Zhaoming Jiang21ad7232023-08-11 02:36:01 +00001861 {"value": 1014, "name": "chromium experimental subgroups", "tags": ["dawn"]},
1862 {"value": 1015, "name": "chromium experimental subgroup uniform control flow", "tags": ["dawn"]},
Jiawei Shaobdabd112023-08-15 08:17:58 +00001863 {"value": 1016, "name": "chromium experimental read write storage texture", "tags": ["dawn"]},
Corentin Wallez7d78e3c2023-08-15 16:46:12 +00001864 {"value": 1017, "name": "pixel local storage coherent", "tags": ["dawn"]},
1865 {"value": 1018, "name": "pixel local storage non coherent", "tags": ["dawn"]},
Jie Chen3bf44822023-08-21 02:56:57 +00001866 {"value": 1019, "name": "norm16 texture formats", "tags": ["dawn"]},
Le Hoang Quyen7431c9d2023-08-23 23:07:50 +00001867 {"value": 1020, "name": "multi planar format extended usages", "tags": ["dawn"]},
Jie Chenb2abd132023-08-29 03:23:25 +00001868 {"value": 1021, "name": "multi planar format p010", "tags": ["dawn"]},
Austin Eng5a54d9e2023-08-04 13:49:24 +00001869
1870 {"value": 1100, "name": "shared texture memory vk dedicated allocation", "tags": ["dawn", "native"]},
1871 {"value": 1101, "name": "shared texture memory a hardware buffer", "tags": ["dawn", "native"]},
1872 {"value": 1102, "name": "shared texture memory dma buf", "tags": ["dawn", "native"]},
1873 {"value": 1103, "name": "shared texture memory opaque FD", "tags": ["dawn", "native"]},
1874 {"value": 1104, "name": "shared texture memory zircon handle", "tags": ["dawn", "native"]},
1875 {"value": 1105, "name": "shared texture memory DXGI shared handle", "tags": ["dawn", "native"]},
1876 {"value": 1106, "name": "shared texture memory D3D11 texture 2D", "tags": ["dawn", "native"]},
1877 {"value": 1107, "name": "shared texture memory IO surface", "tags": ["dawn", "native"]},
1878 {"value": 1108, "name": "shared texture memory EGL image", "tags": ["dawn", "native"]},
1879 {"value": 1200, "name": "shared fence vk semaphore opaque FD", "tags": ["dawn", "native"]},
1880 {"value": 1201, "name": "shared fence vk semaphore sync FD", "tags": ["dawn", "native"]},
1881 {"value": 1202, "name": "shared fence vk semaphore zircon handle", "tags": ["dawn", "native"]},
1882 {"value": 1203, "name": "shared fence DXGI shared handle", "tags": ["dawn", "native"]},
1883 {"value": 1204, "name": "shared fence MTL shared event", "tags": ["dawn", "native"]}
Kai Ninomiya7d174a12021-09-21 17:36:27 +00001884 ]
1885 },
Austin Eng376f1c62017-05-30 20:03:44 -04001886 "filter mode": {
1887 "category": "enum",
1888 "values": [
Yunchao Hecfea9342019-04-02 14:31:29 +00001889 {"value": 0, "name": "nearest"},
1890 {"value": 1, "name": "linear"}
Austin Eng376f1c62017-05-30 20:03:44 -04001891 ]
1892 },
Austin Engfb426532017-08-01 14:22:52 -04001893 "float": {
1894 "category": "native"
1895 },
Yunchao Hec33a8c12019-04-11 18:46:54 +00001896 "front face": {
1897 "category": "enum",
1898 "values": [
1899 {"value": 0, "name": "CCW"},
1900 {"value": 1, "name": "CW"}
1901 ]
1902 },
Corentin Wallez80915842021-03-04 18:13:45 +00001903 "image copy buffer": {
1904 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00001905 "extensible": "in",
Corentin Wallez80915842021-03-04 18:13:45 +00001906 "members": [
1907 {"name": "layout", "type": "texture data layout"},
1908 {"name": "buffer", "type": "buffer"}
1909 ]
1910 },
1911 "image copy texture": {
1912 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00001913 "extensible": "in",
Corentin Wallez80915842021-03-04 18:13:45 +00001914 "members": [
1915 {"name": "texture", "type": "texture"},
1916 {"name": "mip level", "type": "uint32_t", "default": "0"},
1917 {"name": "origin", "type": "origin 3D"},
1918 {"name": "aspect", "type": "texture aspect", "default": "all"}
1919 ]
1920 },
Yan,Shaobob4d8c802022-10-26 00:58:46 +00001921 "image copy external texture": {
1922 "category": "structure",
1923 "extensible": "in",
1924 "tags": ["dawn"],
1925 "members": [
1926 {"name": "external texture", "type": "external texture"},
Yan,Shaobo8150d1c2023-03-24 03:43:56 +00001927 {"name": "origin", "type": "origin 3D"},
1928 {"name": "natural size", "type": "extent 2D"}
Yan,Shaobob4d8c802022-10-26 00:58:46 +00001929 ]
1930 },
Austin Eng376f1c62017-05-30 20:03:44 -04001931 "index format": {
1932 "category": "enum",
1933 "values": [
Brandon Jones8575cb32020-08-27 01:13:35 +00001934 {"value": 0, "name": "undefined", "jsrepr": "undefined"},
1935 {"value": 1, "name": "uint16"},
1936 {"value": 2, "name": "uint32"}
Austin Eng376f1c62017-05-30 20:03:44 -04001937 ]
1938 },
Corentin Wallez5fc2c822020-01-10 13:06:48 +00001939 "instance": {
Corentin Wallez3a1746e2020-01-15 13:14:12 +00001940 "category": "object",
Le Hoang Quyen7971bfe2023-04-05 19:35:07 +00001941 "no autolock": true,
Corentin Wallez3a1746e2020-01-15 13:14:12 +00001942 "methods": [
1943 {
1944 "name": "create surface",
1945 "returns": "surface",
1946 "args": [
1947 {"name": "descriptor", "type": "surface descriptor", "annotation": "const*"}
1948 ]
Kai Ninomiya4e37acc2021-09-17 21:13:33 +00001949 },
1950 {
Le Hoang Quyen69e1c4b2023-03-14 19:03:10 +00001951 "name": "process events"
Kai Ninomiya4e37acc2021-09-17 21:13:33 +00001952 },
1953 {
1954 "name": "request adapter",
Kai Ninomiya4e37acc2021-09-17 21:13:33 +00001955 "args": [
Corentin Wallez1260a532022-07-26 17:36:44 +00001956 {"name": "options", "type": "request adapter options", "annotation": "const*", "optional": true, "no_default": true},
Corentin Walleze00c6bd2021-12-13 17:37:17 +00001957 {"name": "callback", "type": "request adapter callback"},
Loko Kung670e0bb2023-06-10 06:51:37 +00001958 {"name": "userdata", "type": "void *"}
Kai Ninomiya4e37acc2021-09-17 21:13:33 +00001959 ]
Corentin Wallez3a1746e2020-01-15 13:14:12 +00001960 }
1961 ]
Corentin Wallez5fc2c822020-01-10 13:06:48 +00001962 },
1963 "instance descriptor": {
1964 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00001965 "extensible": "in",
Corentin Wallez5fc2c822020-01-10 13:06:48 +00001966 "members": []
1967 },
Brandon Jones58a471a2021-02-08 19:48:06 +00001968 "vertex attribute": {
Yunchao Heb2207732019-02-14 00:35:39 +00001969 "category": "structure",
1970 "extensible": false,
1971 "members": [
Kai Ninomiyaae1f25f2019-11-07 22:23:29 +00001972 {"name": "format", "type": "vertex format"},
1973 {"name": "offset", "type": "uint64_t"},
1974 {"name": "shader location", "type": "uint32_t"}
Yunchao Heb2207732019-02-14 00:35:39 +00001975 ]
1976 },
Brandon Jones58a471a2021-02-08 19:48:06 +00001977 "vertex buffer layout": {
Yunchao He4dec7372019-02-14 23:56:07 +00001978 "category": "structure",
1979 "extensible": false,
1980 "members": [
Kai Ninomiyaae1f25f2019-11-07 22:23:29 +00001981 {"name": "array stride", "type": "uint64_t"},
Corentin Wallezff6c9ca62021-07-25 18:40:19 +00001982 {"name": "step mode", "type": "vertex step mode", "default": "vertex"},
Loko Kung837f1512023-06-06 03:01:15 +00001983 {"name": "attribute count", "type": "size_t"},
Brandon Jones58a471a2021-02-08 19:48:06 +00001984 {"name": "attributes", "type": "vertex attribute", "annotation": "const*", "length": "attribute count"}
Yunchao He4dec7372019-02-14 23:56:07 +00001985 ]
1986 },
Corentin Wallezff6c9ca62021-07-25 18:40:19 +00001987 "vertex step mode": {
Austin Eng376f1c62017-05-30 20:03:44 -04001988 "category": "enum",
1989 "values": [
Takahirof3cf19f2022-05-31 17:24:49 +00001990 {"value": 0, "name": "vertex"},
1991 {"value": 1, "name": "instance"},
Shrek Shao9ec183e2022-08-01 23:03:14 +00001992 {"value": 2, "name": "vertex buffer not used", "jsrepr": "undefined", "valid": true}
Austin Eng376f1c62017-05-30 20:03:44 -04001993 ]
1994 },
Kai Ninomiyab9854312017-08-11 14:36:20 -07001995 "load op": {
1996 "category": "enum",
1997 "values": [
Austin Eng74d4e532022-03-09 18:43:51 +00001998 {"value": 0, "name": "undefined", "jsrepr": "undefined"},
Brandon Jonesa20ce6f2022-02-03 17:59:04 +00001999 {"value": 1, "name": "clear"},
2000 {"value": 2, "name": "load"}
Kai Ninomiyab9854312017-08-11 14:36:20 -07002001 ]
2002 },
Corentin Wallez0d52f802020-07-14 12:30:14 +00002003 "map mode": {
2004 "category": "bitmask",
2005 "values": [
2006 {"value": 0, "name": "none"},
2007 {"value": 1, "name": "read"},
2008 {"value": 2, "name": "write"}
2009 ]
2010 },
Corentin Wallezeee34492022-03-16 18:44:16 +00002011 "mipmap filter mode": {
2012 "category": "enum",
Corentin Wallezeee34492022-03-16 18:44:16 +00002013 "values": [
2014 {"value": 0, "name": "nearest"},
2015 {"value": 1, "name": "linear"}
2016 ]
2017 },
Jiawei Shao5e811ae2018-12-19 08:21:13 +00002018 "store op": {
2019 "category": "enum",
2020 "values": [
Austin Eng74d4e532022-03-09 18:43:51 +00002021 {"value": 0, "name": "undefined", "jsrepr": "undefined"},
Brandon Jonesa20ce6f2022-02-03 17:59:04 +00002022 {"value": 1, "name": "store"},
2023 {"value": 2, "name": "discard"}
Jiawei Shao5e811ae2018-12-19 08:21:13 +00002024 ]
2025 },
Brandon Jonesac71e342018-11-28 17:54:13 +00002026 "origin 3D": {
2027 "category": "structure",
2028 "members": [
Corentin Wallez8f938712019-07-08 19:20:22 +00002029 {"name": "x", "type": "uint32_t", "default": "0"},
2030 {"name": "y", "type": "uint32_t", "default": "0"},
2031 {"name": "z", "type": "uint32_t", "default": "0"}
Brandon Jonesac71e342018-11-28 17:54:13 +00002032 ]
2033 },
Yan,Shaoboe8dd6812022-11-03 09:03:01 +00002034 "origin 2D": {
2035 "category": "structure",
2036 "tags": ["dawn"],
2037 "members": [
2038 {"name": "x", "type": "uint32_t", "default": "0"},
2039 {"name": "y", "type": "uint32_t", "default": "0"}
2040 ]
2041 },
Austin Eng376f1c62017-05-30 20:03:44 -04002042 "pipeline layout": {
Brandon Jones88aeeae2021-11-19 18:26:08 +00002043 "category": "object",
2044 "methods": [
2045 {
2046 "name": "set label",
2047 "returns": "void",
Brandon Jones88aeeae2021-11-19 18:26:08 +00002048 "args": [
2049 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"}
2050 ]
2051 }
2052 ]
Austin Eng376f1c62017-05-30 20:03:44 -04002053 },
Kai Ninomiyaf53f98b2018-06-27 16:21:39 -07002054 "pipeline layout descriptor": {
2055 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00002056 "extensible": "in",
Kai Ninomiyaf53f98b2018-06-27 16:21:39 -07002057 "members": [
François Beaufort277d2e12019-10-03 14:56:49 +00002058 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
Loko Kung837f1512023-06-06 03:01:15 +00002059 {"name": "bind group layout count", "type": "size_t"},
Jiawei Shao20301662019-02-21 00:45:19 +00002060 {"name": "bind group layouts", "type": "bind group layout", "annotation": "const*", "length": "bind group layout count"}
Austin Eng376f1c62017-05-30 20:03:44 -04002061 ]
2062 },
Corentin Wallez7d78e3c2023-08-15 16:46:12 +00002063 "pipeline layout pixel local storage": {
2064 "category": "structure",
2065 "tags": ["dawn"],
2066 "chained": "in",
2067 "chain roots": ["pipeline layout descriptor"],
2068 "members": [
Corentin Wallezb4b916a2023-09-08 17:14:30 +00002069 {"name": "total pixel local storage size", "type": "uint64_t"},
Corentin Wallez7d78e3c2023-08-15 16:46:12 +00002070 {"name": "storage attachment count", "type": "size_t", "default": 0},
2071 {"name": "storage attachments", "type": "pipeline layout storage attachment", "annotation": "const*", "length": "storage attachment count"}
2072 ]
2073 },
2074 "pipeline layout storage attachment": {
2075 "category": "structure",
2076 "tags": ["dawn"],
2077 "extensible": "in",
2078 "members": [
2079 {"name": "offset", "type": "uint64_t", "default": 0},
2080 {"name": "format", "type": "texture format"}
2081 ]
2082 },
Kai Ninomiya261b05d2020-07-13 18:21:03 +00002083 "pipeline statistic name": {
Hao Lib6eff5a2020-06-11 00:34:14 +00002084 "category": "enum",
2085 "values": [
2086 {"value": 0, "name": "vertex shader invocations"},
2087 {"value": 1, "name": "clipper invocations"},
2088 {"value": 2, "name": "clipper primitives out"},
2089 {"value": 3, "name": "fragment shader invocations"},
2090 {"value": 4, "name": "compute shader invocations"}
2091 ]
2092 },
Kai Ninomiya7d174a12021-09-21 17:36:27 +00002093 "power preference": {
2094 "category": "enum",
Kai Ninomiya7d174a12021-09-21 17:36:27 +00002095 "values": [
Shrek Shaoee50bc02022-02-08 20:21:40 +00002096 {"value": 0, "name": "undefined", "jsrepr": "undefined"},
Corentin Wallez6cd1cd92021-11-17 08:13:24 +00002097 {"value": 1, "name": "low power"},
2098 {"value": 2, "name": "high performance"}
Kai Ninomiya7d174a12021-09-21 17:36:27 +00002099 ]
2100 },
Corentin Wallezd87e6762020-01-23 17:20:38 +00002101 "present mode": {
2102 "category": "enum",
Kai Ninomiya930e9182021-09-17 19:44:43 +00002103 "emscripten_no_enum_table": true,
Corentin Wallezd87e6762020-01-23 17:20:38 +00002104 "values": [
dan sinclair3ebe5b62023-08-21 22:57:06 +00002105 {"value": 0, "name": "fifo"},
2106 {"value": 1, "name": "fifo relaxed", "tags": ["upstream"]},
2107 {"value": 2, "name": "immediate"},
2108 {"value": 3, "name": "mailbox"}
Corentin Wallezd87e6762020-01-23 17:20:38 +00002109 ]
2110 },
Jinho Bang0b826712019-10-07 12:23:09 +00002111 "programmable stage descriptor": {
Yan, Shaoboa4924272018-12-10 19:47:22 +00002112 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00002113 "extensible": "in",
Yan, Shaoboa4924272018-12-10 19:47:22 +00002114 "members": [
2115 {"name": "module", "type": "shader module"},
Kai Ninomiya7d174a12021-09-21 17:36:27 +00002116 {"name": "entry point", "type": "char", "annotation": "const*", "length": "strlen"},
Loko Kung837f1512023-06-06 03:01:15 +00002117 {"name": "constant count", "type": "size_t", "default": 0},
shrekshaoe99ad762021-09-28 20:15:52 +00002118 {"name": "constants", "type": "constant entry", "annotation": "const*", "length": "constant count"}
Yan, Shaoboa4924272018-12-10 19:47:22 +00002119 ]
2120 },
Austin Eng3e9e3152017-07-24 13:54:19 -04002121 "primitive topology": {
2122 "category": "enum",
2123 "values": [
Austin Eng439d9632017-07-26 18:10:44 -04002124 {"value": 0, "name": "point list"},
2125 {"value": 1, "name": "line list"},
Austin Eng3e9e3152017-07-24 13:54:19 -04002126 {"value": 2, "name": "line strip"},
Austin Eng439d9632017-07-26 18:10:44 -04002127 {"value": 3, "name": "triangle list"},
Austin Eng3e9e3152017-07-24 13:54:19 -04002128 {"value": 4, "name": "triangle strip"}
2129 ]
2130 },
Hao Lib6eff5a2020-06-11 00:34:14 +00002131 "query set": {
2132 "category": "object",
2133 "methods": [
2134 {
Brandon Jones88aeeae2021-11-19 18:26:08 +00002135 "name": "set label",
2136 "returns": "void",
Brandon Jones88aeeae2021-11-19 18:26:08 +00002137 "args": [
2138 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"}
2139 ]
2140 },
2141 {
Corentin Wallez45820ae2022-06-09 10:12:13 +00002142 "name": "get type",
2143 "returns": "query type"
2144 },
2145 {
2146 "name": "get count",
2147 "returns": "uint32_t"
2148 },
2149 {
Hao Lib6eff5a2020-06-11 00:34:14 +00002150 "name": "destroy"
2151 }
2152 ]
2153 },
2154 "query set descriptor": {
2155 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00002156 "extensible": "in",
Hao Lib6eff5a2020-06-11 00:34:14 +00002157 "members": [
2158 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
2159 {"name": "type", "type": "query type"},
2160 {"name": "count", "type": "uint32_t"},
Loko Kung44fc9da2023-08-16 06:11:11 +00002161 {"name": "pipeline statistics", "type": "pipeline statistic name", "annotation": "const*", "length": "pipeline statistic count"},
2162 {"name": "pipeline statistic count", "type": "size_t", "default": "0"}
Hao Lib6eff5a2020-06-11 00:34:14 +00002163 ]
2164 },
2165 "query type": {
2166 "category": "enum",
2167 "values": [
2168 {"value": 0, "name": "occlusion"},
2169 {"value": 1, "name": "pipeline statistics"},
2170 {"value": 2, "name": "timestamp"}
2171 ]
2172 },
Austin Eng376f1c62017-05-30 20:03:44 -04002173 "queue": {
2174 "category": "object",
2175 "methods": [
2176 {
2177 "name": "submit",
2178 "args": [
Loko Kung837f1512023-06-06 03:01:15 +00002179 {"name": "command count", "type": "size_t"},
Jiawei Shao20301662019-02-21 00:45:19 +00002180 {"name": "commands", "type": "command buffer", "annotation": "const*", "length": "command count"}
Austin Eng376f1c62017-05-30 20:03:44 -04002181 ]
Austin Engf0b761f2018-12-03 16:57:34 +00002182 },
2183 {
Corentin Wallezc093db22021-02-25 13:17:01 +00002184 "name": "on submitted work done",
Corentin Wallezeee34492022-03-16 18:44:16 +00002185 "tags": ["dawn", "emscripten"],
Corentin Wallezc093db22021-02-25 13:17:01 +00002186 "args": [
2187 {"name": "signal value", "type": "uint64_t"},
Corentin Walleze00c6bd2021-12-13 17:37:17 +00002188 {"name": "callback", "type": "queue work done callback"},
Loko Kung670e0bb2023-06-10 06:51:37 +00002189 {"name": "userdata", "type": "void *"}
Corentin Wallezc093db22021-02-25 13:17:01 +00002190 ]
2191 },
2192 {
Corentin Wallezeee34492022-03-16 18:44:16 +00002193 "name": "on submitted work done",
2194 "tags": ["upstream"],
2195 "args": [
2196 {"name": "callback", "type": "queue work done callback"},
Loko Kung670e0bb2023-06-10 06:51:37 +00002197 {"name": "userdata", "type": "void *"}
Corentin Wallezeee34492022-03-16 18:44:16 +00002198 ]
2199 },
2200 {
Corentin Wallez47a33412020-06-02 09:24:39 +00002201 "name": "write buffer",
2202 "args": [
2203 {"name": "buffer", "type": "buffer"},
2204 {"name": "buffer offset", "type": "uint64_t"},
2205 {"name": "data", "type": "void", "annotation": "const*", "length": "size"},
2206 {"name": "size", "type": "size_t"}
2207 ]
Tomek Ponitkaa9c7d642020-07-08 18:42:30 +00002208 },
2209 {
2210 "name": "write texture",
2211 "args": [
Corentin Wallez80915842021-03-04 18:13:45 +00002212 {"name": "destination", "type": "image copy texture", "annotation": "const*"},
Corentin Wallez1b9b53a2020-07-16 00:43:08 +00002213 {"name": "data", "type": "void", "annotation": "const*", "length": "data size"},
Tomek Ponitkaa9c7d642020-07-08 18:42:30 +00002214 {"name": "data size", "type": "size_t"},
2215 {"name": "data layout", "type": "texture data layout", "annotation": "const*"},
Corentin Wallez1b9b53a2020-07-16 00:43:08 +00002216 {"name": "write size", "type": "extent 3D", "annotation": "const*"}
Tomek Ponitkaa9c7d642020-07-08 18:42:30 +00002217 ]
Yan, Shaobodb8766b2020-11-04 02:30:16 +00002218 },
2219 {
2220 "name": "copy texture for browser",
Austin Eng0c824052021-09-20 16:07:25 +00002221 "extensible": "in",
Kai Ninomiya930e9182021-09-17 19:44:43 +00002222 "tags": ["dawn"],
Yan, Shaobodb8766b2020-11-04 02:30:16 +00002223 "args": [
Corentin Wallez80915842021-03-04 18:13:45 +00002224 {"name": "source", "type": "image copy texture", "annotation": "const*"},
2225 {"name": "destination", "type": "image copy texture", "annotation": "const*"},
Yan, Shaobobb913a92020-12-02 08:13:09 +00002226 {"name": "copy size", "type": "extent 3D", "annotation": "const*"},
2227 {"name": "options", "type": "copy texture for browser options", "annotation": "const*"}
Yan, Shaobodb8766b2020-11-04 02:30:16 +00002228 ]
Brandon Jones80853672022-04-12 03:28:40 +00002229 },
2230 {
Yan,Shaobob4d8c802022-10-26 00:58:46 +00002231 "name": "copy external texture for browser",
2232 "extensible": "in",
2233 "tags": ["dawn"],
2234 "args": [
2235 {"name": "source", "type": "image copy external texture", "annotation": "const*"},
2236 {"name": "destination", "type": "image copy texture", "annotation": "const*"},
2237 {"name": "copy size", "type": "extent 3D", "annotation": "const*"},
2238 {"name": "options", "type": "copy texture for browser options", "annotation": "const*"}
2239 ]
2240 },
2241 {
Brandon Jones80853672022-04-12 03:28:40 +00002242 "name": "set label",
2243 "returns": "void",
2244 "args": [
2245 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"}
2246 ]
Austin Eng376f1c62017-05-30 20:03:44 -04002247 }
2248 ]
2249 },
Corentin Wallezeee34492022-03-16 18:44:16 +00002250 "queue descriptor": {
2251 "category": "structure",
2252 "extensible": "in",
Corentin Wallezeee34492022-03-16 18:44:16 +00002253 "members": [
2254 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true}
2255 ]
2256 },
Corentin Wallezc093db22021-02-25 13:17:01 +00002257 "queue work done callback": {
fujunwei23f71622021-12-02 07:41:21 +00002258 "category": "function pointer",
Corentin Wallezc093db22021-02-25 13:17:01 +00002259 "args": [
2260 {"name": "status", "type": "queue work done status"},
Loko Kung670e0bb2023-06-10 06:51:37 +00002261 {"name": "userdata", "type": "void *"}
Corentin Wallezc093db22021-02-25 13:17:01 +00002262 ]
2263 },
2264 "queue work done status": {
2265 "category": "enum",
Kai Ninomiya930e9182021-09-17 19:44:43 +00002266 "emscripten_no_enum_table": true,
Corentin Wallezc093db22021-02-25 13:17:01 +00002267 "values": [
2268 {"value": 0, "name": "success"},
2269 {"value": 1, "name": "error"},
2270 {"value": 2, "name": "unknown"},
2271 {"value": 3, "name": "device lost"}
2272 ]
2273 },
Jiawei Shao5e811ae2018-12-19 08:21:13 +00002274
Austin Eng8a488c12019-08-13 22:12:54 +00002275 "render bundle": {
Corentin Wallez06294ba2023-05-25 17:02:50 +00002276 "category": "object",
2277 "methods": [
2278 {
2279 "name": "set label",
2280 "returns": "void",
2281 "args": [
2282 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"}
2283 ]
2284 }
2285 ]
Austin Eng8a488c12019-08-13 22:12:54 +00002286 },
2287
2288 "render bundle encoder": {
2289 "category": "object",
Le Hoang Quyen7971bfe2023-04-05 19:35:07 +00002290 "no autolock": true,
Austin Eng8a488c12019-08-13 22:12:54 +00002291 "methods": [
2292 {
2293 "name": "set pipeline",
2294 "args": [
2295 {"name": "pipeline", "type": "render pipeline"}
2296 ]
2297 },
2298 {
2299 "name": "set bind group",
2300 "args": [
2301 {"name": "group index", "type": "uint32_t"},
Yunchao He6ffe72c2023-06-14 19:22:29 +00002302 {"name": "group", "type": "bind group", "optional": true},
Loko Kung837f1512023-06-06 03:01:15 +00002303 {"name": "dynamic offset count", "type": "size_t", "default": "0"},
Corentin Wallez75f554d2021-06-17 16:04:29 +00002304 {"name": "dynamic offsets", "type": "uint32_t", "annotation": "const*", "length": "dynamic offset count", "default": "nullptr"}
Austin Eng8a488c12019-08-13 22:12:54 +00002305 ]
2306 },
2307 {
2308 "name": "draw",
2309 "args": [
2310 {"name": "vertex count", "type": "uint32_t"},
Corentin Wallez67b1ad72020-03-31 16:21:35 +00002311 {"name": "instance count", "type": "uint32_t", "default": "1"},
2312 {"name": "first vertex", "type": "uint32_t", "default": "0"},
2313 {"name": "first instance", "type": "uint32_t", "default": "0"}
Austin Eng8a488c12019-08-13 22:12:54 +00002314 ]
2315 },
2316 {
2317 "name": "draw indexed",
2318 "args": [
2319 {"name": "index count", "type": "uint32_t"},
Corentin Wallez67b1ad72020-03-31 16:21:35 +00002320 {"name": "instance count", "type": "uint32_t", "default": "1"},
2321 {"name": "first index", "type": "uint32_t", "default": "0"},
2322 {"name": "base vertex", "type": "int32_t", "default": "0"},
2323 {"name": "first instance", "type": "uint32_t", "default": "0"}
Austin Eng8a488c12019-08-13 22:12:54 +00002324 ]
2325 },
2326 {
2327 "name": "draw indirect",
2328 "args": [
2329 {"name": "indirect buffer", "type": "buffer"},
2330 {"name": "indirect offset", "type": "uint64_t"}
2331 ]
2332 },
2333 {
2334 "name": "draw indexed indirect",
2335 "args": [
2336 {"name": "indirect buffer", "type": "buffer"},
2337 {"name": "indirect offset", "type": "uint64_t"}
2338 ]
2339 },
2340 {
2341 "name": "insert debug marker",
2342 "args": [
Kai Ninomiya51bbbef2020-07-12 16:01:38 +00002343 {"name": "marker label", "type": "char", "annotation": "const*", "length": "strlen"}
Austin Eng8a488c12019-08-13 22:12:54 +00002344 ]
2345 },
2346 {
2347 "name": "pop debug group",
2348 "args": []
2349 },
2350 {
2351 "name": "push debug group",
2352 "args": [
2353 {"name": "group label", "type": "char", "annotation": "const*", "length": "strlen"}
2354 ]
2355 },
2356 {
François Beaufort91b21422019-10-10 07:29:58 +00002357 "name": "set vertex buffer",
Austin Eng8a488c12019-08-13 22:12:54 +00002358 "args": [
François Beaufort91b21422019-10-10 07:29:58 +00002359 {"name": "slot", "type": "uint32_t"},
Yunchao He99244262023-05-11 19:26:30 +00002360 {"name": "buffer", "type": "buffer", "optional": true},
Corentin Wallezc244f532020-04-24 09:42:03 +00002361 {"name": "offset", "type": "uint64_t", "default": "0"},
Zhaoming Jiang2be4b842021-09-28 02:05:00 +00002362 {"name": "size", "type": "uint64_t", "default": "WGPU_WHOLE_SIZE"}
Austin Eng8a488c12019-08-13 22:12:54 +00002363 ]
2364 },
2365 {
2366 "name": "set index buffer",
2367 "args": [
2368 {"name": "buffer", "type": "buffer"},
Corentin Wallez5fad85b2020-11-25 08:54:14 +00002369 {"name": "format", "type": "index format"},
Corentin Wallezc244f532020-04-24 09:42:03 +00002370 {"name": "offset", "type": "uint64_t", "default": "0"},
Zhaoming Jiang2be4b842021-09-28 02:05:00 +00002371 {"name": "size", "type": "uint64_t", "default": "WGPU_WHOLE_SIZE"}
Austin Eng8a488c12019-08-13 22:12:54 +00002372 ]
2373 },
2374 {
2375 "name": "finish",
2376 "returns": "render bundle",
2377 "args": [
2378 {"name": "descriptor", "type": "render bundle descriptor", "annotation": "const*", "optional": true}
2379 ]
Brandon Jones828f6742021-11-23 00:09:25 +00002380 },
2381 {
2382 "name": "set label",
2383 "returns": "void",
Brandon Jones828f6742021-11-23 00:09:25 +00002384 "args": [
2385 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"}
2386 ]
Austin Eng8a488c12019-08-13 22:12:54 +00002387 }
2388 ]
2389 },
2390
2391 "render bundle descriptor": {
2392 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00002393 "extensible": "in",
François Beaufort277d2e12019-10-03 14:56:49 +00002394 "members": [
2395 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true}
2396 ]
Austin Eng8a488c12019-08-13 22:12:54 +00002397 },
2398
2399 "render bundle encoder descriptor": {
2400 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00002401 "extensible": "in",
Austin Eng8a488c12019-08-13 22:12:54 +00002402 "members": [
François Beaufort277d2e12019-10-03 14:56:49 +00002403 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
Loko Kung44fc9da2023-08-16 06:11:11 +00002404 {"name": "color format count", "type": "size_t"},
2405 {"name": "color formats", "type": "texture format", "annotation": "const*", "length": "color format count"},
Corentin Wallezd55bd7a2019-09-05 09:12:32 +00002406 {"name": "depth stencil format", "type": "texture format", "default": "undefined"},
Yunchao He79d20992021-10-15 16:56:13 +00002407 {"name": "sample count", "type": "uint32_t", "default": "1"},
2408 {"name": "depth read only", "type": "bool", "default": "false"},
2409 {"name": "stencil read only", "type": "bool", "default": "false"}
Austin Eng8a488c12019-08-13 22:12:54 +00002410 ]
2411 },
2412
Brandon Jones5e6a0922021-04-17 01:51:53 +00002413 "render pass color attachment": {
Jiawei Shao5e811ae2018-12-19 08:21:13 +00002414 "category": "structure",
Le Hoang Quyenb5879ac2023-06-27 08:32:22 +00002415 "extensible": "in",
Jiawei Shao5e811ae2018-12-19 08:21:13 +00002416 "members": [
Shrek Shao6d205fc2022-03-05 01:34:02 +00002417 {"name": "view", "type": "texture view", "optional": true},
dan sinclair12447192023-08-22 16:44:05 +00002418 {"name": "depth slice", "type": "uint32_t", "default": "0", "tags": ["dawn"]},
Jiawei Shao5e811ae2018-12-19 08:21:13 +00002419 {"name": "resolve target", "type": "texture view", "optional": true},
2420 {"name": "load op", "type": "load op"},
2421 {"name": "store op", "type": "store op"},
Shrek Shaob0987d62022-03-07 19:29:54 +00002422 {"name": "clear value", "type": "color"}
Jiawei Shao5e811ae2018-12-19 08:21:13 +00002423 ]
2424 },
Le Hoang Quyenb5879ac2023-06-27 08:32:22 +00002425 "dawn render pass color attachment render to single sampled": {
2426 "tags": ["dawn"],
2427 "category": "structure",
2428 "chained": "in",
2429 "chain roots": ["render pass color attachment"],
2430 "members": [
2431 {"name": "implicit sample count", "type": "uint32_t", "default": 1}
2432 ]
2433 },
Brandon Jones5e6a0922021-04-17 01:51:53 +00002434 "render pass depth stencil attachment": {
Jiawei Shao5e811ae2018-12-19 08:21:13 +00002435 "category": "structure",
2436 "members": [
Corentin Wallez1ac45652021-09-14 10:42:22 +00002437 {"name": "view", "type": "texture view"},
Brandon Jonesa20ce6f2022-02-03 17:59:04 +00002438 {"name": "depth load op", "type": "load op", "default": "undefined"},
2439 {"name": "depth store op", "type": "store op", "default": "undefined"},
Takahiro9754bc42023-03-01 13:34:59 +00002440 {"name": "depth clear value", "type": "float", "default": "NAN"},
Brandon Jones7695afc2020-07-10 23:13:58 +00002441 {"name": "depth read only", "type": "bool", "default": "false"},
Brandon Jonesa20ce6f2022-02-03 17:59:04 +00002442 {"name": "stencil load op", "type": "load op", "default": "undefined"},
2443 {"name": "stencil store op", "type": "store op", "default": "undefined"},
Brandon Jones6e8c4732022-02-19 00:44:12 +00002444 {"name": "stencil clear value", "type": "uint32_t", "default": "0"},
Corentin Wallez1ac45652021-09-14 10:42:22 +00002445 {"name": "stencil read only", "type": "bool", "default": "false"}
Jiawei Shao5e811ae2018-12-19 08:21:13 +00002446 ]
2447 },
2448
Corentin Wallez8d6b5d22018-05-11 13:04:44 -04002449 "render pass descriptor": {
Jiawei Shaob2c50232019-02-27 09:21:56 +00002450 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00002451 "extensible": "in",
Jiawei Shaob2c50232019-02-27 09:21:56 +00002452 "members": [
François Beaufort277d2e12019-10-03 14:56:49 +00002453 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
Loko Kung837f1512023-06-06 03:01:15 +00002454 {"name": "color attachment count", "type": "size_t"},
Brandon Jones5e6a0922021-04-17 01:51:53 +00002455 {"name": "color attachments", "type": "render pass color attachment", "annotation": "const*", "length": "color attachment count"},
2456 {"name": "depth stencil attachment", "type": "render pass depth stencil attachment", "annotation": "const*", "optional": true},
Corentin Wallez6cd1cd92021-11-17 08:13:24 +00002457 {"name": "occlusion query set", "type": "query set", "optional": true},
Loko Kung837f1512023-06-06 03:01:15 +00002458 {"name": "timestamp write count", "type": "size_t", "default": 0},
Li Hao131c4222022-03-05 01:22:52 +00002459 {"name": "timestamp writes", "type": "render pass timestamp write", "annotation": "const*", "length": "timestamp write count"}
Jiawei Shaob2c50232019-02-27 09:21:56 +00002460 ]
Austin Eng376f1c62017-05-30 20:03:44 -04002461 },
Takahiro831296d2022-06-30 04:19:42 +00002462 "render pass descriptor max draw count": {
2463 "category": "structure",
2464 "chained": "in",
Corentin Walleza45561b2022-07-14 12:58:25 +00002465 "chain roots": ["render pass descriptor"],
Takahiro831296d2022-06-30 04:19:42 +00002466 "members": [
2467 {"name": "max draw count", "type": "uint64_t", "default": 50000000}
2468 ]
2469 },
Corentin Wallez7d78e3c2023-08-15 16:46:12 +00002470 "render pass pixel local storage": {
2471 "category": "structure",
2472 "tags": ["dawn"],
2473 "chained": "in",
2474 "chain roots": ["render pass descriptor"],
2475 "members": [
Corentin Wallezb4b916a2023-09-08 17:14:30 +00002476 {"name": "total pixel local storage size", "type": "uint64_t"},
Corentin Wallez7d78e3c2023-08-15 16:46:12 +00002477 {"name": "storage attachment count", "type": "size_t", "default": 0},
2478 {"name": "storage attachments", "type": "render pass storage attachment", "annotation": "const*", "length": "storage attachment count"}
2479 ]
2480 },
2481 "render pass storage attachment": {
2482 "category": "structure",
2483 "tags": ["dawn"],
2484 "extensible": "in",
2485 "members": [
2486 {"name": "offset", "type": "uint64_t", "default": 0},
2487 {"name": "storage", "type": "texture view"},
2488 {"name": "load op", "type": "load op"},
2489 {"name": "store op", "type": "store op"},
2490 {"name": "clear value", "type": "color"}
2491 ]
2492 },
Corentin Wallez82fbccb2018-09-21 00:24:37 +00002493 "render pass encoder": {
2494 "category": "object",
Le Hoang Quyen7971bfe2023-04-05 19:35:07 +00002495 "no autolock": true,
Corentin Wallez82fbccb2018-09-21 00:24:37 +00002496 "methods": [
2497 {
Yan, Shaobo300eec02018-12-21 10:40:26 +00002498 "name": "set pipeline",
Corentin Wallez82fbccb2018-09-21 00:24:37 +00002499 "args": [
2500 {"name": "pipeline", "type": "render pipeline"}
2501 ]
2502 },
2503 {
Corentin Wallez82fbccb2018-09-21 00:24:37 +00002504 "name": "set bind group",
2505 "args": [
2506 {"name": "group index", "type": "uint32_t"},
Yunchao He6ffe72c2023-06-14 19:22:29 +00002507 {"name": "group", "type": "bind group", "optional": true},
Loko Kung837f1512023-06-06 03:01:15 +00002508 {"name": "dynamic offset count", "type": "size_t", "default": "0"},
Corentin Wallez75f554d2021-06-17 16:04:29 +00002509 {"name": "dynamic offsets", "type": "uint32_t", "annotation": "const*", "length": "dynamic offset count", "default": "nullptr"}
Corentin Wallez82fbccb2018-09-21 00:24:37 +00002510 ]
2511 },
2512 {
Jiawei Shaoc789b842018-12-10 05:20:19 +00002513 "name": "draw",
Corentin Wallez82fbccb2018-09-21 00:24:37 +00002514 "args": [
2515 {"name": "vertex count", "type": "uint32_t"},
Corentin Wallez67b1ad72020-03-31 16:21:35 +00002516 {"name": "instance count", "type": "uint32_t", "default": "1"},
2517 {"name": "first vertex", "type": "uint32_t", "default": "0"},
2518 {"name": "first instance", "type": "uint32_t", "default": "0"}
Corentin Wallez82fbccb2018-09-21 00:24:37 +00002519 ]
2520 },
2521 {
Jiawei Shaoc789b842018-12-10 05:20:19 +00002522 "name": "draw indexed",
Corentin Wallez82fbccb2018-09-21 00:24:37 +00002523 "args": [
2524 {"name": "index count", "type": "uint32_t"},
Corentin Wallez67b1ad72020-03-31 16:21:35 +00002525 {"name": "instance count", "type": "uint32_t", "default": "1"},
2526 {"name": "first index", "type": "uint32_t", "default": "0"},
2527 {"name": "base vertex", "type": "int32_t", "default": "0"},
2528 {"name": "first instance", "type": "uint32_t", "default": "0"}
Corentin Wallez82fbccb2018-09-21 00:24:37 +00002529 ]
2530 },
2531 {
Idan Raiter05f7ad52019-06-10 20:56:27 +00002532 "name": "draw indirect",
2533 "args": [
2534 {"name": "indirect buffer", "type": "buffer"},
2535 {"name": "indirect offset", "type": "uint64_t"}
2536 ]
2537 },
2538 {
2539 "name": "draw indexed indirect",
2540 "args": [
2541 {"name": "indirect buffer", "type": "buffer"},
2542 {"name": "indirect offset", "type": "uint64_t"}
2543 ]
2544 },
2545 {
Austin Eng8a488c12019-08-13 22:12:54 +00002546 "name": "execute bundles",
2547 "args": [
Loko Kung837f1512023-06-06 03:01:15 +00002548 {"name": "bundle count", "type": "size_t"},
Corentin Wallez873df0a2022-09-30 20:34:08 +00002549 {"name": "bundles", "type": "render bundle", "annotation": "const*", "length": "bundle count"}
Austin Eng8a488c12019-08-13 22:12:54 +00002550 ]
2551 },
2552 {
Brandon Jones11d32c82019-02-20 20:21:00 +00002553 "name": "insert debug marker",
2554 "args": [
Kai Ninomiya51bbbef2020-07-12 16:01:38 +00002555 {"name": "marker label", "type": "char", "annotation": "const*", "length": "strlen"}
Brandon Jones11d32c82019-02-20 20:21:00 +00002556 ]
2557 },
2558 {
2559 "name": "pop debug group",
2560 "args": []
2561 },
2562 {
2563 "name": "push debug group",
2564 "args": [
2565 {"name": "group label", "type": "char", "annotation": "const*", "length": "strlen"}
2566 ]
2567 },
2568 {
Corentin Wallez82fbccb2018-09-21 00:24:37 +00002569 "name": "set stencil reference",
2570 "args": [
2571 {"name": "reference", "type": "uint32_t"}
2572 ]
2573 },
2574 {
Brandon Jones413dcf82021-04-15 19:33:58 +00002575 "name": "set blend constant",
2576 "args": [
2577 {"name": "color", "type": "color", "annotation": "const*"}
2578 ]
2579 },
2580 {
Yunchao He050ab492019-07-04 15:30:59 +00002581 "name": "set viewport",
2582 "args": [
2583 {"name": "x", "type": "float"},
2584 {"name": "y", "type": "float"},
2585 {"name": "width", "type": "float"},
2586 {"name": "height", "type": "float"},
2587 {"name": "min depth", "type": "float"},
2588 {"name": "max depth", "type": "float"}
2589 ]
2590 },
2591 {
Corentin Wallez82fbccb2018-09-21 00:24:37 +00002592 "name": "set scissor rect",
2593 "args": [
2594 {"name": "x", "type": "uint32_t"},
2595 {"name": "y", "type": "uint32_t"},
2596 {"name": "width", "type": "uint32_t"},
2597 {"name": "height", "type": "uint32_t"}
2598 ]
2599 },
2600 {
François Beaufort91b21422019-10-10 07:29:58 +00002601 "name": "set vertex buffer",
Corentin Wallez82fbccb2018-09-21 00:24:37 +00002602 "args": [
François Beaufort91b21422019-10-10 07:29:58 +00002603 {"name": "slot", "type": "uint32_t"},
Yunchao He99244262023-05-11 19:26:30 +00002604 {"name": "buffer", "type": "buffer", "optional": true},
Corentin Wallezc244f532020-04-24 09:42:03 +00002605 {"name": "offset", "type": "uint64_t", "default": "0"},
Zhaoming Jiang2be4b842021-09-28 02:05:00 +00002606 {"name": "size", "type": "uint64_t", "default": "WGPU_WHOLE_SIZE"}
Corentin Wallez82fbccb2018-09-21 00:24:37 +00002607 ]
2608 },
2609 {
2610 "name": "set index buffer",
2611 "args": [
2612 {"name": "buffer", "type": "buffer"},
Corentin Wallez5fad85b2020-11-25 08:54:14 +00002613 {"name": "format", "type": "index format"},
Corentin Wallezc244f532020-04-24 09:42:03 +00002614 {"name": "offset", "type": "uint64_t", "default": "0"},
Zhaoming Jiang2be4b842021-09-28 02:05:00 +00002615 {"name": "size", "type": "uint64_t", "default": "WGPU_WHOLE_SIZE"}
Corentin Wallez82fbccb2018-09-21 00:24:37 +00002616 ]
2617 },
2618 {
Hao Li01e44502020-11-18 09:47:52 +00002619 "name": "begin occlusion query",
2620 "args": [
2621 {"name": "query index", "type": "uint32_t"}
2622 ]
2623 },
2624 {
Kai Ninomiya4e37acc2021-09-17 21:13:33 +00002625 "name": "begin pipeline statistics query",
Shrek Shaoee50bc02022-02-08 20:21:40 +00002626 "tags": ["upstream", "emscripten"],
Kai Ninomiya4e37acc2021-09-17 21:13:33 +00002627 "args": [
2628 {"name": "query set", "type": "query set"},
2629 {"name": "query index", "type": "uint32_t"}
2630 ]
2631 },
2632 {
Hao Li01e44502020-11-18 09:47:52 +00002633 "name": "end occlusion query"
2634 },
2635 {
Hao Li5191adc2020-07-01 10:48:16 +00002636 "name": "write timestamp",
Corentin Wallez6cd1cd92021-11-17 08:13:24 +00002637 "tags": ["emscripten", "dawn"],
Hao Li5191adc2020-07-01 10:48:16 +00002638 "args": [
2639 {"name": "query set", "type": "query set"},
2640 {"name": "query index", "type": "uint32_t"}
2641 ]
2642 },
2643 {
Corentin Wallez7d78e3c2023-08-15 16:46:12 +00002644 "name": "pixel local storage barrier",
2645 "tags": ["dawn"]
2646 },
2647 {
Brandon Jones0fee4c12022-02-07 19:48:39 +00002648 "name": "end"
2649 },
2650 {
Kai Ninomiya4e37acc2021-09-17 21:13:33 +00002651 "name": "end pipeline statistics query",
Shrek Shaoee50bc02022-02-08 20:21:40 +00002652 "tags": ["upstream", "emscripten"]
Brandon Jones828f6742021-11-23 00:09:25 +00002653 },
2654 {
2655 "name": "set label",
2656 "returns": "void",
Brandon Jones828f6742021-11-23 00:09:25 +00002657 "args": [
2658 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"}
2659 ]
Corentin Wallez82fbccb2018-09-21 00:24:37 +00002660 }
2661 ]
2662 },
Corentin Wallez6cd1cd92021-11-17 08:13:24 +00002663 "render pass timestamp location": {
2664 "category": "enum",
Corentin Wallez6cd1cd92021-11-17 08:13:24 +00002665 "values": [
2666 {"value": 0, "name": "beginning"},
2667 {"value": 1, "name": "end"}
2668 ]
2669 },
2670 "render pass timestamp write": {
2671 "category": "structure",
Corentin Wallez6cd1cd92021-11-17 08:13:24 +00002672 "members": [
2673 {"name": "query set", "type": "query set"},
2674 {"name": "query index", "type": "uint32_t"},
2675 {"name": "location", "type": "render pass timestamp location"}
2676 ]
2677 },
Corentin Wallez29ced282017-07-14 10:58:07 -04002678 "render pipeline": {
Austin Engf6eb8902019-11-22 17:02:22 +00002679 "category": "object",
2680 "methods": [
2681 {
2682 "name": "get bind group layout",
2683 "returns": "bind group layout",
2684 "args": [
Corentin Wallez373a3ff2020-04-01 18:22:36 +00002685 {"name": "group index", "type": "uint32_t"}
Austin Engf6eb8902019-11-22 17:02:22 +00002686 ]
Brandon Jonesc1bcbbf2021-09-02 18:39:53 +00002687 },
2688 {
2689 "name": "set label",
2690 "returns": "void",
2691 "args": [
2692 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"}
2693 ]
Austin Engf6eb8902019-11-22 17:02:22 +00002694 }
Austin Eng2092a662021-09-10 21:07:39 +00002695
2696 ]
2697 },
2698
2699 "request device callback": {
fujunwei23f71622021-12-02 07:41:21 +00002700 "category": "function pointer",
Austin Eng5a54d9e2023-08-04 13:49:24 +00002701 "_comment": "crbug.com/1234617: Revisit optional status of device once requestDevice can return lost devices",
Austin Eng2092a662021-09-10 21:07:39 +00002702 "args": [
2703 {"name": "status", "type": "request device status"},
Henry Betts5ad86f32023-07-11 09:48:38 +00002704 {"name": "device", "type": "device", "optional": true},
Austin Eng5397f9f2021-12-14 23:22:46 +00002705 {"name": "message", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
Loko Kung670e0bb2023-06-10 06:51:37 +00002706 {"name": "userdata", "type": "void *"}
Austin Eng2092a662021-09-10 21:07:39 +00002707 ]
2708 },
2709
2710 "request device status": {
2711 "category": "enum",
Kai Ninomiya930e9182021-09-17 19:44:43 +00002712 "emscripten_no_enum_table": true,
Austin Eng2092a662021-09-10 21:07:39 +00002713 "values": [
2714 {"value": 0, "name": "success"},
2715 {"value": 1, "name": "error"},
2716 {"value": 2, "name": "unknown"}
Austin Engf6eb8902019-11-22 17:02:22 +00002717 ]
Corentin Wallez29ced282017-07-14 10:58:07 -04002718 },
Brandon Jones0702b702021-03-11 21:19:00 +00002719
2720 "vertex state": {
2721 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00002722 "extensible": "in",
Brandon Jones0702b702021-03-11 21:19:00 +00002723 "members": [
2724 {"name": "module", "type": "shader module"},
2725 {"name": "entry point", "type": "char", "annotation": "const*", "length": "strlen"},
Loko Kung837f1512023-06-06 03:01:15 +00002726 {"name": "constant count", "type": "size_t", "default": 0},
shrekshaoe99ad762021-09-28 20:15:52 +00002727 {"name": "constants", "type": "constant entry", "annotation": "const*", "length": "constant count"},
Loko Kung837f1512023-06-06 03:01:15 +00002728 {"name": "buffer count", "type": "size_t", "default": 0},
Brandon Jones0702b702021-03-11 21:19:00 +00002729 {"name": "buffers", "type": "vertex buffer layout", "annotation": "const*", "length": "buffer count"}
2730 ]
2731 },
2732
2733 "primitive state": {
2734 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00002735 "extensible": "in",
Brandon Jones0702b702021-03-11 21:19:00 +00002736 "members": [
2737 {"name": "topology", "type": "primitive topology", "default": "triangle list"},
2738 {"name": "strip index format", "type": "index format", "default": "undefined"},
2739 {"name": "front face", "type": "front face", "default": "CCW"},
2740 {"name": "cull mode", "type": "cull mode", "default": "none"}
2741 ]
2742 },
2743
Corentin Wallez53db01b2021-11-18 23:05:40 +00002744 "primitive depth clip control": {
2745 "category": "structure",
2746 "chained": "in",
Corentin Walleza45561b2022-07-14 12:58:25 +00002747 "chain roots": ["primitive state"],
Corentin Wallez53db01b2021-11-18 23:05:40 +00002748 "members": [
2749 {"name": "unclipped depth", "type": "bool", "default": "false"}
2750 ]
2751 },
2752
Brandon Jones0702b702021-03-11 21:19:00 +00002753 "depth stencil state": {
2754 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00002755 "extensible": "in",
Brandon Jones0702b702021-03-11 21:19:00 +00002756 "members": [
2757 {"name": "format", "type": "texture format"},
Takahiro9754bc42023-03-01 13:34:59 +00002758 {"name": "depth write enabled", "type": "bool"},
2759 {"name": "depth compare", "type": "compare function"},
Brandon Jones0702b702021-03-11 21:19:00 +00002760 {"name": "stencil front", "type": "stencil face state"},
2761 {"name": "stencil back", "type": "stencil face state"},
2762 {"name": "stencil read mask", "type": "uint32_t", "default": "0xFFFFFFFF"},
2763 {"name": "stencil write mask", "type": "uint32_t", "default": "0xFFFFFFFF"},
2764 {"name": "depth bias", "type": "int32_t", "default": "0"},
2765 {"name": "depth bias slope scale", "type": "float", "default": "0.0f"},
2766 {"name": "depth bias clamp", "type": "float", "default": "0.0f"}
2767 ]
2768 },
2769
2770 "multisample state": {
2771 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00002772 "extensible": "in",
Brandon Jones0702b702021-03-11 21:19:00 +00002773 "members": [
2774 {"name": "count", "type": "uint32_t", "default": "1"},
2775 {"name": "mask", "type": "uint32_t", "default": "0xFFFFFFFF"},
2776 {"name": "alpha to coverage enabled", "type": "bool", "default": "false"}
2777 ]
2778 },
2779
Le Hoang Quyenb5879ac2023-06-27 08:32:22 +00002780 "dawn multisample state render to single sampled": {
2781 "tags": ["dawn"],
2782 "category": "structure",
2783 "chained": "in",
2784 "chain roots": ["multisample state"],
2785 "members": [
2786 {"name": "enabled", "type": "bool", "default": "false"}
2787 ]
2788 },
2789
Brandon Jones0702b702021-03-11 21:19:00 +00002790 "fragment state": {
2791 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00002792 "extensible": "in",
Brandon Jones0702b702021-03-11 21:19:00 +00002793 "members": [
2794 {"name": "module", "type": "shader module"},
2795 {"name": "entry point", "type": "char", "annotation": "const*", "length": "strlen"},
Loko Kung837f1512023-06-06 03:01:15 +00002796 {"name": "constant count", "type": "size_t", "default": 0},
shrekshaoe99ad762021-09-28 20:15:52 +00002797 {"name": "constants", "type": "constant entry", "annotation": "const*", "length": "constant count"},
Loko Kung837f1512023-06-06 03:01:15 +00002798 {"name": "target count", "type": "size_t"},
Brandon Jones0702b702021-03-11 21:19:00 +00002799 {"name": "targets", "type": "color target state", "annotation": "const*", "length": "target count"}
2800 ]
2801 },
2802 "color target state": {
2803 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00002804 "extensible": "in",
Brandon Jones0702b702021-03-11 21:19:00 +00002805 "members": [
2806 {"name": "format", "type": "texture format"},
2807 {"name": "blend", "type": "blend state", "annotation": "const*", "optional": true},
2808 {"name": "write mask", "type": "color write mask", "default": "all"}
2809 ]
2810 },
2811 "blend state": {
2812 "category": "structure",
2813 "extensible": false,
2814 "members": [
2815 {"name": "color", "type": "blend component"},
2816 {"name": "alpha", "type": "blend component"}
2817 ]
2818 },
2819
Yan, Shaoboa4924272018-12-10 19:47:22 +00002820 "render pipeline descriptor": {
2821 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00002822 "extensible": "in",
Yan, Shaoboa4924272018-12-10 19:47:22 +00002823 "members": [
François Beaufort277d2e12019-10-03 14:56:49 +00002824 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
Austin Engf6eb8902019-11-22 17:02:22 +00002825 {"name": "layout", "type": "pipeline layout", "optional": true},
Brandon Jones0702b702021-03-11 21:19:00 +00002826 {"name": "vertex", "type": "vertex state"},
2827 {"name": "primitive", "type": "primitive state"},
2828 {"name": "depth stencil", "type": "depth stencil state", "annotation": "const*", "optional": true},
2829 {"name": "multisample", "type": "multisample state"},
2830 {"name": "fragment", "type": "fragment state", "annotation": "const*", "optional": true}
2831 ]
2832 },
2833
Austin Eng376f1c62017-05-30 20:03:44 -04002834 "sampler": {
Brandon Jones88aeeae2021-11-19 18:26:08 +00002835 "category": "object",
2836 "methods": [
2837 {
2838 "name": "set label",
2839 "returns": "void",
Brandon Jones88aeeae2021-11-19 18:26:08 +00002840 "args": [
2841 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"}
2842 ]
2843 }
2844 ]
Austin Eng376f1c62017-05-30 20:03:44 -04002845 },
Corentin Wallez1ae19e82018-05-17 17:09:07 -04002846 "sampler descriptor": {
2847 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00002848 "extensible": "in",
Corentin Wallez1ae19e82018-05-17 17:09:07 -04002849 "members": [
François Beaufort277d2e12019-10-03 14:56:49 +00002850 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
Corentin Wallez8f938712019-07-08 19:20:22 +00002851 {"name": "address mode u", "type": "address mode", "default": "clamp to edge"},
2852 {"name": "address mode v", "type": "address mode", "default": "clamp to edge"},
2853 {"name": "address mode w", "type": "address mode", "default": "clamp to edge"},
2854 {"name": "mag filter", "type": "filter mode", "default": "nearest"},
2855 {"name": "min filter", "type": "filter mode", "default": "nearest"},
Loko Kungabfa45b2023-04-26 08:03:20 +00002856 {"name": "mipmap filter", "type": "mipmap filter mode", "default": "nearest"},
Corentin Wallez8f938712019-07-08 19:20:22 +00002857 {"name": "lod min clamp", "type": "float", "default": "0.0f"},
Corentin Wallez13005922023-06-13 06:52:56 +00002858 {"name": "lod max clamp", "type": "float", "default": "32.0f"},
shrekshaof8c5e4a2020-12-24 03:11:17 +00002859 {"name": "compare", "type": "compare function", "default": "undefined"},
2860 {"name": "max anisotropy", "type": "uint16_t", "default": "1"}
Austin Eng376f1c62017-05-30 20:03:44 -04002861 ]
2862 },
2863 "shader module": {
Brandon Jones6f2bbe92021-04-05 23:34:17 +00002864 "category": "object",
2865 "methods": [
2866 {
2867 "name": "get compilation info",
2868 "args": [
Corentin Walleze00c6bd2021-12-13 17:37:17 +00002869 {"name": "callback", "type": "compilation info callback"},
Loko Kung670e0bb2023-06-10 06:51:37 +00002870 {"name": "userdata", "type": "void *"}
Brandon Jones6f2bbe92021-04-05 23:34:17 +00002871 ]
Brandon Jonesc1bcbbf2021-09-02 18:39:53 +00002872 },
2873 {
2874 "name": "set label",
2875 "returns": "void",
2876 "args": [
2877 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"}
2878 ]
Brandon Jones6f2bbe92021-04-05 23:34:17 +00002879 }
2880 ]
Austin Eng376f1c62017-05-30 20:03:44 -04002881 },
Corentin Wallezdf671032018-08-20 17:01:20 +02002882 "shader module descriptor": {
2883 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00002884 "extensible": "in",
Corentin Wallezdf671032018-08-20 17:01:20 +02002885 "members": [
Corentin Wallezaa0731d2022-03-21 17:11:53 +00002886 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
Loko Kung837f1512023-06-06 03:01:15 +00002887 {"name": "hint count", "type": "size_t", "default": 0, "tags": ["upstream"]},
Corentin Wallezaa0731d2022-03-21 17:11:53 +00002888 {"name": "hints", "type": "shader module compilation hint", "annotation": "const*", "length": "hint count", "tags": ["upstream"]}
2889 ]
2890 },
2891 "shader module compilation hint": {
2892 "category": "structure",
2893 "extensible": "in",
2894 "tags": ["upstream"],
2895 "members": [
2896 {"name": "entry point", "type": "char", "annotation": "const*", "length": "strlen"},
2897 {"name": "layout", "type": "pipeline layout"}
Corentin Wallezfee27832020-04-21 08:04:48 +00002898 ]
2899 },
2900 "shader module SPIRV descriptor": {
2901 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00002902 "chained": "in",
Corentin Walleza45561b2022-07-14 12:58:25 +00002903 "chain roots": ["shader module descriptor"],
Corentin Wallezfee27832020-04-21 08:04:48 +00002904 "members": [
Corentin Wallezdf671032018-08-20 17:01:20 +02002905 {"name": "code size", "type": "uint32_t"},
2906 {"name": "code", "type": "uint32_t", "annotation": "const*", "length": "code size"}
Austin Eng376f1c62017-05-30 20:03:44 -04002907 ]
2908 },
Corentin Wallezfee27832020-04-21 08:04:48 +00002909 "shader module WGSL descriptor": {
2910 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00002911 "chained": "in",
Corentin Walleza45561b2022-07-14 12:58:25 +00002912 "chain roots": ["shader module descriptor"],
Corentin Wallezfee27832020-04-21 08:04:48 +00002913 "members": [
Loko Kung687e3752023-06-05 19:26:43 +00002914 {"name": "code", "type": "char", "annotation": "const*", "length": "strlen"}
Corentin Wallezfee27832020-04-21 08:04:48 +00002915 ]
2916 },
James Price132d8c72023-02-03 19:38:46 +00002917 "dawn shader module SPIRV options descriptor": {
2918 "category": "structure",
2919 "chained": "in",
2920 "chain roots": ["shader module descriptor"],
2921 "tags": ["dawn"],
2922 "members": [
2923 {"name": "allow non uniform derivatives", "type": "bool", "default": "false"}
2924 ]
2925 },
Corentin Wallezb9b088f2019-08-27 08:42:29 +00002926 "shader stage": {
Austin Eng376f1c62017-05-30 20:03:44 -04002927 "category": "bitmask",
2928 "values": [
Corentin Wallezbe985c12017-07-20 11:00:39 -04002929 {"value": 0, "name": "none"},
Austin Eng376f1c62017-05-30 20:03:44 -04002930 {"value": 1, "name": "vertex"},
2931 {"value": 2, "name": "fragment"},
2932 {"value": 4, "name": "compute"}
2933 ]
2934 },
2935 "stencil operation": {
2936 "category": "enum",
2937 "values": [
2938 {"value": 0, "name": "keep"},
2939 {"value": 1, "name": "zero"},
2940 {"value": 2, "name": "replace"},
2941 {"value": 3, "name": "invert"},
2942 {"value": 4, "name": "increment clamp"},
2943 {"value": 5, "name": "decrement clamp"},
2944 {"value": 6, "name": "increment wrap"},
2945 {"value": 7, "name": "decrement wrap"}
Austin Eng10634392017-06-01 11:30:03 -04002946 ]
Austin Eng376f1c62017-05-30 20:03:44 -04002947 },
Brandon Jones0702b702021-03-11 21:19:00 +00002948 "stencil face state": {
Yunchao He48485e32018-12-15 02:32:34 +00002949 "category": "structure",
2950 "extensible": false,
2951 "members": [
Corentin Wallez8f938712019-07-08 19:20:22 +00002952 {"name": "compare", "type": "compare function", "default": "always"},
2953 {"name": "fail op", "type": "stencil operation", "default": "keep"},
2954 {"name": "depth fail op", "type": "stencil operation", "default": "keep"},
2955 {"name": "pass op", "type": "stencil operation", "default": "keep"}
Yunchao He48485e32018-12-15 02:32:34 +00002956 ]
2957 },
Corentin Wallez3a1746e2020-01-15 13:14:12 +00002958 "surface": {
Kai Ninomiya4e37acc2021-09-17 21:13:33 +00002959 "category": "object",
Le Hoang Quyen7971bfe2023-04-05 19:35:07 +00002960 "no autolock": true,
Kai Ninomiya4e37acc2021-09-17 21:13:33 +00002961 "methods": [
2962 {
dan sinclair3ebe5b62023-08-21 22:57:06 +00002963 "name": "configure",
2964 "returns": "void",
2965 "tags": ["upstream"],
2966 "args": [
2967 {"name": "config", "type": "surface configuration", "annotation": "const*"}
2968 ]
2969 },
2970 {
2971 "name": "get capabilities",
2972 "returns": "void",
2973 "tags": ["upstream"],
2974 "args": [
2975 {"name": "adapter", "type": "adapter"},
2976 {"name": "capabilities", "type": "surface capabilities", "annotation": "*"}
2977 ]
2978 },
2979 {
2980 "name": "get current texture",
2981 "returns": "void",
2982 "tags": ["upstream"],
2983 "args": [
2984 {"name": "surface texture", "type": "surface texture", "annotation": "*"}
2985 ]
2986 },
2987 {
Kai Ninomiya4e37acc2021-09-17 21:13:33 +00002988 "name": "get preferred format",
2989 "returns": "texture format",
Shrek Shaoee50bc02022-02-08 20:21:40 +00002990 "tags": ["upstream", "emscripten"],
Kai Ninomiya4e37acc2021-09-17 21:13:33 +00002991 "args": [
2992 {"name": "adapter", "type": "adapter"}
2993 ]
dan sinclair3ebe5b62023-08-21 22:57:06 +00002994 },
2995 {
2996 "name": "present",
2997 "returns": "void",
2998 "tags": ["upstream"],
2999 "args": []
3000 },
3001 {
3002 "name": "unconfigure",
3003 "returns": "void",
3004 "tags": ["upstream"],
3005 "args": []
Kai Ninomiya4e37acc2021-09-17 21:13:33 +00003006 }
3007 ]
Corentin Wallez3a1746e2020-01-15 13:14:12 +00003008 },
3009 "surface descriptor": {
3010 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00003011 "extensible": "in",
Corentin Wallez3a1746e2020-01-15 13:14:12 +00003012 "members": [
3013 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true}
3014 ]
3015 },
Shrek Shao1554a7d2022-03-08 20:56:10 +00003016 "surface descriptor from android native window": {
3017 "category": "structure",
3018 "chained": "in",
Corentin Walleza45561b2022-07-14 12:58:25 +00003019 "chain roots": ["surface descriptor"],
Shrek Shao1554a7d2022-03-08 20:56:10 +00003020 "tags": ["native"],
3021 "members": [
3022 {"name": "window", "type": "void", "annotation": "*"}
3023 ]
3024 },
Corentin Wallez9585c462020-07-06 18:50:00 +00003025 "surface descriptor from canvas HTML selector": {
Corentin Wallezc2e16962020-01-22 21:37:26 +00003026 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00003027 "chained": "in",
Corentin Walleza45561b2022-07-14 12:58:25 +00003028 "chain roots": ["surface descriptor"],
Corentin Wallezc2e16962020-01-22 21:37:26 +00003029 "members": [
Corentin Wallez9585c462020-07-06 18:50:00 +00003030 {"name": "selector", "type": "char", "annotation": "const*", "length": "strlen"}
Corentin Wallezc2e16962020-01-22 21:37:26 +00003031 ]
3032 },
Corentin Wallez3a1746e2020-01-15 13:14:12 +00003033 "surface descriptor from metal layer": {
3034 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00003035 "chained": "in",
Corentin Walleza45561b2022-07-14 12:58:25 +00003036 "chain roots": ["surface descriptor"],
Kai Ninomiya930e9182021-09-17 19:44:43 +00003037 "tags": ["native"],
Corentin Wallez3a1746e2020-01-15 13:14:12 +00003038 "members": [
3039 {"name": "layer", "type": "void", "annotation": "*"}
3040 ]
3041 },
3042 "surface descriptor from windows HWND": {
3043 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00003044 "chained": "in",
Corentin Walleza45561b2022-07-14 12:58:25 +00003045 "chain roots": ["surface descriptor"],
Kai Ninomiya930e9182021-09-17 19:44:43 +00003046 "tags": ["native"],
Corentin Wallez3a1746e2020-01-15 13:14:12 +00003047 "members": [
3048 {"name": "hinstance", "type": "void", "annotation": "*"},
3049 {"name": "hwnd", "type": "void", "annotation": "*"}
3050 ]
3051 },
Corentin Wallezaa0731d2022-03-21 17:11:53 +00003052 "surface descriptor from xcb window": {
3053 "category": "structure",
3054 "chained": "in",
Corentin Walleza45561b2022-07-14 12:58:25 +00003055 "chain roots": ["surface descriptor"],
Corentin Wallezaa0731d2022-03-21 17:11:53 +00003056 "tags": ["upstream"],
3057 "members": [
3058 {"name": "connection", "type": "void", "annotation": "*"},
3059 {"name": "window", "type": "uint32_t"}
3060 ]
3061 },
Shrek Shao5b9b9862022-03-09 19:04:21 +00003062 "surface descriptor from xlib window": {
Corentin Wallez3a1746e2020-01-15 13:14:12 +00003063 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00003064 "chained": "in",
Corentin Walleza45561b2022-07-14 12:58:25 +00003065 "chain roots": ["surface descriptor"],
Kai Ninomiya930e9182021-09-17 19:44:43 +00003066 "tags": ["native"],
Corentin Wallez3a1746e2020-01-15 13:14:12 +00003067 "members": [
3068 {"name": "display", "type": "void", "annotation": "*"},
3069 {"name": "window", "type": "uint32_t"}
3070 ]
3071 },
Shrek Shao1554a7d2022-03-08 20:56:10 +00003072 "surface descriptor from wayland surface": {
3073 "category": "structure",
3074 "chained": "in",
Corentin Walleza45561b2022-07-14 12:58:25 +00003075 "chain roots": ["surface descriptor"],
Shrek Shao1554a7d2022-03-08 20:56:10 +00003076 "tags": ["native"],
3077 "members": [
3078 {"name": "display", "type": "void", "annotation": "*"},
3079 {"name": "surface", "type": "void", "annotation": "*"}
3080 ]
3081 },
陈俊嘉74326fe2021-04-27 16:43:27 +00003082 "surface descriptor from windows core window": {
3083 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00003084 "chained": "in",
Corentin Walleza45561b2022-07-14 12:58:25 +00003085 "chain roots": ["surface descriptor"],
Kai Ninomiya930e9182021-09-17 19:44:43 +00003086 "tags": ["dawn"],
陈俊嘉74326fe2021-04-27 16:43:27 +00003087 "members": [
3088 {"name": "core window", "type": "void", "annotation": "*"}
3089 ]
3090 },
陈俊嘉11379a32021-06-09 08:44:07 +00003091 "surface descriptor from windows swap chain panel": {
3092 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00003093 "chained": "in",
Corentin Walleza45561b2022-07-14 12:58:25 +00003094 "chain roots": ["surface descriptor"],
Kai Ninomiya930e9182021-09-17 19:44:43 +00003095 "tags": ["dawn"],
陈俊嘉11379a32021-06-09 08:44:07 +00003096 "members": [
3097 {"name": "swap chain panel", "type": "void", "annotation": "*"}
3098 ]
3099 },
Kai Ninomiya35bf4242017-07-19 15:41:17 -07003100 "swap chain": {
3101 "category": "object",
dan sinclair3ebe5b62023-08-21 22:57:06 +00003102 "tags": ["dawn", "emscripten"],
Kai Ninomiya35bf4242017-07-19 15:41:17 -07003103 "methods": [
Corentin Wallez604072b2019-11-12 18:30:11 +00003104 {"name": "get current texture view", "returns": "texture view"},
Corentin Wallez9433a8a2023-06-06 12:00:32 +00003105 {"name": "get current texture", "returns": "texture", "tags": ["dawn"]},
Corentin Wallez604072b2019-11-12 18:30:11 +00003106 {"name": "present"}
Kai Ninomiya35bf4242017-07-19 15:41:17 -07003107 ]
3108 },
Corentin Wallez7be2a712019-02-15 11:15:58 +00003109 "swap chain descriptor": {
3110 "category": "structure",
dan sinclair3ebe5b62023-08-21 22:57:06 +00003111 "tags": ["dawn", "emscripten"],
Austin Eng0c824052021-09-20 16:07:25 +00003112 "extensible": "in",
Corentin Wallez7be2a712019-02-15 11:15:58 +00003113 "members": [
François Beaufort277d2e12019-10-03 14:56:49 +00003114 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
Corentin Wallezd87e6762020-01-23 17:20:38 +00003115 {"name": "usage", "type": "texture usage"},
3116 {"name": "format", "type": "texture format"},
3117 {"name": "width", "type": "uint32_t"},
3118 {"name": "height", "type": "uint32_t"},
Corentin Wallez087deed2023-04-07 14:59:55 +00003119 {"name": "present mode", "type": "present mode"}
Kai Ninomiya35bf4242017-07-19 15:41:17 -07003120 ]
3121 },
dan sinclair3ebe5b62023-08-21 22:57:06 +00003122 "surface texture": {
3123 "category": "structure",
3124 "tags": ["upstream"],
3125 "members": [
3126 {"name": "texture", "type": "texture"},
3127 {"name": "suboptimal", "type": "bool"},
3128 {"name": "status", "type": "surface get current texture status"}
3129 ]
3130 },
Corentin Wallez2b24c3d2020-01-15 09:54:42 +00003131 "s type": {
3132 "category": "enum",
Kai Ninomiya930e9182021-09-17 19:44:43 +00003133 "emscripten_no_enum_table": true,
Corentin Wallez2b24c3d2020-01-15 09:54:42 +00003134 "values": [
Austin Eng76a8d0b2020-04-03 17:37:48 +00003135 {"value": 0, "name": "invalid", "valid": false},
Kai Ninomiya930e9182021-09-17 19:44:43 +00003136 {"value": 1, "name": "surface descriptor from metal layer", "tags": ["native"]},
3137 {"value": 2, "name": "surface descriptor from windows HWND", "tags": ["native"]},
Shrek Shao5b9b9862022-03-09 19:04:21 +00003138 {"value": 3, "name": "surface descriptor from xlib window", "tags": ["native"]},
Corentin Wallez9585c462020-07-06 18:50:00 +00003139 {"value": 4, "name": "surface descriptor from canvas HTML selector"},
Corentin Wallezfee27832020-04-21 08:04:48 +00003140 {"value": 5, "name": "shader module SPIRV descriptor"},
3141 {"value": 6, "name": "shader module WGSL descriptor"},
Austin Eng51d13a42022-06-13 19:18:55 +00003142 {"value": 7, "name": "primitive depth clip control"},
Shrek Shao1554a7d2022-03-08 20:56:10 +00003143 {"value": 8, "name": "surface descriptor from wayland surface", "tags": ["native"]},
3144 {"value": 9, "name": "surface descriptor from android native window", "tags": ["native"]},
Corentin Wallezaa0731d2022-03-21 17:11:53 +00003145 {"value": 10, "name": "surface descriptor from xcb window", "tags": ["upstream"]},
3146 {"value": 11, "name": "surface descriptor from windows core window", "tags": ["dawn"]},
3147 {"value": 12, "name": "external texture binding entry", "tags": ["dawn"]},
3148 {"value": 13, "name": "external texture binding layout", "tags": ["dawn"]},
3149 {"value": 14, "name": "surface descriptor from windows swap chain panel", "tags": ["dawn"]},
Takahiro831296d2022-06-30 04:19:42 +00003150 {"value": 15, "name": "render pass descriptor max draw count"},
Corentin Wallez53db01b2021-11-18 23:05:40 +00003151 {"value": 1000, "name": "dawn texture internal usage descriptor", "tags": ["dawn"]},
Austin Eng2fbc1702022-02-02 21:00:52 +00003152 {"value": 1003, "name": "dawn encoder internal usage descriptor", "tags": ["dawn"]},
Loko Kung44f039d2022-03-01 22:59:40 +00003153 {"value": 1004, "name": "dawn instance descriptor", "tags": ["dawn", "native"]},
Jiawei Shao5a0f8d32022-09-23 00:29:46 +00003154 {"value": 1005, "name": "dawn cache device descriptor", "tags": ["dawn", "native"]},
Jiawei Shao806c5832022-11-23 02:06:11 +00003155 {"value": 1006, "name": "dawn adapter properties power preference", "tags": ["dawn", "native"]},
Zhaoming Jianga12ff9a2023-01-30 09:16:51 +00003156 {"value": 1007, "name": "dawn buffer descriptor error info from wire client", "tags": ["dawn"]},
James Price132d8c72023-02-03 19:38:46 +00003157 {"value": 1008, "name": "dawn toggles descriptor", "tags": ["dawn", "native"]},
Austin Eng0d5e76a2023-06-20 02:51:26 +00003158 {"value": 1009, "name": "dawn shader module SPIRV options descriptor", "tags": ["dawn"]},
Austin Eng493de1e2023-06-20 22:58:27 +00003159 {"value": 1010, "name": "request adapter options LUID", "tags": ["dawn", "native"]},
Le Hoang Quyenb5879ac2023-06-27 08:32:22 +00003160 {"value": 1011, "name": "request adapter options get GL proc", "tags": ["dawn", "native"]},
3161 {"value": 1012, "name": "dawn multisample state render to single sampled", "tags": ["dawn"]},
Austin Eng5a54d9e2023-08-04 13:49:24 +00003162 {"value": 1013, "name": "dawn render pass color attachment render to single sampled", "tags": ["dawn"]},
Corentin Wallez7d78e3c2023-08-15 16:46:12 +00003163 {"value": 1014, "name": "render pass pixel local storage", "tags": ["dawn"]},
3164 {"value": 1015, "name": "pipeline layout pixel local storage", "tags": ["dawn"]},
Austin Eng5a54d9e2023-08-04 13:49:24 +00003165
3166 {"value": 1100, "name": "shared texture memory vk image descriptor", "tags": ["dawn", "native"]},
3167 {"value": 1101, "name": "shared texture memory vk dedicated allocation descriptor", "tags": ["dawn", "native"]},
3168 {"value": 1102, "name": "shared texture memory a hardware buffer descriptor", "tags": ["dawn", "native"]},
3169 {"value": 1103, "name": "shared texture memory dma buf descriptor", "tags": ["dawn", "native"]},
3170 {"value": 1104, "name": "shared texture memory opaque FD descriptor", "tags": ["dawn", "native"]},
3171 {"value": 1105, "name": "shared texture memory zircon handle descriptor", "tags": ["dawn", "native"]},
3172 {"value": 1106, "name": "shared texture memory DXGI shared handle descriptor", "tags": ["dawn", "native"]},
3173 {"value": 1107, "name": "shared texture memory D3D11 texture 2D descriptor", "tags": ["dawn", "native"]},
3174 {"value": 1108, "name": "shared texture memory IO surface descriptor", "tags": ["dawn", "native"]},
3175 {"value": 1109, "name": "shared texture memory EGL image descriptor", "tags": ["dawn", "native"]},
3176 {"value": 1200, "name": "shared texture memory initialized begin state", "tags": ["dawn", "native"]},
3177 {"value": 1201, "name": "shared texture memory initialized end state", "tags": ["dawn", "native"]},
3178 {"value": 1202, "name": "shared texture memory vk image layout begin state", "tags": ["dawn", "native"]},
3179 {"value": 1203, "name": "shared texture memory vk image layout end state", "tags": ["dawn", "native"]},
3180 {"value": 1204, "name": "shared fence vk semaphore opaque FD descriptor", "tags": ["dawn", "native"]},
3181 {"value": 1205, "name": "shared fence vk semaphore opaque FD export info", "tags": ["dawn", "native"]},
3182 {"value": 1206, "name": "shared fence vk semaphore sync FD descriptor", "tags": ["dawn", "native"]},
3183 {"value": 1207, "name": "shared fence vk semaphore sync FD export info", "tags": ["dawn", "native"]},
3184 {"value": 1208, "name": "shared fence vk semaphore zircon handle descriptor", "tags": ["dawn", "native"]},
3185 {"value": 1209, "name": "shared fence vk semaphore zircon handle export info", "tags": ["dawn", "native"]},
3186 {"value": 1210, "name": "shared fence DXGI shared handle descriptor", "tags": ["dawn", "native"]},
3187 {"value": 1211, "name": "shared fence DXGI shared handle export info", "tags": ["dawn", "native"]},
3188 {"value": 1212, "name": "shared fence MTL shared event descriptor", "tags": ["dawn", "native"]},
3189 {"value": 1213, "name": "shared fence MTL shared event export info", "tags": ["dawn", "native"]}
Corentin Wallez2b24c3d2020-01-15 09:54:42 +00003190 ]
3191 },
Austin Eng376f1c62017-05-30 20:03:44 -04003192 "texture": {
3193 "category": "object",
3194 "methods": [
3195 {
Austin Engb4b3ea02019-04-09 16:57:00 +00003196 "name": "create view",
Jiawei Shao6329e5a2018-10-12 08:32:58 +00003197 "returns": "texture view",
3198 "args": [
Kai Ninomiya93196db2019-08-26 22:51:19 +00003199 {"name": "descriptor", "type": "texture view descriptor", "annotation": "const*", "optional": true}
Jiawei Shao6329e5a2018-10-12 08:32:58 +00003200 ]
Natasha Leecae68ff2019-03-27 22:04:10 +00003201 },
3202 {
Brandon Jonesc95e5742021-08-19 20:47:28 +00003203 "name": "set label",
3204 "returns": "void",
3205 "args": [
3206 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"}
3207 ]
3208 },
3209 {
Corentin Wallez736e97c2022-06-08 18:14:02 +00003210 "name": "get width",
3211 "returns": "uint32_t"
3212 },
3213 {
3214 "name": "get height",
3215 "returns": "uint32_t"
3216 },
3217 {
3218 "name": "get depth or array layers",
3219 "returns": "uint32_t"
3220 },
3221 {
3222 "name": "get mip level count",
3223 "returns": "uint32_t"
3224 },
3225 {
3226 "name": "get sample count",
3227 "returns": "uint32_t"
3228 },
3229 {
3230 "name": "get dimension",
3231 "returns": "texture dimension"
3232 },
3233 {
3234 "name": "get format",
3235 "returns": "texture format"
3236 },
3237 {
3238 "name": "get usage",
3239 "returns": "texture usage"
3240 },
3241 {
Natasha Leecae68ff2019-03-27 22:04:10 +00003242 "name": "destroy"
Austin Eng376f1c62017-05-30 20:03:44 -04003243 }
3244 ]
3245 },
dan sinclair3ebe5b62023-08-21 22:57:06 +00003246 "surface get current texture status": {
3247 "category": "enum",
3248 "tags": ["upstream"],
3249 "values": [
3250 {"value": 0, "name": "success"},
3251 {"value": 1, "name": "timeout"},
3252 {"value": 2, "name": "outdated"},
3253 {"value": 3, "name": "lost"},
3254 {"value": 4, "name": "out of memory"},
3255 {"value": 5, "name": "device lost"}
3256 ]
3257 },
Brandon Jonesac71e342018-11-28 17:54:13 +00003258 "texture aspect": {
Corentin Wallez5df84ce2019-07-08 08:55:21 +00003259 "category": "enum",
Brandon Jonesac71e342018-11-28 17:54:13 +00003260 "values": [
Corentin Wallez5df84ce2019-07-08 08:55:21 +00003261 {"value": 0, "name": "all"},
3262 {"value": 1, "name": "stencil only"},
Bryan Bernhart14a23982021-02-05 20:11:24 +00003263 {"value": 2, "name": "depth only"},
Kai Ninomiya930e9182021-09-17 19:44:43 +00003264 {"value": 3, "name": "plane 0 only", "tags": ["dawn"]},
3265 {"value": 4, "name": "plane 1 only", "tags": ["dawn"]}
Brandon Jonesac71e342018-11-28 17:54:13 +00003266 ]
3267 },
Tomek Ponitka0f5d4962020-07-07 10:18:51 +00003268 "texture data layout": {
3269 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00003270 "extensible": "in",
Tomek Ponitka0f5d4962020-07-07 10:18:51 +00003271 "members": [
3272 {"name": "offset", "type": "uint64_t", "default": 0},
Kai Ninomiyacf820d72020-12-16 07:53:30 +00003273 {"name": "bytes per row", "type": "uint32_t", "default": "WGPU_COPY_STRIDE_UNDEFINED"},
3274 {"name": "rows per image", "type": "uint32_t", "default": "WGPU_COPY_STRIDE_UNDEFINED"}
Tomek Ponitka0f5d4962020-07-07 10:18:51 +00003275 ]
3276 },
Jiawei Shao425428f2018-08-27 08:44:48 +08003277 "texture descriptor": {
3278 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00003279 "extensible": "in",
Jiawei Shao425428f2018-08-27 08:44:48 +08003280 "members": [
François Beaufort277d2e12019-10-03 14:56:49 +00003281 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
Corentin Wallez9e9e29f2019-08-27 08:21:39 +00003282 {"name": "usage", "type": "texture usage"},
Corentin Wallez8f938712019-07-08 19:20:22 +00003283 {"name": "dimension", "type": "texture dimension", "default": "2D"},
Corentin Wallez29353d62018-09-18 12:49:22 +00003284 {"name": "size", "type": "extent 3D"},
Jiawei Shao425428f2018-08-27 08:44:48 +08003285 {"name": "format", "type": "texture format"},
Corentin Wallez8f938712019-07-08 19:20:22 +00003286 {"name": "mip level count", "type": "uint32_t", "default": 1},
Corentin Wallezeee34492022-03-16 18:44:16 +00003287 {"name": "sample count", "type": "uint32_t", "default": 1},
Loko Kung837f1512023-06-06 03:01:15 +00003288 {"name": "view format count", "type": "size_t", "default": 0},
Austin Eng8e02ebf2022-03-31 03:53:04 +00003289 {"name": "view formats", "type": "texture format", "annotation": "const*", "length": "view format count"}
Austin Eng376f1c62017-05-30 20:03:44 -04003290 ]
3291 },
3292 "texture dimension": {
3293 "category": "enum",
3294 "values": [
Corentin Wallezf07e85c2019-07-15 20:47:56 +00003295 {"value": 0, "name": "1D"},
3296 {"value": 1, "name": "2D"},
3297 {"value": 2, "name": "3D"}
Austin Eng376f1c62017-05-30 20:03:44 -04003298 ]
3299 },
Corentin Walleza60799f2018-09-11 18:16:54 +00003300 "texture format": {
3301 "category": "enum",
3302 "values": [
Kai Ninomiya7b6246a2020-01-28 23:54:38 +00003303 {"value": 0, "name": "undefined", "valid": false, "jsrepr": "undefined"},
Kai Ninomiya930e9182021-09-17 19:44:43 +00003304
Corentin Wallezd55bd7a2019-09-05 09:12:32 +00003305 {"value": 1, "name": "R8 unorm"},
3306 {"value": 2, "name": "R8 snorm"},
3307 {"value": 3, "name": "R8 uint"},
3308 {"value": 4, "name": "R8 sint"},
Corentin Wallez431d6182019-07-01 09:58:07 +00003309
Corentin Wallezd55bd7a2019-09-05 09:12:32 +00003310 {"value": 5, "name": "R16 uint"},
3311 {"value": 6, "name": "R16 sint"},
3312 {"value": 7, "name": "R16 float"},
3313 {"value": 8, "name": "RG8 unorm"},
3314 {"value": 9, "name": "RG8 snorm"},
3315 {"value": 10, "name": "RG8 uint"},
3316 {"value": 11, "name": "RG8 sint"},
Corentin Wallez431d6182019-07-01 09:58:07 +00003317
Corentin Wallezd55bd7a2019-09-05 09:12:32 +00003318 {"value": 12, "name": "R32 float"},
3319 {"value": 13, "name": "R32 uint"},
3320 {"value": 14, "name": "R32 sint"},
3321 {"value": 15, "name": "RG16 uint"},
3322 {"value": 16, "name": "RG16 sint"},
3323 {"value": 17, "name": "RG16 float"},
3324 {"value": 18, "name": "RGBA8 unorm"},
3325 {"value": 19, "name": "RGBA8 unorm srgb"},
3326 {"value": 20, "name": "RGBA8 snorm"},
3327 {"value": 21, "name": "RGBA8 uint"},
3328 {"value": 22, "name": "RGBA8 sint"},
3329 {"value": 23, "name": "BGRA8 unorm"},
3330 {"value": 24, "name": "BGRA8 unorm srgb"},
3331 {"value": 25, "name": "RGB10 A2 unorm"},
Corentin Wallez2f6e4ec2020-08-19 21:51:20 +00003332 {"value": 26, "name": "RG11 B10 ufloat"},
3333 {"value": 27, "name": "RGB9 E5 ufloat"},
Corentin Wallez431d6182019-07-01 09:58:07 +00003334
Corentin Wallez2f6e4ec2020-08-19 21:51:20 +00003335 {"value": 28, "name": "RG32 float"},
3336 {"value": 29, "name": "RG32 uint"},
3337 {"value": 30, "name": "RG32 sint"},
3338 {"value": 31, "name": "RGBA16 uint"},
3339 {"value": 32, "name": "RGBA16 sint"},
3340 {"value": 33, "name": "RGBA16 float"},
Corentin Wallez431d6182019-07-01 09:58:07 +00003341
Corentin Wallez2f6e4ec2020-08-19 21:51:20 +00003342 {"value": 34, "name": "RGBA32 float"},
3343 {"value": 35, "name": "RGBA32 uint"},
3344 {"value": 36, "name": "RGBA32 sint"},
Corentin Wallez431d6182019-07-01 09:58:07 +00003345
Kai Ninomiyafa9ca442021-09-17 18:25:53 +00003346 {"value": 37, "name": "stencil8"},
3347 {"value": 38, "name": "depth16 unorm"},
3348 {"value": 39, "name": "depth24 plus"},
Bryan Bernhart536c7ae2021-02-16 19:55:09 +00003349 {"value": 40, "name": "depth24 plus stencil8"},
Brandon Jones6d48f572022-06-14 22:48:31 +00003350 {"value": 41, "name": "depth32 float"},
3351 {"value": 42, "name": "depth32 float stencil8"},
Corentin Wallez431d6182019-07-01 09:58:07 +00003352
Brandon Jones6d48f572022-06-14 22:48:31 +00003353 {"value": 43, "name": "BC1 RGBA unorm", "jsrepr": "'bc1-rgba-unorm'"},
3354 {"value": 44, "name": "BC1 RGBA unorm srgb", "jsrepr": "'bc1-rgba-unorm-srgb'"},
3355 {"value": 45, "name": "BC2 RGBA unorm", "jsrepr": "'bc2-rgba-unorm'"},
3356 {"value": 46, "name": "BC2 RGBA unorm srgb", "jsrepr": "'bc2-rgba-unorm-srgb'"},
3357 {"value": 47, "name": "BC3 RGBA unorm", "jsrepr": "'bc3-rgba-unorm'"},
3358 {"value": 48, "name": "BC3 RGBA unorm srgb", "jsrepr": "'bc3-rgba-unorm-srgb'"},
3359 {"value": 49, "name": "BC4 R unorm", "jsrepr": "'bc4-r-unorm'"},
3360 {"value": 50, "name": "BC4 R snorm", "jsrepr": "'bc4-r-snorm'"},
3361 {"value": 51, "name": "BC5 RG unorm", "jsrepr": "'bc5-rg-unorm'"},
3362 {"value": 52, "name": "BC5 RG snorm", "jsrepr": "'bc5-rg-snorm'"},
3363 {"value": 53, "name": "BC6H RGB ufloat", "jsrepr": "'bc6h-rgb-ufloat'"},
3364 {"value": 54, "name": "BC6H RGB float", "jsrepr": "'bc6h-rgb-float'"},
3365 {"value": 55, "name": "BC7 RGBA unorm", "jsrepr": "'bc7-rgba-unorm'"},
3366 {"value": 56, "name": "BC7 RGBA unorm srgb", "jsrepr": "'bc7-rgba-unorm-srgb'"},
Loko Kungc7226a72021-08-31 00:15:45 +00003367
Brandon Jones6d48f572022-06-14 22:48:31 +00003368 {"value": 57, "name": "ETC2 RGB8 unorm", "jsrepr": "'etc2-rgb8unorm'"},
3369 {"value": 58, "name": "ETC2 RGB8 unorm srgb", "jsrepr": "'etc2-rgb8unorm-srgb'"},
3370 {"value": 59, "name": "ETC2 RGB8A1 unorm", "jsrepr": "'etc2-rgb8a1unorm'"},
3371 {"value": 60, "name": "ETC2 RGB8A1 unorm srgb", "jsrepr": "'etc2-rgb8a1unorm-srgb'"},
3372 {"value": 61, "name": "ETC2 RGBA8 unorm", "jsrepr": "'etc2-rgba8unorm'"},
3373 {"value": 62, "name": "ETC2 RGBA8 unorm srgb", "jsrepr": "'etc2-rgba8unorm-srgb'"},
3374 {"value": 63, "name": "EAC R11 unorm", "jsrepr": "'eac-r11unorm'"},
3375 {"value": 64, "name": "EAC R11 snorm", "jsrepr": "'eac-r11snorm'"},
3376 {"value": 65, "name": "EAC RG11 unorm", "jsrepr": "'eac-rg11unorm'"},
3377 {"value": 66, "name": "EAC RG11 snorm", "jsrepr": "'eac-rg11snorm'"},
Loko Kung37a86492021-09-07 18:39:04 +00003378
Brandon Jones6d48f572022-06-14 22:48:31 +00003379 {"value": 67, "name": "ASTC 4x4 unorm", "jsrepr": "'astc-4x4-unorm'"},
3380 {"value": 68, "name": "ASTC 4x4 unorm srgb", "jsrepr": "'astc-4x4-unorm-srgb'"},
3381 {"value": 69, "name": "ASTC 5x4 unorm", "jsrepr": "'astc-5x4-unorm'"},
3382 {"value": 70, "name": "ASTC 5x4 unorm srgb", "jsrepr": "'astc-5x4-unorm-srgb'"},
3383 {"value": 71, "name": "ASTC 5x5 unorm", "jsrepr": "'astc-5x5-unorm'"},
3384 {"value": 72, "name": "ASTC 5x5 unorm srgb", "jsrepr": "'astc-5x5-unorm-srgb'"},
3385 {"value": 73, "name": "ASTC 6x5 unorm", "jsrepr": "'astc-6x5-unorm'"},
3386 {"value": 74, "name": "ASTC 6x5 unorm srgb", "jsrepr": "'astc-6x5-unorm-srgb'"},
3387 {"value": 75, "name": "ASTC 6x6 unorm", "jsrepr": "'astc-6x6-unorm'"},
3388 {"value": 76, "name": "ASTC 6x6 unorm srgb", "jsrepr": "'astc-6x6-unorm-srgb'"},
3389 {"value": 77, "name": "ASTC 8x5 unorm", "jsrepr": "'astc-8x5-unorm'"},
3390 {"value": 78, "name": "ASTC 8x5 unorm srgb", "jsrepr": "'astc-8x5-unorm-srgb'"},
3391 {"value": 79, "name": "ASTC 8x6 unorm", "jsrepr": "'astc-8x6-unorm'"},
3392 {"value": 80, "name": "ASTC 8x6 unorm srgb", "jsrepr": "'astc-8x6-unorm-srgb'"},
3393 {"value": 81, "name": "ASTC 8x8 unorm", "jsrepr": "'astc-8x8-unorm'"},
3394 {"value": 82, "name": "ASTC 8x8 unorm srgb", "jsrepr": "'astc-8x8-unorm-srgb'"},
3395 {"value": 83, "name": "ASTC 10x5 unorm", "jsrepr": "'astc-10x5-unorm'"},
3396 {"value": 84, "name": "ASTC 10x5 unorm srgb", "jsrepr": "'astc-10x5-unorm-srgb'"},
3397 {"value": 85, "name": "ASTC 10x6 unorm", "jsrepr": "'astc-10x6-unorm'"},
3398 {"value": 86, "name": "ASTC 10x6 unorm srgb", "jsrepr": "'astc-10x6-unorm-srgb'"},
3399 {"value": 87, "name": "ASTC 10x8 unorm", "jsrepr": "'astc-10x8-unorm'"},
3400 {"value": 88, "name": "ASTC 10x8 unorm srgb", "jsrepr": "'astc-10x8-unorm-srgb'"},
3401 {"value": 89, "name": "ASTC 10x10 unorm", "jsrepr": "'astc-10x10-unorm'"},
3402 {"value": 90, "name": "ASTC 10x10 unorm srgb", "jsrepr": "'astc-10x10-unorm-srgb'"},
3403 {"value": 91, "name": "ASTC 12x10 unorm", "jsrepr": "'astc-12x10-unorm'"},
3404 {"value": 92, "name": "ASTC 12x10 unorm srgb", "jsrepr": "'astc-12x10-unorm-srgb'"},
3405 {"value": 93, "name": "ASTC 12x12 unorm", "jsrepr": "'astc-12x12-unorm'"},
3406 {"value": 94, "name": "ASTC 12x12 unorm srgb", "jsrepr": "'astc-12x12-unorm-srgb'"},
Kai Ninomiyafa9ca442021-09-17 18:25:53 +00003407
Jie Chen3bf44822023-08-21 02:56:57 +00003408 {"value": 95, "name": "R16 unorm", "tags": ["dawn"]},
3409 {"value": 96, "name": "RG16 unorm", "tags": ["dawn"]},
3410 {"value": 97, "name": "RGBA16 unorm", "tags": ["dawn"]},
3411 {"value": 98, "name": "R16 snorm", "tags": ["dawn"]},
3412 {"value": 99, "name": "RG16 snorm", "tags": ["dawn"]},
3413 {"value": 100, "name": "RGBA16 snorm", "tags": ["dawn"]},
3414
Jie Chenb2abd132023-08-29 03:23:25 +00003415 {"value": 101, "name": "R8 BG8 Biplanar 420 unorm", "tags": ["dawn"]},
3416 {"value": 102, "name": "R10X6 BG10X6 Biplanar 420 unorm", "tags": ["dawn"]}
Corentin Walleza60799f2018-09-11 18:16:54 +00003417 ]
3418 },
Corentin Wallez9e9e29f2019-08-27 08:21:39 +00003419 "texture usage": {
Austin Eng376f1c62017-05-30 20:03:44 -04003420 "category": "bitmask",
3421 "values": [
3422 {"value": 0, "name": "none"},
Corentin Wallezec053552019-07-08 10:05:46 +00003423 {"value": 1, "name": "copy src"},
3424 {"value": 2, "name": "copy dst"},
Brandon Jones27e17a62021-08-10 04:07:37 +00003425 {"value": 4, "name": "texture binding"},
3426 {"value": 8, "name": "storage binding"},
Corentin Wallez6b087812020-10-27 15:35:56 +00003427 {"value": 16, "name": "render attachment"},
Corentin Wallez7d78e3c2023-08-15 16:46:12 +00003428 {"value": 32, "name": "transient attachment", "tags": ["dawn"]},
3429 {"value": 64, "name": "storage attachment", "tags": ["dawn"]}
Austin Eng376f1c62017-05-30 20:03:44 -04003430 ]
3431 },
Jiawei Shao6329e5a2018-10-12 08:32:58 +00003432 "texture view descriptor": {
3433 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00003434 "extensible": "in",
Jiawei Shao6329e5a2018-10-12 08:32:58 +00003435 "members": [
François Beaufort277d2e12019-10-03 14:56:49 +00003436 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
Corentin Wallezd55bd7a2019-09-05 09:12:32 +00003437 {"name": "format", "type": "texture format", "default": "undefined"},
3438 {"name": "dimension", "type": "texture view dimension", "default": "undefined"},
Corentin Wallez8f938712019-07-08 19:20:22 +00003439 {"name": "base mip level", "type": "uint32_t", "default": "0"},
jchen104935c142021-09-15 06:27:25 +00003440 {"name": "mip level count", "type": "uint32_t", "default": "WGPU_MIP_LEVEL_COUNT_UNDEFINED"},
Corentin Wallez8f938712019-07-08 19:20:22 +00003441 {"name": "base array layer", "type": "uint32_t", "default": "0"},
jchen1096ac9692021-09-14 02:41:49 +00003442 {"name": "array layer count", "type": "uint32_t", "default": "WGPU_ARRAY_LAYER_COUNT_UNDEFINED"},
Corentin Wallezdbe74bc2019-09-10 08:30:43 +00003443 {"name": "aspect", "type": "texture aspect", "default": "all"}
Jiawei Shao6329e5a2018-10-12 08:32:58 +00003444 ]
3445 },
Austin Eng376f1c62017-05-30 20:03:44 -04003446 "texture view": {
Brandon Jones88aeeae2021-11-19 18:26:08 +00003447 "category": "object",
3448 "methods": [
3449 {
3450 "name": "set label",
3451 "returns": "void",
Brandon Jones88aeeae2021-11-19 18:26:08 +00003452 "args": [
3453 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"}
3454 ]
3455 }
3456 ]
Austin Eng376f1c62017-05-30 20:03:44 -04003457 },
Jiawei Shao6329e5a2018-10-12 08:32:58 +00003458 "texture view dimension": {
3459 "category": "enum",
3460 "values": [
Kai Ninomiya7b6246a2020-01-28 23:54:38 +00003461 {"value": 0, "name": "undefined", "valid": false, "jsrepr": "undefined"},
Corentin Wallezd55bd7a2019-09-05 09:12:32 +00003462 {"value": 1, "name": "1D"},
3463 {"value": 2, "name": "2D"},
3464 {"value": 3, "name": "2D array"},
3465 {"value": 4, "name": "cube"},
3466 {"value": 5, "name": "cube array"},
3467 {"value": 6, "name": "3D"}
Jiawei Shao6329e5a2018-10-12 08:32:58 +00003468 ]
3469 },
Austin Eng376f1c62017-05-30 20:03:44 -04003470 "vertex format": {
3471 "category": "enum",
3472 "values": [
Brandon Jonese3f10e32021-02-26 02:20:25 +00003473 {"value": 0, "name": "undefined", "valid": false, "jsrepr": "undefined"},
3474 {"value": 1, "name": "uint8x2"},
3475 {"value": 2, "name": "uint8x4"},
3476 {"value": 3, "name": "sint8x2"},
3477 {"value": 4, "name": "sint8x4"},
3478 {"value": 5, "name": "unorm8x2"},
3479 {"value": 6, "name": "unorm8x4"},
3480 {"value": 7, "name": "snorm8x2"},
3481 {"value": 8, "name": "snorm8x4"},
3482 {"value": 9, "name": "uint16x2"},
3483 {"value": 10, "name": "uint16x4"},
3484 {"value": 11, "name": "sint16x2"},
3485 {"value": 12, "name": "sint16x4"},
3486 {"value": 13, "name": "unorm16x2"},
3487 {"value": 14, "name": "unorm16x4"},
3488 {"value": 15, "name": "snorm16x2"},
3489 {"value": 16, "name": "snorm16x4"},
3490 {"value": 17, "name": "float16x2"},
3491 {"value": 18, "name": "float16x4"},
3492 {"value": 19, "name": "float32"},
3493 {"value": 20, "name": "float32x2"},
3494 {"value": 21, "name": "float32x3"},
3495 {"value": 22, "name": "float32x4"},
3496 {"value": 23, "name": "uint32"},
3497 {"value": 24, "name": "uint32x2"},
3498 {"value": 25, "name": "uint32x3"},
3499 {"value": 26, "name": "uint32x4"},
3500 {"value": 27, "name": "sint32"},
3501 {"value": 28, "name": "sint32x2"},
3502 {"value": 29, "name": "sint32x3"},
Brandon Jones4139fa52021-05-21 01:29:17 +00003503 {"value": 30, "name": "sint32x4"}
Austin Eng376f1c62017-05-30 20:03:44 -04003504 ]
3505 },
fujunwei4e876902021-11-25 08:44:01 +00003506 "whole size" : {
3507 "category": "constant",
3508 "type": "uint64_t",
3509 "value": "(0xffffffffffffffffULL)"
3510 },
3511 "whole map size" : {
3512 "category": "constant",
3513 "type": "size_t",
3514 "value": "SIZE_MAX"
3515 },
fujunwei4e876902021-11-25 08:44:01 +00003516 "copy stride undefined" : {
3517 "category": "constant",
3518 "type": "uint32_t",
3519 "value": "(0xffffffffUL)"
3520 },
3521 "limit u32 undefined" : {
3522 "category": "constant",
3523 "type": "uint32_t",
3524 "value": "(0xffffffffUL)"
3525 },
3526 "limit u64 undefined" : {
3527 "category": "constant",
3528 "type": "uint64_t",
3529 "value": "(0xffffffffffffffffULL)"
3530 },
3531 "array layer count undefined" : {
3532 "category": "constant",
3533 "type": "uint32_t",
3534 "value": "(0xffffffffUL)"
3535 },
3536 "mip level count undefined" : {
3537 "category": "constant",
3538 "type": "uint32_t",
3539 "value": "(0xffffffffUL)"
3540 },
Austin Engc7f416c2019-01-15 20:49:53 +00003541 "ObjectType": {
3542 "_comment": "Only used for the wire",
3543 "category": "native"
3544 },
3545 "ObjectId": {
3546 "_comment": "Only used for the wire",
3547 "category": "native"
3548 },
3549 "ObjectHandle": {
3550 "_comment": "Only used for the wire",
3551 "category": "native"
3552 },
Austin Eng376f1c62017-05-30 20:03:44 -04003553 "void": {
3554 "category": "native"
3555 },
Corentin Wallez1325ab12020-06-30 11:51:14 +00003556 "void *": {
3557 "category": "native"
3558 },
3559 "void const *": {
3560 "category": "native"
3561 },
Austin Eng5a54d9e2023-08-04 13:49:24 +00003562 "int": {
3563 "category": "native"
3564 },
Yunchao Hec33a8c12019-04-11 18:46:54 +00003565 "int32_t": {
3566 "category": "native"
3567 },
Corentin Wallez47a33412020-06-02 09:24:39 +00003568 "size_t": {
Loko Kung837f1512023-06-06 03:01:15 +00003569 "category": "native",
3570 "wire transparent": false
Corentin Wallez47a33412020-06-02 09:24:39 +00003571 },
shrekshaof8c5e4a2020-12-24 03:11:17 +00003572 "uint16_t": {
3573 "category": "native"
3574 },
3575 "uint32_t": {
3576 "category": "native"
3577 },
Kai Ninomiya35bf4242017-07-19 15:41:17 -07003578 "uint64_t": {
3579 "category": "native"
Corentin Walleza60799f2018-09-11 18:16:54 +00003580 },
3581 "uint8_t": {
3582 "category": "native"
Austin Eng0eff5982021-07-27 19:59:58 +00003583 },
3584 "dawn texture internal usage descriptor": {
3585 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00003586 "chained": "in",
Corentin Walleza45561b2022-07-14 12:58:25 +00003587 "chain roots": ["texture descriptor"],
Kai Ninomiya930e9182021-09-17 19:44:43 +00003588 "tags": ["dawn"],
Austin Eng0eff5982021-07-27 19:59:58 +00003589 "members": [
3590 {"name": "internal usage", "type": "texture usage", "default": "none"}
3591 ]
Austin Engaa9475e2022-01-18 21:54:25 +00003592 },
3593 "dawn encoder internal usage descriptor": {
3594 "category": "structure",
3595 "chained": "in",
Corentin Walleza45561b2022-07-14 12:58:25 +00003596 "chain roots": ["command encoder descriptor"],
Austin Engaa9475e2022-01-18 21:54:25 +00003597 "tags": ["dawn"],
3598 "members": [
3599 {"name": "use internal usages", "type": "bool", "default": "false"}
3600 ]
Jiawei Shao5a0f8d32022-09-23 00:29:46 +00003601 },
3602 "dawn adapter properties power preference": {
3603 "category": "structure",
3604 "chained": "out",
3605 "chain roots": ["adapter properties"],
3606 "tags": ["dawn"],
3607 "members": [
3608 {"name": "power preference", "type": "power preference", "default": "undefined"}
3609 ]
Jiawei Shao806c5832022-11-23 02:06:11 +00003610 },
3611 "dawn buffer descriptor error info from wire client": {
3612 "category": "structure",
3613 "chained": "in",
3614 "chain roots": ["buffer descriptor"],
3615 "tags": ["dawn"],
3616 "members": [
3617 {"name": "out of memory", "type": "bool", "default": "false"}
3618 ]
Austin Eng376f1c62017-05-30 20:03:44 -04003619 }
3620}