blob: 8913c2ca48c695c46bf82d25191cbc96a75dda30 [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"},
56 {"name": "force fallback adapter", "type": "bool", "default": "false"}
Kai Ninomiya4e37acc2021-09-17 21:13:33 +000057 ]
58 },
59 "request adapter status": {
60 "category": "enum",
Kai Ninomiya4e37acc2021-09-17 21:13:33 +000061 "emscripten_no_enum_table": true,
62 "values": [
63 {"value": 0, "name": "success"},
64 {"value": 1, "name": "unavailable"},
65 {"value": 2, "name": "error"},
66 {"value": 3, "name": "unknown"}
67 ]
68 },
69 "request adapter callback": {
fujunwei23f71622021-12-02 07:41:21 +000070 "category": "function pointer",
Kai Ninomiya4e37acc2021-09-17 21:13:33 +000071 "args": [
72 {"name": "status", "type": "request adapter status"},
73 {"name": "adapter", "type": "adapter"},
Austin Eng5397f9f2021-12-14 23:22:46 +000074 {"name": "message", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
Kai Ninomiya4e37acc2021-09-17 21:13:33 +000075 {"name": "userdata", "type": "void", "annotation": "*"}
76 ]
77 },
78 "adapter": {
79 "category": "object",
Kai Ninomiya4e37acc2021-09-17 21:13:33 +000080 "methods": [
81 {
Le Hoang Quyen99b80812023-03-24 15:50:50 +000082 "name": "get instance",
83 "tags": ["dawn"],
84 "returns": "instance"
85 },
86 {
Kai Ninomiya7d174a12021-09-21 17:36:27 +000087 "name": "get limits",
88 "returns": "bool",
Kai Ninomiya7d174a12021-09-21 17:36:27 +000089 "args": [
90 {"name": "limits", "type": "supported limits", "annotation": "*"}
91 ]
92 },
93 {
Kai Ninomiya4e37acc2021-09-17 21:13:33 +000094 "name": "get properties",
Kai Ninomiya4e37acc2021-09-17 21:13:33 +000095 "args": [
96 {"name": "properties", "type": "adapter properties", "annotation": "*"}
97 ]
98 },
99 {
Kai Ninomiya7d174a12021-09-21 17:36:27 +0000100 "name": "has feature",
101 "returns": "bool",
Kai Ninomiya7d174a12021-09-21 17:36:27 +0000102 "args": [
103 {"name": "feature", "type": "feature name"}
104 ]
105 },
106 {
Austin Eng89ddadc2021-12-15 00:12:30 +0000107 "name": "enumerate features",
Austin Eng3ac7b9c2022-01-06 22:11:28 +0000108 "returns": "size_t",
Austin Eng89ddadc2021-12-15 00:12:30 +0000109 "args": [
110 {"name": "features", "type": "feature name", "annotation": "*"}
111 ]
112 },
113 {
Kai Ninomiya4e37acc2021-09-17 21:13:33 +0000114 "name": "request device",
115 "args": [
Corentin Wallez1260a532022-07-26 17:36:44 +0000116 {"name": "descriptor", "type": "device descriptor", "annotation": "const*", "optional": true, "no_default": true},
Corentin Walleze00c6bd2021-12-13 17:37:17 +0000117 {"name": "callback", "type": "request device callback"},
Kai Ninomiya4e37acc2021-09-17 21:13:33 +0000118 {"name": "userdata", "type": "void", "annotation": "*"}
119 ]
Austin Eng2f218e22021-12-22 19:02:23 +0000120 },
121 {
122 "name": "create device",
123 "tags": ["dawn"],
124 "returns": "device",
125 "args": [
Corentin Wallez1260a532022-07-26 17:36:44 +0000126 {"name": "descriptor", "type": "device descriptor", "annotation": "const*", "optional": true}
Austin Eng2f218e22021-12-22 19:02:23 +0000127 ]
Kai Ninomiya4e37acc2021-09-17 21:13:33 +0000128 }
129 ]
130 },
Corentin Wallezf12c9db2020-01-10 13:28:18 +0000131 "adapter properties": {
132 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +0000133 "extensible": "out",
Corentin Wallezf12c9db2020-01-10 13:28:18 +0000134 "members": [
Corentin Wallezf12c9db2020-01-10 13:28:18 +0000135 {"name": "vendor ID", "type": "uint32_t"},
Brandon Jones8cb8c7a2022-05-26 23:47:39 +0000136 {"name": "vendor name", "type": "char", "annotation": "const*", "length": "strlen"},
137 {"name": "architecture", "type": "char", "annotation": "const*", "length": "strlen"},
Kai Ninomiya930e9182021-09-17 19:44:43 +0000138 {"name": "device ID", "type": "uint32_t"},
Jiawei Shao2294cf42021-12-01 08:13:40 +0000139 {"name": "name", "type": "char", "annotation": "const*", "length": "strlen"},
140 {"name": "driver description", "type": "char", "annotation": "const*", "length": "strlen"},
Corentin Wallezf12c9db2020-01-10 13:28:18 +0000141 {"name": "adapter type", "type": "adapter type"},
142 {"name": "backend type", "type": "backend type"}
143 ]
144 },
145 "adapter type": {
146 "category": "enum",
Kai Ninomiya930e9182021-09-17 19:44:43 +0000147 "emscripten_no_enum_table": true,
Corentin Wallezf12c9db2020-01-10 13:28:18 +0000148 "values": [
149 {"value": 0, "name": "discrete GPU"},
150 {"value": 1, "name": "integrated GPU"},
151 {"value": 2, "name": "CPU"},
Corentin Walleza0afd312020-04-01 12:07:43 +0000152 {"value": 3, "name": "unknown"}
Corentin Wallezf12c9db2020-01-10 13:28:18 +0000153 ]
154 },
Kai Ninomiya4e37acc2021-09-17 21:13:33 +0000155 "device descriptor": {
156 "category": "structure",
Austin Eng1a965ab2021-09-20 18:19:55 +0000157 "extensible": "in",
Kai Ninomiya7d174a12021-09-21 17:36:27 +0000158 "members": [
Corentin Wallez6cd1cd92021-11-17 08:13:24 +0000159 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
Austin Eng5397f9f2021-12-14 23:22:46 +0000160 {"name": "required features count", "type": "uint32_t", "default": 0},
161 {"name": "required features", "type": "feature name", "annotation": "const*", "length": "required features count", "default": "nullptr"},
Corentin Wallezeee34492022-03-16 18:44:16 +0000162 {"name": "required limits", "type": "required limits", "annotation": "const*", "optional": true},
Brandon Jones80853672022-04-12 03:28:40 +0000163 {"name": "default queue", "type": "queue descriptor"}
Kai Ninomiya7d174a12021-09-21 17:36:27 +0000164 ]
Kai Ninomiya4e37acc2021-09-17 21:13:33 +0000165 },
Austin Eng2f218e22021-12-22 19:02:23 +0000166 "dawn toggles device descriptor": {
Zhaoming Jianga12ff9a2023-01-30 09:16:51 +0000167 "tags": ["dawn", "native", "deprecated"],
Austin Eng2f218e22021-12-22 19:02:23 +0000168 "category": "structure",
169 "chained": "in",
Corentin Walleza45561b2022-07-14 12:58:25 +0000170 "chain roots": ["device descriptor"],
Austin Eng2f218e22021-12-22 19:02:23 +0000171 "members": [
172 {"name": "force enabled toggles count", "type": "uint32_t", "default": 0},
173 {"name": "force enabled toggles", "type": "char", "annotation": "const*const*", "length": "force enabled toggles count"},
174 {"name": "force disabled toggles count", "type": "uint32_t", "default": 0},
175 {"name": "force disabled toggles", "type": "char", "annotation": "const*const*", "length": "force disabled toggles count"}
176 ]
177 },
Zhaoming Jianga12ff9a2023-01-30 09:16:51 +0000178 "dawn toggles descriptor": {
179 "tags": ["dawn", "native"],
180 "category": "structure",
181 "chained": "in",
Zhaoming Jiangc2657b22023-03-07 02:03:54 +0000182 "chain roots": ["instance descriptor", "device descriptor"],
Zhaoming Jianga12ff9a2023-01-30 09:16:51 +0000183 "members": [
184 {"name": "enabled toggles count", "type": "uint32_t", "default": 0},
185 {"name": "enabled toggles", "type": "char", "annotation": "const*const*", "length": "enabled toggles count"},
186 {"name": "disabled toggles count", "type": "uint32_t", "default": 0},
187 {"name": "disabled toggles", "type": "char", "annotation": "const*const*", "length": "disabled toggles count"}
188 ]
189 },
Loko Kung44f039d2022-03-01 22:59:40 +0000190 "dawn cache device descriptor" : {
191 "tags": ["dawn", "native"],
192 "category": "structure",
193 "chained": "in",
Corentin Walleza45561b2022-07-14 12:58:25 +0000194 "chain roots": ["device descriptor"],
Loko Kung44f039d2022-03-01 22:59:40 +0000195 "members": [
196 {"name": "isolation key", "type": "char", "annotation": "const*", "length": "strlen", "default": "\"\""}
197 ]
198 },
Corentin Walleza60799f2018-09-11 18:16:54 +0000199 "address mode": {
200 "category": "enum",
201 "values": [
Yan, Shaobo93158eb2019-01-04 04:56:08 +0000202 {"value": 0, "name": "repeat"},
Corentin Walleza0491c92019-07-08 09:36:31 +0000203 {"value": 1, "name": "mirror repeat"},
Austin Eng5f1d2e12019-04-09 15:12:50 +0000204 {"value": 2, "name": "clamp to edge"}
Corentin Walleza60799f2018-09-11 18:16:54 +0000205 ]
Austin Eng10634392017-06-01 11:30:03 -0400206 },
Corentin Wallezf12c9db2020-01-10 13:28:18 +0000207 "backend type": {
208 "category": "enum",
Kai Ninomiya930e9182021-09-17 19:44:43 +0000209 "emscripten_no_enum_table": true,
Corentin Wallezf12c9db2020-01-10 13:28:18 +0000210 "values": [
Corentin Wallezf2ed2482020-01-21 08:44:25 +0000211 {"value": 0, "name": "null"},
Kai Ninomiya4e37acc2021-09-17 21:13:33 +0000212 {"value": 1, "name": "WebGPU"},
213 {"value": 2, "name": "D3D11"},
214 {"value": 3, "name": "D3D12"},
215 {"value": 4, "name": "metal"},
216 {"value": 5, "name": "vulkan"},
217 {"value": 6, "name": "openGL"},
218 {"value": 7, "name": "openGLES"}
Corentin Wallezf12c9db2020-01-10 13:28:18 +0000219 ]
220 },
Austin Eng376f1c62017-05-30 20:03:44 -0400221 "bind group": {
Brandon Jones88aeeae2021-11-19 18:26:08 +0000222 "category": "object",
223 "methods": [
224 {
225 "name": "set label",
226 "returns": "void",
Brandon Jones88aeeae2021-11-19 18:26:08 +0000227 "args": [
228 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"}
229 ]
230 }
231 ]
Austin Eng376f1c62017-05-30 20:03:44 -0400232 },
Corentin Wallezc3c66942020-04-07 07:11:12 +0000233 "bind group entry": {
Corentin Wallez6f9d21e2018-12-05 07:18:30 +0000234 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +0000235 "extensible": "in",
Corentin Wallez6f9d21e2018-12-05 07:18:30 +0000236 "members": [
237 {"name": "binding", "type": "uint32_t"},
Corentin Wallez6f0e1f92018-12-07 12:31:53 +0000238 {"name": "buffer", "type": "buffer", "optional": true},
Corentin Wallez8f938712019-07-08 19:20:22 +0000239 {"name": "offset", "type": "uint64_t", "default": "0"},
Zhaoming Jiangf304f252022-09-28 12:49:27 +0000240 {"name": "size", "type": "uint64_t", "default": "WGPU_WHOLE_SIZE"},
Corentin Wallez6f9d21e2018-12-05 07:18:30 +0000241 {"name": "sampler", "type": "sampler", "optional": true},
242 {"name": "texture view", "type": "texture view", "optional": true}
243 ]
244 },
245 "bind group descriptor": {
246 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +0000247 "extensible": "in",
Corentin Wallez6f9d21e2018-12-05 07:18:30 +0000248 "members": [
François Beaufort277d2e12019-10-03 14:56:49 +0000249 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
Corentin Wallez6f9d21e2018-12-05 07:18:30 +0000250 {"name": "layout", "type": "bind group layout"},
Corentin Wallez84ae2bf2020-05-13 17:05:55 +0000251 {"name": "entry count", "type": "uint32_t"},
Corentin Wallez3966eb12020-04-21 07:36:30 +0000252 {"name": "entries", "type": "bind group entry", "annotation": "const*", "length": "entry count"}
Austin Eng376f1c62017-05-30 20:03:44 -0400253 ]
254 },
Austin Eng376f1c62017-05-30 20:03:44 -0400255 "bind group layout": {
Brandon Jones88aeeae2021-11-19 18:26:08 +0000256 "category": "object",
257 "methods": [
258 {
259 "name": "set label",
260 "returns": "void",
Brandon Jones88aeeae2021-11-19 18:26:08 +0000261 "args": [
262 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"}
263 ]
264 }
265 ]
Austin Eng376f1c62017-05-30 20:03:44 -0400266 },
Brandon Jones9c52c2992020-12-12 02:09:56 +0000267
268 "buffer binding type": {
269 "category": "enum",
270 "values": [
271 {"value": 0, "name": "undefined", "jsrepr": "undefined", "valid": false},
272 {"value": 1, "name": "uniform"},
273 {"value": 2, "name": "storage"},
Kai Ninomiya4e37acc2021-09-17 21:13:33 +0000274 {"value": 3, "name": "read only storage"}
Brandon Jones9c52c2992020-12-12 02:09:56 +0000275 ]
276 },
277 "buffer binding layout": {
278 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +0000279 "extensible": "in",
Brandon Jones9c52c2992020-12-12 02:09:56 +0000280 "members": [
281 {"name": "type", "type": "buffer binding type", "default": "undefined"},
282 {"name": "has dynamic offset", "type": "bool", "default": "false"},
283 {"name": "min binding size", "type": "uint64_t", "default": "0"}
284 ]
285 },
286
287 "sampler binding type": {
288 "category": "enum",
289 "values": [
290 {"value": 0, "name": "undefined", "jsrepr": "undefined", "valid": false},
291 {"value": 1, "name": "filtering"},
292 {"value": 2, "name": "non filtering"},
293 {"value": 3, "name": "comparison"}
294 ]
295 },
296 "sampler binding layout": {
297 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +0000298 "extensible": "in",
Brandon Jones9c52c2992020-12-12 02:09:56 +0000299 "members": [
300 {"name": "type", "type": "sampler binding type", "default": "undefined"}
301 ]
302 },
303
304 "texture sample type": {
305 "category": "enum",
306 "values": [
307 {"value": 0, "name": "undefined", "jsrepr": "undefined", "valid": false},
308 {"value": 1, "name": "float"},
309 {"value": 2, "name": "unfilterable float"},
310 {"value": 3, "name": "depth"},
311 {"value": 4, "name": "sint"},
312 {"value": 5, "name": "uint"}
313 ]
314 },
315 "texture binding layout": {
316 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +0000317 "extensible": "in",
Brandon Jones9c52c2992020-12-12 02:09:56 +0000318 "members": [
319 {"name": "sample type", "type": "texture sample type", "default": "undefined"},
320 {"name": "view dimension", "type": "texture view dimension", "default": "undefined"},
321 {"name": "multisampled", "type": "bool", "default": "false"}
322 ]
323 },
324
Brandon Jones39633e22021-06-01 19:45:53 +0000325 "external texture binding entry": {
326 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +0000327 "chained": "in",
Corentin Walleza45561b2022-07-14 12:58:25 +0000328 "chain roots": ["bind group entry"],
Kai Ninomiya930e9182021-09-17 19:44:43 +0000329 "tags": ["dawn"],
Brandon Jones39633e22021-06-01 19:45:53 +0000330 "members": [
331 {"name": "external texture", "type": "external texture"}
332 ]
333 },
334
335 "external texture binding layout": {
336 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +0000337 "chained": "in",
Corentin Walleza45561b2022-07-14 12:58:25 +0000338 "chain roots": ["bind group layout entry"],
Kai Ninomiya930e9182021-09-17 19:44:43 +0000339 "tags": ["dawn"],
Brandon Jones39633e22021-06-01 19:45:53 +0000340 "members": []
341 },
342
Brandon Jones9c52c2992020-12-12 02:09:56 +0000343 "storage texture access": {
344 "category": "enum",
345 "values": [
346 {"value": 0, "name": "undefined", "jsrepr": "undefined", "valid": false},
Kai Ninomiya930e9182021-09-17 19:44:43 +0000347 {"value": 1, "name": "write only"}
Brandon Jones9c52c2992020-12-12 02:09:56 +0000348 ]
349 },
350 "storage texture binding layout": {
351 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +0000352 "extensible": "in",
Brandon Jones9c52c2992020-12-12 02:09:56 +0000353 "members": [
354 {"name": "access", "type": "storage texture access", "default": "undefined"},
355 {"name": "format", "type": "texture format", "default": "undefined"},
356 {"name": "view dimension", "type": "texture view dimension", "default": "undefined"}
357 ]
358 },
359
Corentin Wallezc3c66942020-04-07 07:11:12 +0000360 "bind group layout entry": {
Kai Ninomiya234becf2018-07-10 12:23:50 -0700361 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +0000362 "extensible": "in",
Kai Ninomiya234becf2018-07-10 12:23:50 -0700363 "members": [
364 {"name": "binding", "type": "uint32_t"},
Corentin Wallezb9b088f2019-08-27 08:42:29 +0000365 {"name": "visibility", "type": "shader stage"},
Brandon Jones9c52c2992020-12-12 02:09:56 +0000366 {"name": "buffer", "type": "buffer binding layout"},
367 {"name": "sampler", "type": "sampler binding layout"},
368 {"name": "texture", "type": "texture binding layout"},
369 {"name": "storage texture", "type": "storage texture binding layout"}
Kai Ninomiya234becf2018-07-10 12:23:50 -0700370 ]
371 },
372 "bind group layout descriptor": {
373 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +0000374 "extensible": "in",
Kai Ninomiya234becf2018-07-10 12:23:50 -0700375 "members": [
François Beaufort277d2e12019-10-03 14:56:49 +0000376 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
Corentin Wallez84ae2bf2020-05-13 17:05:55 +0000377 {"name": "entry count", "type": "uint32_t"},
Corentin Wallez3966eb12020-04-21 07:36:30 +0000378 {"name": "entries", "type": "bind group layout entry", "annotation": "const*", "length": "entry count"}
Austin Eng376f1c62017-05-30 20:03:44 -0400379 ]
380 },
Brandon Jones0702b702021-03-11 21:19:00 +0000381 "blend component": {
Yunchao Hec35103d2018-10-29 09:06:55 +0000382 "category": "structure",
383 "extensible": false,
384 "members": [
Corentin Wallez8f938712019-07-08 19:20:22 +0000385 {"name": "operation", "type": "blend operation", "default": "add"},
386 {"name": "src factor", "type": "blend factor", "default": "one"},
387 {"name": "dst factor", "type": "blend factor", "default": "zero"}
Yunchao Hec35103d2018-10-29 09:06:55 +0000388 ]
389 },
Austin Eng94bebe52017-07-26 16:59:53 -0400390 "blend factor": {
391 "category": "enum",
392 "values": [
393 {"value": 0, "name": "zero"},
394 {"value": 1, "name": "one"},
Brandon Jones22b923c2021-04-15 18:34:29 +0000395 {"value": 2, "name": "src"},
396 {"value": 3, "name": "one minus src"},
Austin Eng94bebe52017-07-26 16:59:53 -0400397 {"value": 4, "name": "src alpha"},
398 {"value": 5, "name": "one minus src alpha"},
Brandon Jones22b923c2021-04-15 18:34:29 +0000399 {"value": 6, "name": "dst"},
400 {"value": 7, "name": "one minus dst"},
Austin Eng94bebe52017-07-26 16:59:53 -0400401 {"value": 8, "name": "dst alpha"},
402 {"value": 9, "name": "one minus dst alpha"},
403 {"value": 10, "name": "src alpha saturated"},
Brandon Jones22b923c2021-04-15 18:34:29 +0000404 {"value": 11, "name": "constant"},
Corentin Wallez10b9cce2021-09-03 16:37:00 +0000405 {"value": 12, "name": "one minus constant"}
Austin Eng94bebe52017-07-26 16:59:53 -0400406 ]
407 },
408 "blend operation": {
409 "category": "enum",
410 "values": [
411 {"value": 0, "name": "add"},
412 {"value": 1, "name": "subtract"},
413 {"value": 2, "name": "reverse subtract"},
414 {"value": 3, "name": "min"},
415 {"value": 4, "name": "max"}
416 ]
417 },
Corentin Walleza60799f2018-09-11 18:16:54 +0000418 "bool": {
419 "category": "native"
420 },
Austin Eng376f1c62017-05-30 20:03:44 -0400421 "buffer": {
422 "category": "object",
423 "methods": [
424 {
Corentin Wallez0d52f802020-07-14 12:30:14 +0000425 "name": "map async",
426 "args": [
Corentin Wallez3ed44f52020-07-20 16:24:20 +0000427 {"name": "mode", "type": "map mode"},
Corentin Wallez0d52f802020-07-14 12:30:14 +0000428 {"name": "offset", "type": "size_t"},
429 {"name": "size", "type": "size_t"},
Corentin Walleze00c6bd2021-12-13 17:37:17 +0000430 {"name": "callback", "type": "buffer map callback"},
Corentin Wallez0d52f802020-07-14 12:30:14 +0000431 {"name": "userdata", "type": "void", "annotation": "*"}
432 ]
433 },
434 {
Corentin Wallez1325ab12020-06-30 11:51:14 +0000435 "name": "get mapped range",
Corentin Wallezf6e70442020-07-17 18:50:37 +0000436 "returns": "void *",
437 "args": [
438 {"name": "offset", "type": "size_t", "default": 0},
Shrek Shao286061d2022-04-29 18:12:17 +0000439 {"name": "size", "type": "size_t", "default": "WGPU_WHOLE_MAP_SIZE"}
Corentin Wallezf6e70442020-07-17 18:50:37 +0000440 ]
Corentin Wallez1325ab12020-06-30 11:51:14 +0000441 },
442 {
443 "name": "get const mapped range",
Corentin Wallezf6e70442020-07-17 18:50:37 +0000444 "returns": "void const *",
445 "args": [
446 {"name": "offset", "type": "size_t", "default": 0},
Shrek Shao286061d2022-04-29 18:12:17 +0000447 {"name": "size", "type": "size_t", "default": "WGPU_WHOLE_MAP_SIZE"}
Corentin Wallezf6e70442020-07-17 18:50:37 +0000448 ]
Corentin Wallez1325ab12020-06-30 11:51:14 +0000449 },
450 {
Brandon Jonesc95e5742021-08-19 20:47:28 +0000451 "name": "set label",
452 "returns": "void",
453 "args": [
454 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"}
455 ]
456 },
457 {
Corentin Wallezd4281872022-06-08 14:46:41 +0000458 "name": "get usage",
459 "returns": "buffer usage"
460 },
461 {
462 "name": "get size",
463 "returns": "uint64_t"
464 },
465 {
Takahiro915e55a2022-12-19 19:06:51 +0000466 "name": "get map state",
467 "returns": "buffer map state"
468 },
469 {
Corentin Wallezb1c19ee2017-06-09 10:51:29 -0400470 "name": "unmap"
Austin Eng446ab442019-02-13 21:26:48 +0000471 },
472 {
473 "name": "destroy"
Austin Eng376f1c62017-05-30 20:03:44 -0400474 }
475 ]
476 },
Corentin Wallez82b65732018-08-22 15:37:29 +0200477 "buffer descriptor": {
478 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +0000479 "extensible": "in",
Corentin Wallez82b65732018-08-22 15:37:29 +0200480 "members": [
François Beaufort277d2e12019-10-03 14:56:49 +0000481 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
Corentin Wallez9e9e29f2019-08-27 08:21:39 +0000482 {"name": "usage", "type": "buffer usage"},
Corentin Wallezb2ea1912020-07-07 11:21:51 +0000483 {"name": "size", "type": "uint64_t"},
484 {"name": "mapped at creation", "type": "bool", "default": "false"}
Corentin Wallez82b65732018-08-22 15:37:29 +0200485 ]
486 },
Corentin Wallez0d52f802020-07-14 12:30:14 +0000487 "buffer map callback": {
fujunwei23f71622021-12-02 07:41:21 +0000488 "category": "function pointer",
Corentin Wallez0d52f802020-07-14 12:30:14 +0000489 "args": [
490 {"name": "status", "type": "buffer map async status"},
491 {"name": "userdata", "type": "void", "annotation": "*"}
492 ]
493 },
Corentin Wallez8565e002018-03-20 19:48:54 -0400494 "buffer map async status": {
Corentin Wallezb1c19ee2017-06-09 10:51:29 -0400495 "category": "enum",
Kai Ninomiya930e9182021-09-17 19:44:43 +0000496 "emscripten_no_enum_table": true,
Corentin Wallezb1c19ee2017-06-09 10:51:29 -0400497 "values": [
498 {"value": 0, "name": "success"},
499 {"value": 1, "name": "error"},
500 {"value": 2, "name": "unknown"},
Jiawei Shaoed2b4652020-09-27 02:00:52 +0000501 {"value": 3, "name": "device lost"},
502 {"value": 4, "name": "destroyed before callback"},
503 {"value": 5, "name": "unmapped before callback"}
Corentin Wallezb1c19ee2017-06-09 10:51:29 -0400504 ]
505 },
Takahiro915e55a2022-12-19 19:06:51 +0000506 "buffer map state": {
507 "category": "enum",
508 "values": [
509 {"value": 0, "name": "unmapped"},
510 {"value": 1, "name": "pending"},
511 {"value": 2, "name": "mapped"}
512 ]
513 },
Corentin Wallez9e9e29f2019-08-27 08:21:39 +0000514 "buffer usage": {
Austin Eng376f1c62017-05-30 20:03:44 -0400515 "category": "bitmask",
516 "values": [
517 {"value": 0, "name": "none"},
Corentin Wallezf45bdb82017-06-05 15:42:14 -0400518 {"value": 1, "name": "map read"},
Corentin Wallez769b00f2017-06-16 15:35:12 -0400519 {"value": 2, "name": "map write"},
Corentin Wallezec053552019-07-08 10:05:46 +0000520 {"value": 4, "name": "copy src"},
521 {"value": 8, "name": "copy dst"},
Corentin Wallez769b00f2017-06-16 15:35:12 -0400522 {"value": 16, "name": "index"},
523 {"value": 32, "name": "vertex"},
524 {"value": 64, "name": "uniform"},
Idan Raiter05f7ad52019-06-10 20:56:27 +0000525 {"value": 128, "name": "storage"},
Hao Li5c89c8d2020-07-17 09:02:46 +0000526 {"value": 256, "name": "indirect"},
527 {"value": 512, "name": "query resolve"}
Austin Eng376f1c62017-05-30 20:03:44 -0400528 ]
529 },
Austin Eng376f1c62017-05-30 20:03:44 -0400530 "char": {
531 "category": "native"
532 },
Jiawei Shao5e811ae2018-12-19 08:21:13 +0000533 "color": {
534 "category": "structure",
535 "members": [
Brandon Jones670858d2020-09-22 16:51:36 +0000536 {"name": "r", "type": "double"},
537 {"name": "g", "type": "double"},
538 {"name": "b", "type": "double"},
539 {"name": "a", "type": "double"}
Jiawei Shao5e811ae2018-12-19 08:21:13 +0000540 ]
541 },
Austin Eng94bebe52017-07-26 16:59:53 -0400542 "color write mask": {
543 "category": "bitmask",
544 "values": [
545 {"value": 0, "name": "none"},
546 {"value": 1, "name": "red"},
547 {"value": 2, "name": "green"},
548 {"value": 4, "name": "blue"},
549 {"value": 8, "name": "alpha"},
550 {"value": 15, "name": "all"}
551 ]
552 },
Kai Ninomiya7d174a12021-09-21 17:36:27 +0000553 "constant entry": {
554 "category": "structure",
555 "extensible": "in",
556 "members": [
shrekshaoe99ad762021-09-28 20:15:52 +0000557 {"name": "key", "type": "char", "annotation": "const*", "length": "strlen"},
Kai Ninomiya7d174a12021-09-21 17:36:27 +0000558 {"name": "value", "type": "double"}
559 ]
560 },
Austin Eng376f1c62017-05-30 20:03:44 -0400561 "command buffer": {
Brandon Jones828f6742021-11-23 00:09:25 +0000562 "category": "object",
563 "methods": [
564 {
565 "name": "set label",
566 "returns": "void",
Brandon Jones828f6742021-11-23 00:09:25 +0000567 "args": [
568 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"}
569 ]
570 }
571 ]
Austin Eng376f1c62017-05-30 20:03:44 -0400572 },
Corentin Wallez4b90c472019-07-10 20:43:13 +0000573 "command buffer descriptor": {
574 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +0000575 "extensible": "in",
François Beaufort6ac5a922019-09-25 13:56:48 +0000576 "members": [
577 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true}
578 ]
Corentin Wallez4b90c472019-07-10 20:43:13 +0000579 },
Corentin Walleze1f0d4e2019-02-15 12:54:08 +0000580 "command encoder": {
581 "category": "object",
582 "methods": [
583 {
584 "name": "finish",
Corentin Wallez4b90c472019-07-10 20:43:13 +0000585 "returns": "command buffer",
586 "args": [
587 {"name": "descriptor", "type": "command buffer descriptor", "annotation": "const*", "optional": true}
588 ]
Corentin Walleze1f0d4e2019-02-15 12:54:08 +0000589 },
590 {
591 "name": "begin compute pass",
Corentin Wallez4b90c472019-07-10 20:43:13 +0000592 "returns": "compute pass encoder",
593 "args": [
594 {"name": "descriptor", "type": "compute pass descriptor", "annotation": "const*", "optional": true}
595 ]
Corentin Walleze1f0d4e2019-02-15 12:54:08 +0000596 },
597 {
598 "name": "begin render pass",
Corentin Wallez4b90c472019-07-10 20:43:13 +0000599 "returns": "render pass encoder",
Corentin Walleze1f0d4e2019-02-15 12:54:08 +0000600 "args": [
Corentin Wallez4b90c472019-07-10 20:43:13 +0000601 {"name": "descriptor", "type": "render pass descriptor", "annotation": "const*"}
602 ]
Corentin Walleze1f0d4e2019-02-15 12:54:08 +0000603 },
604 {
605 "name": "copy buffer to buffer",
606 "args": [
607 {"name": "source", "type": "buffer"},
Austin Engcf52d712019-04-05 20:51:29 +0000608 {"name": "source offset", "type": "uint64_t"},
Corentin Walleze1f0d4e2019-02-15 12:54:08 +0000609 {"name": "destination", "type": "buffer"},
Austin Engcf52d712019-04-05 20:51:29 +0000610 {"name": "destination offset", "type": "uint64_t"},
611 {"name": "size", "type": "uint64_t"}
Corentin Walleze1f0d4e2019-02-15 12:54:08 +0000612 ]
613 },
614 {
615 "name": "copy buffer to texture",
616 "args": [
Corentin Wallez80915842021-03-04 18:13:45 +0000617 {"name": "source", "type": "image copy buffer", "annotation": "const*"},
618 {"name": "destination", "type": "image copy texture", "annotation": "const*"},
Corentin Walleze1f0d4e2019-02-15 12:54:08 +0000619 {"name": "copy size", "type": "extent 3D", "annotation": "const*"}
620 ]
621 },
622 {
623 "name": "copy texture to buffer",
624 "args": [
Corentin Wallez80915842021-03-04 18:13:45 +0000625 {"name": "source", "type": "image copy texture", "annotation": "const*"},
626 {"name": "destination", "type": "image copy buffer", "annotation": "const*"},
Corentin Walleze1f0d4e2019-02-15 12:54:08 +0000627 {"name": "copy size", "type": "extent 3D", "annotation": "const*"}
628 ]
Brandon Jonesd3d3aa02019-03-26 11:06:23 +0000629 },
630 {
631 "name": "copy texture to texture",
632 "args": [
Corentin Wallez80915842021-03-04 18:13:45 +0000633 {"name": "source", "type": "image copy texture", "annotation": "const*"},
634 {"name": "destination", "type": "image copy texture", "annotation": "const*"},
Brandon Jonesd3d3aa02019-03-26 11:06:23 +0000635 {"name": "copy size", "type": "extent 3D", "annotation": "const*"}
636 ]
Corentin Wallezb8ea84c2019-09-10 08:20:40 +0000637 },
638 {
Juanmif00c68a2021-08-05 22:55:09 +0000639 "name": "copy texture to texture internal",
Kai Ninomiya930e9182021-09-17 19:44:43 +0000640 "tags": ["dawn"],
Juanmif00c68a2021-08-05 22:55:09 +0000641 "args": [
642 {"name": "source", "type": "image copy texture", "annotation": "const*"},
643 {"name": "destination", "type": "image copy texture", "annotation": "const*"},
644 {"name": "copy size", "type": "extent 3D", "annotation": "const*"}
645 ]
646 },
647 {
Brandon Jonesd3105bf2021-12-02 21:43:49 +0000648 "name": "clear buffer",
Corentin Wallez6cd1cd92021-11-17 08:13:24 +0000649 "args": [
Brandon Jonesd3105bf2021-12-02 21:43:49 +0000650 {"name": "buffer", "type": "buffer"},
651 {"name": "offset", "type": "uint64_t", "default": 0},
652 {"name": "size", "type": "uint64_t", "default": "WGPU_WHOLE_SIZE"}
Corentin Wallez6cd1cd92021-11-17 08:13:24 +0000653 ]
654 },
655 {
Austin Eng464aaeb2020-11-14 01:24:03 +0000656 "name": "inject validation error",
Kai Ninomiya930e9182021-09-17 19:44:43 +0000657 "tags": ["dawn"],
Austin Eng464aaeb2020-11-14 01:24:03 +0000658 "args": [
659 {"name": "message", "type": "char", "annotation": "const*", "length": "strlen"}
Kai Ninomiya930e9182021-09-17 19:44:43 +0000660 ]
Austin Eng464aaeb2020-11-14 01:24:03 +0000661 },
662 {
Corentin Wallezb8ea84c2019-09-10 08:20:40 +0000663 "name": "insert debug marker",
664 "args": [
Kai Ninomiya51bbbef2020-07-12 16:01:38 +0000665 {"name": "marker label", "type": "char", "annotation": "const*", "length": "strlen"}
Corentin Wallezb8ea84c2019-09-10 08:20:40 +0000666 ]
667 },
668 {
669 "name": "pop debug group",
670 "args": []
671 },
672 {
673 "name": "push debug group",
674 "args": [
675 {"name": "group label", "type": "char", "annotation": "const*", "length": "strlen"}
676 ]
Hao Li5191adc2020-07-01 10:48:16 +0000677 },
678 {
Hao Li5c89c8d2020-07-17 09:02:46 +0000679 "name": "resolve query set",
680 "args": [
681 {"name": "query set", "type": "query set"},
682 {"name": "first query", "type": "uint32_t"},
683 {"name": "query count", "type": "uint32_t"},
684 {"name": "destination", "type": "buffer"},
685 {"name": "destination offset", "type": "uint64_t"}
686 ]
687 },
688 {
Ken Rockot6237c8a2021-09-20 19:25:05 +0000689 "name": "write buffer",
Kai Ninomiya7d174a12021-09-21 17:36:27 +0000690 "tags": ["dawn"],
Ken Rockot6237c8a2021-09-20 19:25:05 +0000691 "args": [
692 {"name": "buffer", "type": "buffer"},
693 {"name": "buffer offset", "type": "uint64_t"},
694 {"name": "data", "type": "uint8_t", "annotation": "const*", "length": "size"},
695 {"name": "size", "type": "uint64_t"}
696 ]
697 },
698 {
Hao Li5191adc2020-07-01 10:48:16 +0000699 "name": "write timestamp",
700 "args": [
701 {"name": "query set", "type": "query set"},
702 {"name": "query index", "type": "uint32_t"}
703 ]
Brandon Jones828f6742021-11-23 00:09:25 +0000704 },
705 {
706 "name": "set label",
707 "returns": "void",
Brandon Jones828f6742021-11-23 00:09:25 +0000708 "args": [
709 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"}
710 ]
Corentin Walleze1f0d4e2019-02-15 12:54:08 +0000711 }
712 ]
713 },
Corentin Wallez4b90c472019-07-10 20:43:13 +0000714 "command encoder descriptor": {
715 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +0000716 "extensible": "in",
François Beaufort277d2e12019-10-03 14:56:49 +0000717 "members": [
718 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true}
719 ]
Corentin Wallez4b90c472019-07-10 20:43:13 +0000720 },
Corentin Wallez82fbccb2018-09-21 00:24:37 +0000721 "compare function": {
722 "category": "enum",
723 "values": [
Corentin Wallez5d2f2042021-04-08 18:42:47 +0000724 {"value": 0, "name": "undefined", "jsrepr": "undefined", "valid": false},
Austin Engd6a54312020-04-17 19:32:07 +0000725 {"value": 1, "name": "never"},
726 {"value": 2, "name": "less"},
727 {"value": 3, "name": "less equal"},
728 {"value": 4, "name": "greater"},
729 {"value": 5, "name": "greater equal"},
730 {"value": 6, "name": "equal"},
731 {"value": 7, "name": "not equal"},
732 {"value": 8, "name": "always"}
Corentin Wallez82fbccb2018-09-21 00:24:37 +0000733 ]
734 },
Brandon Jones6f2bbe92021-04-05 23:34:17 +0000735 "compilation info": {
736 "category": "structure",
Corentin Wallez61c85322021-11-16 09:25:35 +0000737 "extensible": "in",
Brandon Jones6f2bbe92021-04-05 23:34:17 +0000738 "members": [
739 {"name": "message count", "type": "uint32_t"},
740 {"name": "messages", "type": "compilation message", "annotation": "const*", "length": "message count"}
741 ]
742 },
743 "compilation info callback": {
fujunwei23f71622021-12-02 07:41:21 +0000744 "category": "function pointer",
Brandon Jones6f2bbe92021-04-05 23:34:17 +0000745 "args": [
746 {"name": "status", "type": "compilation info request status"},
747 {"name": "compilation info", "type": "compilation info", "annotation": "const*"},
748 {"name": "userdata", "type": "void", "annotation": "*"}
749 ]
750 },
751 "compilation info request status": {
752 "category": "enum",
753 "values": [
754 {"value": 0, "name": "success"},
755 {"value": 1, "name": "error"},
756 {"value": 2, "name": "device lost"},
757 {"value": 3, "name": "unknown"}
758 ]
759 },
760 "compilation message": {
761 "category": "structure",
Corentin Wallez61c85322021-11-16 09:25:35 +0000762 "extensible": "in",
Brandon Jones6f2bbe92021-04-05 23:34:17 +0000763 "members": [
764 {"name": "message", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
765 {"name": "type", "type": "compilation message type"},
766 {"name": "line num", "type": "uint64_t"},
Brandon Jones83ae2ce2021-04-30 20:45:58 +0000767 {"name": "line pos", "type": "uint64_t"},
768 {"name": "offset", "type": "uint64_t"},
Jiawei Shaof7beb852023-01-10 00:03:24 +0000769 {"name": "length", "type": "uint64_t"},
770 {"name": "utf16 line pos", "type": "uint64_t"},
771 {"name": "utf16 offset", "type": "uint64_t"},
772 {"name": "utf16 length", "type": "uint64_t"}
Brandon Jones6f2bbe92021-04-05 23:34:17 +0000773 ]
774 },
775 "compilation message type": {
776 "category": "enum",
Kai Ninomiya930e9182021-09-17 19:44:43 +0000777 "emscripten_no_enum_table": true,
Brandon Jones6f2bbe92021-04-05 23:34:17 +0000778 "values": [
779 {"value": 0, "name": "error"},
780 {"value": 1, "name": "warning"},
781 {"value": 2, "name": "info"}
782 ]
783 },
Corentin Wallez4b90c472019-07-10 20:43:13 +0000784 "compute pass descriptor": {
785 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +0000786 "extensible": "in",
François Beaufort6ac5a922019-09-25 13:56:48 +0000787 "members": [
Corentin Wallez6cd1cd92021-11-17 08:13:24 +0000788 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
Li Hao131c4222022-03-05 01:22:52 +0000789 {"name": "timestamp write count", "type": "uint32_t", "default": 0},
790 {"name": "timestamp writes", "type": "compute pass timestamp write", "annotation": "const*", "length": "timestamp write count"}
François Beaufort6ac5a922019-09-25 13:56:48 +0000791 ]
Corentin Wallez4b90c472019-07-10 20:43:13 +0000792 },
Corentin Wallez82fbccb2018-09-21 00:24:37 +0000793 "compute pass encoder": {
794 "category": "object",
795 "methods": [
Corentin Walleze9d347e2017-06-26 16:23:03 -0400796 {
Brandon Jones11d32c82019-02-20 20:21:00 +0000797 "name": "insert debug marker",
798 "args": [
Kai Ninomiya51bbbef2020-07-12 16:01:38 +0000799 {"name": "marker label", "type": "char", "annotation": "const*", "length": "strlen"}
Brandon Jones11d32c82019-02-20 20:21:00 +0000800 ]
801 },
802 {
803 "name": "pop debug group",
804 "args": []
805 },
806 {
807 "name": "push debug group",
808 "args": [
809 {"name": "group label", "type": "char", "annotation": "const*", "length": "strlen"}
810 ]
811 },
812 {
Yan, Shaobo300eec02018-12-21 10:40:26 +0000813 "name": "set pipeline",
Austin Eng376f1c62017-05-30 20:03:44 -0400814 "args": [
Corentin Wallez82fbccb2018-09-21 00:24:37 +0000815 {"name": "pipeline", "type": "compute pipeline"}
Austin Eng376f1c62017-05-30 20:03:44 -0400816 ]
817 },
818 {
Corentin Wallez82fbccb2018-09-21 00:24:37 +0000819 "name": "set bind group",
Austin Eng376f1c62017-05-30 20:03:44 -0400820 "args": [
Corentin Wallez82fbccb2018-09-21 00:24:37 +0000821 {"name": "group index", "type": "uint32_t"},
Yan, Shaobo991ab982019-03-18 06:01:37 +0000822 {"name": "group", "type": "bind group"},
Corentin Wallez70c8c102019-10-09 16:08:42 +0000823 {"name": "dynamic offset count", "type": "uint32_t", "default": "0"},
Corentin Wallez75f554d2021-06-17 16:04:29 +0000824 {"name": "dynamic offsets", "type": "uint32_t", "annotation": "const*", "length": "dynamic offset count", "default": "nullptr"}
Corentin Wallez29ced282017-07-14 10:58:07 -0400825 ]
826 },
827 {
Hao Li5191adc2020-07-01 10:48:16 +0000828 "name": "write timestamp",
Corentin Wallez6cd1cd92021-11-17 08:13:24 +0000829 "tags": ["emscripten", "dawn"],
Hao Li5191adc2020-07-01 10:48:16 +0000830 "args": [
831 {"name": "query set", "type": "query set"},
832 {"name": "query index", "type": "uint32_t"}
833 ]
834 },
835 {
Kai Ninomiya4e37acc2021-09-17 21:13:33 +0000836 "name": "begin pipeline statistics query",
Shrek Shaoee50bc02022-02-08 20:21:40 +0000837 "tags": ["upstream", "emscripten"],
Kai Ninomiya4e37acc2021-09-17 21:13:33 +0000838 "args": [
839 {"name": "query set", "type": "query set"},
840 {"name": "query index", "type": "uint32_t"}
841 ]
842 },
843 {
Corentin Wallez82fbccb2018-09-21 00:24:37 +0000844 "name": "dispatch",
Brandon Jones3daebe82022-04-29 17:51:54 +0000845 "tags": ["deprecated"],
846 "args": [
847 {"name": "workgroupCountX", "type": "uint32_t"},
848 {"name": "workgroupCountY", "type": "uint32_t", "default": "1"},
849 {"name": "workgroupCountZ", "type": "uint32_t", "default": "1"}
850 ]
851 },
852 {
853 "name": "dispatch workgroups",
Corentin Walleza3c89cc2018-02-13 14:57:13 -0500854 "args": [
Brandon Jones913e1582022-01-27 09:40:02 +0000855 {"name": "workgroupCountX", "type": "uint32_t"},
856 {"name": "workgroupCountY", "type": "uint32_t", "default": "1"},
857 {"name": "workgroupCountZ", "type": "uint32_t", "default": "1"}
Corentin Walleza3c89cc2018-02-13 14:57:13 -0500858 ]
859 },
860 {
Idan Raiter05f7ad52019-06-10 20:56:27 +0000861 "name": "dispatch indirect",
Brandon Jones3daebe82022-04-29 17:51:54 +0000862 "tags": ["deprecated"],
863 "args": [
864 {"name": "indirect buffer", "type": "buffer"},
865 {"name": "indirect offset", "type": "uint64_t"}
866 ]
867 },
868 {
869 "name": "dispatch workgroups indirect",
Idan Raiter05f7ad52019-06-10 20:56:27 +0000870 "args": [
871 {"name": "indirect buffer", "type": "buffer"},
872 {"name": "indirect offset", "type": "uint64_t"}
873 ]
874 },
875 {
Brandon Jones0fee4c12022-02-07 19:48:39 +0000876 "name": "end"
877 },
878 {
879 "name": "end pass",
880 "tags": ["deprecated"]
Kai Ninomiya4e37acc2021-09-17 21:13:33 +0000881 },
882 {
883 "name": "end pipeline statistics query",
Shrek Shaoee50bc02022-02-08 20:21:40 +0000884 "tags": ["upstream", "emscripten"]
Brandon Jones828f6742021-11-23 00:09:25 +0000885 },
886 {
887 "name": "set label",
888 "returns": "void",
Brandon Jones828f6742021-11-23 00:09:25 +0000889 "args": [
890 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"}
891 ]
Austin Eng376f1c62017-05-30 20:03:44 -0400892 }
893 ]
894 },
Corentin Wallez6cd1cd92021-11-17 08:13:24 +0000895 "compute pass timestamp location": {
896 "category": "enum",
Corentin Wallez6cd1cd92021-11-17 08:13:24 +0000897 "values": [
898 {"value": 0, "name": "beginning"},
899 {"value": 1, "name": "end"}
900 ]
901 },
902 "compute pass timestamp write": {
903 "category": "structure",
Corentin Wallez6cd1cd92021-11-17 08:13:24 +0000904 "members": [
905 {"name": "query set", "type": "query set"},
906 {"name": "query index", "type": "uint32_t"},
907 {"name": "location", "type": "compute pass timestamp location"}
908 ]
909 },
Corentin Wallez29ced282017-07-14 10:58:07 -0400910 "compute pipeline": {
Austin Engf6eb8902019-11-22 17:02:22 +0000911 "category": "object",
912 "methods": [
913 {
914 "name": "get bind group layout",
915 "returns": "bind group layout",
916 "args": [
Corentin Wallez373a3ff2020-04-01 18:22:36 +0000917 {"name": "group index", "type": "uint32_t"}
Austin Engf6eb8902019-11-22 17:02:22 +0000918 ]
Brandon Jonesc1bcbbf2021-09-02 18:39:53 +0000919 },
920 {
921 "name": "set label",
922 "returns": "void",
923 "args": [
924 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"}
925 ]
Austin Engf6eb8902019-11-22 17:02:22 +0000926 }
927 ]
Corentin Wallez29ced282017-07-14 10:58:07 -0400928 },
Corentin Wallez8e335a52018-08-27 23:12:56 +0200929 "compute pipeline descriptor": {
930 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +0000931 "extensible": "in",
Corentin Wallez8e335a52018-08-27 23:12:56 +0200932 "members": [
François Beaufort277d2e12019-10-03 14:56:49 +0000933 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
Austin Engf6eb8902019-11-22 17:02:22 +0000934 {"name": "layout", "type": "pipeline layout", "optional": true},
Corentin Wallezc7203ba2021-09-14 11:42:27 +0000935 {"name": "compute", "type": "programmable stage descriptor"}
Corentin Wallez29ced282017-07-14 10:58:07 -0400936 ]
937 },
Yan483bead2021-12-14 04:51:45 +0000938 "alpha mode": {
939 "category": "enum",
940 "tags": ["dawn"],
941 "values": [
942 {"value": 0, "name": "premultiplied"},
shrekshaoa3f4a322022-07-11 18:11:14 +0000943 {"value": 1, "name": "unpremultiplied"},
944 {"value": 2, "name": "opaque"}
Yan483bead2021-12-14 04:51:45 +0000945 ]
946 },
Yan, Shaobobb913a92020-12-02 08:13:09 +0000947 "copy texture for browser options": {
948 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +0000949 "extensible": "in",
Kai Ninomiya930e9182021-09-17 19:44:43 +0000950 "tags": ["dawn"],
Yan, Shaobobb913a92020-12-02 08:13:09 +0000951 "members": [
Yan483bead2021-12-14 04:51:45 +0000952 {"name": "flip y", "type": "bool", "default": "false"},
Yan483bead2021-12-14 04:51:45 +0000953 {"name": "needs color space conversion", "type": "bool", "default": "false"},
954 {"name": "src alpha mode", "type": "alpha mode", "default": "unpremultiplied"},
Yan483bead2021-12-14 04:51:45 +0000955 {"name": "src transfer function parameters", "type": "float", "annotation": "const*",
Yan52040532021-12-15 04:08:56 +0000956 "length": 7, "optional": true},
Yan483bead2021-12-14 04:51:45 +0000957 {"name": "conversion matrix", "type": "float", "annotation": "const*",
Yan52040532021-12-15 04:08:56 +0000958 "length": 9, "optional": true},
Yan483bead2021-12-14 04:51:45 +0000959 {"name": "dst transfer function parameters", "type": "float", "annotation": "const*",
Yan52040532021-12-15 04:08:56 +0000960 "length": 7, "optional": true},
shrekshaoc6cbcdb2022-07-11 18:11:14 +0000961 {"name": "dst alpha mode", "type": "alpha mode", "default": "unpremultiplied"},
962 {"name": "internal usage", "type": "bool", "default": "false"}
Yan, Shaobobb913a92020-12-02 08:13:09 +0000963 ]
964 },
Corentin Wallez2d3c2e32021-02-22 18:27:36 +0000965 "create compute pipeline async callback": {
fujunwei23f71622021-12-02 07:41:21 +0000966 "category": "function pointer",
Jiawei Shaoae5f9502020-10-19 01:56:08 +0000967 "args": [
Corentin Wallez2d3c2e32021-02-22 18:27:36 +0000968 {"name": "status", "type": "create pipeline async status"},
Jiawei Shaoae5f9502020-10-19 01:56:08 +0000969 {"name": "pipeline", "type": "compute pipeline"},
970 {"name": "message", "type": "char", "annotation": "const*", "length": "strlen"},
971 {"name": "userdata", "type": "void", "annotation": "*"}
972 ]
973 },
Corentin Wallez2d3c2e32021-02-22 18:27:36 +0000974 "create pipeline async status": {
Jiawei Shaoae5f9502020-10-19 01:56:08 +0000975 "category": "enum",
Kai Ninomiya930e9182021-09-17 19:44:43 +0000976 "emscripten_no_enum_table": true,
Jiawei Shaoae5f9502020-10-19 01:56:08 +0000977 "values": [
978 {"value": 0, "name": "success"},
Corentin Walleze4b4c472023-02-08 19:36:53 +0000979 {"value": 1, "name": "validation error"},
980 {"value": 2, "name": "internal error"},
981 {"value": 3, "name": "device lost"},
982 {"value": 4, "name": "device destroyed"},
Corentin Wallezc7130052023-02-17 23:24:43 +0000983 {"value": 5, "name": "unknown"}
Jiawei Shaoae5f9502020-10-19 01:56:08 +0000984 ]
985 },
Corentin Wallez2d3c2e32021-02-22 18:27:36 +0000986 "create render pipeline async callback": {
fujunwei23f71622021-12-02 07:41:21 +0000987 "category": "function pointer",
Jiawei Shao03e14002020-10-21 04:37:41 +0000988 "args": [
Corentin Wallez2d3c2e32021-02-22 18:27:36 +0000989 {"name": "status", "type": "create pipeline async status"},
Jiawei Shao03e14002020-10-21 04:37:41 +0000990 {"name": "pipeline", "type": "render pipeline"},
991 {"name": "message", "type": "char", "annotation": "const*", "length": "strlen"},
992 {"name": "userdata", "type": "void", "annotation": "*"}
993 ]
994 },
Yunchao Hec33a8c12019-04-11 18:46:54 +0000995 "cull mode": {
996 "category": "enum",
997 "values": [
998 {"value": 0, "name": "none"},
999 {"value": 1, "name": "front"},
1000 {"value": 2, "name": "back"}
1001 ]
1002 },
Austin Eng376f1c62017-05-30 20:03:44 -04001003 "device": {
1004 "category": "object",
1005 "methods": [
1006 {
Corentin Wallez6f9d21e2018-12-05 07:18:30 +00001007 "name": "create bind group",
1008 "returns": "bind group",
1009 "args": [
1010 {"name": "descriptor", "type": "bind group descriptor", "annotation": "const*"}
1011 ]
Austin Eng376f1c62017-05-30 20:03:44 -04001012 },
1013 {
Kai Ninomiya234becf2018-07-10 12:23:50 -07001014 "name": "create bind group layout",
1015 "returns": "bind group layout",
1016 "args": [
1017 {"name": "descriptor", "type": "bind group layout descriptor", "annotation": "const*"}
1018 ]
Austin Eng376f1c62017-05-30 20:03:44 -04001019 },
1020 {
Corentin Wallez82b65732018-08-22 15:37:29 +02001021 "name": "create buffer",
1022 "returns": "buffer",
1023 "args": [
1024 {"name": "descriptor", "type": "buffer descriptor", "annotation": "const*"}
1025 ]
1026 },
1027 {
Austin Engcf1fdf42020-06-15 23:42:13 +00001028 "name": "create error buffer",
1029 "returns": "buffer",
Jiawei Shao806c5832022-11-23 02:06:11 +00001030 "tags": ["dawn"],
1031 "args": [
1032 {"name": "descriptor", "type": "buffer descriptor", "annotation": "const*"}
1033 ]
Austin Engcf1fdf42020-06-15 23:42:13 +00001034 },
1035 {
Corentin Walleze1f0d4e2019-02-15 12:54:08 +00001036 "name": "create command encoder",
Corentin Wallez4b90c472019-07-10 20:43:13 +00001037 "returns": "command encoder",
1038 "args": [
1039 {"name": "descriptor", "type": "command encoder descriptor", "annotation": "const*", "optional": true}
1040 ]
Corentin Walleze1f0d4e2019-02-15 12:54:08 +00001041 },
1042 {
Corentin Wallez8e335a52018-08-27 23:12:56 +02001043 "name": "create compute pipeline",
1044 "returns": "compute pipeline",
1045 "args": [
1046 {"name": "descriptor", "type": "compute pipeline descriptor", "annotation": "const*"}
1047 ]
Corentin Wallez29ced282017-07-14 10:58:07 -04001048 },
1049 {
Corentin Wallez2d3c2e32021-02-22 18:27:36 +00001050 "name": "create compute pipeline async",
Jiawei Shaoae5f9502020-10-19 01:56:08 +00001051 "returns": "void",
1052 "args": [
1053 {"name": "descriptor", "type": "compute pipeline descriptor", "annotation": "const*"},
Corentin Walleze00c6bd2021-12-13 17:37:17 +00001054 {"name": "callback", "type": "create compute pipeline async callback"},
Jiawei Shaoae5f9502020-10-19 01:56:08 +00001055 {"name": "userdata", "type": "void", "annotation": "*"}
1056 ]
1057 },
1058 {
Austin Engbffc9662021-09-17 15:36:00 +00001059 "name": "create external texture",
1060 "returns": "external texture",
Kai Ninomiya930e9182021-09-17 19:44:43 +00001061 "tags": ["dawn"],
Austin Engbffc9662021-09-17 15:36:00 +00001062 "args": [
1063 {"name": "external texture descriptor", "type": "external texture descriptor", "annotation": "const*"}
1064 ]
1065 },
1066 {
Yan,Shaobo7ce3c2d2022-06-27 02:57:40 +00001067 "name": "create error external texture",
1068 "returns": "external texture",
1069 "tags": ["dawn"]
1070 },
1071 {
Kai Ninomiyaf53f98b2018-06-27 16:21:39 -07001072 "name": "create pipeline layout",
1073 "returns": "pipeline layout",
1074 "args": [
1075 {"name": "descriptor", "type": "pipeline layout descriptor", "annotation": "const*"}
1076 ]
Austin Eng376f1c62017-05-30 20:03:44 -04001077 },
1078 {
Corentin Wallez9585c462020-07-06 18:50:00 +00001079 "name": "create query set",
1080 "returns": "query set",
1081 "args": [
1082 {"name": "descriptor", "type": "query set descriptor", "annotation": "const*"}
1083 ]
1084 },
1085 {
Corentin Wallez2d3c2e32021-02-22 18:27:36 +00001086 "name": "create render pipeline async",
Jiawei Shao03e14002020-10-21 04:37:41 +00001087 "returns": "void",
1088 "args": [
Brandon Jones41c87d92021-05-21 05:01:38 +00001089 {"name": "descriptor", "type": "render pipeline descriptor", "annotation": "const*"},
Corentin Walleze00c6bd2021-12-13 17:37:17 +00001090 {"name": "callback", "type": "create render pipeline async callback"},
Jiawei Shao03e14002020-10-21 04:37:41 +00001091 {"name": "userdata", "type": "void", "annotation": "*"}
1092 ]
1093 },
1094 {
Austin Eng8a488c12019-08-13 22:12:54 +00001095 "name": "create render bundle encoder",
1096 "returns": "render bundle encoder",
1097 "args": [
1098 {"name": "descriptor", "type": "render bundle encoder descriptor", "annotation": "const*"}
1099 ]
1100 },
1101 {
Corentin Wallez9585c462020-07-06 18:50:00 +00001102 "name": "create render pipeline",
1103 "returns": "render pipeline",
1104 "args": [
1105 {"name": "descriptor", "type": "render pipeline descriptor", "annotation": "const*"}
1106 ]
1107 },
1108 {
Corentin Wallez1ae19e82018-05-17 17:09:07 -04001109 "name": "create sampler",
1110 "returns": "sampler",
1111 "args": [
shrekshaob3177d42021-01-26 02:22:58 +00001112 {"name": "descriptor", "type": "sampler descriptor", "annotation": "const*", "optional": true}
Corentin Wallez1ae19e82018-05-17 17:09:07 -04001113 ]
Austin Eng376f1c62017-05-30 20:03:44 -04001114 },
1115 {
Corentin Wallezdf671032018-08-20 17:01:20 +02001116 "name": "create shader module",
1117 "returns": "shader module",
1118 "args": [
1119 {"name": "descriptor", "type": "shader module descriptor", "annotation": "const*"}
1120 ]
Austin Eng376f1c62017-05-30 20:03:44 -04001121 },
1122 {
Corentin Wallez7be2a712019-02-15 11:15:58 +00001123 "name": "create swap chain",
Corentin Wallez74771202022-05-23 15:44:29 +00001124 "tags": ["dawn"],
Corentin Wallez7be2a712019-02-15 11:15:58 +00001125 "returns": "swap chain",
1126 "args": [
Corentin Wallez9d6265b2020-11-04 10:04:17 +00001127 {"name": "surface", "type": "surface", "optional": true},
Corentin Wallez7be2a712019-02-15 11:15:58 +00001128 {"name": "descriptor", "type": "swap chain descriptor", "annotation": "const*"}
1129 ]
Kai Ninomiyac16a67a2017-07-27 18:30:57 -07001130 },
1131 {
Corentin Wallez74771202022-05-23 15:44:29 +00001132 "name": "create swap chain",
1133 "tags": ["upstream", "emscripten"],
1134 "returns": "swap chain",
1135 "args": [
1136 {"name": "surface", "type": "surface"},
1137 {"name": "descriptor", "type": "swap chain descriptor", "annotation": "const*"}
1138 ]
1139 },
1140 {
Jiawei Shao425428f2018-08-27 08:44:48 +08001141 "name": "create texture",
1142 "returns": "texture",
1143 "args": [
1144 {"name": "descriptor", "type": "texture descriptor", "annotation": "const*"}
1145 ]
Austin Eng376f1c62017-05-30 20:03:44 -04001146 },
1147 {
Corentin Wallez256e0262022-07-20 16:07:44 +00001148 "name": "create error texture",
1149 "returns": "texture",
1150 "tags": ["dawn"],
1151 "args": [
1152 {"name": "descriptor", "type": "texture descriptor", "annotation": "const*"}
1153 ]
1154 },
1155 {
Loko Kung2494c9b2021-12-01 17:55:30 +00001156 "name": "destroy"
Kai Ninomiya4e37acc2021-09-17 21:13:33 +00001157 },
1158 {
Austin Engbffc9662021-09-17 15:36:00 +00001159 "name": "get limits",
1160 "returns": "bool",
1161 "args": [
1162 {"name": "limits", "type": "supported limits", "annotation": "*"}
1163 ]
Corentin Wallez6d315da2021-02-04 15:33:42 +00001164 },
1165 {
Austin Eng89ddadc2021-12-15 00:12:30 +00001166 "name": "has feature",
1167 "returns": "bool",
1168 "args": [
1169 {"name": "feature", "type": "feature name"}
1170 ]
1171 },
1172 {
Austin Eng89ddadc2021-12-15 00:12:30 +00001173 "name": "enumerate features",
Austin Eng3ac7b9c2022-01-06 22:11:28 +00001174 "returns": "size_t",
Austin Eng89ddadc2021-12-15 00:12:30 +00001175 "args": [
1176 {"name": "features", "type": "feature name", "annotation": "*"}
1177 ]
1178 },
1179 {
Austin Engbf324352022-08-18 18:02:00 +00001180 "name": "get adapter",
1181 "returns": "adapter",
1182 "tags": ["dawn"]
1183 },
1184 {
Austin Engbffc9662021-09-17 15:36:00 +00001185 "name": "get queue",
1186 "returns": "queue"
Brandon Jones0e92e9b2021-04-01 20:46:42 +00001187 },
1188 {
Austin Enge06f01b2019-09-30 22:50:59 +00001189 "name": "inject error",
1190 "args": [
1191 {"name": "type", "type": "error type"},
Austin Eng867f7202019-10-02 06:35:38 +00001192 {"name": "message", "type": "char", "annotation": "const*", "length": "strlen"}
Austin Enge06f01b2019-09-30 22:50:59 +00001193 ],
Kai Ninomiya930e9182021-09-17 19:44:43 +00001194 "tags": ["dawn"]
Austin Enge06f01b2019-09-30 22:50:59 +00001195 },
1196 {
Loko Kung3a53edc2022-08-29 22:33:50 +00001197 "name": "force loss",
1198 "args": [
1199 {"name": "type", "type": "device lost reason"},
1200 {"name": "message", "type": "char", "annotation": "const*", "length": "strlen"}
1201 ],
Kai Ninomiya930e9182021-09-17 19:44:43 +00001202 "tags": ["dawn"]
Natasha Lee0ecc48e2020-01-15 19:02:13 +00001203 },
1204 {
Kai Ninomiya930e9182021-09-17 19:44:43 +00001205 "name": "tick",
1206 "tags": ["dawn"]
Corentin Wallezdbb57292017-06-14 13:33:45 -04001207 },
1208 {
Austin Eng45ea7e62019-08-27 21:43:56 +00001209 "name": "set uncaptured error callback",
Austin Eng376f1c62017-05-30 20:03:44 -04001210 "args": [
Corentin Walleze00c6bd2021-12-13 17:37:17 +00001211 {"name": "callback", "type": "error callback"},
Corentin Wallez839053b2019-05-29 13:03:50 +00001212 {"name": "userdata", "type": "void", "annotation": "*"}
Austin Eng376f1c62017-05-30 20:03:44 -04001213 ]
Austin Eng45238d72019-09-04 22:54:03 +00001214 },
1215 {
Zhaoming Jiangb44000e2021-06-04 07:10:56 +00001216 "name": "set logging callback",
Kai Ninomiya930e9182021-09-17 19:44:43 +00001217 "tags": ["dawn"],
Zhaoming Jiangb44000e2021-06-04 07:10:56 +00001218 "args": [
Corentin Walleze00c6bd2021-12-13 17:37:17 +00001219 {"name": "callback", "type": "logging callback"},
Zhaoming Jiangb44000e2021-06-04 07:10:56 +00001220 {"name": "userdata", "type": "void", "annotation": "*"}
1221 ]
1222 },
1223 {
Natasha Lee9bba4a92019-12-18 18:59:20 +00001224 "name": "set device lost callback",
1225 "args": [
Corentin Walleze00c6bd2021-12-13 17:37:17 +00001226 {"name": "callback", "type": "device lost callback"},
Natasha Lee9bba4a92019-12-18 18:59:20 +00001227 {"name": "userdata", "type": "void", "annotation": "*"}
1228 ]
1229 },
1230 {
Austin Eng45238d72019-09-04 22:54:03 +00001231 "name": "push error scope",
1232 "args": [
1233 {"name": "filter", "type": "error filter"}
1234 ]
1235 },
1236 {
1237 "name": "pop error scope",
1238 "returns": "bool",
1239 "args": [
Corentin Walleze00c6bd2021-12-13 17:37:17 +00001240 {"name": "callback", "type": "error callback"},
Austin Eng45238d72019-09-04 22:54:03 +00001241 {"name": "userdata", "type": "void", "annotation": "*"}
1242 ]
Brandon Jones80853672022-04-12 03:28:40 +00001243 },
1244 {
1245 "name": "set label",
1246 "returns": "void",
1247 "args": [
1248 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"}
1249 ]
Corentin Wallez09631422023-01-10 15:17:26 +00001250 },
1251 {
1252 "name": "validate texture descriptor",
1253 "tags": ["dawn"],
1254 "args": [
1255 {"name": "descriptor", "type": "texture descriptor", "annotation": "const*"}
1256 ]
Austin Eng376f1c62017-05-30 20:03:44 -04001257 }
1258 ]
1259 },
Natasha Lee9bba4a92019-12-18 18:59:20 +00001260 "device lost callback": {
fujunwei23f71622021-12-02 07:41:21 +00001261 "category": "function pointer",
Corentin Wallez13e2e132020-01-25 09:30:40 +00001262 "args": [
Kai Ninomiya51791e02021-09-28 11:52:17 +00001263 {"name": "reason", "type": "device lost reason"},
Natasha Lee9bba4a92019-12-18 18:59:20 +00001264 {"name": "message", "type": "char", "annotation": "const*"},
1265 {"name": "userdata", "type": "void", "annotation": "*"}
1266 ]
1267 },
Kai Ninomiya4e37acc2021-09-17 21:13:33 +00001268 "device lost reason": {
1269 "category": "enum",
1270 "emscripten_no_enum_table": true,
1271 "values": [
Kai Ninomiya51791e02021-09-28 11:52:17 +00001272 {"value": 0, "name": "undefined", "jsrepr": "undefined"},
1273 {"value": 1, "name": "destroyed"}
Kai Ninomiya4e37acc2021-09-17 21:13:33 +00001274 ]
1275 },
Brandon Jones670858d2020-09-22 16:51:36 +00001276 "double": {
1277 "category": "native"
1278 },
Austin Engcb0cb652019-08-27 21:41:56 +00001279 "error callback": {
fujunwei23f71622021-12-02 07:41:21 +00001280 "category": "function pointer",
Corentin Wallez540abab2019-11-22 13:18:22 +00001281 "args": [
1282 {"name": "type", "type": "error type"},
1283 {"name": "message", "type": "char", "annotation": "const*"},
1284 {"name": "userdata", "type": "void", "annotation": "*"}
1285 ]
Austin Eng376f1c62017-05-30 20:03:44 -04001286 },
Austin Eng02fbf162021-09-13 18:49:09 +00001287 "limits": {
1288 "category": "structure",
Austin Eng02fbf162021-09-13 18:49:09 +00001289 "members": [
1290 {"name": "max texture dimension 1D", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
1291 {"name": "max texture dimension 2D", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
1292 {"name": "max texture dimension 3D", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
1293 {"name": "max texture array layers", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
1294 {"name": "max bind groups", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
Brandon Jones773800b2022-09-21 17:42:24 +00001295 {"name": "max bindings per bind group", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
Austin Eng02fbf162021-09-13 18:49:09 +00001296 {"name": "max dynamic uniform buffers per pipeline layout", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
1297 {"name": "max dynamic storage buffers per pipeline layout", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
1298 {"name": "max sampled textures per shader stage", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
1299 {"name": "max samplers per shader stage", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
1300 {"name": "max storage buffers per shader stage", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
1301 {"name": "max storage textures per shader stage", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
1302 {"name": "max uniform buffers per shader stage", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
1303 {"name": "max uniform buffer binding size", "type": "uint64_t", "default": "WGPU_LIMIT_U64_UNDEFINED"},
1304 {"name": "max storage buffer binding size", "type": "uint64_t", "default": "WGPU_LIMIT_U64_UNDEFINED"},
1305 {"name": "min uniform buffer offset alignment", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
1306 {"name": "min storage buffer offset alignment", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
1307 {"name": "max vertex buffers", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
shrekshaod1a5f932022-09-29 19:02:11 +00001308 {"name": "max buffer size", "type": "uint64_t", "default": "WGPU_LIMIT_U64_UNDEFINED"},
Austin Eng02fbf162021-09-13 18:49:09 +00001309 {"name": "max vertex attributes", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
1310 {"name": "max vertex buffer array stride", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
1311 {"name": "max inter stage shader components", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
Brandon Jones431c7a42022-06-24 17:30:29 +00001312 {"name": "max inter stage shader variables", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
Austin Engcda3d7b2022-06-13 16:48:45 +00001313 {"name": "max color attachments", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
Loko Kunge70563a2022-12-12 20:55:05 +00001314 {"name": "max color attachment bytes per sample", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
Austin Eng02fbf162021-09-13 18:49:09 +00001315 {"name": "max compute workgroup storage size", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
1316 {"name": "max compute invocations per workgroup", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
1317 {"name": "max compute workgroup size x", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
1318 {"name": "max compute workgroup size y", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
1319 {"name": "max compute workgroup size z", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
Loko Kung4f98dd42023-03-08 02:45:50 +00001320 {"name": "max compute workgroups per dimension", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"},
1321 {"name": "max fragment combined output resources", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"}
Austin Eng02fbf162021-09-13 18:49:09 +00001322 ]
1323 },
Austin Engbffc9662021-09-17 15:36:00 +00001324 "required limits": {
1325 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00001326 "extensible": "in",
Austin Engbffc9662021-09-17 15:36:00 +00001327 "members": [
1328 {"name": "limits", "type": "limits"}
1329 ]
1330 },
1331 "supported limits": {
1332 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00001333 "extensible": "out",
Austin Engbffc9662021-09-17 15:36:00 +00001334 "members": [
1335 {"name": "limits", "type": "limits"}
1336 ]
1337 },
Zhaoming Jiangb44000e2021-06-04 07:10:56 +00001338 "logging callback": {
fujunwei23f71622021-12-02 07:41:21 +00001339 "category": "function pointer",
Kai Ninomiya930e9182021-09-17 19:44:43 +00001340 "tags": ["dawn"],
Zhaoming Jiangb44000e2021-06-04 07:10:56 +00001341 "args": [
1342 {"name": "type", "type": "logging type"},
1343 {"name": "message", "type": "char", "annotation": "const*"},
1344 {"name": "userdata", "type": "void", "annotation": "*"}
1345 ]
1346 },
Austin Eng45238d72019-09-04 22:54:03 +00001347 "error filter": {
1348 "category": "enum",
1349 "values": [
Zhaoming Jiang53137bd2021-12-08 02:42:17 +00001350 {"value": 0, "name": "validation"},
Brandon Jones567f0682022-09-07 14:14:14 +00001351 {"value": 1, "name": "out of memory"},
1352 {"value": 2, "name": "internal"}
Austin Eng45238d72019-09-04 22:54:03 +00001353 ]
1354 },
Austin Engcb0cb652019-08-27 21:41:56 +00001355 "error type": {
1356 "category": "enum",
Kai Ninomiya930e9182021-09-17 19:44:43 +00001357 "emscripten_no_enum_table": true,
Austin Engcb0cb652019-08-27 21:41:56 +00001358 "values": [
1359 {"value": 0, "name": "no error"},
1360 {"value": 1, "name": "validation"},
1361 {"value": 2, "name": "out of memory"},
Brandon Jones567f0682022-09-07 14:14:14 +00001362 {"value": 3, "name": "internal"},
1363 {"value": 4, "name": "unknown"},
1364 {"value": 5, "name": "device lost"}
Austin Engcb0cb652019-08-27 21:41:56 +00001365 ]
1366 },
Zhaoming Jiangb44000e2021-06-04 07:10:56 +00001367 "logging type": {
1368 "category": "enum",
Kai Ninomiya930e9182021-09-17 19:44:43 +00001369 "tags": ["dawn"],
Zhaoming Jiangb44000e2021-06-04 07:10:56 +00001370 "values": [
1371 {"value": 0, "name": "verbose"},
1372 {"value": 1, "name": "info"},
1373 {"value": 2, "name": "warning"},
1374 {"value": 3, "name": "error"}
1375 ]
1376 },
Yan,Shaobo96a0bd52022-10-24 04:19:43 +00001377 "extent 2D": {
1378 "category": "structure",
Yan,Shaoboe8dd6812022-11-03 09:03:01 +00001379 "tags": ["dawn"],
Yan,Shaobo96a0bd52022-10-24 04:19:43 +00001380 "_TODO": "crbug.com/1316671: Remove default value of 'width' after chromium side chagnes landed",
1381 "members": [
1382 {"name": "width", "type": "uint32_t", "default": 0},
1383 {"name": "height", "type": "uint32_t", "default": 1}
1384 ]
1385 },
Corentin Wallez29353d62018-09-18 12:49:22 +00001386 "extent 3D": {
1387 "category": "structure",
1388 "members": [
Corentin Walleza736d962021-03-04 17:03:15 +00001389 {"name": "width", "type": "uint32_t"},
Corentin Wallez2931c422020-10-16 14:20:06 +00001390 {"name": "height", "type": "uint32_t", "default": 1},
Brandon Jones76e5a9f2021-05-13 17:51:23 +00001391 {"name": "depth or array layers", "type": "uint32_t", "default": 1}
Corentin Wallez29353d62018-09-18 12:49:22 +00001392 ]
1393 },
Brandon Jones0e92e9b2021-04-01 20:46:42 +00001394 "external texture": {
1395 "category": "object",
Kai Ninomiya930e9182021-09-17 19:44:43 +00001396 "tags": ["dawn"],
Brandon Jones0e92e9b2021-04-01 20:46:42 +00001397 "methods": [
1398 {
Brandon Jones88aeeae2021-11-19 18:26:08 +00001399 "name": "set label",
1400 "returns": "void",
Brandon Jones88aeeae2021-11-19 18:26:08 +00001401 "args": [
1402 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"}
1403 ]
1404 },
1405 {
Brandon Jones0e92e9b2021-04-01 20:46:42 +00001406 "name": "destroy",
1407 "returns": "void"
Yan,Shaoboe958db02023-02-24 02:09:38 +00001408 },
1409 {
1410 "name": "expire",
1411 "returns": "void"
1412 },
1413 {
1414 "name": "refresh",
1415 "returns": "void"
Brandon Jones0e92e9b2021-04-01 20:46:42 +00001416 }
1417 ]
1418 },
Brandon Jones85ceb082022-11-30 21:32:26 +00001419 "external texture rotation":{
1420 "category": "enum",
1421 "tags": ["dawn"],
1422 "values": [
1423 {"value": 0, "name": "rotate 0 degrees"},
1424 {"value": 1, "name": "rotate 90 degrees"},
1425 {"value": 2, "name": "rotate 180 degrees"},
1426 {"value": 3, "name": "rotate 270 degrees"}
1427 ]
1428 },
Brandon Jones0e92e9b2021-04-01 20:46:42 +00001429 "external texture descriptor": {
1430 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00001431 "extensible": "in",
Kai Ninomiya930e9182021-09-17 19:44:43 +00001432 "tags": ["dawn"],
Brandon Jones0e92e9b2021-04-01 20:46:42 +00001433 "members": [
Corentin Wallezd85bbb62021-10-01 15:34:25 +00001434 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
Brandon Jones0e92e9b2021-04-01 20:46:42 +00001435 {"name": "plane 0", "type": "texture view"},
Brandon Jones37b3df42022-01-25 18:09:00 +00001436 {"name": "plane 1", "type": "texture view", "optional": true},
Yan,Shaoboe8dd6812022-11-03 09:03:01 +00001437 {"name": "visible origin", "type": "origin 2D"},
1438 {"name": "visible size", "type": "extent 2D"},
jchen10ef62b582022-06-22 03:14:26 +00001439 {"name": "do yuv to rgb conversion only", "type": "bool", "default": "false"},
Brandon Jonescf4a85e2022-05-02 20:37:28 +00001440 {"name": "yuv to rgb conversion matrix", "type": "float", "annotation": "const*",
Brandon Jones136a0a42022-05-24 01:41:43 +00001441 "length": 12, "optional": true},
Brandon Jonescf4a85e2022-05-02 20:37:28 +00001442 {"name": "src transfer function parameters", "type": "float", "annotation": "const*",
Brandon Jonese61a390b2022-05-19 17:44:29 +00001443 "length": 7},
Brandon Jonescf4a85e2022-05-02 20:37:28 +00001444 {"name": "dst transfer function parameters", "type": "float", "annotation": "const*",
Brandon Jonese61a390b2022-05-19 17:44:29 +00001445 "length": 7},
Brandon Jonescf4a85e2022-05-02 20:37:28 +00001446 {"name": "gamut conversion matrix", "type": "float", "annotation": "const*",
Brandon Jones85ceb082022-11-30 21:32:26 +00001447 "length": 9},
1448 {"name": "flip y", "type": "bool", "default": "false"},
Brandon Jones713cd862023-01-04 21:27:32 +00001449 {"name": "rotation", "type": "external texture rotation", "default": "rotate 0 degrees"}
Brandon Jones0e92e9b2021-04-01 20:46:42 +00001450 ]
1451 },
Kai Ninomiya7d174a12021-09-21 17:36:27 +00001452 "feature name": {
1453 "category": "enum",
Kai Ninomiya7d174a12021-09-21 17:36:27 +00001454 "values": [
1455 {"value": 0, "name": "undefined", "jsrepr": "undefined"},
Austin Eng51d13a42022-06-13 19:18:55 +00001456 {"value": 1, "name": "depth clip control"},
Brandon Jones6d48f572022-06-14 22:48:31 +00001457 {"value": 2, "name": "depth32 float stencil8"},
1458 {"value": 3, "name": "timestamp query"},
1459 {"value": 4, "name": "pipeline statistics query"},
1460 {"value": 5, "name": "texture compression BC"},
1461 {"value": 6, "name": "texture compression ETC2"},
1462 {"value": 7, "name": "texture compression ASTC"},
1463 {"value": 8, "name": "indirect first instance"},
Zhaoming Jiang7ca82ac2022-09-08 00:11:04 +00001464 {"value": 9, "name": "shader f16"},
Takahirod4dd5472022-09-22 16:38:06 +00001465 {"value": 10, "name": "RG11B10 ufloat renderable"},
Jiawei Shaof5cee3f2023-02-11 02:53:53 +00001466 {"value": 11, "name": "BGRA8 unorm storage"},
Austin Eng89ddadc2021-12-15 00:12:30 +00001467 {"value": 1001, "name": "dawn shader float 16", "tags": ["dawn"]},
1468 {"value": 1002, "name": "dawn internal usages", "tags": ["dawn"]},
Austin Eng2f218e22021-12-22 19:02:23 +00001469 {"value": 1003, "name": "dawn multi planar formats", "tags": ["dawn"]},
Jiawei Shao9ebba362022-05-20 08:21:00 +00001470 {"value": 1004, "name": "dawn native", "tags": ["dawn", "native"]},
Li Hao74f6bc72022-10-28 04:51:16 +00001471 {"value": 1005, "name": "chromium experimental dp4a", "tags": ["dawn"]},
1472 {"value": 1006, "name": "timestamp query inside passes", "tags": ["dawn"]}
Kai Ninomiya7d174a12021-09-21 17:36:27 +00001473 ]
1474 },
Austin Eng376f1c62017-05-30 20:03:44 -04001475 "filter mode": {
1476 "category": "enum",
1477 "values": [
Yunchao Hecfea9342019-04-02 14:31:29 +00001478 {"value": 0, "name": "nearest"},
1479 {"value": 1, "name": "linear"}
Austin Eng376f1c62017-05-30 20:03:44 -04001480 ]
1481 },
Austin Engfb426532017-08-01 14:22:52 -04001482 "float": {
1483 "category": "native"
1484 },
Yunchao Hec33a8c12019-04-11 18:46:54 +00001485 "front face": {
1486 "category": "enum",
1487 "values": [
1488 {"value": 0, "name": "CCW"},
1489 {"value": 1, "name": "CW"}
1490 ]
1491 },
Corentin Wallez80915842021-03-04 18:13:45 +00001492 "image copy buffer": {
1493 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00001494 "extensible": "in",
Corentin Wallez80915842021-03-04 18:13:45 +00001495 "members": [
1496 {"name": "layout", "type": "texture data layout"},
1497 {"name": "buffer", "type": "buffer"}
1498 ]
1499 },
1500 "image copy texture": {
1501 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00001502 "extensible": "in",
Corentin Wallez80915842021-03-04 18:13:45 +00001503 "members": [
1504 {"name": "texture", "type": "texture"},
1505 {"name": "mip level", "type": "uint32_t", "default": "0"},
1506 {"name": "origin", "type": "origin 3D"},
1507 {"name": "aspect", "type": "texture aspect", "default": "all"}
1508 ]
1509 },
Yan,Shaobob4d8c802022-10-26 00:58:46 +00001510 "image copy external texture": {
1511 "category": "structure",
1512 "extensible": "in",
1513 "tags": ["dawn"],
1514 "members": [
1515 {"name": "external texture", "type": "external texture"},
Yan,Shaobo8150d1c2023-03-24 03:43:56 +00001516 {"name": "origin", "type": "origin 3D"},
1517 {"name": "natural size", "type": "extent 2D"}
Yan,Shaobob4d8c802022-10-26 00:58:46 +00001518 ]
1519 },
Austin Eng376f1c62017-05-30 20:03:44 -04001520 "index format": {
1521 "category": "enum",
1522 "values": [
Brandon Jones8575cb32020-08-27 01:13:35 +00001523 {"value": 0, "name": "undefined", "jsrepr": "undefined"},
1524 {"value": 1, "name": "uint16"},
1525 {"value": 2, "name": "uint32"}
Austin Eng376f1c62017-05-30 20:03:44 -04001526 ]
1527 },
Corentin Wallez5fc2c822020-01-10 13:06:48 +00001528 "instance": {
Corentin Wallez3a1746e2020-01-15 13:14:12 +00001529 "category": "object",
1530 "methods": [
1531 {
1532 "name": "create surface",
1533 "returns": "surface",
1534 "args": [
1535 {"name": "descriptor", "type": "surface descriptor", "annotation": "const*"}
1536 ]
Kai Ninomiya4e37acc2021-09-17 21:13:33 +00001537 },
1538 {
Le Hoang Quyen69e1c4b2023-03-14 19:03:10 +00001539 "name": "process events"
Kai Ninomiya4e37acc2021-09-17 21:13:33 +00001540 },
1541 {
1542 "name": "request adapter",
Kai Ninomiya4e37acc2021-09-17 21:13:33 +00001543 "args": [
Corentin Wallez1260a532022-07-26 17:36:44 +00001544 {"name": "options", "type": "request adapter options", "annotation": "const*", "optional": true, "no_default": true},
Corentin Walleze00c6bd2021-12-13 17:37:17 +00001545 {"name": "callback", "type": "request adapter callback"},
Kai Ninomiya4e37acc2021-09-17 21:13:33 +00001546 {"name": "userdata", "type": "void", "annotation": "*"}
1547 ]
Corentin Wallez3a1746e2020-01-15 13:14:12 +00001548 }
1549 ]
Corentin Wallez5fc2c822020-01-10 13:06:48 +00001550 },
1551 "instance descriptor": {
1552 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00001553 "extensible": "in",
Corentin Wallez5fc2c822020-01-10 13:06:48 +00001554 "members": []
1555 },
Austin Eng2fbc1702022-02-02 21:00:52 +00001556 "dawn instance descriptor": {
1557 "tags": ["dawn", "native"],
1558 "category": "structure",
1559 "chained": "in",
Corentin Walleza45561b2022-07-14 12:58:25 +00001560 "chain roots": ["instance descriptor"],
Austin Eng2fbc1702022-02-02 21:00:52 +00001561 "members": [
1562 {"name": "additional runtime search paths count", "type": "uint32_t", "default": 0},
1563 {"name": "additional runtime search paths", "type": "char", "annotation": "const*const*", "length": "additional runtime search paths count"}
1564 ]
1565 },
Brandon Jones58a471a2021-02-08 19:48:06 +00001566 "vertex attribute": {
Yunchao Heb2207732019-02-14 00:35:39 +00001567 "category": "structure",
1568 "extensible": false,
1569 "members": [
Kai Ninomiyaae1f25f2019-11-07 22:23:29 +00001570 {"name": "format", "type": "vertex format"},
1571 {"name": "offset", "type": "uint64_t"},
1572 {"name": "shader location", "type": "uint32_t"}
Yunchao Heb2207732019-02-14 00:35:39 +00001573 ]
1574 },
Brandon Jones58a471a2021-02-08 19:48:06 +00001575 "vertex buffer layout": {
Yunchao He4dec7372019-02-14 23:56:07 +00001576 "category": "structure",
1577 "extensible": false,
1578 "members": [
Kai Ninomiyaae1f25f2019-11-07 22:23:29 +00001579 {"name": "array stride", "type": "uint64_t"},
Corentin Wallezff6c9ca62021-07-25 18:40:19 +00001580 {"name": "step mode", "type": "vertex step mode", "default": "vertex"},
Yunchao He2d4b5292019-06-06 17:54:30 +00001581 {"name": "attribute count", "type": "uint32_t"},
Brandon Jones58a471a2021-02-08 19:48:06 +00001582 {"name": "attributes", "type": "vertex attribute", "annotation": "const*", "length": "attribute count"}
Yunchao He4dec7372019-02-14 23:56:07 +00001583 ]
1584 },
Corentin Wallezff6c9ca62021-07-25 18:40:19 +00001585 "vertex step mode": {
Austin Eng376f1c62017-05-30 20:03:44 -04001586 "category": "enum",
1587 "values": [
Takahirof3cf19f2022-05-31 17:24:49 +00001588 {"value": 0, "name": "vertex"},
1589 {"value": 1, "name": "instance"},
Shrek Shao9ec183e2022-08-01 23:03:14 +00001590 {"value": 2, "name": "vertex buffer not used", "jsrepr": "undefined", "valid": true}
Austin Eng376f1c62017-05-30 20:03:44 -04001591 ]
1592 },
Kai Ninomiyab9854312017-08-11 14:36:20 -07001593 "load op": {
1594 "category": "enum",
1595 "values": [
Austin Eng74d4e532022-03-09 18:43:51 +00001596 {"value": 0, "name": "undefined", "jsrepr": "undefined"},
Brandon Jonesa20ce6f2022-02-03 17:59:04 +00001597 {"value": 1, "name": "clear"},
1598 {"value": 2, "name": "load"}
Kai Ninomiyab9854312017-08-11 14:36:20 -07001599 ]
1600 },
Corentin Wallez0d52f802020-07-14 12:30:14 +00001601 "map mode": {
1602 "category": "bitmask",
1603 "values": [
1604 {"value": 0, "name": "none"},
1605 {"value": 1, "name": "read"},
1606 {"value": 2, "name": "write"}
1607 ]
1608 },
Corentin Wallezeee34492022-03-16 18:44:16 +00001609 "mipmap filter mode": {
1610 "category": "enum",
1611 "tags": ["upstream"],
1612 "values": [
1613 {"value": 0, "name": "nearest"},
1614 {"value": 1, "name": "linear"}
1615 ]
1616 },
Jiawei Shao5e811ae2018-12-19 08:21:13 +00001617 "store op": {
1618 "category": "enum",
1619 "values": [
Austin Eng74d4e532022-03-09 18:43:51 +00001620 {"value": 0, "name": "undefined", "jsrepr": "undefined"},
Brandon Jonesa20ce6f2022-02-03 17:59:04 +00001621 {"value": 1, "name": "store"},
1622 {"value": 2, "name": "discard"}
Jiawei Shao5e811ae2018-12-19 08:21:13 +00001623 ]
1624 },
Brandon Jonesac71e342018-11-28 17:54:13 +00001625 "origin 3D": {
1626 "category": "structure",
1627 "members": [
Corentin Wallez8f938712019-07-08 19:20:22 +00001628 {"name": "x", "type": "uint32_t", "default": "0"},
1629 {"name": "y", "type": "uint32_t", "default": "0"},
1630 {"name": "z", "type": "uint32_t", "default": "0"}
Brandon Jonesac71e342018-11-28 17:54:13 +00001631 ]
1632 },
Yan,Shaoboe8dd6812022-11-03 09:03:01 +00001633 "origin 2D": {
1634 "category": "structure",
1635 "tags": ["dawn"],
1636 "members": [
1637 {"name": "x", "type": "uint32_t", "default": "0"},
1638 {"name": "y", "type": "uint32_t", "default": "0"}
1639 ]
1640 },
Austin Eng376f1c62017-05-30 20:03:44 -04001641 "pipeline layout": {
Brandon Jones88aeeae2021-11-19 18:26:08 +00001642 "category": "object",
1643 "methods": [
1644 {
1645 "name": "set label",
1646 "returns": "void",
Brandon Jones88aeeae2021-11-19 18:26:08 +00001647 "args": [
1648 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"}
1649 ]
1650 }
1651 ]
Austin Eng376f1c62017-05-30 20:03:44 -04001652 },
Kai Ninomiyaf53f98b2018-06-27 16:21:39 -07001653 "pipeline layout descriptor": {
1654 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00001655 "extensible": "in",
Kai Ninomiyaf53f98b2018-06-27 16:21:39 -07001656 "members": [
François Beaufort277d2e12019-10-03 14:56:49 +00001657 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
Jiawei Shao20301662019-02-21 00:45:19 +00001658 {"name": "bind group layout count", "type": "uint32_t"},
1659 {"name": "bind group layouts", "type": "bind group layout", "annotation": "const*", "length": "bind group layout count"}
Austin Eng376f1c62017-05-30 20:03:44 -04001660 ]
1661 },
Kai Ninomiya261b05d2020-07-13 18:21:03 +00001662 "pipeline statistic name": {
Hao Lib6eff5a2020-06-11 00:34:14 +00001663 "category": "enum",
1664 "values": [
1665 {"value": 0, "name": "vertex shader invocations"},
1666 {"value": 1, "name": "clipper invocations"},
1667 {"value": 2, "name": "clipper primitives out"},
1668 {"value": 3, "name": "fragment shader invocations"},
1669 {"value": 4, "name": "compute shader invocations"}
1670 ]
1671 },
Kai Ninomiya7d174a12021-09-21 17:36:27 +00001672 "power preference": {
1673 "category": "enum",
Kai Ninomiya7d174a12021-09-21 17:36:27 +00001674 "values": [
Shrek Shaoee50bc02022-02-08 20:21:40 +00001675 {"value": 0, "name": "undefined", "jsrepr": "undefined"},
Corentin Wallez6cd1cd92021-11-17 08:13:24 +00001676 {"value": 1, "name": "low power"},
1677 {"value": 2, "name": "high performance"}
Kai Ninomiya7d174a12021-09-21 17:36:27 +00001678 ]
1679 },
Corentin Wallezd87e6762020-01-23 17:20:38 +00001680 "present mode": {
1681 "category": "enum",
Kai Ninomiya930e9182021-09-17 19:44:43 +00001682 "emscripten_no_enum_table": true,
Corentin Wallezd87e6762020-01-23 17:20:38 +00001683 "values": [
Corentin Wallez527045f2020-03-20 16:47:50 +00001684 {"value": 0, "name": "immediate"},
1685 {"value": 1, "name": "mailbox"},
1686 {"value": 2, "name": "fifo"}
Corentin Wallezd87e6762020-01-23 17:20:38 +00001687 ]
1688 },
Jinho Bang0b826712019-10-07 12:23:09 +00001689 "programmable stage descriptor": {
Yan, Shaoboa4924272018-12-10 19:47:22 +00001690 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00001691 "extensible": "in",
Yan, Shaoboa4924272018-12-10 19:47:22 +00001692 "members": [
1693 {"name": "module", "type": "shader module"},
Kai Ninomiya7d174a12021-09-21 17:36:27 +00001694 {"name": "entry point", "type": "char", "annotation": "const*", "length": "strlen"},
shrekshaoe99ad762021-09-28 20:15:52 +00001695 {"name": "constant count", "type": "uint32_t", "default": 0},
1696 {"name": "constants", "type": "constant entry", "annotation": "const*", "length": "constant count"}
Yan, Shaoboa4924272018-12-10 19:47:22 +00001697 ]
1698 },
Austin Eng3e9e3152017-07-24 13:54:19 -04001699 "primitive topology": {
1700 "category": "enum",
1701 "values": [
Austin Eng439d9632017-07-26 18:10:44 -04001702 {"value": 0, "name": "point list"},
1703 {"value": 1, "name": "line list"},
Austin Eng3e9e3152017-07-24 13:54:19 -04001704 {"value": 2, "name": "line strip"},
Austin Eng439d9632017-07-26 18:10:44 -04001705 {"value": 3, "name": "triangle list"},
Austin Eng3e9e3152017-07-24 13:54:19 -04001706 {"value": 4, "name": "triangle strip"}
1707 ]
1708 },
Hao Lib6eff5a2020-06-11 00:34:14 +00001709 "query set": {
1710 "category": "object",
1711 "methods": [
1712 {
Brandon Jones88aeeae2021-11-19 18:26:08 +00001713 "name": "set label",
1714 "returns": "void",
Brandon Jones88aeeae2021-11-19 18:26:08 +00001715 "args": [
1716 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"}
1717 ]
1718 },
1719 {
Corentin Wallez45820ae2022-06-09 10:12:13 +00001720 "name": "get type",
1721 "returns": "query type"
1722 },
1723 {
1724 "name": "get count",
1725 "returns": "uint32_t"
1726 },
1727 {
Hao Lib6eff5a2020-06-11 00:34:14 +00001728 "name": "destroy"
1729 }
1730 ]
1731 },
1732 "query set descriptor": {
1733 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00001734 "extensible": "in",
Hao Lib6eff5a2020-06-11 00:34:14 +00001735 "members": [
1736 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
1737 {"name": "type", "type": "query type"},
1738 {"name": "count", "type": "uint32_t"},
Kai Ninomiya261b05d2020-07-13 18:21:03 +00001739 {"name": "pipeline statistics", "type": "pipeline statistic name", "annotation": "const*", "length": "pipeline statistics count"},
Corentin Wallez9585c462020-07-06 18:50:00 +00001740 {"name": "pipeline statistics count", "type": "uint32_t", "default": "0"}
Hao Lib6eff5a2020-06-11 00:34:14 +00001741 ]
1742 },
1743 "query type": {
1744 "category": "enum",
1745 "values": [
1746 {"value": 0, "name": "occlusion"},
1747 {"value": 1, "name": "pipeline statistics"},
1748 {"value": 2, "name": "timestamp"}
1749 ]
1750 },
Austin Eng376f1c62017-05-30 20:03:44 -04001751 "queue": {
1752 "category": "object",
1753 "methods": [
1754 {
1755 "name": "submit",
1756 "args": [
Jiawei Shao20301662019-02-21 00:45:19 +00001757 {"name": "command count", "type": "uint32_t"},
1758 {"name": "commands", "type": "command buffer", "annotation": "const*", "length": "command count"}
Austin Eng376f1c62017-05-30 20:03:44 -04001759 ]
Austin Engf0b761f2018-12-03 16:57:34 +00001760 },
1761 {
Corentin Wallezc093db22021-02-25 13:17:01 +00001762 "name": "on submitted work done",
Corentin Wallezeee34492022-03-16 18:44:16 +00001763 "tags": ["dawn", "emscripten"],
Corentin Wallezc093db22021-02-25 13:17:01 +00001764 "args": [
1765 {"name": "signal value", "type": "uint64_t"},
Corentin Walleze00c6bd2021-12-13 17:37:17 +00001766 {"name": "callback", "type": "queue work done callback"},
Corentin Wallezc093db22021-02-25 13:17:01 +00001767 {"name": "userdata", "type": "void", "annotation": "*"}
1768 ]
1769 },
1770 {
Corentin Wallezeee34492022-03-16 18:44:16 +00001771 "name": "on submitted work done",
1772 "tags": ["upstream"],
1773 "args": [
1774 {"name": "callback", "type": "queue work done callback"},
1775 {"name": "userdata", "type": "void", "annotation": "*"}
1776 ]
1777 },
1778 {
Corentin Wallez47a33412020-06-02 09:24:39 +00001779 "name": "write buffer",
1780 "args": [
1781 {"name": "buffer", "type": "buffer"},
1782 {"name": "buffer offset", "type": "uint64_t"},
1783 {"name": "data", "type": "void", "annotation": "const*", "length": "size"},
1784 {"name": "size", "type": "size_t"}
1785 ]
Tomek Ponitkaa9c7d642020-07-08 18:42:30 +00001786 },
1787 {
1788 "name": "write texture",
1789 "args": [
Corentin Wallez80915842021-03-04 18:13:45 +00001790 {"name": "destination", "type": "image copy texture", "annotation": "const*"},
Corentin Wallez1b9b53a2020-07-16 00:43:08 +00001791 {"name": "data", "type": "void", "annotation": "const*", "length": "data size"},
Tomek Ponitkaa9c7d642020-07-08 18:42:30 +00001792 {"name": "data size", "type": "size_t"},
1793 {"name": "data layout", "type": "texture data layout", "annotation": "const*"},
Corentin Wallez1b9b53a2020-07-16 00:43:08 +00001794 {"name": "write size", "type": "extent 3D", "annotation": "const*"}
Tomek Ponitkaa9c7d642020-07-08 18:42:30 +00001795 ]
Yan, Shaobodb8766b2020-11-04 02:30:16 +00001796 },
1797 {
1798 "name": "copy texture for browser",
Austin Eng0c824052021-09-20 16:07:25 +00001799 "extensible": "in",
Kai Ninomiya930e9182021-09-17 19:44:43 +00001800 "tags": ["dawn"],
Yan, Shaobodb8766b2020-11-04 02:30:16 +00001801 "args": [
Corentin Wallez80915842021-03-04 18:13:45 +00001802 {"name": "source", "type": "image copy texture", "annotation": "const*"},
1803 {"name": "destination", "type": "image copy texture", "annotation": "const*"},
Yan, Shaobobb913a92020-12-02 08:13:09 +00001804 {"name": "copy size", "type": "extent 3D", "annotation": "const*"},
1805 {"name": "options", "type": "copy texture for browser options", "annotation": "const*"}
Yan, Shaobodb8766b2020-11-04 02:30:16 +00001806 ]
Brandon Jones80853672022-04-12 03:28:40 +00001807 },
1808 {
Yan,Shaobob4d8c802022-10-26 00:58:46 +00001809 "name": "copy external texture for browser",
1810 "extensible": "in",
1811 "tags": ["dawn"],
1812 "args": [
1813 {"name": "source", "type": "image copy external texture", "annotation": "const*"},
1814 {"name": "destination", "type": "image copy texture", "annotation": "const*"},
1815 {"name": "copy size", "type": "extent 3D", "annotation": "const*"},
1816 {"name": "options", "type": "copy texture for browser options", "annotation": "const*"}
1817 ]
1818 },
1819 {
Brandon Jones80853672022-04-12 03:28:40 +00001820 "name": "set label",
1821 "returns": "void",
1822 "args": [
1823 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"}
1824 ]
Austin Eng376f1c62017-05-30 20:03:44 -04001825 }
1826 ]
1827 },
Corentin Wallezeee34492022-03-16 18:44:16 +00001828 "queue descriptor": {
1829 "category": "structure",
1830 "extensible": "in",
Corentin Wallezeee34492022-03-16 18:44:16 +00001831 "members": [
1832 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true}
1833 ]
1834 },
Corentin Wallezc093db22021-02-25 13:17:01 +00001835 "queue work done callback": {
fujunwei23f71622021-12-02 07:41:21 +00001836 "category": "function pointer",
Corentin Wallezc093db22021-02-25 13:17:01 +00001837 "args": [
1838 {"name": "status", "type": "queue work done status"},
1839 {"name": "userdata", "type": "void", "annotation": "*"}
1840 ]
1841 },
1842 "queue work done status": {
1843 "category": "enum",
Kai Ninomiya930e9182021-09-17 19:44:43 +00001844 "emscripten_no_enum_table": true,
Corentin Wallezc093db22021-02-25 13:17:01 +00001845 "values": [
1846 {"value": 0, "name": "success"},
1847 {"value": 1, "name": "error"},
1848 {"value": 2, "name": "unknown"},
1849 {"value": 3, "name": "device lost"}
1850 ]
1851 },
Jiawei Shao5e811ae2018-12-19 08:21:13 +00001852
Austin Eng8a488c12019-08-13 22:12:54 +00001853 "render bundle": {
1854 "category": "object"
1855 },
1856
1857 "render bundle encoder": {
1858 "category": "object",
1859 "methods": [
1860 {
1861 "name": "set pipeline",
1862 "args": [
1863 {"name": "pipeline", "type": "render pipeline"}
1864 ]
1865 },
1866 {
1867 "name": "set bind group",
1868 "args": [
1869 {"name": "group index", "type": "uint32_t"},
1870 {"name": "group", "type": "bind group"},
Corentin Wallez70c8c102019-10-09 16:08:42 +00001871 {"name": "dynamic offset count", "type": "uint32_t", "default": "0"},
Corentin Wallez75f554d2021-06-17 16:04:29 +00001872 {"name": "dynamic offsets", "type": "uint32_t", "annotation": "const*", "length": "dynamic offset count", "default": "nullptr"}
Austin Eng8a488c12019-08-13 22:12:54 +00001873 ]
1874 },
1875 {
1876 "name": "draw",
1877 "args": [
1878 {"name": "vertex count", "type": "uint32_t"},
Corentin Wallez67b1ad72020-03-31 16:21:35 +00001879 {"name": "instance count", "type": "uint32_t", "default": "1"},
1880 {"name": "first vertex", "type": "uint32_t", "default": "0"},
1881 {"name": "first instance", "type": "uint32_t", "default": "0"}
Austin Eng8a488c12019-08-13 22:12:54 +00001882 ]
1883 },
1884 {
1885 "name": "draw indexed",
1886 "args": [
1887 {"name": "index count", "type": "uint32_t"},
Corentin Wallez67b1ad72020-03-31 16:21:35 +00001888 {"name": "instance count", "type": "uint32_t", "default": "1"},
1889 {"name": "first index", "type": "uint32_t", "default": "0"},
1890 {"name": "base vertex", "type": "int32_t", "default": "0"},
1891 {"name": "first instance", "type": "uint32_t", "default": "0"}
Austin Eng8a488c12019-08-13 22:12:54 +00001892 ]
1893 },
1894 {
1895 "name": "draw indirect",
1896 "args": [
1897 {"name": "indirect buffer", "type": "buffer"},
1898 {"name": "indirect offset", "type": "uint64_t"}
1899 ]
1900 },
1901 {
1902 "name": "draw indexed indirect",
1903 "args": [
1904 {"name": "indirect buffer", "type": "buffer"},
1905 {"name": "indirect offset", "type": "uint64_t"}
1906 ]
1907 },
1908 {
1909 "name": "insert debug marker",
1910 "args": [
Kai Ninomiya51bbbef2020-07-12 16:01:38 +00001911 {"name": "marker label", "type": "char", "annotation": "const*", "length": "strlen"}
Austin Eng8a488c12019-08-13 22:12:54 +00001912 ]
1913 },
1914 {
1915 "name": "pop debug group",
1916 "args": []
1917 },
1918 {
1919 "name": "push debug group",
1920 "args": [
1921 {"name": "group label", "type": "char", "annotation": "const*", "length": "strlen"}
1922 ]
1923 },
1924 {
François Beaufort91b21422019-10-10 07:29:58 +00001925 "name": "set vertex buffer",
Austin Eng8a488c12019-08-13 22:12:54 +00001926 "args": [
François Beaufort91b21422019-10-10 07:29:58 +00001927 {"name": "slot", "type": "uint32_t"},
1928 {"name": "buffer", "type": "buffer"},
Corentin Wallezc244f532020-04-24 09:42:03 +00001929 {"name": "offset", "type": "uint64_t", "default": "0"},
Zhaoming Jiang2be4b842021-09-28 02:05:00 +00001930 {"name": "size", "type": "uint64_t", "default": "WGPU_WHOLE_SIZE"}
Austin Eng8a488c12019-08-13 22:12:54 +00001931 ]
1932 },
1933 {
1934 "name": "set index buffer",
1935 "args": [
1936 {"name": "buffer", "type": "buffer"},
Corentin Wallez5fad85b2020-11-25 08:54:14 +00001937 {"name": "format", "type": "index format"},
Corentin Wallezc244f532020-04-24 09:42:03 +00001938 {"name": "offset", "type": "uint64_t", "default": "0"},
Zhaoming Jiang2be4b842021-09-28 02:05:00 +00001939 {"name": "size", "type": "uint64_t", "default": "WGPU_WHOLE_SIZE"}
Austin Eng8a488c12019-08-13 22:12:54 +00001940 ]
1941 },
1942 {
1943 "name": "finish",
1944 "returns": "render bundle",
1945 "args": [
1946 {"name": "descriptor", "type": "render bundle descriptor", "annotation": "const*", "optional": true}
1947 ]
Brandon Jones828f6742021-11-23 00:09:25 +00001948 },
1949 {
1950 "name": "set label",
1951 "returns": "void",
Brandon Jones828f6742021-11-23 00:09:25 +00001952 "args": [
1953 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"}
1954 ]
Austin Eng8a488c12019-08-13 22:12:54 +00001955 }
1956 ]
1957 },
1958
1959 "render bundle descriptor": {
1960 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00001961 "extensible": "in",
François Beaufort277d2e12019-10-03 14:56:49 +00001962 "members": [
1963 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true}
1964 ]
Austin Eng8a488c12019-08-13 22:12:54 +00001965 },
1966
1967 "render bundle encoder descriptor": {
1968 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00001969 "extensible": "in",
Austin Eng8a488c12019-08-13 22:12:54 +00001970 "members": [
François Beaufort277d2e12019-10-03 14:56:49 +00001971 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
Austin Eng8a488c12019-08-13 22:12:54 +00001972 {"name": "color formats count", "type": "uint32_t"},
1973 {"name": "color formats", "type": "texture format", "annotation": "const*", "length": "color formats count"},
Corentin Wallezd55bd7a2019-09-05 09:12:32 +00001974 {"name": "depth stencil format", "type": "texture format", "default": "undefined"},
Yunchao He79d20992021-10-15 16:56:13 +00001975 {"name": "sample count", "type": "uint32_t", "default": "1"},
1976 {"name": "depth read only", "type": "bool", "default": "false"},
1977 {"name": "stencil read only", "type": "bool", "default": "false"}
Austin Eng8a488c12019-08-13 22:12:54 +00001978 ]
1979 },
1980
Brandon Jones5e6a0922021-04-17 01:51:53 +00001981 "render pass color attachment": {
Jiawei Shao5e811ae2018-12-19 08:21:13 +00001982 "category": "structure",
1983 "members": [
Shrek Shao6d205fc2022-03-05 01:34:02 +00001984 {"name": "view", "type": "texture view", "optional": true},
Jiawei Shao5e811ae2018-12-19 08:21:13 +00001985 {"name": "resolve target", "type": "texture view", "optional": true},
1986 {"name": "load op", "type": "load op"},
1987 {"name": "store op", "type": "store op"},
Shrek Shaob0987d62022-03-07 19:29:54 +00001988 {"name": "clear value", "type": "color"}
Jiawei Shao5e811ae2018-12-19 08:21:13 +00001989 ]
1990 },
1991
Brandon Jones5e6a0922021-04-17 01:51:53 +00001992 "render pass depth stencil attachment": {
Jiawei Shao5e811ae2018-12-19 08:21:13 +00001993 "category": "structure",
1994 "members": [
Corentin Wallez1ac45652021-09-14 10:42:22 +00001995 {"name": "view", "type": "texture view"},
Brandon Jonesa20ce6f2022-02-03 17:59:04 +00001996 {"name": "depth load op", "type": "load op", "default": "undefined"},
1997 {"name": "depth store op", "type": "store op", "default": "undefined"},
Takahiro9754bc42023-03-01 13:34:59 +00001998 {"name": "depth clear value", "type": "float", "default": "NAN"},
Brandon Jones7695afc2020-07-10 23:13:58 +00001999 {"name": "depth read only", "type": "bool", "default": "false"},
Brandon Jonesa20ce6f2022-02-03 17:59:04 +00002000 {"name": "stencil load op", "type": "load op", "default": "undefined"},
2001 {"name": "stencil store op", "type": "store op", "default": "undefined"},
Brandon Jones6e8c4732022-02-19 00:44:12 +00002002 {"name": "stencil clear value", "type": "uint32_t", "default": "0"},
Corentin Wallez1ac45652021-09-14 10:42:22 +00002003 {"name": "stencil read only", "type": "bool", "default": "false"}
Jiawei Shao5e811ae2018-12-19 08:21:13 +00002004 ]
2005 },
2006
Corentin Wallez8d6b5d22018-05-11 13:04:44 -04002007 "render pass descriptor": {
Jiawei Shaob2c50232019-02-27 09:21:56 +00002008 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00002009 "extensible": "in",
Jiawei Shaob2c50232019-02-27 09:21:56 +00002010 "members": [
François Beaufort277d2e12019-10-03 14:56:49 +00002011 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
Jiawei Shaob2c50232019-02-27 09:21:56 +00002012 {"name": "color attachment count", "type": "uint32_t"},
Brandon Jones5e6a0922021-04-17 01:51:53 +00002013 {"name": "color attachments", "type": "render pass color attachment", "annotation": "const*", "length": "color attachment count"},
2014 {"name": "depth stencil attachment", "type": "render pass depth stencil attachment", "annotation": "const*", "optional": true},
Corentin Wallez6cd1cd92021-11-17 08:13:24 +00002015 {"name": "occlusion query set", "type": "query set", "optional": true},
Li Hao131c4222022-03-05 01:22:52 +00002016 {"name": "timestamp write count", "type": "uint32_t", "default": 0},
2017 {"name": "timestamp writes", "type": "render pass timestamp write", "annotation": "const*", "length": "timestamp write count"}
Jiawei Shaob2c50232019-02-27 09:21:56 +00002018 ]
Austin Eng376f1c62017-05-30 20:03:44 -04002019 },
Takahiro831296d2022-06-30 04:19:42 +00002020 "render pass descriptor max draw count": {
2021 "category": "structure",
2022 "chained": "in",
Corentin Walleza45561b2022-07-14 12:58:25 +00002023 "chain roots": ["render pass descriptor"],
Takahiro831296d2022-06-30 04:19:42 +00002024 "members": [
2025 {"name": "max draw count", "type": "uint64_t", "default": 50000000}
2026 ]
2027 },
Corentin Wallez82fbccb2018-09-21 00:24:37 +00002028 "render pass encoder": {
2029 "category": "object",
2030 "methods": [
2031 {
Yan, Shaobo300eec02018-12-21 10:40:26 +00002032 "name": "set pipeline",
Corentin Wallez82fbccb2018-09-21 00:24:37 +00002033 "args": [
2034 {"name": "pipeline", "type": "render pipeline"}
2035 ]
2036 },
2037 {
Corentin Wallez82fbccb2018-09-21 00:24:37 +00002038 "name": "set bind group",
2039 "args": [
2040 {"name": "group index", "type": "uint32_t"},
Yan, Shaobo991ab982019-03-18 06:01:37 +00002041 {"name": "group", "type": "bind group"},
Corentin Wallez70c8c102019-10-09 16:08:42 +00002042 {"name": "dynamic offset count", "type": "uint32_t", "default": "0"},
Corentin Wallez75f554d2021-06-17 16:04:29 +00002043 {"name": "dynamic offsets", "type": "uint32_t", "annotation": "const*", "length": "dynamic offset count", "default": "nullptr"}
Corentin Wallez82fbccb2018-09-21 00:24:37 +00002044 ]
2045 },
2046 {
Jiawei Shaoc789b842018-12-10 05:20:19 +00002047 "name": "draw",
Corentin Wallez82fbccb2018-09-21 00:24:37 +00002048 "args": [
2049 {"name": "vertex count", "type": "uint32_t"},
Corentin Wallez67b1ad72020-03-31 16:21:35 +00002050 {"name": "instance count", "type": "uint32_t", "default": "1"},
2051 {"name": "first vertex", "type": "uint32_t", "default": "0"},
2052 {"name": "first instance", "type": "uint32_t", "default": "0"}
Corentin Wallez82fbccb2018-09-21 00:24:37 +00002053 ]
2054 },
2055 {
Jiawei Shaoc789b842018-12-10 05:20:19 +00002056 "name": "draw indexed",
Corentin Wallez82fbccb2018-09-21 00:24:37 +00002057 "args": [
2058 {"name": "index count", "type": "uint32_t"},
Corentin Wallez67b1ad72020-03-31 16:21:35 +00002059 {"name": "instance count", "type": "uint32_t", "default": "1"},
2060 {"name": "first index", "type": "uint32_t", "default": "0"},
2061 {"name": "base vertex", "type": "int32_t", "default": "0"},
2062 {"name": "first instance", "type": "uint32_t", "default": "0"}
Corentin Wallez82fbccb2018-09-21 00:24:37 +00002063 ]
2064 },
2065 {
Idan Raiter05f7ad52019-06-10 20:56:27 +00002066 "name": "draw indirect",
2067 "args": [
2068 {"name": "indirect buffer", "type": "buffer"},
2069 {"name": "indirect offset", "type": "uint64_t"}
2070 ]
2071 },
2072 {
2073 "name": "draw indexed indirect",
2074 "args": [
2075 {"name": "indirect buffer", "type": "buffer"},
2076 {"name": "indirect offset", "type": "uint64_t"}
2077 ]
2078 },
2079 {
Austin Eng8a488c12019-08-13 22:12:54 +00002080 "name": "execute bundles",
2081 "args": [
Corentin Wallez873df0a2022-09-30 20:34:08 +00002082 {"name": "bundle count", "type": "uint32_t"},
2083 {"name": "bundles", "type": "render bundle", "annotation": "const*", "length": "bundle count"}
Austin Eng8a488c12019-08-13 22:12:54 +00002084 ]
2085 },
2086 {
Brandon Jones11d32c82019-02-20 20:21:00 +00002087 "name": "insert debug marker",
2088 "args": [
Kai Ninomiya51bbbef2020-07-12 16:01:38 +00002089 {"name": "marker label", "type": "char", "annotation": "const*", "length": "strlen"}
Brandon Jones11d32c82019-02-20 20:21:00 +00002090 ]
2091 },
2092 {
2093 "name": "pop debug group",
2094 "args": []
2095 },
2096 {
2097 "name": "push debug group",
2098 "args": [
2099 {"name": "group label", "type": "char", "annotation": "const*", "length": "strlen"}
2100 ]
2101 },
2102 {
Corentin Wallez82fbccb2018-09-21 00:24:37 +00002103 "name": "set stencil reference",
2104 "args": [
2105 {"name": "reference", "type": "uint32_t"}
2106 ]
2107 },
2108 {
Brandon Jones413dcf82021-04-15 19:33:58 +00002109 "name": "set blend constant",
2110 "args": [
2111 {"name": "color", "type": "color", "annotation": "const*"}
2112 ]
2113 },
2114 {
Yunchao He050ab492019-07-04 15:30:59 +00002115 "name": "set viewport",
2116 "args": [
2117 {"name": "x", "type": "float"},
2118 {"name": "y", "type": "float"},
2119 {"name": "width", "type": "float"},
2120 {"name": "height", "type": "float"},
2121 {"name": "min depth", "type": "float"},
2122 {"name": "max depth", "type": "float"}
2123 ]
2124 },
2125 {
Corentin Wallez82fbccb2018-09-21 00:24:37 +00002126 "name": "set scissor rect",
2127 "args": [
2128 {"name": "x", "type": "uint32_t"},
2129 {"name": "y", "type": "uint32_t"},
2130 {"name": "width", "type": "uint32_t"},
2131 {"name": "height", "type": "uint32_t"}
2132 ]
2133 },
2134 {
François Beaufort91b21422019-10-10 07:29:58 +00002135 "name": "set vertex buffer",
Corentin Wallez82fbccb2018-09-21 00:24:37 +00002136 "args": [
François Beaufort91b21422019-10-10 07:29:58 +00002137 {"name": "slot", "type": "uint32_t"},
2138 {"name": "buffer", "type": "buffer"},
Corentin Wallezc244f532020-04-24 09:42:03 +00002139 {"name": "offset", "type": "uint64_t", "default": "0"},
Zhaoming Jiang2be4b842021-09-28 02:05:00 +00002140 {"name": "size", "type": "uint64_t", "default": "WGPU_WHOLE_SIZE"}
Corentin Wallez82fbccb2018-09-21 00:24:37 +00002141 ]
2142 },
2143 {
2144 "name": "set index buffer",
2145 "args": [
2146 {"name": "buffer", "type": "buffer"},
Corentin Wallez5fad85b2020-11-25 08:54:14 +00002147 {"name": "format", "type": "index format"},
Corentin Wallezc244f532020-04-24 09:42:03 +00002148 {"name": "offset", "type": "uint64_t", "default": "0"},
Zhaoming Jiang2be4b842021-09-28 02:05:00 +00002149 {"name": "size", "type": "uint64_t", "default": "WGPU_WHOLE_SIZE"}
Corentin Wallez82fbccb2018-09-21 00:24:37 +00002150 ]
2151 },
2152 {
Hao Li01e44502020-11-18 09:47:52 +00002153 "name": "begin occlusion query",
2154 "args": [
2155 {"name": "query index", "type": "uint32_t"}
2156 ]
2157 },
2158 {
Kai Ninomiya4e37acc2021-09-17 21:13:33 +00002159 "name": "begin pipeline statistics query",
Shrek Shaoee50bc02022-02-08 20:21:40 +00002160 "tags": ["upstream", "emscripten"],
Kai Ninomiya4e37acc2021-09-17 21:13:33 +00002161 "args": [
2162 {"name": "query set", "type": "query set"},
2163 {"name": "query index", "type": "uint32_t"}
2164 ]
2165 },
2166 {
Hao Li01e44502020-11-18 09:47:52 +00002167 "name": "end occlusion query"
2168 },
2169 {
Hao Li5191adc2020-07-01 10:48:16 +00002170 "name": "write timestamp",
Corentin Wallez6cd1cd92021-11-17 08:13:24 +00002171 "tags": ["emscripten", "dawn"],
Hao Li5191adc2020-07-01 10:48:16 +00002172 "args": [
2173 {"name": "query set", "type": "query set"},
2174 {"name": "query index", "type": "uint32_t"}
2175 ]
2176 },
2177 {
Brandon Jones0fee4c12022-02-07 19:48:39 +00002178 "name": "end"
2179 },
2180 {
2181 "name": "end pass",
2182 "tags": ["deprecated"]
Kai Ninomiya4e37acc2021-09-17 21:13:33 +00002183 },
2184 {
2185 "name": "end pipeline statistics query",
Shrek Shaoee50bc02022-02-08 20:21:40 +00002186 "tags": ["upstream", "emscripten"]
Brandon Jones828f6742021-11-23 00:09:25 +00002187 },
2188 {
2189 "name": "set label",
2190 "returns": "void",
Brandon Jones828f6742021-11-23 00:09:25 +00002191 "args": [
2192 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"}
2193 ]
Corentin Wallez82fbccb2018-09-21 00:24:37 +00002194 }
2195 ]
2196 },
Corentin Wallez6cd1cd92021-11-17 08:13:24 +00002197 "render pass timestamp location": {
2198 "category": "enum",
Corentin Wallez6cd1cd92021-11-17 08:13:24 +00002199 "values": [
2200 {"value": 0, "name": "beginning"},
2201 {"value": 1, "name": "end"}
2202 ]
2203 },
2204 "render pass timestamp write": {
2205 "category": "structure",
Corentin Wallez6cd1cd92021-11-17 08:13:24 +00002206 "members": [
2207 {"name": "query set", "type": "query set"},
2208 {"name": "query index", "type": "uint32_t"},
2209 {"name": "location", "type": "render pass timestamp location"}
2210 ]
2211 },
Corentin Wallez29ced282017-07-14 10:58:07 -04002212 "render pipeline": {
Austin Engf6eb8902019-11-22 17:02:22 +00002213 "category": "object",
2214 "methods": [
2215 {
2216 "name": "get bind group layout",
2217 "returns": "bind group layout",
2218 "args": [
Corentin Wallez373a3ff2020-04-01 18:22:36 +00002219 {"name": "group index", "type": "uint32_t"}
Austin Engf6eb8902019-11-22 17:02:22 +00002220 ]
Brandon Jonesc1bcbbf2021-09-02 18:39:53 +00002221 },
2222 {
2223 "name": "set label",
2224 "returns": "void",
2225 "args": [
2226 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"}
2227 ]
Austin Engf6eb8902019-11-22 17:02:22 +00002228 }
Austin Eng2092a662021-09-10 21:07:39 +00002229
2230 ]
2231 },
2232
2233 "request device callback": {
fujunwei23f71622021-12-02 07:41:21 +00002234 "category": "function pointer",
Austin Eng2092a662021-09-10 21:07:39 +00002235 "args": [
2236 {"name": "status", "type": "request device status"},
2237 {"name": "device", "type": "device"},
Austin Eng5397f9f2021-12-14 23:22:46 +00002238 {"name": "message", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
Austin Eng2092a662021-09-10 21:07:39 +00002239 {"name": "userdata", "type": "void", "annotation": "*"}
2240 ]
2241 },
2242
2243 "request device status": {
2244 "category": "enum",
Kai Ninomiya930e9182021-09-17 19:44:43 +00002245 "emscripten_no_enum_table": true,
Austin Eng2092a662021-09-10 21:07:39 +00002246 "values": [
2247 {"value": 0, "name": "success"},
2248 {"value": 1, "name": "error"},
2249 {"value": 2, "name": "unknown"}
Austin Engf6eb8902019-11-22 17:02:22 +00002250 ]
Corentin Wallez29ced282017-07-14 10:58:07 -04002251 },
Brandon Jones0702b702021-03-11 21:19:00 +00002252
2253 "vertex state": {
2254 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00002255 "extensible": "in",
Brandon Jones0702b702021-03-11 21:19:00 +00002256 "members": [
2257 {"name": "module", "type": "shader module"},
2258 {"name": "entry point", "type": "char", "annotation": "const*", "length": "strlen"},
shrekshaoe99ad762021-09-28 20:15:52 +00002259 {"name": "constant count", "type": "uint32_t", "default": 0},
2260 {"name": "constants", "type": "constant entry", "annotation": "const*", "length": "constant count"},
Austin Eng41b4c9d2021-04-16 07:19:35 +00002261 {"name": "buffer count", "type": "uint32_t", "default": 0},
Brandon Jones0702b702021-03-11 21:19:00 +00002262 {"name": "buffers", "type": "vertex buffer layout", "annotation": "const*", "length": "buffer count"}
2263 ]
2264 },
2265
2266 "primitive state": {
2267 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00002268 "extensible": "in",
Brandon Jones0702b702021-03-11 21:19:00 +00002269 "members": [
2270 {"name": "topology", "type": "primitive topology", "default": "triangle list"},
2271 {"name": "strip index format", "type": "index format", "default": "undefined"},
2272 {"name": "front face", "type": "front face", "default": "CCW"},
2273 {"name": "cull mode", "type": "cull mode", "default": "none"}
2274 ]
2275 },
2276
Corentin Wallez53db01b2021-11-18 23:05:40 +00002277 "primitive depth clip control": {
2278 "category": "structure",
2279 "chained": "in",
Corentin Walleza45561b2022-07-14 12:58:25 +00002280 "chain roots": ["primitive state"],
Corentin Wallez53db01b2021-11-18 23:05:40 +00002281 "members": [
2282 {"name": "unclipped depth", "type": "bool", "default": "false"}
2283 ]
2284 },
2285
Brandon Jones0702b702021-03-11 21:19:00 +00002286 "depth stencil state": {
2287 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00002288 "extensible": "in",
Brandon Jones0702b702021-03-11 21:19:00 +00002289 "members": [
2290 {"name": "format", "type": "texture format"},
Takahiro9754bc42023-03-01 13:34:59 +00002291 {"name": "depth write enabled", "type": "bool"},
2292 {"name": "depth compare", "type": "compare function"},
Brandon Jones0702b702021-03-11 21:19:00 +00002293 {"name": "stencil front", "type": "stencil face state"},
2294 {"name": "stencil back", "type": "stencil face state"},
2295 {"name": "stencil read mask", "type": "uint32_t", "default": "0xFFFFFFFF"},
2296 {"name": "stencil write mask", "type": "uint32_t", "default": "0xFFFFFFFF"},
2297 {"name": "depth bias", "type": "int32_t", "default": "0"},
2298 {"name": "depth bias slope scale", "type": "float", "default": "0.0f"},
2299 {"name": "depth bias clamp", "type": "float", "default": "0.0f"}
2300 ]
2301 },
2302
2303 "multisample state": {
2304 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00002305 "extensible": "in",
Brandon Jones0702b702021-03-11 21:19:00 +00002306 "members": [
2307 {"name": "count", "type": "uint32_t", "default": "1"},
2308 {"name": "mask", "type": "uint32_t", "default": "0xFFFFFFFF"},
2309 {"name": "alpha to coverage enabled", "type": "bool", "default": "false"}
2310 ]
2311 },
2312
2313 "fragment state": {
2314 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00002315 "extensible": "in",
Brandon Jones0702b702021-03-11 21:19:00 +00002316 "members": [
2317 {"name": "module", "type": "shader module"},
2318 {"name": "entry point", "type": "char", "annotation": "const*", "length": "strlen"},
shrekshaoe99ad762021-09-28 20:15:52 +00002319 {"name": "constant count", "type": "uint32_t", "default": 0},
2320 {"name": "constants", "type": "constant entry", "annotation": "const*", "length": "constant count"},
Brandon Jones0702b702021-03-11 21:19:00 +00002321 {"name": "target count", "type": "uint32_t"},
2322 {"name": "targets", "type": "color target state", "annotation": "const*", "length": "target count"}
2323 ]
2324 },
2325 "color target state": {
2326 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00002327 "extensible": "in",
Brandon Jones0702b702021-03-11 21:19:00 +00002328 "members": [
2329 {"name": "format", "type": "texture format"},
2330 {"name": "blend", "type": "blend state", "annotation": "const*", "optional": true},
2331 {"name": "write mask", "type": "color write mask", "default": "all"}
2332 ]
2333 },
2334 "blend state": {
2335 "category": "structure",
2336 "extensible": false,
2337 "members": [
2338 {"name": "color", "type": "blend component"},
2339 {"name": "alpha", "type": "blend component"}
2340 ]
2341 },
2342
Yan, Shaoboa4924272018-12-10 19:47:22 +00002343 "render pipeline descriptor": {
2344 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00002345 "extensible": "in",
Yan, Shaoboa4924272018-12-10 19:47:22 +00002346 "members": [
François Beaufort277d2e12019-10-03 14:56:49 +00002347 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
Austin Engf6eb8902019-11-22 17:02:22 +00002348 {"name": "layout", "type": "pipeline layout", "optional": true},
Brandon Jones0702b702021-03-11 21:19:00 +00002349 {"name": "vertex", "type": "vertex state"},
2350 {"name": "primitive", "type": "primitive state"},
2351 {"name": "depth stencil", "type": "depth stencil state", "annotation": "const*", "optional": true},
2352 {"name": "multisample", "type": "multisample state"},
2353 {"name": "fragment", "type": "fragment state", "annotation": "const*", "optional": true}
2354 ]
2355 },
2356
Austin Eng376f1c62017-05-30 20:03:44 -04002357 "sampler": {
Brandon Jones88aeeae2021-11-19 18:26:08 +00002358 "category": "object",
2359 "methods": [
2360 {
2361 "name": "set label",
2362 "returns": "void",
Brandon Jones88aeeae2021-11-19 18:26:08 +00002363 "args": [
2364 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"}
2365 ]
2366 }
2367 ]
Austin Eng376f1c62017-05-30 20:03:44 -04002368 },
Corentin Wallez1ae19e82018-05-17 17:09:07 -04002369 "sampler descriptor": {
2370 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00002371 "extensible": "in",
Corentin Wallez1ae19e82018-05-17 17:09:07 -04002372 "members": [
François Beaufort277d2e12019-10-03 14:56:49 +00002373 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
Corentin Wallez8f938712019-07-08 19:20:22 +00002374 {"name": "address mode u", "type": "address mode", "default": "clamp to edge"},
2375 {"name": "address mode v", "type": "address mode", "default": "clamp to edge"},
2376 {"name": "address mode w", "type": "address mode", "default": "clamp to edge"},
2377 {"name": "mag filter", "type": "filter mode", "default": "nearest"},
2378 {"name": "min filter", "type": "filter mode", "default": "nearest"},
Corentin Wallezeee34492022-03-16 18:44:16 +00002379 {"name": "mipmap filter", "type": "filter mode", "default": "nearest", "tags": ["dawn", "emscripten"]},
2380 {"name": "mipmap filter", "type": "mipmap filter mode", "default": "nearest", "tags": ["upstream"]},
Corentin Wallez8f938712019-07-08 19:20:22 +00002381 {"name": "lod min clamp", "type": "float", "default": "0.0f"},
2382 {"name": "lod max clamp", "type": "float", "default": "1000.0f"},
shrekshaof8c5e4a2020-12-24 03:11:17 +00002383 {"name": "compare", "type": "compare function", "default": "undefined"},
2384 {"name": "max anisotropy", "type": "uint16_t", "default": "1"}
Austin Eng376f1c62017-05-30 20:03:44 -04002385 ]
2386 },
2387 "shader module": {
Brandon Jones6f2bbe92021-04-05 23:34:17 +00002388 "category": "object",
2389 "methods": [
2390 {
2391 "name": "get compilation info",
2392 "args": [
Corentin Walleze00c6bd2021-12-13 17:37:17 +00002393 {"name": "callback", "type": "compilation info callback"},
Brandon Jones6f2bbe92021-04-05 23:34:17 +00002394 {"name": "userdata", "type": "void", "annotation": "*"}
2395 ]
Brandon Jonesc1bcbbf2021-09-02 18:39:53 +00002396 },
2397 {
2398 "name": "set label",
2399 "returns": "void",
2400 "args": [
2401 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"}
2402 ]
Brandon Jones6f2bbe92021-04-05 23:34:17 +00002403 }
2404 ]
Austin Eng376f1c62017-05-30 20:03:44 -04002405 },
Corentin Wallezdf671032018-08-20 17:01:20 +02002406 "shader module descriptor": {
2407 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00002408 "extensible": "in",
Corentin Wallezdf671032018-08-20 17:01:20 +02002409 "members": [
Corentin Wallezaa0731d2022-03-21 17:11:53 +00002410 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
2411 {"name": "hint count", "type": "uint32_t", "default": 0, "tags": ["upstream"]},
2412 {"name": "hints", "type": "shader module compilation hint", "annotation": "const*", "length": "hint count", "tags": ["upstream"]}
2413 ]
2414 },
2415 "shader module compilation hint": {
2416 "category": "structure",
2417 "extensible": "in",
2418 "tags": ["upstream"],
2419 "members": [
2420 {"name": "entry point", "type": "char", "annotation": "const*", "length": "strlen"},
2421 {"name": "layout", "type": "pipeline layout"}
Corentin Wallezfee27832020-04-21 08:04:48 +00002422 ]
2423 },
2424 "shader module SPIRV descriptor": {
2425 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00002426 "chained": "in",
Corentin Walleza45561b2022-07-14 12:58:25 +00002427 "chain roots": ["shader module descriptor"],
Corentin Wallezfee27832020-04-21 08:04:48 +00002428 "members": [
Corentin Wallezdf671032018-08-20 17:01:20 +02002429 {"name": "code size", "type": "uint32_t"},
2430 {"name": "code", "type": "uint32_t", "annotation": "const*", "length": "code size"}
Austin Eng376f1c62017-05-30 20:03:44 -04002431 ]
2432 },
Corentin Wallezfee27832020-04-21 08:04:48 +00002433 "shader module WGSL descriptor": {
2434 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00002435 "chained": "in",
Corentin Walleza45561b2022-07-14 12:58:25 +00002436 "chain roots": ["shader module descriptor"],
Corentin Wallezfee27832020-04-21 08:04:48 +00002437 "members": [
Corentin Wallez53db01b2021-11-18 23:05:40 +00002438 {"name": "source", "type": "char", "annotation": "const*", "length": "strlen", "tags": ["dawn", "emscripten"]},
2439 {"name": "code", "type": "char", "annotation": "const*", "length": "strlen", "tags": ["upstream"]}
Corentin Wallezfee27832020-04-21 08:04:48 +00002440 ]
2441 },
James Price132d8c72023-02-03 19:38:46 +00002442 "dawn shader module SPIRV options descriptor": {
2443 "category": "structure",
2444 "chained": "in",
2445 "chain roots": ["shader module descriptor"],
2446 "tags": ["dawn"],
2447 "members": [
2448 {"name": "allow non uniform derivatives", "type": "bool", "default": "false"}
2449 ]
2450 },
Corentin Wallezb9b088f2019-08-27 08:42:29 +00002451 "shader stage": {
Austin Eng376f1c62017-05-30 20:03:44 -04002452 "category": "bitmask",
2453 "values": [
Corentin Wallezbe985c12017-07-20 11:00:39 -04002454 {"value": 0, "name": "none"},
Austin Eng376f1c62017-05-30 20:03:44 -04002455 {"value": 1, "name": "vertex"},
2456 {"value": 2, "name": "fragment"},
2457 {"value": 4, "name": "compute"}
2458 ]
2459 },
2460 "stencil operation": {
2461 "category": "enum",
2462 "values": [
2463 {"value": 0, "name": "keep"},
2464 {"value": 1, "name": "zero"},
2465 {"value": 2, "name": "replace"},
2466 {"value": 3, "name": "invert"},
2467 {"value": 4, "name": "increment clamp"},
2468 {"value": 5, "name": "decrement clamp"},
2469 {"value": 6, "name": "increment wrap"},
2470 {"value": 7, "name": "decrement wrap"}
Austin Eng10634392017-06-01 11:30:03 -04002471 ]
Austin Eng376f1c62017-05-30 20:03:44 -04002472 },
Brandon Jones0702b702021-03-11 21:19:00 +00002473 "stencil face state": {
Yunchao He48485e32018-12-15 02:32:34 +00002474 "category": "structure",
2475 "extensible": false,
2476 "members": [
Corentin Wallez8f938712019-07-08 19:20:22 +00002477 {"name": "compare", "type": "compare function", "default": "always"},
2478 {"name": "fail op", "type": "stencil operation", "default": "keep"},
2479 {"name": "depth fail op", "type": "stencil operation", "default": "keep"},
2480 {"name": "pass op", "type": "stencil operation", "default": "keep"}
Yunchao He48485e32018-12-15 02:32:34 +00002481 ]
2482 },
Corentin Wallez3a1746e2020-01-15 13:14:12 +00002483 "surface": {
Kai Ninomiya4e37acc2021-09-17 21:13:33 +00002484 "category": "object",
2485 "methods": [
2486 {
2487 "name": "get preferred format",
2488 "returns": "texture format",
Shrek Shaoee50bc02022-02-08 20:21:40 +00002489 "tags": ["upstream", "emscripten"],
Kai Ninomiya4e37acc2021-09-17 21:13:33 +00002490 "args": [
2491 {"name": "adapter", "type": "adapter"}
2492 ]
2493 }
2494 ]
Corentin Wallez3a1746e2020-01-15 13:14:12 +00002495 },
2496 "surface descriptor": {
2497 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00002498 "extensible": "in",
Corentin Wallez3a1746e2020-01-15 13:14:12 +00002499 "members": [
2500 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true}
2501 ]
2502 },
Shrek Shao1554a7d2022-03-08 20:56:10 +00002503 "surface descriptor from android native window": {
2504 "category": "structure",
2505 "chained": "in",
Corentin Walleza45561b2022-07-14 12:58:25 +00002506 "chain roots": ["surface descriptor"],
Shrek Shao1554a7d2022-03-08 20:56:10 +00002507 "tags": ["native"],
2508 "members": [
2509 {"name": "window", "type": "void", "annotation": "*"}
2510 ]
2511 },
Corentin Wallez9585c462020-07-06 18:50:00 +00002512 "surface descriptor from canvas HTML selector": {
Corentin Wallezc2e16962020-01-22 21:37:26 +00002513 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00002514 "chained": "in",
Corentin Walleza45561b2022-07-14 12:58:25 +00002515 "chain roots": ["surface descriptor"],
Corentin Wallezc2e16962020-01-22 21:37:26 +00002516 "members": [
Corentin Wallez9585c462020-07-06 18:50:00 +00002517 {"name": "selector", "type": "char", "annotation": "const*", "length": "strlen"}
Corentin Wallezc2e16962020-01-22 21:37:26 +00002518 ]
2519 },
Corentin Wallez3a1746e2020-01-15 13:14:12 +00002520 "surface descriptor from metal layer": {
2521 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00002522 "chained": "in",
Corentin Walleza45561b2022-07-14 12:58:25 +00002523 "chain roots": ["surface descriptor"],
Kai Ninomiya930e9182021-09-17 19:44:43 +00002524 "tags": ["native"],
Corentin Wallez3a1746e2020-01-15 13:14:12 +00002525 "members": [
2526 {"name": "layer", "type": "void", "annotation": "*"}
2527 ]
2528 },
2529 "surface descriptor from windows HWND": {
2530 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00002531 "chained": "in",
Corentin Walleza45561b2022-07-14 12:58:25 +00002532 "chain roots": ["surface descriptor"],
Kai Ninomiya930e9182021-09-17 19:44:43 +00002533 "tags": ["native"],
Corentin Wallez3a1746e2020-01-15 13:14:12 +00002534 "members": [
2535 {"name": "hinstance", "type": "void", "annotation": "*"},
2536 {"name": "hwnd", "type": "void", "annotation": "*"}
2537 ]
2538 },
Corentin Wallezaa0731d2022-03-21 17:11:53 +00002539 "surface descriptor from xcb window": {
2540 "category": "structure",
2541 "chained": "in",
Corentin Walleza45561b2022-07-14 12:58:25 +00002542 "chain roots": ["surface descriptor"],
Corentin Wallezaa0731d2022-03-21 17:11:53 +00002543 "tags": ["upstream"],
2544 "members": [
2545 {"name": "connection", "type": "void", "annotation": "*"},
2546 {"name": "window", "type": "uint32_t"}
2547 ]
2548 },
Shrek Shao5b9b9862022-03-09 19:04:21 +00002549 "surface descriptor from xlib window": {
Corentin Wallez3a1746e2020-01-15 13:14:12 +00002550 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00002551 "chained": "in",
Corentin Walleza45561b2022-07-14 12:58:25 +00002552 "chain roots": ["surface descriptor"],
Kai Ninomiya930e9182021-09-17 19:44:43 +00002553 "tags": ["native"],
Corentin Wallez3a1746e2020-01-15 13:14:12 +00002554 "members": [
2555 {"name": "display", "type": "void", "annotation": "*"},
2556 {"name": "window", "type": "uint32_t"}
2557 ]
2558 },
Shrek Shao1554a7d2022-03-08 20:56:10 +00002559 "surface descriptor from wayland surface": {
2560 "category": "structure",
2561 "chained": "in",
Corentin Walleza45561b2022-07-14 12:58:25 +00002562 "chain roots": ["surface descriptor"],
Shrek Shao1554a7d2022-03-08 20:56:10 +00002563 "tags": ["native"],
2564 "members": [
2565 {"name": "display", "type": "void", "annotation": "*"},
2566 {"name": "surface", "type": "void", "annotation": "*"}
2567 ]
2568 },
陈俊嘉74326fe2021-04-27 16:43:27 +00002569 "surface descriptor from windows core window": {
2570 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00002571 "chained": "in",
Corentin Walleza45561b2022-07-14 12:58:25 +00002572 "chain roots": ["surface descriptor"],
Kai Ninomiya930e9182021-09-17 19:44:43 +00002573 "tags": ["dawn"],
陈俊嘉74326fe2021-04-27 16:43:27 +00002574 "members": [
2575 {"name": "core window", "type": "void", "annotation": "*"}
2576 ]
2577 },
陈俊嘉11379a32021-06-09 08:44:07 +00002578 "surface descriptor from windows swap chain panel": {
2579 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00002580 "chained": "in",
Corentin Walleza45561b2022-07-14 12:58:25 +00002581 "chain roots": ["surface descriptor"],
Kai Ninomiya930e9182021-09-17 19:44:43 +00002582 "tags": ["dawn"],
陈俊嘉11379a32021-06-09 08:44:07 +00002583 "members": [
2584 {"name": "swap chain panel", "type": "void", "annotation": "*"}
2585 ]
2586 },
Kai Ninomiya35bf4242017-07-19 15:41:17 -07002587 "swap chain": {
2588 "category": "object",
2589 "methods": [
2590 {
2591 "name": "configure",
Kai Ninomiya930e9182021-09-17 19:44:43 +00002592 "tags": ["dawn"],
Kai Ninomiya35bf4242017-07-19 15:41:17 -07002593 "args": [
2594 {"name": "format", "type": "texture format"},
Corentin Wallez9e9e29f2019-08-27 08:21:39 +00002595 {"name": "allowed usage", "type": "texture usage"},
Kai Ninomiya35bf4242017-07-19 15:41:17 -07002596 {"name": "width", "type": "uint32_t"},
2597 {"name": "height", "type": "uint32_t"}
2598 ]
2599 },
Corentin Wallez604072b2019-11-12 18:30:11 +00002600 {"name": "get current texture view", "returns": "texture view"},
2601 {"name": "present"}
Kai Ninomiya35bf4242017-07-19 15:41:17 -07002602 ]
2603 },
Corentin Wallez7be2a712019-02-15 11:15:58 +00002604 "swap chain descriptor": {
2605 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00002606 "extensible": "in",
Corentin Wallez7be2a712019-02-15 11:15:58 +00002607 "members": [
François Beaufort277d2e12019-10-03 14:56:49 +00002608 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
Corentin Wallezd87e6762020-01-23 17:20:38 +00002609 {"name": "usage", "type": "texture usage"},
2610 {"name": "format", "type": "texture format"},
2611 {"name": "width", "type": "uint32_t"},
2612 {"name": "height", "type": "uint32_t"},
2613 {"name": "present mode", "type": "present mode"},
Kai Ninomiya930e9182021-09-17 19:44:43 +00002614 {"name": "implementation", "type": "uint64_t", "default": 0, "tags": ["deprecated"]}
Kai Ninomiya35bf4242017-07-19 15:41:17 -07002615 ]
2616 },
Corentin Wallez2b24c3d2020-01-15 09:54:42 +00002617 "s type": {
2618 "category": "enum",
Kai Ninomiya930e9182021-09-17 19:44:43 +00002619 "emscripten_no_enum_table": true,
Corentin Wallez2b24c3d2020-01-15 09:54:42 +00002620 "values": [
Austin Eng76a8d0b2020-04-03 17:37:48 +00002621 {"value": 0, "name": "invalid", "valid": false},
Kai Ninomiya930e9182021-09-17 19:44:43 +00002622 {"value": 1, "name": "surface descriptor from metal layer", "tags": ["native"]},
2623 {"value": 2, "name": "surface descriptor from windows HWND", "tags": ["native"]},
Shrek Shao5b9b9862022-03-09 19:04:21 +00002624 {"value": 3, "name": "surface descriptor from xlib window", "tags": ["native"]},
Corentin Wallez9585c462020-07-06 18:50:00 +00002625 {"value": 4, "name": "surface descriptor from canvas HTML selector"},
Corentin Wallezfee27832020-04-21 08:04:48 +00002626 {"value": 5, "name": "shader module SPIRV descriptor"},
2627 {"value": 6, "name": "shader module WGSL descriptor"},
Austin Eng51d13a42022-06-13 19:18:55 +00002628 {"value": 7, "name": "primitive depth clip control"},
Shrek Shao1554a7d2022-03-08 20:56:10 +00002629 {"value": 8, "name": "surface descriptor from wayland surface", "tags": ["native"]},
2630 {"value": 9, "name": "surface descriptor from android native window", "tags": ["native"]},
Corentin Wallezaa0731d2022-03-21 17:11:53 +00002631 {"value": 10, "name": "surface descriptor from xcb window", "tags": ["upstream"]},
2632 {"value": 11, "name": "surface descriptor from windows core window", "tags": ["dawn"]},
2633 {"value": 12, "name": "external texture binding entry", "tags": ["dawn"]},
2634 {"value": 13, "name": "external texture binding layout", "tags": ["dawn"]},
2635 {"value": 14, "name": "surface descriptor from windows swap chain panel", "tags": ["dawn"]},
Takahiro831296d2022-06-30 04:19:42 +00002636 {"value": 15, "name": "render pass descriptor max draw count"},
Corentin Wallez53db01b2021-11-18 23:05:40 +00002637 {"value": 1000, "name": "dawn texture internal usage descriptor", "tags": ["dawn"]},
Zhaoming Jianga12ff9a2023-01-30 09:16:51 +00002638 {"value": 1002, "name": "dawn toggles device descriptor", "tags": ["dawn", "native", "deprecated"]},
Austin Eng2fbc1702022-02-02 21:00:52 +00002639 {"value": 1003, "name": "dawn encoder internal usage descriptor", "tags": ["dawn"]},
Loko Kung44f039d2022-03-01 22:59:40 +00002640 {"value": 1004, "name": "dawn instance descriptor", "tags": ["dawn", "native"]},
Jiawei Shao5a0f8d32022-09-23 00:29:46 +00002641 {"value": 1005, "name": "dawn cache device descriptor", "tags": ["dawn", "native"]},
Jiawei Shao806c5832022-11-23 02:06:11 +00002642 {"value": 1006, "name": "dawn adapter properties power preference", "tags": ["dawn", "native"]},
Zhaoming Jianga12ff9a2023-01-30 09:16:51 +00002643 {"value": 1007, "name": "dawn buffer descriptor error info from wire client", "tags": ["dawn"]},
James Price132d8c72023-02-03 19:38:46 +00002644 {"value": 1008, "name": "dawn toggles descriptor", "tags": ["dawn", "native"]},
2645 {"value": 1009, "name": "dawn shader module SPIRV options descriptor", "tags": ["dawn"]}
Corentin Wallez2b24c3d2020-01-15 09:54:42 +00002646 ]
2647 },
Austin Eng376f1c62017-05-30 20:03:44 -04002648 "texture": {
2649 "category": "object",
2650 "methods": [
2651 {
Austin Engb4b3ea02019-04-09 16:57:00 +00002652 "name": "create view",
Jiawei Shao6329e5a2018-10-12 08:32:58 +00002653 "returns": "texture view",
2654 "args": [
Kai Ninomiya93196db2019-08-26 22:51:19 +00002655 {"name": "descriptor", "type": "texture view descriptor", "annotation": "const*", "optional": true}
Jiawei Shao6329e5a2018-10-12 08:32:58 +00002656 ]
Natasha Leecae68ff2019-03-27 22:04:10 +00002657 },
2658 {
Brandon Jonesc95e5742021-08-19 20:47:28 +00002659 "name": "set label",
2660 "returns": "void",
2661 "args": [
2662 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"}
2663 ]
2664 },
2665 {
Corentin Wallez736e97c2022-06-08 18:14:02 +00002666 "name": "get width",
2667 "returns": "uint32_t"
2668 },
2669 {
2670 "name": "get height",
2671 "returns": "uint32_t"
2672 },
2673 {
2674 "name": "get depth or array layers",
2675 "returns": "uint32_t"
2676 },
2677 {
2678 "name": "get mip level count",
2679 "returns": "uint32_t"
2680 },
2681 {
2682 "name": "get sample count",
2683 "returns": "uint32_t"
2684 },
2685 {
2686 "name": "get dimension",
2687 "returns": "texture dimension"
2688 },
2689 {
2690 "name": "get format",
2691 "returns": "texture format"
2692 },
2693 {
2694 "name": "get usage",
2695 "returns": "texture usage"
2696 },
2697 {
Natasha Leecae68ff2019-03-27 22:04:10 +00002698 "name": "destroy"
Austin Eng376f1c62017-05-30 20:03:44 -04002699 }
2700 ]
2701 },
Brandon Jonesac71e342018-11-28 17:54:13 +00002702 "texture aspect": {
Corentin Wallez5df84ce2019-07-08 08:55:21 +00002703 "category": "enum",
Brandon Jonesac71e342018-11-28 17:54:13 +00002704 "values": [
Corentin Wallez5df84ce2019-07-08 08:55:21 +00002705 {"value": 0, "name": "all"},
2706 {"value": 1, "name": "stencil only"},
Bryan Bernhart14a23982021-02-05 20:11:24 +00002707 {"value": 2, "name": "depth only"},
Kai Ninomiya930e9182021-09-17 19:44:43 +00002708 {"value": 3, "name": "plane 0 only", "tags": ["dawn"]},
2709 {"value": 4, "name": "plane 1 only", "tags": ["dawn"]}
Brandon Jonesac71e342018-11-28 17:54:13 +00002710 ]
2711 },
Corentin Wallezf463a202019-08-21 12:16:33 +00002712 "texture component type": {
2713 "category": "enum",
Corentin Wallezf53010c2023-03-01 16:59:56 +00002714 "tags": ["dawn"],
Corentin Wallezf463a202019-08-21 12:16:33 +00002715 "values": [
2716 {"value": 0, "name": "float"},
2717 {"value": 1, "name": "sint"},
Corentin Wallez4196a542020-10-16 14:13:16 +00002718 {"value": 2, "name": "uint"},
2719 {"value": 3, "name": "depth comparison"}
Corentin Wallezf463a202019-08-21 12:16:33 +00002720 ]
2721 },
Tomek Ponitka0f5d4962020-07-07 10:18:51 +00002722 "texture data layout": {
2723 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00002724 "extensible": "in",
Tomek Ponitka0f5d4962020-07-07 10:18:51 +00002725 "members": [
2726 {"name": "offset", "type": "uint64_t", "default": 0},
Kai Ninomiyacf820d72020-12-16 07:53:30 +00002727 {"name": "bytes per row", "type": "uint32_t", "default": "WGPU_COPY_STRIDE_UNDEFINED"},
2728 {"name": "rows per image", "type": "uint32_t", "default": "WGPU_COPY_STRIDE_UNDEFINED"}
Tomek Ponitka0f5d4962020-07-07 10:18:51 +00002729 ]
2730 },
Jiawei Shao425428f2018-08-27 08:44:48 +08002731 "texture descriptor": {
2732 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00002733 "extensible": "in",
Jiawei Shao425428f2018-08-27 08:44:48 +08002734 "members": [
François Beaufort277d2e12019-10-03 14:56:49 +00002735 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
Corentin Wallez9e9e29f2019-08-27 08:21:39 +00002736 {"name": "usage", "type": "texture usage"},
Corentin Wallez8f938712019-07-08 19:20:22 +00002737 {"name": "dimension", "type": "texture dimension", "default": "2D"},
Corentin Wallez29353d62018-09-18 12:49:22 +00002738 {"name": "size", "type": "extent 3D"},
Jiawei Shao425428f2018-08-27 08:44:48 +08002739 {"name": "format", "type": "texture format"},
Corentin Wallez8f938712019-07-08 19:20:22 +00002740 {"name": "mip level count", "type": "uint32_t", "default": 1},
Corentin Wallezeee34492022-03-16 18:44:16 +00002741 {"name": "sample count", "type": "uint32_t", "default": 1},
Austin Eng8e02ebf2022-03-31 03:53:04 +00002742 {"name": "view format count", "type": "uint32_t", "default": 0},
2743 {"name": "view formats", "type": "texture format", "annotation": "const*", "length": "view format count"}
Austin Eng376f1c62017-05-30 20:03:44 -04002744 ]
2745 },
2746 "texture dimension": {
2747 "category": "enum",
2748 "values": [
Corentin Wallezf07e85c2019-07-15 20:47:56 +00002749 {"value": 0, "name": "1D"},
2750 {"value": 1, "name": "2D"},
2751 {"value": 2, "name": "3D"}
Austin Eng376f1c62017-05-30 20:03:44 -04002752 ]
2753 },
Corentin Walleza60799f2018-09-11 18:16:54 +00002754 "texture format": {
2755 "category": "enum",
2756 "values": [
Kai Ninomiya7b6246a2020-01-28 23:54:38 +00002757 {"value": 0, "name": "undefined", "valid": false, "jsrepr": "undefined"},
Kai Ninomiya930e9182021-09-17 19:44:43 +00002758
Corentin Wallezd55bd7a2019-09-05 09:12:32 +00002759 {"value": 1, "name": "R8 unorm"},
2760 {"value": 2, "name": "R8 snorm"},
2761 {"value": 3, "name": "R8 uint"},
2762 {"value": 4, "name": "R8 sint"},
Corentin Wallez431d6182019-07-01 09:58:07 +00002763
Corentin Wallezd55bd7a2019-09-05 09:12:32 +00002764 {"value": 5, "name": "R16 uint"},
2765 {"value": 6, "name": "R16 sint"},
2766 {"value": 7, "name": "R16 float"},
2767 {"value": 8, "name": "RG8 unorm"},
2768 {"value": 9, "name": "RG8 snorm"},
2769 {"value": 10, "name": "RG8 uint"},
2770 {"value": 11, "name": "RG8 sint"},
Corentin Wallez431d6182019-07-01 09:58:07 +00002771
Corentin Wallezd55bd7a2019-09-05 09:12:32 +00002772 {"value": 12, "name": "R32 float"},
2773 {"value": 13, "name": "R32 uint"},
2774 {"value": 14, "name": "R32 sint"},
2775 {"value": 15, "name": "RG16 uint"},
2776 {"value": 16, "name": "RG16 sint"},
2777 {"value": 17, "name": "RG16 float"},
2778 {"value": 18, "name": "RGBA8 unorm"},
2779 {"value": 19, "name": "RGBA8 unorm srgb"},
2780 {"value": 20, "name": "RGBA8 snorm"},
2781 {"value": 21, "name": "RGBA8 uint"},
2782 {"value": 22, "name": "RGBA8 sint"},
2783 {"value": 23, "name": "BGRA8 unorm"},
2784 {"value": 24, "name": "BGRA8 unorm srgb"},
2785 {"value": 25, "name": "RGB10 A2 unorm"},
Corentin Wallez2f6e4ec2020-08-19 21:51:20 +00002786 {"value": 26, "name": "RG11 B10 ufloat"},
2787 {"value": 27, "name": "RGB9 E5 ufloat"},
Corentin Wallez431d6182019-07-01 09:58:07 +00002788
Corentin Wallez2f6e4ec2020-08-19 21:51:20 +00002789 {"value": 28, "name": "RG32 float"},
2790 {"value": 29, "name": "RG32 uint"},
2791 {"value": 30, "name": "RG32 sint"},
2792 {"value": 31, "name": "RGBA16 uint"},
2793 {"value": 32, "name": "RGBA16 sint"},
2794 {"value": 33, "name": "RGBA16 float"},
Corentin Wallez431d6182019-07-01 09:58:07 +00002795
Corentin Wallez2f6e4ec2020-08-19 21:51:20 +00002796 {"value": 34, "name": "RGBA32 float"},
2797 {"value": 35, "name": "RGBA32 uint"},
2798 {"value": 36, "name": "RGBA32 sint"},
Corentin Wallez431d6182019-07-01 09:58:07 +00002799
Kai Ninomiyafa9ca442021-09-17 18:25:53 +00002800 {"value": 37, "name": "stencil8"},
2801 {"value": 38, "name": "depth16 unorm"},
2802 {"value": 39, "name": "depth24 plus"},
Bryan Bernhart536c7ae2021-02-16 19:55:09 +00002803 {"value": 40, "name": "depth24 plus stencil8"},
Brandon Jones6d48f572022-06-14 22:48:31 +00002804 {"value": 41, "name": "depth32 float"},
2805 {"value": 42, "name": "depth32 float stencil8"},
Corentin Wallez431d6182019-07-01 09:58:07 +00002806
Brandon Jones6d48f572022-06-14 22:48:31 +00002807 {"value": 43, "name": "BC1 RGBA unorm", "jsrepr": "'bc1-rgba-unorm'"},
2808 {"value": 44, "name": "BC1 RGBA unorm srgb", "jsrepr": "'bc1-rgba-unorm-srgb'"},
2809 {"value": 45, "name": "BC2 RGBA unorm", "jsrepr": "'bc2-rgba-unorm'"},
2810 {"value": 46, "name": "BC2 RGBA unorm srgb", "jsrepr": "'bc2-rgba-unorm-srgb'"},
2811 {"value": 47, "name": "BC3 RGBA unorm", "jsrepr": "'bc3-rgba-unorm'"},
2812 {"value": 48, "name": "BC3 RGBA unorm srgb", "jsrepr": "'bc3-rgba-unorm-srgb'"},
2813 {"value": 49, "name": "BC4 R unorm", "jsrepr": "'bc4-r-unorm'"},
2814 {"value": 50, "name": "BC4 R snorm", "jsrepr": "'bc4-r-snorm'"},
2815 {"value": 51, "name": "BC5 RG unorm", "jsrepr": "'bc5-rg-unorm'"},
2816 {"value": 52, "name": "BC5 RG snorm", "jsrepr": "'bc5-rg-snorm'"},
2817 {"value": 53, "name": "BC6H RGB ufloat", "jsrepr": "'bc6h-rgb-ufloat'"},
2818 {"value": 54, "name": "BC6H RGB float", "jsrepr": "'bc6h-rgb-float'"},
2819 {"value": 55, "name": "BC7 RGBA unorm", "jsrepr": "'bc7-rgba-unorm'"},
2820 {"value": 56, "name": "BC7 RGBA unorm srgb", "jsrepr": "'bc7-rgba-unorm-srgb'"},
Loko Kungc7226a72021-08-31 00:15:45 +00002821
Brandon Jones6d48f572022-06-14 22:48:31 +00002822 {"value": 57, "name": "ETC2 RGB8 unorm", "jsrepr": "'etc2-rgb8unorm'"},
2823 {"value": 58, "name": "ETC2 RGB8 unorm srgb", "jsrepr": "'etc2-rgb8unorm-srgb'"},
2824 {"value": 59, "name": "ETC2 RGB8A1 unorm", "jsrepr": "'etc2-rgb8a1unorm'"},
2825 {"value": 60, "name": "ETC2 RGB8A1 unorm srgb", "jsrepr": "'etc2-rgb8a1unorm-srgb'"},
2826 {"value": 61, "name": "ETC2 RGBA8 unorm", "jsrepr": "'etc2-rgba8unorm'"},
2827 {"value": 62, "name": "ETC2 RGBA8 unorm srgb", "jsrepr": "'etc2-rgba8unorm-srgb'"},
2828 {"value": 63, "name": "EAC R11 unorm", "jsrepr": "'eac-r11unorm'"},
2829 {"value": 64, "name": "EAC R11 snorm", "jsrepr": "'eac-r11snorm'"},
2830 {"value": 65, "name": "EAC RG11 unorm", "jsrepr": "'eac-rg11unorm'"},
2831 {"value": 66, "name": "EAC RG11 snorm", "jsrepr": "'eac-rg11snorm'"},
Loko Kung37a86492021-09-07 18:39:04 +00002832
Brandon Jones6d48f572022-06-14 22:48:31 +00002833 {"value": 67, "name": "ASTC 4x4 unorm", "jsrepr": "'astc-4x4-unorm'"},
2834 {"value": 68, "name": "ASTC 4x4 unorm srgb", "jsrepr": "'astc-4x4-unorm-srgb'"},
2835 {"value": 69, "name": "ASTC 5x4 unorm", "jsrepr": "'astc-5x4-unorm'"},
2836 {"value": 70, "name": "ASTC 5x4 unorm srgb", "jsrepr": "'astc-5x4-unorm-srgb'"},
2837 {"value": 71, "name": "ASTC 5x5 unorm", "jsrepr": "'astc-5x5-unorm'"},
2838 {"value": 72, "name": "ASTC 5x5 unorm srgb", "jsrepr": "'astc-5x5-unorm-srgb'"},
2839 {"value": 73, "name": "ASTC 6x5 unorm", "jsrepr": "'astc-6x5-unorm'"},
2840 {"value": 74, "name": "ASTC 6x5 unorm srgb", "jsrepr": "'astc-6x5-unorm-srgb'"},
2841 {"value": 75, "name": "ASTC 6x6 unorm", "jsrepr": "'astc-6x6-unorm'"},
2842 {"value": 76, "name": "ASTC 6x6 unorm srgb", "jsrepr": "'astc-6x6-unorm-srgb'"},
2843 {"value": 77, "name": "ASTC 8x5 unorm", "jsrepr": "'astc-8x5-unorm'"},
2844 {"value": 78, "name": "ASTC 8x5 unorm srgb", "jsrepr": "'astc-8x5-unorm-srgb'"},
2845 {"value": 79, "name": "ASTC 8x6 unorm", "jsrepr": "'astc-8x6-unorm'"},
2846 {"value": 80, "name": "ASTC 8x6 unorm srgb", "jsrepr": "'astc-8x6-unorm-srgb'"},
2847 {"value": 81, "name": "ASTC 8x8 unorm", "jsrepr": "'astc-8x8-unorm'"},
2848 {"value": 82, "name": "ASTC 8x8 unorm srgb", "jsrepr": "'astc-8x8-unorm-srgb'"},
2849 {"value": 83, "name": "ASTC 10x5 unorm", "jsrepr": "'astc-10x5-unorm'"},
2850 {"value": 84, "name": "ASTC 10x5 unorm srgb", "jsrepr": "'astc-10x5-unorm-srgb'"},
2851 {"value": 85, "name": "ASTC 10x6 unorm", "jsrepr": "'astc-10x6-unorm'"},
2852 {"value": 86, "name": "ASTC 10x6 unorm srgb", "jsrepr": "'astc-10x6-unorm-srgb'"},
2853 {"value": 87, "name": "ASTC 10x8 unorm", "jsrepr": "'astc-10x8-unorm'"},
2854 {"value": 88, "name": "ASTC 10x8 unorm srgb", "jsrepr": "'astc-10x8-unorm-srgb'"},
2855 {"value": 89, "name": "ASTC 10x10 unorm", "jsrepr": "'astc-10x10-unorm'"},
2856 {"value": 90, "name": "ASTC 10x10 unorm srgb", "jsrepr": "'astc-10x10-unorm-srgb'"},
2857 {"value": 91, "name": "ASTC 12x10 unorm", "jsrepr": "'astc-12x10-unorm'"},
2858 {"value": 92, "name": "ASTC 12x10 unorm srgb", "jsrepr": "'astc-12x10-unorm-srgb'"},
2859 {"value": 93, "name": "ASTC 12x12 unorm", "jsrepr": "'astc-12x12-unorm'"},
2860 {"value": 94, "name": "ASTC 12x12 unorm srgb", "jsrepr": "'astc-12x12-unorm-srgb'"},
Kai Ninomiyafa9ca442021-09-17 18:25:53 +00002861
Brandon Jones6d48f572022-06-14 22:48:31 +00002862 {"value": 95, "name": "R8 BG8 Biplanar 420 unorm", "tags": ["dawn"]}
Corentin Walleza60799f2018-09-11 18:16:54 +00002863 ]
2864 },
Corentin Wallez9e9e29f2019-08-27 08:21:39 +00002865 "texture usage": {
Austin Eng376f1c62017-05-30 20:03:44 -04002866 "category": "bitmask",
2867 "values": [
2868 {"value": 0, "name": "none"},
Corentin Wallezec053552019-07-08 10:05:46 +00002869 {"value": 1, "name": "copy src"},
2870 {"value": 2, "name": "copy dst"},
Brandon Jones27e17a62021-08-10 04:07:37 +00002871 {"value": 4, "name": "texture binding"},
2872 {"value": 8, "name": "storage binding"},
Corentin Wallez6b087812020-10-27 15:35:56 +00002873 {"value": 16, "name": "render attachment"},
Kai Ninomiya930e9182021-09-17 19:44:43 +00002874 {"value": 32, "name": "present", "tags": ["dawn"]}
Austin Eng376f1c62017-05-30 20:03:44 -04002875 ]
2876 },
Jiawei Shao6329e5a2018-10-12 08:32:58 +00002877 "texture view descriptor": {
2878 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00002879 "extensible": "in",
Jiawei Shao6329e5a2018-10-12 08:32:58 +00002880 "members": [
François Beaufort277d2e12019-10-03 14:56:49 +00002881 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true},
Corentin Wallezd55bd7a2019-09-05 09:12:32 +00002882 {"name": "format", "type": "texture format", "default": "undefined"},
2883 {"name": "dimension", "type": "texture view dimension", "default": "undefined"},
Corentin Wallez8f938712019-07-08 19:20:22 +00002884 {"name": "base mip level", "type": "uint32_t", "default": "0"},
jchen104935c142021-09-15 06:27:25 +00002885 {"name": "mip level count", "type": "uint32_t", "default": "WGPU_MIP_LEVEL_COUNT_UNDEFINED"},
Corentin Wallez8f938712019-07-08 19:20:22 +00002886 {"name": "base array layer", "type": "uint32_t", "default": "0"},
jchen1096ac9692021-09-14 02:41:49 +00002887 {"name": "array layer count", "type": "uint32_t", "default": "WGPU_ARRAY_LAYER_COUNT_UNDEFINED"},
Corentin Wallezdbe74bc2019-09-10 08:30:43 +00002888 {"name": "aspect", "type": "texture aspect", "default": "all"}
Jiawei Shao6329e5a2018-10-12 08:32:58 +00002889 ]
2890 },
Austin Eng376f1c62017-05-30 20:03:44 -04002891 "texture view": {
Brandon Jones88aeeae2021-11-19 18:26:08 +00002892 "category": "object",
2893 "methods": [
2894 {
2895 "name": "set label",
2896 "returns": "void",
Brandon Jones88aeeae2021-11-19 18:26:08 +00002897 "args": [
2898 {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"}
2899 ]
2900 }
2901 ]
Austin Eng376f1c62017-05-30 20:03:44 -04002902 },
Jiawei Shao6329e5a2018-10-12 08:32:58 +00002903 "texture view dimension": {
2904 "category": "enum",
2905 "values": [
Kai Ninomiya7b6246a2020-01-28 23:54:38 +00002906 {"value": 0, "name": "undefined", "valid": false, "jsrepr": "undefined"},
Corentin Wallezd55bd7a2019-09-05 09:12:32 +00002907 {"value": 1, "name": "1D"},
2908 {"value": 2, "name": "2D"},
2909 {"value": 3, "name": "2D array"},
2910 {"value": 4, "name": "cube"},
2911 {"value": 5, "name": "cube array"},
2912 {"value": 6, "name": "3D"}
Jiawei Shao6329e5a2018-10-12 08:32:58 +00002913 ]
2914 },
Austin Eng376f1c62017-05-30 20:03:44 -04002915 "vertex format": {
2916 "category": "enum",
2917 "values": [
Brandon Jonese3f10e32021-02-26 02:20:25 +00002918 {"value": 0, "name": "undefined", "valid": false, "jsrepr": "undefined"},
2919 {"value": 1, "name": "uint8x2"},
2920 {"value": 2, "name": "uint8x4"},
2921 {"value": 3, "name": "sint8x2"},
2922 {"value": 4, "name": "sint8x4"},
2923 {"value": 5, "name": "unorm8x2"},
2924 {"value": 6, "name": "unorm8x4"},
2925 {"value": 7, "name": "snorm8x2"},
2926 {"value": 8, "name": "snorm8x4"},
2927 {"value": 9, "name": "uint16x2"},
2928 {"value": 10, "name": "uint16x4"},
2929 {"value": 11, "name": "sint16x2"},
2930 {"value": 12, "name": "sint16x4"},
2931 {"value": 13, "name": "unorm16x2"},
2932 {"value": 14, "name": "unorm16x4"},
2933 {"value": 15, "name": "snorm16x2"},
2934 {"value": 16, "name": "snorm16x4"},
2935 {"value": 17, "name": "float16x2"},
2936 {"value": 18, "name": "float16x4"},
2937 {"value": 19, "name": "float32"},
2938 {"value": 20, "name": "float32x2"},
2939 {"value": 21, "name": "float32x3"},
2940 {"value": 22, "name": "float32x4"},
2941 {"value": 23, "name": "uint32"},
2942 {"value": 24, "name": "uint32x2"},
2943 {"value": 25, "name": "uint32x3"},
2944 {"value": 26, "name": "uint32x4"},
2945 {"value": 27, "name": "sint32"},
2946 {"value": 28, "name": "sint32x2"},
2947 {"value": 29, "name": "sint32x3"},
Brandon Jones4139fa52021-05-21 01:29:17 +00002948 {"value": 30, "name": "sint32x4"}
Austin Eng376f1c62017-05-30 20:03:44 -04002949 ]
2950 },
fujunwei4e876902021-11-25 08:44:01 +00002951 "whole size" : {
2952 "category": "constant",
2953 "type": "uint64_t",
2954 "value": "(0xffffffffffffffffULL)"
2955 },
2956 "whole map size" : {
2957 "category": "constant",
2958 "type": "size_t",
2959 "value": "SIZE_MAX"
2960 },
2961 "stride undefined" : {
2962 "category": "constant",
2963 "tags": ["deprecated"],
2964 "_TODO": "crbug.com/dawn/520: Remove WGPU_STRIDE_UNDEFINED in favor of WGPU_COPY_STRIDE_UNDEFINED.",
2965 "type": "uint32_t",
2966 "value": "(0xffffffffUL)"
2967 },
2968 "copy stride undefined" : {
2969 "category": "constant",
2970 "type": "uint32_t",
2971 "value": "(0xffffffffUL)"
2972 },
2973 "limit u32 undefined" : {
2974 "category": "constant",
2975 "type": "uint32_t",
2976 "value": "(0xffffffffUL)"
2977 },
2978 "limit u64 undefined" : {
2979 "category": "constant",
2980 "type": "uint64_t",
2981 "value": "(0xffffffffffffffffULL)"
2982 },
2983 "array layer count undefined" : {
2984 "category": "constant",
2985 "type": "uint32_t",
2986 "value": "(0xffffffffUL)"
2987 },
2988 "mip level count undefined" : {
2989 "category": "constant",
2990 "type": "uint32_t",
2991 "value": "(0xffffffffUL)"
2992 },
Austin Engc7f416c2019-01-15 20:49:53 +00002993 "ObjectType": {
2994 "_comment": "Only used for the wire",
2995 "category": "native"
2996 },
2997 "ObjectId": {
2998 "_comment": "Only used for the wire",
2999 "category": "native"
3000 },
3001 "ObjectHandle": {
3002 "_comment": "Only used for the wire",
3003 "category": "native"
3004 },
Austin Eng376f1c62017-05-30 20:03:44 -04003005 "void": {
3006 "category": "native"
3007 },
Corentin Wallez1325ab12020-06-30 11:51:14 +00003008 "void *": {
3009 "category": "native"
3010 },
3011 "void const *": {
3012 "category": "native"
3013 },
Yunchao Hec33a8c12019-04-11 18:46:54 +00003014 "int32_t": {
3015 "category": "native"
3016 },
Corentin Wallez47a33412020-06-02 09:24:39 +00003017 "size_t": {
3018 "category": "native"
3019 },
shrekshaof8c5e4a2020-12-24 03:11:17 +00003020 "uint16_t": {
3021 "category": "native"
3022 },
3023 "uint32_t": {
3024 "category": "native"
3025 },
Kai Ninomiya35bf4242017-07-19 15:41:17 -07003026 "uint64_t": {
3027 "category": "native"
Corentin Walleza60799f2018-09-11 18:16:54 +00003028 },
3029 "uint8_t": {
3030 "category": "native"
Austin Eng0eff5982021-07-27 19:59:58 +00003031 },
3032 "dawn texture internal usage descriptor": {
3033 "category": "structure",
Austin Eng0c824052021-09-20 16:07:25 +00003034 "chained": "in",
Corentin Walleza45561b2022-07-14 12:58:25 +00003035 "chain roots": ["texture descriptor"],
Kai Ninomiya930e9182021-09-17 19:44:43 +00003036 "tags": ["dawn"],
Austin Eng0eff5982021-07-27 19:59:58 +00003037 "members": [
3038 {"name": "internal usage", "type": "texture usage", "default": "none"}
3039 ]
Austin Engaa9475e2022-01-18 21:54:25 +00003040 },
3041 "dawn encoder internal usage descriptor": {
3042 "category": "structure",
3043 "chained": "in",
Corentin Walleza45561b2022-07-14 12:58:25 +00003044 "chain roots": ["command encoder descriptor"],
Austin Engaa9475e2022-01-18 21:54:25 +00003045 "tags": ["dawn"],
3046 "members": [
3047 {"name": "use internal usages", "type": "bool", "default": "false"}
3048 ]
Jiawei Shao5a0f8d32022-09-23 00:29:46 +00003049 },
3050 "dawn adapter properties power preference": {
3051 "category": "structure",
3052 "chained": "out",
3053 "chain roots": ["adapter properties"],
3054 "tags": ["dawn"],
3055 "members": [
3056 {"name": "power preference", "type": "power preference", "default": "undefined"}
3057 ]
Jiawei Shao806c5832022-11-23 02:06:11 +00003058 },
3059 "dawn buffer descriptor error info from wire client": {
3060 "category": "structure",
3061 "chained": "in",
3062 "chain roots": ["buffer descriptor"],
3063 "tags": ["dawn"],
3064 "members": [
3065 {"name": "out of memory", "type": "bool", "default": "false"}
3066 ]
Austin Eng376f1c62017-05-30 20:03:44 -04003067 }
3068}