Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 1 | { |
| 2 | "_comment": [ |
Corentin Wallez | 4a9ef4e | 2018-07-18 11:40:26 +0200 | [diff] [blame] | 3 | "Copyright 2017 The Dawn Authors", |
Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 4 | "", |
| 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 Wallez | 6d0438c | 2021-03-24 20:29:42 +0000 | [diff] [blame] | 17 | |
Ben Clayton | 26c31f6 | 2022-01-27 18:33:47 +0000 | [diff] [blame] | 18 | "_doc": "See docs/dawn/codegen.md", |
Corentin Wallez | 6d0438c | 2021-03-24 20:29:42 +0000 | [diff] [blame] | 19 | |
fujunwei | 76bda37 | 2021-11-23 08:47:35 +0000 | [diff] [blame] | 20 | "_metadata": { |
| 21 | "api": "WebGPU", |
| 22 | "c_prefix": "WGPU", |
Shrek Shao | 2bf9990 | 2021-12-02 21:25:58 +0000 | [diff] [blame] | 23 | "namespace": "wgpu", |
fujunwei | 3a46476 | 2021-12-05 05:29:44 +0000 | [diff] [blame] | 24 | "proc_table_prefix": "Dawn", |
fujunwei | a2241d4 | 2021-12-16 04:54:38 +0000 | [diff] [blame] | 25 | "native_namespace": "dawn native", |
Shrek Shao | 2bf9990 | 2021-12-02 21:25:58 +0000 | [diff] [blame] | 26 | "copyright_year": "2019" |
fujunwei | 76bda37 | 2021-11-23 08:47:35 +0000 | [diff] [blame] | 27 | }, |
| 28 | |
fujunwei | 23f7162 | 2021-12-02 07:41:21 +0000 | [diff] [blame] | 29 | "create instance": { |
| 30 | "category": "function", |
| 31 | "returns": "instance", |
| 32 | "args": [ |
fujunwei | c7d4f2c | 2021-12-07 00:46:35 +0000 | [diff] [blame] | 33 | {"name": "descriptor", "type": "instance descriptor", "annotation": "const*", "optional": true} |
fujunwei | 23f7162 | 2021-12-02 07:41:21 +0000 | [diff] [blame] | 34 | ] |
| 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 Ninomiya | 4e37acc | 2021-09-17 21:13:33 +0000 | [diff] [blame] | 50 | "request adapter options": { |
| 51 | "category": "structure", |
Austin Eng | 1a965ab | 2021-09-20 18:19:55 +0000 | [diff] [blame] | 52 | "extensible": "in", |
Kai Ninomiya | 4e37acc | 2021-09-17 21:13:33 +0000 | [diff] [blame] | 53 | "members": [ |
Austin Eng | 5397f9f | 2021-12-14 23:22:46 +0000 | [diff] [blame] | 54 | {"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 Ninomiya | 4e37acc | 2021-09-17 21:13:33 +0000 | [diff] [blame] | 57 | ] |
| 58 | }, |
| 59 | "request adapter status": { |
| 60 | "category": "enum", |
Kai Ninomiya | 4e37acc | 2021-09-17 21:13:33 +0000 | [diff] [blame] | 61 | "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": { |
fujunwei | 23f7162 | 2021-12-02 07:41:21 +0000 | [diff] [blame] | 70 | "category": "function pointer", |
Kai Ninomiya | 4e37acc | 2021-09-17 21:13:33 +0000 | [diff] [blame] | 71 | "args": [ |
| 72 | {"name": "status", "type": "request adapter status"}, |
| 73 | {"name": "adapter", "type": "adapter"}, |
Austin Eng | 5397f9f | 2021-12-14 23:22:46 +0000 | [diff] [blame] | 74 | {"name": "message", "type": "char", "annotation": "const*", "length": "strlen", "optional": true}, |
Kai Ninomiya | 4e37acc | 2021-09-17 21:13:33 +0000 | [diff] [blame] | 75 | {"name": "userdata", "type": "void", "annotation": "*"} |
| 76 | ] |
| 77 | }, |
| 78 | "adapter": { |
| 79 | "category": "object", |
Le Hoang Quyen | 7971bfe | 2023-04-05 19:35:07 +0000 | [diff] [blame] | 80 | "no autolock": true, |
Kai Ninomiya | 4e37acc | 2021-09-17 21:13:33 +0000 | [diff] [blame] | 81 | "methods": [ |
| 82 | { |
Le Hoang Quyen | 99b8081 | 2023-03-24 15:50:50 +0000 | [diff] [blame] | 83 | "name": "get instance", |
| 84 | "tags": ["dawn"], |
| 85 | "returns": "instance" |
| 86 | }, |
| 87 | { |
Kai Ninomiya | 7d174a1 | 2021-09-21 17:36:27 +0000 | [diff] [blame] | 88 | "name": "get limits", |
| 89 | "returns": "bool", |
Kai Ninomiya | 7d174a1 | 2021-09-21 17:36:27 +0000 | [diff] [blame] | 90 | "args": [ |
| 91 | {"name": "limits", "type": "supported limits", "annotation": "*"} |
| 92 | ] |
| 93 | }, |
| 94 | { |
Kai Ninomiya | 4e37acc | 2021-09-17 21:13:33 +0000 | [diff] [blame] | 95 | "name": "get properties", |
Kai Ninomiya | 4e37acc | 2021-09-17 21:13:33 +0000 | [diff] [blame] | 96 | "args": [ |
| 97 | {"name": "properties", "type": "adapter properties", "annotation": "*"} |
| 98 | ] |
| 99 | }, |
| 100 | { |
Kai Ninomiya | 7d174a1 | 2021-09-21 17:36:27 +0000 | [diff] [blame] | 101 | "name": "has feature", |
| 102 | "returns": "bool", |
Kai Ninomiya | 7d174a1 | 2021-09-21 17:36:27 +0000 | [diff] [blame] | 103 | "args": [ |
| 104 | {"name": "feature", "type": "feature name"} |
| 105 | ] |
| 106 | }, |
| 107 | { |
Austin Eng | 89ddadc | 2021-12-15 00:12:30 +0000 | [diff] [blame] | 108 | "name": "enumerate features", |
Austin Eng | 3ac7b9c | 2022-01-06 22:11:28 +0000 | [diff] [blame] | 109 | "returns": "size_t", |
Austin Eng | 89ddadc | 2021-12-15 00:12:30 +0000 | [diff] [blame] | 110 | "args": [ |
| 111 | {"name": "features", "type": "feature name", "annotation": "*"} |
| 112 | ] |
| 113 | }, |
| 114 | { |
Kai Ninomiya | 4e37acc | 2021-09-17 21:13:33 +0000 | [diff] [blame] | 115 | "name": "request device", |
| 116 | "args": [ |
Corentin Wallez | 1260a53 | 2022-07-26 17:36:44 +0000 | [diff] [blame] | 117 | {"name": "descriptor", "type": "device descriptor", "annotation": "const*", "optional": true, "no_default": true}, |
Corentin Wallez | e00c6bd | 2021-12-13 17:37:17 +0000 | [diff] [blame] | 118 | {"name": "callback", "type": "request device callback"}, |
Kai Ninomiya | 4e37acc | 2021-09-17 21:13:33 +0000 | [diff] [blame] | 119 | {"name": "userdata", "type": "void", "annotation": "*"} |
| 120 | ] |
Austin Eng | 2f218e2 | 2021-12-22 19:02:23 +0000 | [diff] [blame] | 121 | }, |
| 122 | { |
| 123 | "name": "create device", |
| 124 | "tags": ["dawn"], |
| 125 | "returns": "device", |
| 126 | "args": [ |
Corentin Wallez | 1260a53 | 2022-07-26 17:36:44 +0000 | [diff] [blame] | 127 | {"name": "descriptor", "type": "device descriptor", "annotation": "const*", "optional": true} |
Austin Eng | 2f218e2 | 2021-12-22 19:02:23 +0000 | [diff] [blame] | 128 | ] |
Kai Ninomiya | 4e37acc | 2021-09-17 21:13:33 +0000 | [diff] [blame] | 129 | } |
| 130 | ] |
| 131 | }, |
Corentin Wallez | f12c9db | 2020-01-10 13:28:18 +0000 | [diff] [blame] | 132 | "adapter properties": { |
| 133 | "category": "structure", |
Austin Eng | 0c82405 | 2021-09-20 16:07:25 +0000 | [diff] [blame] | 134 | "extensible": "out", |
Corentin Wallez | f12c9db | 2020-01-10 13:28:18 +0000 | [diff] [blame] | 135 | "members": [ |
Corentin Wallez | f12c9db | 2020-01-10 13:28:18 +0000 | [diff] [blame] | 136 | {"name": "vendor ID", "type": "uint32_t"}, |
Brandon Jones | 8cb8c7a | 2022-05-26 23:47:39 +0000 | [diff] [blame] | 137 | {"name": "vendor name", "type": "char", "annotation": "const*", "length": "strlen"}, |
| 138 | {"name": "architecture", "type": "char", "annotation": "const*", "length": "strlen"}, |
Kai Ninomiya | 930e918 | 2021-09-17 19:44:43 +0000 | [diff] [blame] | 139 | {"name": "device ID", "type": "uint32_t"}, |
Jiawei Shao | 2294cf4 | 2021-12-01 08:13:40 +0000 | [diff] [blame] | 140 | {"name": "name", "type": "char", "annotation": "const*", "length": "strlen"}, |
| 141 | {"name": "driver description", "type": "char", "annotation": "const*", "length": "strlen"}, |
Corentin Wallez | f12c9db | 2020-01-10 13:28:18 +0000 | [diff] [blame] | 142 | {"name": "adapter type", "type": "adapter type"}, |
| 143 | {"name": "backend type", "type": "backend type"} |
| 144 | ] |
| 145 | }, |
| 146 | "adapter type": { |
| 147 | "category": "enum", |
Kai Ninomiya | 930e918 | 2021-09-17 19:44:43 +0000 | [diff] [blame] | 148 | "emscripten_no_enum_table": true, |
Corentin Wallez | f12c9db | 2020-01-10 13:28:18 +0000 | [diff] [blame] | 149 | "values": [ |
| 150 | {"value": 0, "name": "discrete GPU"}, |
| 151 | {"value": 1, "name": "integrated GPU"}, |
| 152 | {"value": 2, "name": "CPU"}, |
Corentin Wallez | a0afd31 | 2020-04-01 12:07:43 +0000 | [diff] [blame] | 153 | {"value": 3, "name": "unknown"} |
Corentin Wallez | f12c9db | 2020-01-10 13:28:18 +0000 | [diff] [blame] | 154 | ] |
| 155 | }, |
Kai Ninomiya | 4e37acc | 2021-09-17 21:13:33 +0000 | [diff] [blame] | 156 | "device descriptor": { |
| 157 | "category": "structure", |
Austin Eng | 1a965ab | 2021-09-20 18:19:55 +0000 | [diff] [blame] | 158 | "extensible": "in", |
Kai Ninomiya | 7d174a1 | 2021-09-21 17:36:27 +0000 | [diff] [blame] | 159 | "members": [ |
Corentin Wallez | 6cd1cd9 | 2021-11-17 08:13:24 +0000 | [diff] [blame] | 160 | {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true}, |
Austin Eng | 5397f9f | 2021-12-14 23:22:46 +0000 | [diff] [blame] | 161 | {"name": "required features count", "type": "uint32_t", "default": 0}, |
| 162 | {"name": "required features", "type": "feature name", "annotation": "const*", "length": "required features count", "default": "nullptr"}, |
Corentin Wallez | eee3449 | 2022-03-16 18:44:16 +0000 | [diff] [blame] | 163 | {"name": "required limits", "type": "required limits", "annotation": "const*", "optional": true}, |
Brandon Jones | 8085367 | 2022-04-12 03:28:40 +0000 | [diff] [blame] | 164 | {"name": "default queue", "type": "queue descriptor"} |
Kai Ninomiya | 7d174a1 | 2021-09-21 17:36:27 +0000 | [diff] [blame] | 165 | ] |
Kai Ninomiya | 4e37acc | 2021-09-17 21:13:33 +0000 | [diff] [blame] | 166 | }, |
Austin Eng | 2f218e2 | 2021-12-22 19:02:23 +0000 | [diff] [blame] | 167 | "dawn toggles device descriptor": { |
Zhaoming Jiang | a12ff9a | 2023-01-30 09:16:51 +0000 | [diff] [blame] | 168 | "tags": ["dawn", "native", "deprecated"], |
Austin Eng | 2f218e2 | 2021-12-22 19:02:23 +0000 | [diff] [blame] | 169 | "category": "structure", |
| 170 | "chained": "in", |
Corentin Wallez | a45561b | 2022-07-14 12:58:25 +0000 | [diff] [blame] | 171 | "chain roots": ["device descriptor"], |
Austin Eng | 2f218e2 | 2021-12-22 19:02:23 +0000 | [diff] [blame] | 172 | "members": [ |
| 173 | {"name": "force enabled toggles count", "type": "uint32_t", "default": 0}, |
| 174 | {"name": "force enabled toggles", "type": "char", "annotation": "const*const*", "length": "force enabled toggles count"}, |
| 175 | {"name": "force disabled toggles count", "type": "uint32_t", "default": 0}, |
| 176 | {"name": "force disabled toggles", "type": "char", "annotation": "const*const*", "length": "force disabled toggles count"} |
| 177 | ] |
| 178 | }, |
Zhaoming Jiang | a12ff9a | 2023-01-30 09:16:51 +0000 | [diff] [blame] | 179 | "dawn toggles descriptor": { |
| 180 | "tags": ["dawn", "native"], |
| 181 | "category": "structure", |
| 182 | "chained": "in", |
Zhaoming Jiang | c2657b2 | 2023-03-07 02:03:54 +0000 | [diff] [blame] | 183 | "chain roots": ["instance descriptor", "device descriptor"], |
Zhaoming Jiang | a12ff9a | 2023-01-30 09:16:51 +0000 | [diff] [blame] | 184 | "members": [ |
| 185 | {"name": "enabled toggles count", "type": "uint32_t", "default": 0}, |
| 186 | {"name": "enabled toggles", "type": "char", "annotation": "const*const*", "length": "enabled toggles count"}, |
| 187 | {"name": "disabled toggles count", "type": "uint32_t", "default": 0}, |
| 188 | {"name": "disabled toggles", "type": "char", "annotation": "const*const*", "length": "disabled toggles count"} |
| 189 | ] |
| 190 | }, |
Loko Kung | 44f039d | 2022-03-01 22:59:40 +0000 | [diff] [blame] | 191 | "dawn cache device descriptor" : { |
| 192 | "tags": ["dawn", "native"], |
| 193 | "category": "structure", |
| 194 | "chained": "in", |
Corentin Wallez | a45561b | 2022-07-14 12:58:25 +0000 | [diff] [blame] | 195 | "chain roots": ["device descriptor"], |
Loko Kung | 44f039d | 2022-03-01 22:59:40 +0000 | [diff] [blame] | 196 | "members": [ |
| 197 | {"name": "isolation key", "type": "char", "annotation": "const*", "length": "strlen", "default": "\"\""} |
| 198 | ] |
| 199 | }, |
Corentin Wallez | a60799f | 2018-09-11 18:16:54 +0000 | [diff] [blame] | 200 | "address mode": { |
| 201 | "category": "enum", |
| 202 | "values": [ |
Yan, Shaobo | 93158eb | 2019-01-04 04:56:08 +0000 | [diff] [blame] | 203 | {"value": 0, "name": "repeat"}, |
Corentin Wallez | a0491c9 | 2019-07-08 09:36:31 +0000 | [diff] [blame] | 204 | {"value": 1, "name": "mirror repeat"}, |
Austin Eng | 5f1d2e1 | 2019-04-09 15:12:50 +0000 | [diff] [blame] | 205 | {"value": 2, "name": "clamp to edge"} |
Corentin Wallez | a60799f | 2018-09-11 18:16:54 +0000 | [diff] [blame] | 206 | ] |
Austin Eng | 1063439 | 2017-06-01 11:30:03 -0400 | [diff] [blame] | 207 | }, |
Corentin Wallez | f12c9db | 2020-01-10 13:28:18 +0000 | [diff] [blame] | 208 | "backend type": { |
| 209 | "category": "enum", |
Kai Ninomiya | 930e918 | 2021-09-17 19:44:43 +0000 | [diff] [blame] | 210 | "emscripten_no_enum_table": true, |
Corentin Wallez | f12c9db | 2020-01-10 13:28:18 +0000 | [diff] [blame] | 211 | "values": [ |
Corentin Wallez | f2ed248 | 2020-01-21 08:44:25 +0000 | [diff] [blame] | 212 | {"value": 0, "name": "null"}, |
Kai Ninomiya | 4e37acc | 2021-09-17 21:13:33 +0000 | [diff] [blame] | 213 | {"value": 1, "name": "WebGPU"}, |
| 214 | {"value": 2, "name": "D3D11"}, |
| 215 | {"value": 3, "name": "D3D12"}, |
| 216 | {"value": 4, "name": "metal"}, |
| 217 | {"value": 5, "name": "vulkan"}, |
| 218 | {"value": 6, "name": "openGL"}, |
| 219 | {"value": 7, "name": "openGLES"} |
Corentin Wallez | f12c9db | 2020-01-10 13:28:18 +0000 | [diff] [blame] | 220 | ] |
| 221 | }, |
Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 222 | "bind group": { |
Brandon Jones | 88aeeae | 2021-11-19 18:26:08 +0000 | [diff] [blame] | 223 | "category": "object", |
| 224 | "methods": [ |
| 225 | { |
| 226 | "name": "set label", |
| 227 | "returns": "void", |
Brandon Jones | 88aeeae | 2021-11-19 18:26:08 +0000 | [diff] [blame] | 228 | "args": [ |
| 229 | {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"} |
| 230 | ] |
| 231 | } |
| 232 | ] |
Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 233 | }, |
Corentin Wallez | c3c6694 | 2020-04-07 07:11:12 +0000 | [diff] [blame] | 234 | "bind group entry": { |
Corentin Wallez | 6f9d21e | 2018-12-05 07:18:30 +0000 | [diff] [blame] | 235 | "category": "structure", |
Austin Eng | 0c82405 | 2021-09-20 16:07:25 +0000 | [diff] [blame] | 236 | "extensible": "in", |
Corentin Wallez | 6f9d21e | 2018-12-05 07:18:30 +0000 | [diff] [blame] | 237 | "members": [ |
| 238 | {"name": "binding", "type": "uint32_t"}, |
Corentin Wallez | 6f0e1f9 | 2018-12-07 12:31:53 +0000 | [diff] [blame] | 239 | {"name": "buffer", "type": "buffer", "optional": true}, |
Corentin Wallez | 8f93871 | 2019-07-08 19:20:22 +0000 | [diff] [blame] | 240 | {"name": "offset", "type": "uint64_t", "default": "0"}, |
Zhaoming Jiang | f304f25 | 2022-09-28 12:49:27 +0000 | [diff] [blame] | 241 | {"name": "size", "type": "uint64_t", "default": "WGPU_WHOLE_SIZE"}, |
Corentin Wallez | 6f9d21e | 2018-12-05 07:18:30 +0000 | [diff] [blame] | 242 | {"name": "sampler", "type": "sampler", "optional": true}, |
| 243 | {"name": "texture view", "type": "texture view", "optional": true} |
| 244 | ] |
| 245 | }, |
| 246 | "bind group descriptor": { |
| 247 | "category": "structure", |
Austin Eng | 0c82405 | 2021-09-20 16:07:25 +0000 | [diff] [blame] | 248 | "extensible": "in", |
Corentin Wallez | 6f9d21e | 2018-12-05 07:18:30 +0000 | [diff] [blame] | 249 | "members": [ |
François Beaufort | 277d2e1 | 2019-10-03 14:56:49 +0000 | [diff] [blame] | 250 | {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true}, |
Corentin Wallez | 6f9d21e | 2018-12-05 07:18:30 +0000 | [diff] [blame] | 251 | {"name": "layout", "type": "bind group layout"}, |
Corentin Wallez | 84ae2bf | 2020-05-13 17:05:55 +0000 | [diff] [blame] | 252 | {"name": "entry count", "type": "uint32_t"}, |
Corentin Wallez | 3966eb1 | 2020-04-21 07:36:30 +0000 | [diff] [blame] | 253 | {"name": "entries", "type": "bind group entry", "annotation": "const*", "length": "entry count"} |
Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 254 | ] |
| 255 | }, |
Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 256 | "bind group layout": { |
Brandon Jones | 88aeeae | 2021-11-19 18:26:08 +0000 | [diff] [blame] | 257 | "category": "object", |
| 258 | "methods": [ |
| 259 | { |
| 260 | "name": "set label", |
| 261 | "returns": "void", |
Brandon Jones | 88aeeae | 2021-11-19 18:26:08 +0000 | [diff] [blame] | 262 | "args": [ |
| 263 | {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"} |
| 264 | ] |
| 265 | } |
| 266 | ] |
Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 267 | }, |
Brandon Jones | 9c52c299 | 2020-12-12 02:09:56 +0000 | [diff] [blame] | 268 | |
| 269 | "buffer binding type": { |
| 270 | "category": "enum", |
| 271 | "values": [ |
| 272 | {"value": 0, "name": "undefined", "jsrepr": "undefined", "valid": false}, |
| 273 | {"value": 1, "name": "uniform"}, |
| 274 | {"value": 2, "name": "storage"}, |
Kai Ninomiya | 4e37acc | 2021-09-17 21:13:33 +0000 | [diff] [blame] | 275 | {"value": 3, "name": "read only storage"} |
Brandon Jones | 9c52c299 | 2020-12-12 02:09:56 +0000 | [diff] [blame] | 276 | ] |
| 277 | }, |
| 278 | "buffer binding layout": { |
| 279 | "category": "structure", |
Austin Eng | 0c82405 | 2021-09-20 16:07:25 +0000 | [diff] [blame] | 280 | "extensible": "in", |
Brandon Jones | 9c52c299 | 2020-12-12 02:09:56 +0000 | [diff] [blame] | 281 | "members": [ |
| 282 | {"name": "type", "type": "buffer binding type", "default": "undefined"}, |
| 283 | {"name": "has dynamic offset", "type": "bool", "default": "false"}, |
| 284 | {"name": "min binding size", "type": "uint64_t", "default": "0"} |
| 285 | ] |
| 286 | }, |
| 287 | |
| 288 | "sampler binding type": { |
| 289 | "category": "enum", |
| 290 | "values": [ |
| 291 | {"value": 0, "name": "undefined", "jsrepr": "undefined", "valid": false}, |
| 292 | {"value": 1, "name": "filtering"}, |
| 293 | {"value": 2, "name": "non filtering"}, |
| 294 | {"value": 3, "name": "comparison"} |
| 295 | ] |
| 296 | }, |
| 297 | "sampler binding layout": { |
| 298 | "category": "structure", |
Austin Eng | 0c82405 | 2021-09-20 16:07:25 +0000 | [diff] [blame] | 299 | "extensible": "in", |
Brandon Jones | 9c52c299 | 2020-12-12 02:09:56 +0000 | [diff] [blame] | 300 | "members": [ |
| 301 | {"name": "type", "type": "sampler binding type", "default": "undefined"} |
| 302 | ] |
| 303 | }, |
| 304 | |
| 305 | "texture sample type": { |
| 306 | "category": "enum", |
| 307 | "values": [ |
| 308 | {"value": 0, "name": "undefined", "jsrepr": "undefined", "valid": false}, |
| 309 | {"value": 1, "name": "float"}, |
| 310 | {"value": 2, "name": "unfilterable float"}, |
| 311 | {"value": 3, "name": "depth"}, |
| 312 | {"value": 4, "name": "sint"}, |
| 313 | {"value": 5, "name": "uint"} |
| 314 | ] |
| 315 | }, |
| 316 | "texture binding layout": { |
| 317 | "category": "structure", |
Austin Eng | 0c82405 | 2021-09-20 16:07:25 +0000 | [diff] [blame] | 318 | "extensible": "in", |
Brandon Jones | 9c52c299 | 2020-12-12 02:09:56 +0000 | [diff] [blame] | 319 | "members": [ |
| 320 | {"name": "sample type", "type": "texture sample type", "default": "undefined"}, |
| 321 | {"name": "view dimension", "type": "texture view dimension", "default": "undefined"}, |
| 322 | {"name": "multisampled", "type": "bool", "default": "false"} |
| 323 | ] |
| 324 | }, |
| 325 | |
Brandon Jones | 39633e2 | 2021-06-01 19:45:53 +0000 | [diff] [blame] | 326 | "external texture binding entry": { |
| 327 | "category": "structure", |
Austin Eng | 0c82405 | 2021-09-20 16:07:25 +0000 | [diff] [blame] | 328 | "chained": "in", |
Corentin Wallez | a45561b | 2022-07-14 12:58:25 +0000 | [diff] [blame] | 329 | "chain roots": ["bind group entry"], |
Kai Ninomiya | 930e918 | 2021-09-17 19:44:43 +0000 | [diff] [blame] | 330 | "tags": ["dawn"], |
Brandon Jones | 39633e2 | 2021-06-01 19:45:53 +0000 | [diff] [blame] | 331 | "members": [ |
| 332 | {"name": "external texture", "type": "external texture"} |
| 333 | ] |
| 334 | }, |
| 335 | |
| 336 | "external texture binding layout": { |
| 337 | "category": "structure", |
Austin Eng | 0c82405 | 2021-09-20 16:07:25 +0000 | [diff] [blame] | 338 | "chained": "in", |
Corentin Wallez | a45561b | 2022-07-14 12:58:25 +0000 | [diff] [blame] | 339 | "chain roots": ["bind group layout entry"], |
Kai Ninomiya | 930e918 | 2021-09-17 19:44:43 +0000 | [diff] [blame] | 340 | "tags": ["dawn"], |
Brandon Jones | 39633e2 | 2021-06-01 19:45:53 +0000 | [diff] [blame] | 341 | "members": [] |
| 342 | }, |
| 343 | |
Brandon Jones | 9c52c299 | 2020-12-12 02:09:56 +0000 | [diff] [blame] | 344 | "storage texture access": { |
| 345 | "category": "enum", |
| 346 | "values": [ |
| 347 | {"value": 0, "name": "undefined", "jsrepr": "undefined", "valid": false}, |
Kai Ninomiya | 930e918 | 2021-09-17 19:44:43 +0000 | [diff] [blame] | 348 | {"value": 1, "name": "write only"} |
Brandon Jones | 9c52c299 | 2020-12-12 02:09:56 +0000 | [diff] [blame] | 349 | ] |
| 350 | }, |
| 351 | "storage texture binding layout": { |
| 352 | "category": "structure", |
Austin Eng | 0c82405 | 2021-09-20 16:07:25 +0000 | [diff] [blame] | 353 | "extensible": "in", |
Brandon Jones | 9c52c299 | 2020-12-12 02:09:56 +0000 | [diff] [blame] | 354 | "members": [ |
| 355 | {"name": "access", "type": "storage texture access", "default": "undefined"}, |
| 356 | {"name": "format", "type": "texture format", "default": "undefined"}, |
| 357 | {"name": "view dimension", "type": "texture view dimension", "default": "undefined"} |
| 358 | ] |
| 359 | }, |
| 360 | |
Corentin Wallez | c3c6694 | 2020-04-07 07:11:12 +0000 | [diff] [blame] | 361 | "bind group layout entry": { |
Kai Ninomiya | 234becf | 2018-07-10 12:23:50 -0700 | [diff] [blame] | 362 | "category": "structure", |
Austin Eng | 0c82405 | 2021-09-20 16:07:25 +0000 | [diff] [blame] | 363 | "extensible": "in", |
Kai Ninomiya | 234becf | 2018-07-10 12:23:50 -0700 | [diff] [blame] | 364 | "members": [ |
| 365 | {"name": "binding", "type": "uint32_t"}, |
Corentin Wallez | b9b088f | 2019-08-27 08:42:29 +0000 | [diff] [blame] | 366 | {"name": "visibility", "type": "shader stage"}, |
Brandon Jones | 9c52c299 | 2020-12-12 02:09:56 +0000 | [diff] [blame] | 367 | {"name": "buffer", "type": "buffer binding layout"}, |
| 368 | {"name": "sampler", "type": "sampler binding layout"}, |
| 369 | {"name": "texture", "type": "texture binding layout"}, |
| 370 | {"name": "storage texture", "type": "storage texture binding layout"} |
Kai Ninomiya | 234becf | 2018-07-10 12:23:50 -0700 | [diff] [blame] | 371 | ] |
| 372 | }, |
| 373 | "bind group layout descriptor": { |
| 374 | "category": "structure", |
Austin Eng | 0c82405 | 2021-09-20 16:07:25 +0000 | [diff] [blame] | 375 | "extensible": "in", |
Kai Ninomiya | 234becf | 2018-07-10 12:23:50 -0700 | [diff] [blame] | 376 | "members": [ |
François Beaufort | 277d2e1 | 2019-10-03 14:56:49 +0000 | [diff] [blame] | 377 | {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true}, |
Corentin Wallez | 84ae2bf | 2020-05-13 17:05:55 +0000 | [diff] [blame] | 378 | {"name": "entry count", "type": "uint32_t"}, |
Corentin Wallez | 3966eb1 | 2020-04-21 07:36:30 +0000 | [diff] [blame] | 379 | {"name": "entries", "type": "bind group layout entry", "annotation": "const*", "length": "entry count"} |
Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 380 | ] |
| 381 | }, |
Brandon Jones | 0702b70 | 2021-03-11 21:19:00 +0000 | [diff] [blame] | 382 | "blend component": { |
Yunchao He | c35103d | 2018-10-29 09:06:55 +0000 | [diff] [blame] | 383 | "category": "structure", |
| 384 | "extensible": false, |
| 385 | "members": [ |
Corentin Wallez | 8f93871 | 2019-07-08 19:20:22 +0000 | [diff] [blame] | 386 | {"name": "operation", "type": "blend operation", "default": "add"}, |
| 387 | {"name": "src factor", "type": "blend factor", "default": "one"}, |
| 388 | {"name": "dst factor", "type": "blend factor", "default": "zero"} |
Yunchao He | c35103d | 2018-10-29 09:06:55 +0000 | [diff] [blame] | 389 | ] |
| 390 | }, |
Austin Eng | 94bebe5 | 2017-07-26 16:59:53 -0400 | [diff] [blame] | 391 | "blend factor": { |
| 392 | "category": "enum", |
| 393 | "values": [ |
| 394 | {"value": 0, "name": "zero"}, |
| 395 | {"value": 1, "name": "one"}, |
Brandon Jones | 22b923c | 2021-04-15 18:34:29 +0000 | [diff] [blame] | 396 | {"value": 2, "name": "src"}, |
| 397 | {"value": 3, "name": "one minus src"}, |
Austin Eng | 94bebe5 | 2017-07-26 16:59:53 -0400 | [diff] [blame] | 398 | {"value": 4, "name": "src alpha"}, |
| 399 | {"value": 5, "name": "one minus src alpha"}, |
Brandon Jones | 22b923c | 2021-04-15 18:34:29 +0000 | [diff] [blame] | 400 | {"value": 6, "name": "dst"}, |
| 401 | {"value": 7, "name": "one minus dst"}, |
Austin Eng | 94bebe5 | 2017-07-26 16:59:53 -0400 | [diff] [blame] | 402 | {"value": 8, "name": "dst alpha"}, |
| 403 | {"value": 9, "name": "one minus dst alpha"}, |
| 404 | {"value": 10, "name": "src alpha saturated"}, |
Brandon Jones | 22b923c | 2021-04-15 18:34:29 +0000 | [diff] [blame] | 405 | {"value": 11, "name": "constant"}, |
Corentin Wallez | 10b9cce | 2021-09-03 16:37:00 +0000 | [diff] [blame] | 406 | {"value": 12, "name": "one minus constant"} |
Austin Eng | 94bebe5 | 2017-07-26 16:59:53 -0400 | [diff] [blame] | 407 | ] |
| 408 | }, |
| 409 | "blend operation": { |
| 410 | "category": "enum", |
| 411 | "values": [ |
| 412 | {"value": 0, "name": "add"}, |
| 413 | {"value": 1, "name": "subtract"}, |
| 414 | {"value": 2, "name": "reverse subtract"}, |
| 415 | {"value": 3, "name": "min"}, |
| 416 | {"value": 4, "name": "max"} |
| 417 | ] |
| 418 | }, |
Corentin Wallez | a60799f | 2018-09-11 18:16:54 +0000 | [diff] [blame] | 419 | "bool": { |
| 420 | "category": "native" |
| 421 | }, |
Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 422 | "buffer": { |
| 423 | "category": "object", |
| 424 | "methods": [ |
| 425 | { |
Corentin Wallez | 0d52f80 | 2020-07-14 12:30:14 +0000 | [diff] [blame] | 426 | "name": "map async", |
| 427 | "args": [ |
Corentin Wallez | 3ed44f5 | 2020-07-20 16:24:20 +0000 | [diff] [blame] | 428 | {"name": "mode", "type": "map mode"}, |
Corentin Wallez | 0d52f80 | 2020-07-14 12:30:14 +0000 | [diff] [blame] | 429 | {"name": "offset", "type": "size_t"}, |
| 430 | {"name": "size", "type": "size_t"}, |
Corentin Wallez | e00c6bd | 2021-12-13 17:37:17 +0000 | [diff] [blame] | 431 | {"name": "callback", "type": "buffer map callback"}, |
Corentin Wallez | 0d52f80 | 2020-07-14 12:30:14 +0000 | [diff] [blame] | 432 | {"name": "userdata", "type": "void", "annotation": "*"} |
| 433 | ] |
| 434 | }, |
| 435 | { |
Corentin Wallez | 1325ab1 | 2020-06-30 11:51:14 +0000 | [diff] [blame] | 436 | "name": "get mapped range", |
Corentin Wallez | f6e7044 | 2020-07-17 18:50:37 +0000 | [diff] [blame] | 437 | "returns": "void *", |
| 438 | "args": [ |
| 439 | {"name": "offset", "type": "size_t", "default": 0}, |
Shrek Shao | 286061d | 2022-04-29 18:12:17 +0000 | [diff] [blame] | 440 | {"name": "size", "type": "size_t", "default": "WGPU_WHOLE_MAP_SIZE"} |
Corentin Wallez | f6e7044 | 2020-07-17 18:50:37 +0000 | [diff] [blame] | 441 | ] |
Corentin Wallez | 1325ab1 | 2020-06-30 11:51:14 +0000 | [diff] [blame] | 442 | }, |
| 443 | { |
| 444 | "name": "get const mapped range", |
Corentin Wallez | f6e7044 | 2020-07-17 18:50:37 +0000 | [diff] [blame] | 445 | "returns": "void const *", |
| 446 | "args": [ |
| 447 | {"name": "offset", "type": "size_t", "default": 0}, |
Shrek Shao | 286061d | 2022-04-29 18:12:17 +0000 | [diff] [blame] | 448 | {"name": "size", "type": "size_t", "default": "WGPU_WHOLE_MAP_SIZE"} |
Corentin Wallez | f6e7044 | 2020-07-17 18:50:37 +0000 | [diff] [blame] | 449 | ] |
Corentin Wallez | 1325ab1 | 2020-06-30 11:51:14 +0000 | [diff] [blame] | 450 | }, |
| 451 | { |
Brandon Jones | c95e574 | 2021-08-19 20:47:28 +0000 | [diff] [blame] | 452 | "name": "set label", |
| 453 | "returns": "void", |
| 454 | "args": [ |
| 455 | {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"} |
| 456 | ] |
| 457 | }, |
| 458 | { |
Corentin Wallez | d428187 | 2022-06-08 14:46:41 +0000 | [diff] [blame] | 459 | "name": "get usage", |
| 460 | "returns": "buffer usage" |
| 461 | }, |
| 462 | { |
| 463 | "name": "get size", |
| 464 | "returns": "uint64_t" |
| 465 | }, |
| 466 | { |
Takahiro | 915e55a | 2022-12-19 19:06:51 +0000 | [diff] [blame] | 467 | "name": "get map state", |
| 468 | "returns": "buffer map state" |
| 469 | }, |
| 470 | { |
Corentin Wallez | b1c19ee | 2017-06-09 10:51:29 -0400 | [diff] [blame] | 471 | "name": "unmap" |
Austin Eng | 446ab44 | 2019-02-13 21:26:48 +0000 | [diff] [blame] | 472 | }, |
| 473 | { |
| 474 | "name": "destroy" |
Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 475 | } |
| 476 | ] |
| 477 | }, |
Corentin Wallez | 82b6573 | 2018-08-22 15:37:29 +0200 | [diff] [blame] | 478 | "buffer descriptor": { |
| 479 | "category": "structure", |
Austin Eng | 0c82405 | 2021-09-20 16:07:25 +0000 | [diff] [blame] | 480 | "extensible": "in", |
Corentin Wallez | 82b6573 | 2018-08-22 15:37:29 +0200 | [diff] [blame] | 481 | "members": [ |
François Beaufort | 277d2e1 | 2019-10-03 14:56:49 +0000 | [diff] [blame] | 482 | {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true}, |
Corentin Wallez | 9e9e29f | 2019-08-27 08:21:39 +0000 | [diff] [blame] | 483 | {"name": "usage", "type": "buffer usage"}, |
Corentin Wallez | b2ea191 | 2020-07-07 11:21:51 +0000 | [diff] [blame] | 484 | {"name": "size", "type": "uint64_t"}, |
| 485 | {"name": "mapped at creation", "type": "bool", "default": "false"} |
Corentin Wallez | 82b6573 | 2018-08-22 15:37:29 +0200 | [diff] [blame] | 486 | ] |
| 487 | }, |
Corentin Wallez | 0d52f80 | 2020-07-14 12:30:14 +0000 | [diff] [blame] | 488 | "buffer map callback": { |
fujunwei | 23f7162 | 2021-12-02 07:41:21 +0000 | [diff] [blame] | 489 | "category": "function pointer", |
Corentin Wallez | 0d52f80 | 2020-07-14 12:30:14 +0000 | [diff] [blame] | 490 | "args": [ |
| 491 | {"name": "status", "type": "buffer map async status"}, |
| 492 | {"name": "userdata", "type": "void", "annotation": "*"} |
| 493 | ] |
| 494 | }, |
Corentin Wallez | 8565e00 | 2018-03-20 19:48:54 -0400 | [diff] [blame] | 495 | "buffer map async status": { |
Corentin Wallez | b1c19ee | 2017-06-09 10:51:29 -0400 | [diff] [blame] | 496 | "category": "enum", |
Kai Ninomiya | 930e918 | 2021-09-17 19:44:43 +0000 | [diff] [blame] | 497 | "emscripten_no_enum_table": true, |
Corentin Wallez | b1c19ee | 2017-06-09 10:51:29 -0400 | [diff] [blame] | 498 | "values": [ |
| 499 | {"value": 0, "name": "success"}, |
| 500 | {"value": 1, "name": "error"}, |
| 501 | {"value": 2, "name": "unknown"}, |
Jiawei Shao | ed2b465 | 2020-09-27 02:00:52 +0000 | [diff] [blame] | 502 | {"value": 3, "name": "device lost"}, |
| 503 | {"value": 4, "name": "destroyed before callback"}, |
| 504 | {"value": 5, "name": "unmapped before callback"} |
Corentin Wallez | b1c19ee | 2017-06-09 10:51:29 -0400 | [diff] [blame] | 505 | ] |
| 506 | }, |
Takahiro | 915e55a | 2022-12-19 19:06:51 +0000 | [diff] [blame] | 507 | "buffer map state": { |
| 508 | "category": "enum", |
| 509 | "values": [ |
| 510 | {"value": 0, "name": "unmapped"}, |
| 511 | {"value": 1, "name": "pending"}, |
| 512 | {"value": 2, "name": "mapped"} |
| 513 | ] |
| 514 | }, |
Corentin Wallez | 9e9e29f | 2019-08-27 08:21:39 +0000 | [diff] [blame] | 515 | "buffer usage": { |
Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 516 | "category": "bitmask", |
| 517 | "values": [ |
| 518 | {"value": 0, "name": "none"}, |
Corentin Wallez | f45bdb8 | 2017-06-05 15:42:14 -0400 | [diff] [blame] | 519 | {"value": 1, "name": "map read"}, |
Corentin Wallez | 769b00f | 2017-06-16 15:35:12 -0400 | [diff] [blame] | 520 | {"value": 2, "name": "map write"}, |
Corentin Wallez | ec05355 | 2019-07-08 10:05:46 +0000 | [diff] [blame] | 521 | {"value": 4, "name": "copy src"}, |
| 522 | {"value": 8, "name": "copy dst"}, |
Corentin Wallez | 769b00f | 2017-06-16 15:35:12 -0400 | [diff] [blame] | 523 | {"value": 16, "name": "index"}, |
| 524 | {"value": 32, "name": "vertex"}, |
| 525 | {"value": 64, "name": "uniform"}, |
Idan Raiter | 05f7ad5 | 2019-06-10 20:56:27 +0000 | [diff] [blame] | 526 | {"value": 128, "name": "storage"}, |
Hao Li | 5c89c8d | 2020-07-17 09:02:46 +0000 | [diff] [blame] | 527 | {"value": 256, "name": "indirect"}, |
| 528 | {"value": 512, "name": "query resolve"} |
Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 529 | ] |
| 530 | }, |
Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 531 | "char": { |
| 532 | "category": "native" |
| 533 | }, |
Jiawei Shao | 5e811ae | 2018-12-19 08:21:13 +0000 | [diff] [blame] | 534 | "color": { |
| 535 | "category": "structure", |
| 536 | "members": [ |
Brandon Jones | 670858d | 2020-09-22 16:51:36 +0000 | [diff] [blame] | 537 | {"name": "r", "type": "double"}, |
| 538 | {"name": "g", "type": "double"}, |
| 539 | {"name": "b", "type": "double"}, |
| 540 | {"name": "a", "type": "double"} |
Jiawei Shao | 5e811ae | 2018-12-19 08:21:13 +0000 | [diff] [blame] | 541 | ] |
| 542 | }, |
Austin Eng | 94bebe5 | 2017-07-26 16:59:53 -0400 | [diff] [blame] | 543 | "color write mask": { |
| 544 | "category": "bitmask", |
| 545 | "values": [ |
| 546 | {"value": 0, "name": "none"}, |
| 547 | {"value": 1, "name": "red"}, |
| 548 | {"value": 2, "name": "green"}, |
| 549 | {"value": 4, "name": "blue"}, |
| 550 | {"value": 8, "name": "alpha"}, |
| 551 | {"value": 15, "name": "all"} |
| 552 | ] |
| 553 | }, |
Kai Ninomiya | 7d174a1 | 2021-09-21 17:36:27 +0000 | [diff] [blame] | 554 | "constant entry": { |
| 555 | "category": "structure", |
| 556 | "extensible": "in", |
| 557 | "members": [ |
shrekshao | e99ad76 | 2021-09-28 20:15:52 +0000 | [diff] [blame] | 558 | {"name": "key", "type": "char", "annotation": "const*", "length": "strlen"}, |
Kai Ninomiya | 7d174a1 | 2021-09-21 17:36:27 +0000 | [diff] [blame] | 559 | {"name": "value", "type": "double"} |
| 560 | ] |
| 561 | }, |
Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 562 | "command buffer": { |
Brandon Jones | 828f674 | 2021-11-23 00:09:25 +0000 | [diff] [blame] | 563 | "category": "object", |
| 564 | "methods": [ |
| 565 | { |
| 566 | "name": "set label", |
| 567 | "returns": "void", |
Brandon Jones | 828f674 | 2021-11-23 00:09:25 +0000 | [diff] [blame] | 568 | "args": [ |
| 569 | {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"} |
| 570 | ] |
| 571 | } |
| 572 | ] |
Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 573 | }, |
Corentin Wallez | 4b90c47 | 2019-07-10 20:43:13 +0000 | [diff] [blame] | 574 | "command buffer descriptor": { |
| 575 | "category": "structure", |
Austin Eng | 0c82405 | 2021-09-20 16:07:25 +0000 | [diff] [blame] | 576 | "extensible": "in", |
François Beaufort | 6ac5a92 | 2019-09-25 13:56:48 +0000 | [diff] [blame] | 577 | "members": [ |
| 578 | {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true} |
| 579 | ] |
Corentin Wallez | 4b90c47 | 2019-07-10 20:43:13 +0000 | [diff] [blame] | 580 | }, |
Corentin Wallez | e1f0d4e | 2019-02-15 12:54:08 +0000 | [diff] [blame] | 581 | "command encoder": { |
| 582 | "category": "object", |
Le Hoang Quyen | 7971bfe | 2023-04-05 19:35:07 +0000 | [diff] [blame] | 583 | "no autolock": true, |
Corentin Wallez | e1f0d4e | 2019-02-15 12:54:08 +0000 | [diff] [blame] | 584 | "methods": [ |
| 585 | { |
| 586 | "name": "finish", |
Corentin Wallez | 4b90c47 | 2019-07-10 20:43:13 +0000 | [diff] [blame] | 587 | "returns": "command buffer", |
| 588 | "args": [ |
| 589 | {"name": "descriptor", "type": "command buffer descriptor", "annotation": "const*", "optional": true} |
| 590 | ] |
Corentin Wallez | e1f0d4e | 2019-02-15 12:54:08 +0000 | [diff] [blame] | 591 | }, |
| 592 | { |
| 593 | "name": "begin compute pass", |
Corentin Wallez | 4b90c47 | 2019-07-10 20:43:13 +0000 | [diff] [blame] | 594 | "returns": "compute pass encoder", |
| 595 | "args": [ |
| 596 | {"name": "descriptor", "type": "compute pass descriptor", "annotation": "const*", "optional": true} |
| 597 | ] |
Corentin Wallez | e1f0d4e | 2019-02-15 12:54:08 +0000 | [diff] [blame] | 598 | }, |
| 599 | { |
| 600 | "name": "begin render pass", |
Corentin Wallez | 4b90c47 | 2019-07-10 20:43:13 +0000 | [diff] [blame] | 601 | "returns": "render pass encoder", |
Corentin Wallez | e1f0d4e | 2019-02-15 12:54:08 +0000 | [diff] [blame] | 602 | "args": [ |
Corentin Wallez | 4b90c47 | 2019-07-10 20:43:13 +0000 | [diff] [blame] | 603 | {"name": "descriptor", "type": "render pass descriptor", "annotation": "const*"} |
| 604 | ] |
Corentin Wallez | e1f0d4e | 2019-02-15 12:54:08 +0000 | [diff] [blame] | 605 | }, |
| 606 | { |
| 607 | "name": "copy buffer to buffer", |
| 608 | "args": [ |
| 609 | {"name": "source", "type": "buffer"}, |
Austin Eng | cf52d71 | 2019-04-05 20:51:29 +0000 | [diff] [blame] | 610 | {"name": "source offset", "type": "uint64_t"}, |
Corentin Wallez | e1f0d4e | 2019-02-15 12:54:08 +0000 | [diff] [blame] | 611 | {"name": "destination", "type": "buffer"}, |
Austin Eng | cf52d71 | 2019-04-05 20:51:29 +0000 | [diff] [blame] | 612 | {"name": "destination offset", "type": "uint64_t"}, |
| 613 | {"name": "size", "type": "uint64_t"} |
Corentin Wallez | e1f0d4e | 2019-02-15 12:54:08 +0000 | [diff] [blame] | 614 | ] |
| 615 | }, |
| 616 | { |
| 617 | "name": "copy buffer to texture", |
| 618 | "args": [ |
Corentin Wallez | 8091584 | 2021-03-04 18:13:45 +0000 | [diff] [blame] | 619 | {"name": "source", "type": "image copy buffer", "annotation": "const*"}, |
| 620 | {"name": "destination", "type": "image copy texture", "annotation": "const*"}, |
Corentin Wallez | e1f0d4e | 2019-02-15 12:54:08 +0000 | [diff] [blame] | 621 | {"name": "copy size", "type": "extent 3D", "annotation": "const*"} |
| 622 | ] |
| 623 | }, |
| 624 | { |
| 625 | "name": "copy texture to buffer", |
| 626 | "args": [ |
Corentin Wallez | 8091584 | 2021-03-04 18:13:45 +0000 | [diff] [blame] | 627 | {"name": "source", "type": "image copy texture", "annotation": "const*"}, |
| 628 | {"name": "destination", "type": "image copy buffer", "annotation": "const*"}, |
Corentin Wallez | e1f0d4e | 2019-02-15 12:54:08 +0000 | [diff] [blame] | 629 | {"name": "copy size", "type": "extent 3D", "annotation": "const*"} |
| 630 | ] |
Brandon Jones | d3d3aa0 | 2019-03-26 11:06:23 +0000 | [diff] [blame] | 631 | }, |
| 632 | { |
| 633 | "name": "copy texture to texture", |
| 634 | "args": [ |
Corentin Wallez | 8091584 | 2021-03-04 18:13:45 +0000 | [diff] [blame] | 635 | {"name": "source", "type": "image copy texture", "annotation": "const*"}, |
| 636 | {"name": "destination", "type": "image copy texture", "annotation": "const*"}, |
Brandon Jones | d3d3aa0 | 2019-03-26 11:06:23 +0000 | [diff] [blame] | 637 | {"name": "copy size", "type": "extent 3D", "annotation": "const*"} |
| 638 | ] |
Corentin Wallez | b8ea84c | 2019-09-10 08:20:40 +0000 | [diff] [blame] | 639 | }, |
| 640 | { |
Juanmi | f00c68a | 2021-08-05 22:55:09 +0000 | [diff] [blame] | 641 | "name": "copy texture to texture internal", |
Kai Ninomiya | 930e918 | 2021-09-17 19:44:43 +0000 | [diff] [blame] | 642 | "tags": ["dawn"], |
Juanmi | f00c68a | 2021-08-05 22:55:09 +0000 | [diff] [blame] | 643 | "args": [ |
| 644 | {"name": "source", "type": "image copy texture", "annotation": "const*"}, |
| 645 | {"name": "destination", "type": "image copy texture", "annotation": "const*"}, |
| 646 | {"name": "copy size", "type": "extent 3D", "annotation": "const*"} |
| 647 | ] |
| 648 | }, |
| 649 | { |
Brandon Jones | d3105bf | 2021-12-02 21:43:49 +0000 | [diff] [blame] | 650 | "name": "clear buffer", |
Corentin Wallez | 6cd1cd9 | 2021-11-17 08:13:24 +0000 | [diff] [blame] | 651 | "args": [ |
Brandon Jones | d3105bf | 2021-12-02 21:43:49 +0000 | [diff] [blame] | 652 | {"name": "buffer", "type": "buffer"}, |
| 653 | {"name": "offset", "type": "uint64_t", "default": 0}, |
| 654 | {"name": "size", "type": "uint64_t", "default": "WGPU_WHOLE_SIZE"} |
Corentin Wallez | 6cd1cd9 | 2021-11-17 08:13:24 +0000 | [diff] [blame] | 655 | ] |
| 656 | }, |
| 657 | { |
Austin Eng | 464aaeb | 2020-11-14 01:24:03 +0000 | [diff] [blame] | 658 | "name": "inject validation error", |
Kai Ninomiya | 930e918 | 2021-09-17 19:44:43 +0000 | [diff] [blame] | 659 | "tags": ["dawn"], |
Austin Eng | 464aaeb | 2020-11-14 01:24:03 +0000 | [diff] [blame] | 660 | "args": [ |
| 661 | {"name": "message", "type": "char", "annotation": "const*", "length": "strlen"} |
Kai Ninomiya | 930e918 | 2021-09-17 19:44:43 +0000 | [diff] [blame] | 662 | ] |
Austin Eng | 464aaeb | 2020-11-14 01:24:03 +0000 | [diff] [blame] | 663 | }, |
| 664 | { |
Corentin Wallez | b8ea84c | 2019-09-10 08:20:40 +0000 | [diff] [blame] | 665 | "name": "insert debug marker", |
| 666 | "args": [ |
Kai Ninomiya | 51bbbef | 2020-07-12 16:01:38 +0000 | [diff] [blame] | 667 | {"name": "marker label", "type": "char", "annotation": "const*", "length": "strlen"} |
Corentin Wallez | b8ea84c | 2019-09-10 08:20:40 +0000 | [diff] [blame] | 668 | ] |
| 669 | }, |
| 670 | { |
| 671 | "name": "pop debug group", |
| 672 | "args": [] |
| 673 | }, |
| 674 | { |
| 675 | "name": "push debug group", |
| 676 | "args": [ |
| 677 | {"name": "group label", "type": "char", "annotation": "const*", "length": "strlen"} |
| 678 | ] |
Hao Li | 5191adc | 2020-07-01 10:48:16 +0000 | [diff] [blame] | 679 | }, |
| 680 | { |
Hao Li | 5c89c8d | 2020-07-17 09:02:46 +0000 | [diff] [blame] | 681 | "name": "resolve query set", |
| 682 | "args": [ |
| 683 | {"name": "query set", "type": "query set"}, |
| 684 | {"name": "first query", "type": "uint32_t"}, |
| 685 | {"name": "query count", "type": "uint32_t"}, |
| 686 | {"name": "destination", "type": "buffer"}, |
| 687 | {"name": "destination offset", "type": "uint64_t"} |
| 688 | ] |
| 689 | }, |
| 690 | { |
Ken Rockot | 6237c8a | 2021-09-20 19:25:05 +0000 | [diff] [blame] | 691 | "name": "write buffer", |
Kai Ninomiya | 7d174a1 | 2021-09-21 17:36:27 +0000 | [diff] [blame] | 692 | "tags": ["dawn"], |
Ken Rockot | 6237c8a | 2021-09-20 19:25:05 +0000 | [diff] [blame] | 693 | "args": [ |
| 694 | {"name": "buffer", "type": "buffer"}, |
| 695 | {"name": "buffer offset", "type": "uint64_t"}, |
| 696 | {"name": "data", "type": "uint8_t", "annotation": "const*", "length": "size"}, |
| 697 | {"name": "size", "type": "uint64_t"} |
| 698 | ] |
| 699 | }, |
| 700 | { |
Hao Li | 5191adc | 2020-07-01 10:48:16 +0000 | [diff] [blame] | 701 | "name": "write timestamp", |
| 702 | "args": [ |
| 703 | {"name": "query set", "type": "query set"}, |
| 704 | {"name": "query index", "type": "uint32_t"} |
| 705 | ] |
Brandon Jones | 828f674 | 2021-11-23 00:09:25 +0000 | [diff] [blame] | 706 | }, |
| 707 | { |
| 708 | "name": "set label", |
| 709 | "returns": "void", |
Brandon Jones | 828f674 | 2021-11-23 00:09:25 +0000 | [diff] [blame] | 710 | "args": [ |
| 711 | {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"} |
| 712 | ] |
Corentin Wallez | e1f0d4e | 2019-02-15 12:54:08 +0000 | [diff] [blame] | 713 | } |
| 714 | ] |
| 715 | }, |
Corentin Wallez | 4b90c47 | 2019-07-10 20:43:13 +0000 | [diff] [blame] | 716 | "command encoder descriptor": { |
| 717 | "category": "structure", |
Austin Eng | 0c82405 | 2021-09-20 16:07:25 +0000 | [diff] [blame] | 718 | "extensible": "in", |
François Beaufort | 277d2e1 | 2019-10-03 14:56:49 +0000 | [diff] [blame] | 719 | "members": [ |
| 720 | {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true} |
| 721 | ] |
Corentin Wallez | 4b90c47 | 2019-07-10 20:43:13 +0000 | [diff] [blame] | 722 | }, |
Corentin Wallez | 82fbccb | 2018-09-21 00:24:37 +0000 | [diff] [blame] | 723 | "compare function": { |
| 724 | "category": "enum", |
| 725 | "values": [ |
Corentin Wallez | 5d2f204 | 2021-04-08 18:42:47 +0000 | [diff] [blame] | 726 | {"value": 0, "name": "undefined", "jsrepr": "undefined", "valid": false}, |
Austin Eng | d6a5431 | 2020-04-17 19:32:07 +0000 | [diff] [blame] | 727 | {"value": 1, "name": "never"}, |
| 728 | {"value": 2, "name": "less"}, |
| 729 | {"value": 3, "name": "less equal"}, |
| 730 | {"value": 4, "name": "greater"}, |
| 731 | {"value": 5, "name": "greater equal"}, |
| 732 | {"value": 6, "name": "equal"}, |
| 733 | {"value": 7, "name": "not equal"}, |
| 734 | {"value": 8, "name": "always"} |
Corentin Wallez | 82fbccb | 2018-09-21 00:24:37 +0000 | [diff] [blame] | 735 | ] |
| 736 | }, |
Brandon Jones | 6f2bbe9 | 2021-04-05 23:34:17 +0000 | [diff] [blame] | 737 | "compilation info": { |
| 738 | "category": "structure", |
Corentin Wallez | 61c8532 | 2021-11-16 09:25:35 +0000 | [diff] [blame] | 739 | "extensible": "in", |
Brandon Jones | 6f2bbe9 | 2021-04-05 23:34:17 +0000 | [diff] [blame] | 740 | "members": [ |
| 741 | {"name": "message count", "type": "uint32_t"}, |
| 742 | {"name": "messages", "type": "compilation message", "annotation": "const*", "length": "message count"} |
| 743 | ] |
| 744 | }, |
| 745 | "compilation info callback": { |
fujunwei | 23f7162 | 2021-12-02 07:41:21 +0000 | [diff] [blame] | 746 | "category": "function pointer", |
Brandon Jones | 6f2bbe9 | 2021-04-05 23:34:17 +0000 | [diff] [blame] | 747 | "args": [ |
| 748 | {"name": "status", "type": "compilation info request status"}, |
| 749 | {"name": "compilation info", "type": "compilation info", "annotation": "const*"}, |
| 750 | {"name": "userdata", "type": "void", "annotation": "*"} |
| 751 | ] |
| 752 | }, |
| 753 | "compilation info request status": { |
| 754 | "category": "enum", |
| 755 | "values": [ |
| 756 | {"value": 0, "name": "success"}, |
| 757 | {"value": 1, "name": "error"}, |
| 758 | {"value": 2, "name": "device lost"}, |
| 759 | {"value": 3, "name": "unknown"} |
| 760 | ] |
| 761 | }, |
| 762 | "compilation message": { |
| 763 | "category": "structure", |
Corentin Wallez | 61c8532 | 2021-11-16 09:25:35 +0000 | [diff] [blame] | 764 | "extensible": "in", |
Brandon Jones | 6f2bbe9 | 2021-04-05 23:34:17 +0000 | [diff] [blame] | 765 | "members": [ |
| 766 | {"name": "message", "type": "char", "annotation": "const*", "length": "strlen", "optional": true}, |
| 767 | {"name": "type", "type": "compilation message type"}, |
| 768 | {"name": "line num", "type": "uint64_t"}, |
Brandon Jones | 83ae2ce | 2021-04-30 20:45:58 +0000 | [diff] [blame] | 769 | {"name": "line pos", "type": "uint64_t"}, |
| 770 | {"name": "offset", "type": "uint64_t"}, |
Jiawei Shao | f7beb85 | 2023-01-10 00:03:24 +0000 | [diff] [blame] | 771 | {"name": "length", "type": "uint64_t"}, |
| 772 | {"name": "utf16 line pos", "type": "uint64_t"}, |
| 773 | {"name": "utf16 offset", "type": "uint64_t"}, |
| 774 | {"name": "utf16 length", "type": "uint64_t"} |
Brandon Jones | 6f2bbe9 | 2021-04-05 23:34:17 +0000 | [diff] [blame] | 775 | ] |
| 776 | }, |
| 777 | "compilation message type": { |
| 778 | "category": "enum", |
Kai Ninomiya | 930e918 | 2021-09-17 19:44:43 +0000 | [diff] [blame] | 779 | "emscripten_no_enum_table": true, |
Brandon Jones | 6f2bbe9 | 2021-04-05 23:34:17 +0000 | [diff] [blame] | 780 | "values": [ |
| 781 | {"value": 0, "name": "error"}, |
| 782 | {"value": 1, "name": "warning"}, |
| 783 | {"value": 2, "name": "info"} |
| 784 | ] |
| 785 | }, |
Corentin Wallez | 4b90c47 | 2019-07-10 20:43:13 +0000 | [diff] [blame] | 786 | "compute pass descriptor": { |
| 787 | "category": "structure", |
Austin Eng | 0c82405 | 2021-09-20 16:07:25 +0000 | [diff] [blame] | 788 | "extensible": "in", |
François Beaufort | 6ac5a92 | 2019-09-25 13:56:48 +0000 | [diff] [blame] | 789 | "members": [ |
Corentin Wallez | 6cd1cd9 | 2021-11-17 08:13:24 +0000 | [diff] [blame] | 790 | {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true}, |
Li Hao | 131c422 | 2022-03-05 01:22:52 +0000 | [diff] [blame] | 791 | {"name": "timestamp write count", "type": "uint32_t", "default": 0}, |
| 792 | {"name": "timestamp writes", "type": "compute pass timestamp write", "annotation": "const*", "length": "timestamp write count"} |
François Beaufort | 6ac5a92 | 2019-09-25 13:56:48 +0000 | [diff] [blame] | 793 | ] |
Corentin Wallez | 4b90c47 | 2019-07-10 20:43:13 +0000 | [diff] [blame] | 794 | }, |
Corentin Wallez | 82fbccb | 2018-09-21 00:24:37 +0000 | [diff] [blame] | 795 | "compute pass encoder": { |
| 796 | "category": "object", |
Le Hoang Quyen | 7971bfe | 2023-04-05 19:35:07 +0000 | [diff] [blame] | 797 | "no autolock": true, |
Corentin Wallez | 82fbccb | 2018-09-21 00:24:37 +0000 | [diff] [blame] | 798 | "methods": [ |
Corentin Wallez | e9d347e | 2017-06-26 16:23:03 -0400 | [diff] [blame] | 799 | { |
Brandon Jones | 11d32c8 | 2019-02-20 20:21:00 +0000 | [diff] [blame] | 800 | "name": "insert debug marker", |
| 801 | "args": [ |
Kai Ninomiya | 51bbbef | 2020-07-12 16:01:38 +0000 | [diff] [blame] | 802 | {"name": "marker label", "type": "char", "annotation": "const*", "length": "strlen"} |
Brandon Jones | 11d32c8 | 2019-02-20 20:21:00 +0000 | [diff] [blame] | 803 | ] |
| 804 | }, |
| 805 | { |
| 806 | "name": "pop debug group", |
| 807 | "args": [] |
| 808 | }, |
| 809 | { |
| 810 | "name": "push debug group", |
| 811 | "args": [ |
| 812 | {"name": "group label", "type": "char", "annotation": "const*", "length": "strlen"} |
| 813 | ] |
| 814 | }, |
| 815 | { |
Yan, Shaobo | 300eec0 | 2018-12-21 10:40:26 +0000 | [diff] [blame] | 816 | "name": "set pipeline", |
Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 817 | "args": [ |
Corentin Wallez | 82fbccb | 2018-09-21 00:24:37 +0000 | [diff] [blame] | 818 | {"name": "pipeline", "type": "compute pipeline"} |
Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 819 | ] |
| 820 | }, |
| 821 | { |
Corentin Wallez | 82fbccb | 2018-09-21 00:24:37 +0000 | [diff] [blame] | 822 | "name": "set bind group", |
Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 823 | "args": [ |
Corentin Wallez | 82fbccb | 2018-09-21 00:24:37 +0000 | [diff] [blame] | 824 | {"name": "group index", "type": "uint32_t"}, |
Yan, Shaobo | 991ab98 | 2019-03-18 06:01:37 +0000 | [diff] [blame] | 825 | {"name": "group", "type": "bind group"}, |
Corentin Wallez | 70c8c10 | 2019-10-09 16:08:42 +0000 | [diff] [blame] | 826 | {"name": "dynamic offset count", "type": "uint32_t", "default": "0"}, |
Corentin Wallez | 75f554d | 2021-06-17 16:04:29 +0000 | [diff] [blame] | 827 | {"name": "dynamic offsets", "type": "uint32_t", "annotation": "const*", "length": "dynamic offset count", "default": "nullptr"} |
Corentin Wallez | 29ced28 | 2017-07-14 10:58:07 -0400 | [diff] [blame] | 828 | ] |
| 829 | }, |
| 830 | { |
Hao Li | 5191adc | 2020-07-01 10:48:16 +0000 | [diff] [blame] | 831 | "name": "write timestamp", |
Corentin Wallez | 6cd1cd9 | 2021-11-17 08:13:24 +0000 | [diff] [blame] | 832 | "tags": ["emscripten", "dawn"], |
Hao Li | 5191adc | 2020-07-01 10:48:16 +0000 | [diff] [blame] | 833 | "args": [ |
| 834 | {"name": "query set", "type": "query set"}, |
| 835 | {"name": "query index", "type": "uint32_t"} |
| 836 | ] |
| 837 | }, |
| 838 | { |
Kai Ninomiya | 4e37acc | 2021-09-17 21:13:33 +0000 | [diff] [blame] | 839 | "name": "begin pipeline statistics query", |
Shrek Shao | ee50bc0 | 2022-02-08 20:21:40 +0000 | [diff] [blame] | 840 | "tags": ["upstream", "emscripten"], |
Kai Ninomiya | 4e37acc | 2021-09-17 21:13:33 +0000 | [diff] [blame] | 841 | "args": [ |
| 842 | {"name": "query set", "type": "query set"}, |
| 843 | {"name": "query index", "type": "uint32_t"} |
| 844 | ] |
| 845 | }, |
| 846 | { |
Corentin Wallez | 82fbccb | 2018-09-21 00:24:37 +0000 | [diff] [blame] | 847 | "name": "dispatch", |
Brandon Jones | 3daebe8 | 2022-04-29 17:51:54 +0000 | [diff] [blame] | 848 | "tags": ["deprecated"], |
| 849 | "args": [ |
| 850 | {"name": "workgroupCountX", "type": "uint32_t"}, |
| 851 | {"name": "workgroupCountY", "type": "uint32_t", "default": "1"}, |
| 852 | {"name": "workgroupCountZ", "type": "uint32_t", "default": "1"} |
| 853 | ] |
| 854 | }, |
| 855 | { |
| 856 | "name": "dispatch workgroups", |
Corentin Wallez | a3c89cc | 2018-02-13 14:57:13 -0500 | [diff] [blame] | 857 | "args": [ |
Brandon Jones | 913e158 | 2022-01-27 09:40:02 +0000 | [diff] [blame] | 858 | {"name": "workgroupCountX", "type": "uint32_t"}, |
| 859 | {"name": "workgroupCountY", "type": "uint32_t", "default": "1"}, |
| 860 | {"name": "workgroupCountZ", "type": "uint32_t", "default": "1"} |
Corentin Wallez | a3c89cc | 2018-02-13 14:57:13 -0500 | [diff] [blame] | 861 | ] |
| 862 | }, |
| 863 | { |
Idan Raiter | 05f7ad5 | 2019-06-10 20:56:27 +0000 | [diff] [blame] | 864 | "name": "dispatch indirect", |
Brandon Jones | 3daebe8 | 2022-04-29 17:51:54 +0000 | [diff] [blame] | 865 | "tags": ["deprecated"], |
| 866 | "args": [ |
| 867 | {"name": "indirect buffer", "type": "buffer"}, |
| 868 | {"name": "indirect offset", "type": "uint64_t"} |
| 869 | ] |
| 870 | }, |
| 871 | { |
| 872 | "name": "dispatch workgroups indirect", |
Idan Raiter | 05f7ad5 | 2019-06-10 20:56:27 +0000 | [diff] [blame] | 873 | "args": [ |
| 874 | {"name": "indirect buffer", "type": "buffer"}, |
| 875 | {"name": "indirect offset", "type": "uint64_t"} |
| 876 | ] |
| 877 | }, |
| 878 | { |
Brandon Jones | 0fee4c1 | 2022-02-07 19:48:39 +0000 | [diff] [blame] | 879 | "name": "end" |
| 880 | }, |
| 881 | { |
| 882 | "name": "end pass", |
| 883 | "tags": ["deprecated"] |
Kai Ninomiya | 4e37acc | 2021-09-17 21:13:33 +0000 | [diff] [blame] | 884 | }, |
| 885 | { |
| 886 | "name": "end pipeline statistics query", |
Shrek Shao | ee50bc0 | 2022-02-08 20:21:40 +0000 | [diff] [blame] | 887 | "tags": ["upstream", "emscripten"] |
Brandon Jones | 828f674 | 2021-11-23 00:09:25 +0000 | [diff] [blame] | 888 | }, |
| 889 | { |
| 890 | "name": "set label", |
| 891 | "returns": "void", |
Brandon Jones | 828f674 | 2021-11-23 00:09:25 +0000 | [diff] [blame] | 892 | "args": [ |
| 893 | {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"} |
| 894 | ] |
Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 895 | } |
| 896 | ] |
| 897 | }, |
Corentin Wallez | 6cd1cd9 | 2021-11-17 08:13:24 +0000 | [diff] [blame] | 898 | "compute pass timestamp location": { |
| 899 | "category": "enum", |
Corentin Wallez | 6cd1cd9 | 2021-11-17 08:13:24 +0000 | [diff] [blame] | 900 | "values": [ |
| 901 | {"value": 0, "name": "beginning"}, |
| 902 | {"value": 1, "name": "end"} |
| 903 | ] |
| 904 | }, |
| 905 | "compute pass timestamp write": { |
| 906 | "category": "structure", |
Corentin Wallez | 6cd1cd9 | 2021-11-17 08:13:24 +0000 | [diff] [blame] | 907 | "members": [ |
| 908 | {"name": "query set", "type": "query set"}, |
| 909 | {"name": "query index", "type": "uint32_t"}, |
| 910 | {"name": "location", "type": "compute pass timestamp location"} |
| 911 | ] |
| 912 | }, |
Corentin Wallez | 29ced28 | 2017-07-14 10:58:07 -0400 | [diff] [blame] | 913 | "compute pipeline": { |
Austin Eng | f6eb890 | 2019-11-22 17:02:22 +0000 | [diff] [blame] | 914 | "category": "object", |
| 915 | "methods": [ |
| 916 | { |
| 917 | "name": "get bind group layout", |
| 918 | "returns": "bind group layout", |
| 919 | "args": [ |
Corentin Wallez | 373a3ff | 2020-04-01 18:22:36 +0000 | [diff] [blame] | 920 | {"name": "group index", "type": "uint32_t"} |
Austin Eng | f6eb890 | 2019-11-22 17:02:22 +0000 | [diff] [blame] | 921 | ] |
Brandon Jones | c1bcbbf | 2021-09-02 18:39:53 +0000 | [diff] [blame] | 922 | }, |
| 923 | { |
| 924 | "name": "set label", |
| 925 | "returns": "void", |
| 926 | "args": [ |
| 927 | {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"} |
| 928 | ] |
Austin Eng | f6eb890 | 2019-11-22 17:02:22 +0000 | [diff] [blame] | 929 | } |
| 930 | ] |
Corentin Wallez | 29ced28 | 2017-07-14 10:58:07 -0400 | [diff] [blame] | 931 | }, |
Corentin Wallez | 8e335a5 | 2018-08-27 23:12:56 +0200 | [diff] [blame] | 932 | "compute pipeline descriptor": { |
| 933 | "category": "structure", |
Austin Eng | 0c82405 | 2021-09-20 16:07:25 +0000 | [diff] [blame] | 934 | "extensible": "in", |
Corentin Wallez | 8e335a5 | 2018-08-27 23:12:56 +0200 | [diff] [blame] | 935 | "members": [ |
François Beaufort | 277d2e1 | 2019-10-03 14:56:49 +0000 | [diff] [blame] | 936 | {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true}, |
Austin Eng | f6eb890 | 2019-11-22 17:02:22 +0000 | [diff] [blame] | 937 | {"name": "layout", "type": "pipeline layout", "optional": true}, |
Corentin Wallez | c7203ba | 2021-09-14 11:42:27 +0000 | [diff] [blame] | 938 | {"name": "compute", "type": "programmable stage descriptor"} |
Corentin Wallez | 29ced28 | 2017-07-14 10:58:07 -0400 | [diff] [blame] | 939 | ] |
| 940 | }, |
Yan | 483bead | 2021-12-14 04:51:45 +0000 | [diff] [blame] | 941 | "alpha mode": { |
| 942 | "category": "enum", |
| 943 | "tags": ["dawn"], |
| 944 | "values": [ |
| 945 | {"value": 0, "name": "premultiplied"}, |
shrekshao | a3f4a32 | 2022-07-11 18:11:14 +0000 | [diff] [blame] | 946 | {"value": 1, "name": "unpremultiplied"}, |
| 947 | {"value": 2, "name": "opaque"} |
Yan | 483bead | 2021-12-14 04:51:45 +0000 | [diff] [blame] | 948 | ] |
| 949 | }, |
Yan, Shaobo | bb913a9 | 2020-12-02 08:13:09 +0000 | [diff] [blame] | 950 | "copy texture for browser options": { |
| 951 | "category": "structure", |
Austin Eng | 0c82405 | 2021-09-20 16:07:25 +0000 | [diff] [blame] | 952 | "extensible": "in", |
Kai Ninomiya | 930e918 | 2021-09-17 19:44:43 +0000 | [diff] [blame] | 953 | "tags": ["dawn"], |
Yan, Shaobo | bb913a9 | 2020-12-02 08:13:09 +0000 | [diff] [blame] | 954 | "members": [ |
Yan | 483bead | 2021-12-14 04:51:45 +0000 | [diff] [blame] | 955 | {"name": "flip y", "type": "bool", "default": "false"}, |
Yan | 483bead | 2021-12-14 04:51:45 +0000 | [diff] [blame] | 956 | {"name": "needs color space conversion", "type": "bool", "default": "false"}, |
| 957 | {"name": "src alpha mode", "type": "alpha mode", "default": "unpremultiplied"}, |
Yan | 483bead | 2021-12-14 04:51:45 +0000 | [diff] [blame] | 958 | {"name": "src transfer function parameters", "type": "float", "annotation": "const*", |
Yan | 5204053 | 2021-12-15 04:08:56 +0000 | [diff] [blame] | 959 | "length": 7, "optional": true}, |
Yan | 483bead | 2021-12-14 04:51:45 +0000 | [diff] [blame] | 960 | {"name": "conversion matrix", "type": "float", "annotation": "const*", |
Yan | 5204053 | 2021-12-15 04:08:56 +0000 | [diff] [blame] | 961 | "length": 9, "optional": true}, |
Yan | 483bead | 2021-12-14 04:51:45 +0000 | [diff] [blame] | 962 | {"name": "dst transfer function parameters", "type": "float", "annotation": "const*", |
Yan | 5204053 | 2021-12-15 04:08:56 +0000 | [diff] [blame] | 963 | "length": 7, "optional": true}, |
shrekshao | c6cbcdb | 2022-07-11 18:11:14 +0000 | [diff] [blame] | 964 | {"name": "dst alpha mode", "type": "alpha mode", "default": "unpremultiplied"}, |
| 965 | {"name": "internal usage", "type": "bool", "default": "false"} |
Yan, Shaobo | bb913a9 | 2020-12-02 08:13:09 +0000 | [diff] [blame] | 966 | ] |
| 967 | }, |
Corentin Wallez | 2d3c2e3 | 2021-02-22 18:27:36 +0000 | [diff] [blame] | 968 | "create compute pipeline async callback": { |
fujunwei | 23f7162 | 2021-12-02 07:41:21 +0000 | [diff] [blame] | 969 | "category": "function pointer", |
Jiawei Shao | ae5f950 | 2020-10-19 01:56:08 +0000 | [diff] [blame] | 970 | "args": [ |
Corentin Wallez | 2d3c2e3 | 2021-02-22 18:27:36 +0000 | [diff] [blame] | 971 | {"name": "status", "type": "create pipeline async status"}, |
Jiawei Shao | ae5f950 | 2020-10-19 01:56:08 +0000 | [diff] [blame] | 972 | {"name": "pipeline", "type": "compute pipeline"}, |
| 973 | {"name": "message", "type": "char", "annotation": "const*", "length": "strlen"}, |
| 974 | {"name": "userdata", "type": "void", "annotation": "*"} |
| 975 | ] |
| 976 | }, |
Corentin Wallez | 2d3c2e3 | 2021-02-22 18:27:36 +0000 | [diff] [blame] | 977 | "create pipeline async status": { |
Jiawei Shao | ae5f950 | 2020-10-19 01:56:08 +0000 | [diff] [blame] | 978 | "category": "enum", |
Kai Ninomiya | 930e918 | 2021-09-17 19:44:43 +0000 | [diff] [blame] | 979 | "emscripten_no_enum_table": true, |
Jiawei Shao | ae5f950 | 2020-10-19 01:56:08 +0000 | [diff] [blame] | 980 | "values": [ |
| 981 | {"value": 0, "name": "success"}, |
Corentin Wallez | e4b4c47 | 2023-02-08 19:36:53 +0000 | [diff] [blame] | 982 | {"value": 1, "name": "validation error"}, |
| 983 | {"value": 2, "name": "internal error"}, |
| 984 | {"value": 3, "name": "device lost"}, |
| 985 | {"value": 4, "name": "device destroyed"}, |
Corentin Wallez | c713005 | 2023-02-17 23:24:43 +0000 | [diff] [blame] | 986 | {"value": 5, "name": "unknown"} |
Jiawei Shao | ae5f950 | 2020-10-19 01:56:08 +0000 | [diff] [blame] | 987 | ] |
| 988 | }, |
Corentin Wallez | 2d3c2e3 | 2021-02-22 18:27:36 +0000 | [diff] [blame] | 989 | "create render pipeline async callback": { |
fujunwei | 23f7162 | 2021-12-02 07:41:21 +0000 | [diff] [blame] | 990 | "category": "function pointer", |
Jiawei Shao | 03e1400 | 2020-10-21 04:37:41 +0000 | [diff] [blame] | 991 | "args": [ |
Corentin Wallez | 2d3c2e3 | 2021-02-22 18:27:36 +0000 | [diff] [blame] | 992 | {"name": "status", "type": "create pipeline async status"}, |
Jiawei Shao | 03e1400 | 2020-10-21 04:37:41 +0000 | [diff] [blame] | 993 | {"name": "pipeline", "type": "render pipeline"}, |
| 994 | {"name": "message", "type": "char", "annotation": "const*", "length": "strlen"}, |
| 995 | {"name": "userdata", "type": "void", "annotation": "*"} |
| 996 | ] |
| 997 | }, |
Yunchao He | c33a8c1 | 2019-04-11 18:46:54 +0000 | [diff] [blame] | 998 | "cull mode": { |
| 999 | "category": "enum", |
| 1000 | "values": [ |
| 1001 | {"value": 0, "name": "none"}, |
| 1002 | {"value": 1, "name": "front"}, |
| 1003 | {"value": 2, "name": "back"} |
| 1004 | ] |
| 1005 | }, |
Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 1006 | "device": { |
| 1007 | "category": "object", |
| 1008 | "methods": [ |
| 1009 | { |
Corentin Wallez | 6f9d21e | 2018-12-05 07:18:30 +0000 | [diff] [blame] | 1010 | "name": "create bind group", |
| 1011 | "returns": "bind group", |
| 1012 | "args": [ |
| 1013 | {"name": "descriptor", "type": "bind group descriptor", "annotation": "const*"} |
| 1014 | ] |
Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 1015 | }, |
| 1016 | { |
Kai Ninomiya | 234becf | 2018-07-10 12:23:50 -0700 | [diff] [blame] | 1017 | "name": "create bind group layout", |
| 1018 | "returns": "bind group layout", |
| 1019 | "args": [ |
| 1020 | {"name": "descriptor", "type": "bind group layout descriptor", "annotation": "const*"} |
| 1021 | ] |
Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 1022 | }, |
| 1023 | { |
Corentin Wallez | 82b6573 | 2018-08-22 15:37:29 +0200 | [diff] [blame] | 1024 | "name": "create buffer", |
| 1025 | "returns": "buffer", |
| 1026 | "args": [ |
| 1027 | {"name": "descriptor", "type": "buffer descriptor", "annotation": "const*"} |
| 1028 | ] |
| 1029 | }, |
| 1030 | { |
Austin Eng | cf1fdf4 | 2020-06-15 23:42:13 +0000 | [diff] [blame] | 1031 | "name": "create error buffer", |
| 1032 | "returns": "buffer", |
Jiawei Shao | 806c583 | 2022-11-23 02:06:11 +0000 | [diff] [blame] | 1033 | "tags": ["dawn"], |
| 1034 | "args": [ |
| 1035 | {"name": "descriptor", "type": "buffer descriptor", "annotation": "const*"} |
| 1036 | ] |
Austin Eng | cf1fdf4 | 2020-06-15 23:42:13 +0000 | [diff] [blame] | 1037 | }, |
| 1038 | { |
Corentin Wallez | e1f0d4e | 2019-02-15 12:54:08 +0000 | [diff] [blame] | 1039 | "name": "create command encoder", |
Corentin Wallez | 4b90c47 | 2019-07-10 20:43:13 +0000 | [diff] [blame] | 1040 | "returns": "command encoder", |
| 1041 | "args": [ |
| 1042 | {"name": "descriptor", "type": "command encoder descriptor", "annotation": "const*", "optional": true} |
| 1043 | ] |
Corentin Wallez | e1f0d4e | 2019-02-15 12:54:08 +0000 | [diff] [blame] | 1044 | }, |
| 1045 | { |
Corentin Wallez | 8e335a5 | 2018-08-27 23:12:56 +0200 | [diff] [blame] | 1046 | "name": "create compute pipeline", |
| 1047 | "returns": "compute pipeline", |
| 1048 | "args": [ |
| 1049 | {"name": "descriptor", "type": "compute pipeline descriptor", "annotation": "const*"} |
| 1050 | ] |
Corentin Wallez | 29ced28 | 2017-07-14 10:58:07 -0400 | [diff] [blame] | 1051 | }, |
| 1052 | { |
Corentin Wallez | 2d3c2e3 | 2021-02-22 18:27:36 +0000 | [diff] [blame] | 1053 | "name": "create compute pipeline async", |
Jiawei Shao | ae5f950 | 2020-10-19 01:56:08 +0000 | [diff] [blame] | 1054 | "returns": "void", |
| 1055 | "args": [ |
| 1056 | {"name": "descriptor", "type": "compute pipeline descriptor", "annotation": "const*"}, |
Corentin Wallez | e00c6bd | 2021-12-13 17:37:17 +0000 | [diff] [blame] | 1057 | {"name": "callback", "type": "create compute pipeline async callback"}, |
Jiawei Shao | ae5f950 | 2020-10-19 01:56:08 +0000 | [diff] [blame] | 1058 | {"name": "userdata", "type": "void", "annotation": "*"} |
| 1059 | ] |
| 1060 | }, |
| 1061 | { |
Austin Eng | bffc966 | 2021-09-17 15:36:00 +0000 | [diff] [blame] | 1062 | "name": "create external texture", |
| 1063 | "returns": "external texture", |
Kai Ninomiya | 930e918 | 2021-09-17 19:44:43 +0000 | [diff] [blame] | 1064 | "tags": ["dawn"], |
Austin Eng | bffc966 | 2021-09-17 15:36:00 +0000 | [diff] [blame] | 1065 | "args": [ |
| 1066 | {"name": "external texture descriptor", "type": "external texture descriptor", "annotation": "const*"} |
| 1067 | ] |
| 1068 | }, |
| 1069 | { |
Yan,Shaobo | 7ce3c2d | 2022-06-27 02:57:40 +0000 | [diff] [blame] | 1070 | "name": "create error external texture", |
| 1071 | "returns": "external texture", |
| 1072 | "tags": ["dawn"] |
| 1073 | }, |
| 1074 | { |
Kai Ninomiya | f53f98b | 2018-06-27 16:21:39 -0700 | [diff] [blame] | 1075 | "name": "create pipeline layout", |
| 1076 | "returns": "pipeline layout", |
| 1077 | "args": [ |
| 1078 | {"name": "descriptor", "type": "pipeline layout descriptor", "annotation": "const*"} |
| 1079 | ] |
Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 1080 | }, |
| 1081 | { |
Corentin Wallez | 9585c46 | 2020-07-06 18:50:00 +0000 | [diff] [blame] | 1082 | "name": "create query set", |
| 1083 | "returns": "query set", |
| 1084 | "args": [ |
| 1085 | {"name": "descriptor", "type": "query set descriptor", "annotation": "const*"} |
| 1086 | ] |
| 1087 | }, |
| 1088 | { |
Corentin Wallez | 2d3c2e3 | 2021-02-22 18:27:36 +0000 | [diff] [blame] | 1089 | "name": "create render pipeline async", |
Jiawei Shao | 03e1400 | 2020-10-21 04:37:41 +0000 | [diff] [blame] | 1090 | "returns": "void", |
| 1091 | "args": [ |
Brandon Jones | 41c87d9 | 2021-05-21 05:01:38 +0000 | [diff] [blame] | 1092 | {"name": "descriptor", "type": "render pipeline descriptor", "annotation": "const*"}, |
Corentin Wallez | e00c6bd | 2021-12-13 17:37:17 +0000 | [diff] [blame] | 1093 | {"name": "callback", "type": "create render pipeline async callback"}, |
Jiawei Shao | 03e1400 | 2020-10-21 04:37:41 +0000 | [diff] [blame] | 1094 | {"name": "userdata", "type": "void", "annotation": "*"} |
| 1095 | ] |
| 1096 | }, |
| 1097 | { |
Austin Eng | 8a488c1 | 2019-08-13 22:12:54 +0000 | [diff] [blame] | 1098 | "name": "create render bundle encoder", |
| 1099 | "returns": "render bundle encoder", |
| 1100 | "args": [ |
| 1101 | {"name": "descriptor", "type": "render bundle encoder descriptor", "annotation": "const*"} |
| 1102 | ] |
| 1103 | }, |
| 1104 | { |
Corentin Wallez | 9585c46 | 2020-07-06 18:50:00 +0000 | [diff] [blame] | 1105 | "name": "create render pipeline", |
| 1106 | "returns": "render pipeline", |
| 1107 | "args": [ |
| 1108 | {"name": "descriptor", "type": "render pipeline descriptor", "annotation": "const*"} |
| 1109 | ] |
| 1110 | }, |
| 1111 | { |
Corentin Wallez | 1ae19e8 | 2018-05-17 17:09:07 -0400 | [diff] [blame] | 1112 | "name": "create sampler", |
| 1113 | "returns": "sampler", |
| 1114 | "args": [ |
shrekshao | b3177d4 | 2021-01-26 02:22:58 +0000 | [diff] [blame] | 1115 | {"name": "descriptor", "type": "sampler descriptor", "annotation": "const*", "optional": true} |
Corentin Wallez | 1ae19e8 | 2018-05-17 17:09:07 -0400 | [diff] [blame] | 1116 | ] |
Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 1117 | }, |
| 1118 | { |
Corentin Wallez | df67103 | 2018-08-20 17:01:20 +0200 | [diff] [blame] | 1119 | "name": "create shader module", |
| 1120 | "returns": "shader module", |
| 1121 | "args": [ |
| 1122 | {"name": "descriptor", "type": "shader module descriptor", "annotation": "const*"} |
| 1123 | ] |
Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 1124 | }, |
| 1125 | { |
Corentin Wallez | 7be2a71 | 2019-02-15 11:15:58 +0000 | [diff] [blame] | 1126 | "name": "create swap chain", |
Corentin Wallez | 7477120 | 2022-05-23 15:44:29 +0000 | [diff] [blame] | 1127 | "returns": "swap chain", |
| 1128 | "args": [ |
| 1129 | {"name": "surface", "type": "surface"}, |
| 1130 | {"name": "descriptor", "type": "swap chain descriptor", "annotation": "const*"} |
| 1131 | ] |
| 1132 | }, |
| 1133 | { |
Jiawei Shao | 425428f | 2018-08-27 08:44:48 +0800 | [diff] [blame] | 1134 | "name": "create texture", |
| 1135 | "returns": "texture", |
| 1136 | "args": [ |
| 1137 | {"name": "descriptor", "type": "texture descriptor", "annotation": "const*"} |
| 1138 | ] |
Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 1139 | }, |
| 1140 | { |
Corentin Wallez | 256e026 | 2022-07-20 16:07:44 +0000 | [diff] [blame] | 1141 | "name": "create error texture", |
| 1142 | "returns": "texture", |
| 1143 | "tags": ["dawn"], |
| 1144 | "args": [ |
| 1145 | {"name": "descriptor", "type": "texture descriptor", "annotation": "const*"} |
| 1146 | ] |
| 1147 | }, |
| 1148 | { |
Loko Kung | 2494c9b | 2021-12-01 17:55:30 +0000 | [diff] [blame] | 1149 | "name": "destroy" |
Kai Ninomiya | 4e37acc | 2021-09-17 21:13:33 +0000 | [diff] [blame] | 1150 | }, |
| 1151 | { |
Austin Eng | bffc966 | 2021-09-17 15:36:00 +0000 | [diff] [blame] | 1152 | "name": "get limits", |
| 1153 | "returns": "bool", |
| 1154 | "args": [ |
| 1155 | {"name": "limits", "type": "supported limits", "annotation": "*"} |
| 1156 | ] |
Corentin Wallez | 6d315da | 2021-02-04 15:33:42 +0000 | [diff] [blame] | 1157 | }, |
| 1158 | { |
Austin Eng | 89ddadc | 2021-12-15 00:12:30 +0000 | [diff] [blame] | 1159 | "name": "has feature", |
| 1160 | "returns": "bool", |
| 1161 | "args": [ |
| 1162 | {"name": "feature", "type": "feature name"} |
| 1163 | ] |
| 1164 | }, |
| 1165 | { |
Austin Eng | 89ddadc | 2021-12-15 00:12:30 +0000 | [diff] [blame] | 1166 | "name": "enumerate features", |
Austin Eng | 3ac7b9c | 2022-01-06 22:11:28 +0000 | [diff] [blame] | 1167 | "returns": "size_t", |
Austin Eng | 89ddadc | 2021-12-15 00:12:30 +0000 | [diff] [blame] | 1168 | "args": [ |
| 1169 | {"name": "features", "type": "feature name", "annotation": "*"} |
| 1170 | ] |
| 1171 | }, |
| 1172 | { |
Austin Eng | bf32435 | 2022-08-18 18:02:00 +0000 | [diff] [blame] | 1173 | "name": "get adapter", |
| 1174 | "returns": "adapter", |
| 1175 | "tags": ["dawn"] |
| 1176 | }, |
| 1177 | { |
Austin Eng | bffc966 | 2021-09-17 15:36:00 +0000 | [diff] [blame] | 1178 | "name": "get queue", |
| 1179 | "returns": "queue" |
Brandon Jones | 0e92e9b | 2021-04-01 20:46:42 +0000 | [diff] [blame] | 1180 | }, |
| 1181 | { |
Austin Eng | e06f01b | 2019-09-30 22:50:59 +0000 | [diff] [blame] | 1182 | "name": "inject error", |
| 1183 | "args": [ |
| 1184 | {"name": "type", "type": "error type"}, |
Austin Eng | 867f720 | 2019-10-02 06:35:38 +0000 | [diff] [blame] | 1185 | {"name": "message", "type": "char", "annotation": "const*", "length": "strlen"} |
Austin Eng | e06f01b | 2019-09-30 22:50:59 +0000 | [diff] [blame] | 1186 | ], |
Kai Ninomiya | 930e918 | 2021-09-17 19:44:43 +0000 | [diff] [blame] | 1187 | "tags": ["dawn"] |
Austin Eng | e06f01b | 2019-09-30 22:50:59 +0000 | [diff] [blame] | 1188 | }, |
| 1189 | { |
Loko Kung | 3a53edc | 2022-08-29 22:33:50 +0000 | [diff] [blame] | 1190 | "name": "force loss", |
| 1191 | "args": [ |
| 1192 | {"name": "type", "type": "device lost reason"}, |
| 1193 | {"name": "message", "type": "char", "annotation": "const*", "length": "strlen"} |
| 1194 | ], |
Kai Ninomiya | 930e918 | 2021-09-17 19:44:43 +0000 | [diff] [blame] | 1195 | "tags": ["dawn"] |
Natasha Lee | 0ecc48e | 2020-01-15 19:02:13 +0000 | [diff] [blame] | 1196 | }, |
| 1197 | { |
Kai Ninomiya | 930e918 | 2021-09-17 19:44:43 +0000 | [diff] [blame] | 1198 | "name": "tick", |
Le Hoang Quyen | 7971bfe | 2023-04-05 19:35:07 +0000 | [diff] [blame] | 1199 | "no autolock": true, |
Kai Ninomiya | 930e918 | 2021-09-17 19:44:43 +0000 | [diff] [blame] | 1200 | "tags": ["dawn"] |
Corentin Wallez | dbb5729 | 2017-06-14 13:33:45 -0400 | [diff] [blame] | 1201 | }, |
| 1202 | { |
Austin Eng | 45ea7e6 | 2019-08-27 21:43:56 +0000 | [diff] [blame] | 1203 | "name": "set uncaptured error callback", |
Le Hoang Quyen | 7971bfe | 2023-04-05 19:35:07 +0000 | [diff] [blame] | 1204 | "no autolock": true, |
Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 1205 | "args": [ |
Corentin Wallez | e00c6bd | 2021-12-13 17:37:17 +0000 | [diff] [blame] | 1206 | {"name": "callback", "type": "error callback"}, |
Corentin Wallez | 839053b | 2019-05-29 13:03:50 +0000 | [diff] [blame] | 1207 | {"name": "userdata", "type": "void", "annotation": "*"} |
Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 1208 | ] |
Austin Eng | 45238d7 | 2019-09-04 22:54:03 +0000 | [diff] [blame] | 1209 | }, |
| 1210 | { |
Zhaoming Jiang | b44000e | 2021-06-04 07:10:56 +0000 | [diff] [blame] | 1211 | "name": "set logging callback", |
Le Hoang Quyen | 7971bfe | 2023-04-05 19:35:07 +0000 | [diff] [blame] | 1212 | "no autolock": true, |
Kai Ninomiya | 930e918 | 2021-09-17 19:44:43 +0000 | [diff] [blame] | 1213 | "tags": ["dawn"], |
Zhaoming Jiang | b44000e | 2021-06-04 07:10:56 +0000 | [diff] [blame] | 1214 | "args": [ |
Corentin Wallez | e00c6bd | 2021-12-13 17:37:17 +0000 | [diff] [blame] | 1215 | {"name": "callback", "type": "logging callback"}, |
Zhaoming Jiang | b44000e | 2021-06-04 07:10:56 +0000 | [diff] [blame] | 1216 | {"name": "userdata", "type": "void", "annotation": "*"} |
| 1217 | ] |
| 1218 | }, |
| 1219 | { |
Natasha Lee | 9bba4a9 | 2019-12-18 18:59:20 +0000 | [diff] [blame] | 1220 | "name": "set device lost callback", |
Le Hoang Quyen | 7971bfe | 2023-04-05 19:35:07 +0000 | [diff] [blame] | 1221 | "no autolock": true, |
Natasha Lee | 9bba4a9 | 2019-12-18 18:59:20 +0000 | [diff] [blame] | 1222 | "args": [ |
Corentin Wallez | e00c6bd | 2021-12-13 17:37:17 +0000 | [diff] [blame] | 1223 | {"name": "callback", "type": "device lost callback"}, |
Natasha Lee | 9bba4a9 | 2019-12-18 18:59:20 +0000 | [diff] [blame] | 1224 | {"name": "userdata", "type": "void", "annotation": "*"} |
| 1225 | ] |
| 1226 | }, |
| 1227 | { |
Austin Eng | 45238d7 | 2019-09-04 22:54:03 +0000 | [diff] [blame] | 1228 | "name": "push error scope", |
| 1229 | "args": [ |
| 1230 | {"name": "filter", "type": "error filter"} |
| 1231 | ] |
| 1232 | }, |
| 1233 | { |
| 1234 | "name": "pop error scope", |
| 1235 | "returns": "bool", |
| 1236 | "args": [ |
Corentin Wallez | e00c6bd | 2021-12-13 17:37:17 +0000 | [diff] [blame] | 1237 | {"name": "callback", "type": "error callback"}, |
Austin Eng | 45238d7 | 2019-09-04 22:54:03 +0000 | [diff] [blame] | 1238 | {"name": "userdata", "type": "void", "annotation": "*"} |
| 1239 | ] |
Brandon Jones | 8085367 | 2022-04-12 03:28:40 +0000 | [diff] [blame] | 1240 | }, |
| 1241 | { |
| 1242 | "name": "set label", |
| 1243 | "returns": "void", |
| 1244 | "args": [ |
| 1245 | {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"} |
| 1246 | ] |
Corentin Wallez | 0963142 | 2023-01-10 15:17:26 +0000 | [diff] [blame] | 1247 | }, |
| 1248 | { |
| 1249 | "name": "validate texture descriptor", |
| 1250 | "tags": ["dawn"], |
| 1251 | "args": [ |
| 1252 | {"name": "descriptor", "type": "texture descriptor", "annotation": "const*"} |
| 1253 | ] |
Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 1254 | } |
| 1255 | ] |
| 1256 | }, |
Natasha Lee | 9bba4a9 | 2019-12-18 18:59:20 +0000 | [diff] [blame] | 1257 | "device lost callback": { |
fujunwei | 23f7162 | 2021-12-02 07:41:21 +0000 | [diff] [blame] | 1258 | "category": "function pointer", |
Corentin Wallez | 13e2e13 | 2020-01-25 09:30:40 +0000 | [diff] [blame] | 1259 | "args": [ |
Kai Ninomiya | 51791e0 | 2021-09-28 11:52:17 +0000 | [diff] [blame] | 1260 | {"name": "reason", "type": "device lost reason"}, |
Natasha Lee | 9bba4a9 | 2019-12-18 18:59:20 +0000 | [diff] [blame] | 1261 | {"name": "message", "type": "char", "annotation": "const*"}, |
| 1262 | {"name": "userdata", "type": "void", "annotation": "*"} |
| 1263 | ] |
| 1264 | }, |
Kai Ninomiya | 4e37acc | 2021-09-17 21:13:33 +0000 | [diff] [blame] | 1265 | "device lost reason": { |
| 1266 | "category": "enum", |
| 1267 | "emscripten_no_enum_table": true, |
| 1268 | "values": [ |
Kai Ninomiya | 51791e0 | 2021-09-28 11:52:17 +0000 | [diff] [blame] | 1269 | {"value": 0, "name": "undefined", "jsrepr": "undefined"}, |
| 1270 | {"value": 1, "name": "destroyed"} |
Kai Ninomiya | 4e37acc | 2021-09-17 21:13:33 +0000 | [diff] [blame] | 1271 | ] |
| 1272 | }, |
Brandon Jones | 670858d | 2020-09-22 16:51:36 +0000 | [diff] [blame] | 1273 | "double": { |
| 1274 | "category": "native" |
| 1275 | }, |
Austin Eng | cb0cb65 | 2019-08-27 21:41:56 +0000 | [diff] [blame] | 1276 | "error callback": { |
fujunwei | 23f7162 | 2021-12-02 07:41:21 +0000 | [diff] [blame] | 1277 | "category": "function pointer", |
Corentin Wallez | 540abab | 2019-11-22 13:18:22 +0000 | [diff] [blame] | 1278 | "args": [ |
| 1279 | {"name": "type", "type": "error type"}, |
| 1280 | {"name": "message", "type": "char", "annotation": "const*"}, |
| 1281 | {"name": "userdata", "type": "void", "annotation": "*"} |
| 1282 | ] |
Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 1283 | }, |
Austin Eng | 02fbf16 | 2021-09-13 18:49:09 +0000 | [diff] [blame] | 1284 | "limits": { |
| 1285 | "category": "structure", |
Austin Eng | 02fbf16 | 2021-09-13 18:49:09 +0000 | [diff] [blame] | 1286 | "members": [ |
| 1287 | {"name": "max texture dimension 1D", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"}, |
| 1288 | {"name": "max texture dimension 2D", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"}, |
| 1289 | {"name": "max texture dimension 3D", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"}, |
| 1290 | {"name": "max texture array layers", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"}, |
| 1291 | {"name": "max bind groups", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"}, |
Brandon Jones | 773800b | 2022-09-21 17:42:24 +0000 | [diff] [blame] | 1292 | {"name": "max bindings per bind group", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"}, |
Austin Eng | 02fbf16 | 2021-09-13 18:49:09 +0000 | [diff] [blame] | 1293 | {"name": "max dynamic uniform buffers per pipeline layout", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"}, |
| 1294 | {"name": "max dynamic storage buffers per pipeline layout", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"}, |
| 1295 | {"name": "max sampled textures per shader stage", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"}, |
| 1296 | {"name": "max samplers per shader stage", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"}, |
| 1297 | {"name": "max storage buffers per shader stage", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"}, |
| 1298 | {"name": "max storage textures per shader stage", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"}, |
| 1299 | {"name": "max uniform buffers per shader stage", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"}, |
| 1300 | {"name": "max uniform buffer binding size", "type": "uint64_t", "default": "WGPU_LIMIT_U64_UNDEFINED"}, |
| 1301 | {"name": "max storage buffer binding size", "type": "uint64_t", "default": "WGPU_LIMIT_U64_UNDEFINED"}, |
| 1302 | {"name": "min uniform buffer offset alignment", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"}, |
| 1303 | {"name": "min storage buffer offset alignment", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"}, |
| 1304 | {"name": "max vertex buffers", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"}, |
shrekshao | d1a5f93 | 2022-09-29 19:02:11 +0000 | [diff] [blame] | 1305 | {"name": "max buffer size", "type": "uint64_t", "default": "WGPU_LIMIT_U64_UNDEFINED"}, |
Austin Eng | 02fbf16 | 2021-09-13 18:49:09 +0000 | [diff] [blame] | 1306 | {"name": "max vertex attributes", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"}, |
| 1307 | {"name": "max vertex buffer array stride", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"}, |
| 1308 | {"name": "max inter stage shader components", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"}, |
Brandon Jones | 431c7a4 | 2022-06-24 17:30:29 +0000 | [diff] [blame] | 1309 | {"name": "max inter stage shader variables", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"}, |
Austin Eng | cda3d7b | 2022-06-13 16:48:45 +0000 | [diff] [blame] | 1310 | {"name": "max color attachments", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"}, |
Loko Kung | e70563a | 2022-12-12 20:55:05 +0000 | [diff] [blame] | 1311 | {"name": "max color attachment bytes per sample", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"}, |
Austin Eng | 02fbf16 | 2021-09-13 18:49:09 +0000 | [diff] [blame] | 1312 | {"name": "max compute workgroup storage size", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"}, |
| 1313 | {"name": "max compute invocations per workgroup", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"}, |
| 1314 | {"name": "max compute workgroup size x", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"}, |
| 1315 | {"name": "max compute workgroup size y", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"}, |
| 1316 | {"name": "max compute workgroup size z", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"}, |
Loko Kung | 4f98dd4 | 2023-03-08 02:45:50 +0000 | [diff] [blame] | 1317 | {"name": "max compute workgroups per dimension", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"}, |
| 1318 | {"name": "max fragment combined output resources", "type": "uint32_t", "default": "WGPU_LIMIT_U32_UNDEFINED"} |
Austin Eng | 02fbf16 | 2021-09-13 18:49:09 +0000 | [diff] [blame] | 1319 | ] |
| 1320 | }, |
Austin Eng | bffc966 | 2021-09-17 15:36:00 +0000 | [diff] [blame] | 1321 | "required limits": { |
| 1322 | "category": "structure", |
Austin Eng | 0c82405 | 2021-09-20 16:07:25 +0000 | [diff] [blame] | 1323 | "extensible": "in", |
Austin Eng | bffc966 | 2021-09-17 15:36:00 +0000 | [diff] [blame] | 1324 | "members": [ |
| 1325 | {"name": "limits", "type": "limits"} |
| 1326 | ] |
| 1327 | }, |
| 1328 | "supported limits": { |
| 1329 | "category": "structure", |
Austin Eng | 0c82405 | 2021-09-20 16:07:25 +0000 | [diff] [blame] | 1330 | "extensible": "out", |
Austin Eng | bffc966 | 2021-09-17 15:36:00 +0000 | [diff] [blame] | 1331 | "members": [ |
| 1332 | {"name": "limits", "type": "limits"} |
| 1333 | ] |
| 1334 | }, |
Zhaoming Jiang | b44000e | 2021-06-04 07:10:56 +0000 | [diff] [blame] | 1335 | "logging callback": { |
fujunwei | 23f7162 | 2021-12-02 07:41:21 +0000 | [diff] [blame] | 1336 | "category": "function pointer", |
Kai Ninomiya | 930e918 | 2021-09-17 19:44:43 +0000 | [diff] [blame] | 1337 | "tags": ["dawn"], |
Zhaoming Jiang | b44000e | 2021-06-04 07:10:56 +0000 | [diff] [blame] | 1338 | "args": [ |
| 1339 | {"name": "type", "type": "logging type"}, |
| 1340 | {"name": "message", "type": "char", "annotation": "const*"}, |
| 1341 | {"name": "userdata", "type": "void", "annotation": "*"} |
| 1342 | ] |
| 1343 | }, |
Austin Eng | 45238d7 | 2019-09-04 22:54:03 +0000 | [diff] [blame] | 1344 | "error filter": { |
| 1345 | "category": "enum", |
| 1346 | "values": [ |
Zhaoming Jiang | 53137bd | 2021-12-08 02:42:17 +0000 | [diff] [blame] | 1347 | {"value": 0, "name": "validation"}, |
Brandon Jones | 567f068 | 2022-09-07 14:14:14 +0000 | [diff] [blame] | 1348 | {"value": 1, "name": "out of memory"}, |
| 1349 | {"value": 2, "name": "internal"} |
Austin Eng | 45238d7 | 2019-09-04 22:54:03 +0000 | [diff] [blame] | 1350 | ] |
| 1351 | }, |
Austin Eng | cb0cb65 | 2019-08-27 21:41:56 +0000 | [diff] [blame] | 1352 | "error type": { |
| 1353 | "category": "enum", |
Kai Ninomiya | 930e918 | 2021-09-17 19:44:43 +0000 | [diff] [blame] | 1354 | "emscripten_no_enum_table": true, |
Austin Eng | cb0cb65 | 2019-08-27 21:41:56 +0000 | [diff] [blame] | 1355 | "values": [ |
| 1356 | {"value": 0, "name": "no error"}, |
| 1357 | {"value": 1, "name": "validation"}, |
| 1358 | {"value": 2, "name": "out of memory"}, |
Brandon Jones | 567f068 | 2022-09-07 14:14:14 +0000 | [diff] [blame] | 1359 | {"value": 3, "name": "internal"}, |
| 1360 | {"value": 4, "name": "unknown"}, |
| 1361 | {"value": 5, "name": "device lost"} |
Austin Eng | cb0cb65 | 2019-08-27 21:41:56 +0000 | [diff] [blame] | 1362 | ] |
| 1363 | }, |
Zhaoming Jiang | b44000e | 2021-06-04 07:10:56 +0000 | [diff] [blame] | 1364 | "logging type": { |
| 1365 | "category": "enum", |
Kai Ninomiya | 930e918 | 2021-09-17 19:44:43 +0000 | [diff] [blame] | 1366 | "tags": ["dawn"], |
Zhaoming Jiang | b44000e | 2021-06-04 07:10:56 +0000 | [diff] [blame] | 1367 | "values": [ |
| 1368 | {"value": 0, "name": "verbose"}, |
| 1369 | {"value": 1, "name": "info"}, |
| 1370 | {"value": 2, "name": "warning"}, |
| 1371 | {"value": 3, "name": "error"} |
| 1372 | ] |
| 1373 | }, |
Yan,Shaobo | 96a0bd5 | 2022-10-24 04:19:43 +0000 | [diff] [blame] | 1374 | "extent 2D": { |
| 1375 | "category": "structure", |
Yan,Shaobo | e8dd681 | 2022-11-03 09:03:01 +0000 | [diff] [blame] | 1376 | "tags": ["dawn"], |
Yan,Shaobo | 96a0bd5 | 2022-10-24 04:19:43 +0000 | [diff] [blame] | 1377 | "_TODO": "crbug.com/1316671: Remove default value of 'width' after chromium side chagnes landed", |
| 1378 | "members": [ |
| 1379 | {"name": "width", "type": "uint32_t", "default": 0}, |
| 1380 | {"name": "height", "type": "uint32_t", "default": 1} |
| 1381 | ] |
| 1382 | }, |
Corentin Wallez | 29353d6 | 2018-09-18 12:49:22 +0000 | [diff] [blame] | 1383 | "extent 3D": { |
| 1384 | "category": "structure", |
| 1385 | "members": [ |
Corentin Wallez | a736d96 | 2021-03-04 17:03:15 +0000 | [diff] [blame] | 1386 | {"name": "width", "type": "uint32_t"}, |
Corentin Wallez | 2931c42 | 2020-10-16 14:20:06 +0000 | [diff] [blame] | 1387 | {"name": "height", "type": "uint32_t", "default": 1}, |
Brandon Jones | 76e5a9f | 2021-05-13 17:51:23 +0000 | [diff] [blame] | 1388 | {"name": "depth or array layers", "type": "uint32_t", "default": 1} |
Corentin Wallez | 29353d6 | 2018-09-18 12:49:22 +0000 | [diff] [blame] | 1389 | ] |
| 1390 | }, |
Brandon Jones | 0e92e9b | 2021-04-01 20:46:42 +0000 | [diff] [blame] | 1391 | "external texture": { |
| 1392 | "category": "object", |
Kai Ninomiya | 930e918 | 2021-09-17 19:44:43 +0000 | [diff] [blame] | 1393 | "tags": ["dawn"], |
Brandon Jones | 0e92e9b | 2021-04-01 20:46:42 +0000 | [diff] [blame] | 1394 | "methods": [ |
| 1395 | { |
Brandon Jones | 88aeeae | 2021-11-19 18:26:08 +0000 | [diff] [blame] | 1396 | "name": "set label", |
| 1397 | "returns": "void", |
Brandon Jones | 88aeeae | 2021-11-19 18:26:08 +0000 | [diff] [blame] | 1398 | "args": [ |
| 1399 | {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"} |
| 1400 | ] |
| 1401 | }, |
| 1402 | { |
Brandon Jones | 0e92e9b | 2021-04-01 20:46:42 +0000 | [diff] [blame] | 1403 | "name": "destroy", |
| 1404 | "returns": "void" |
Yan,Shaobo | e958db0 | 2023-02-24 02:09:38 +0000 | [diff] [blame] | 1405 | }, |
| 1406 | { |
| 1407 | "name": "expire", |
| 1408 | "returns": "void" |
| 1409 | }, |
| 1410 | { |
| 1411 | "name": "refresh", |
| 1412 | "returns": "void" |
Brandon Jones | 0e92e9b | 2021-04-01 20:46:42 +0000 | [diff] [blame] | 1413 | } |
| 1414 | ] |
| 1415 | }, |
Brandon Jones | 85ceb08 | 2022-11-30 21:32:26 +0000 | [diff] [blame] | 1416 | "external texture rotation":{ |
| 1417 | "category": "enum", |
| 1418 | "tags": ["dawn"], |
| 1419 | "values": [ |
| 1420 | {"value": 0, "name": "rotate 0 degrees"}, |
| 1421 | {"value": 1, "name": "rotate 90 degrees"}, |
| 1422 | {"value": 2, "name": "rotate 180 degrees"}, |
| 1423 | {"value": 3, "name": "rotate 270 degrees"} |
| 1424 | ] |
| 1425 | }, |
Brandon Jones | 0e92e9b | 2021-04-01 20:46:42 +0000 | [diff] [blame] | 1426 | "external texture descriptor": { |
| 1427 | "category": "structure", |
Austin Eng | 0c82405 | 2021-09-20 16:07:25 +0000 | [diff] [blame] | 1428 | "extensible": "in", |
Kai Ninomiya | 930e918 | 2021-09-17 19:44:43 +0000 | [diff] [blame] | 1429 | "tags": ["dawn"], |
Brandon Jones | 0e92e9b | 2021-04-01 20:46:42 +0000 | [diff] [blame] | 1430 | "members": [ |
Corentin Wallez | d85bbb6 | 2021-10-01 15:34:25 +0000 | [diff] [blame] | 1431 | {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true}, |
Brandon Jones | 0e92e9b | 2021-04-01 20:46:42 +0000 | [diff] [blame] | 1432 | {"name": "plane 0", "type": "texture view"}, |
Brandon Jones | 37b3df4 | 2022-01-25 18:09:00 +0000 | [diff] [blame] | 1433 | {"name": "plane 1", "type": "texture view", "optional": true}, |
Yan,Shaobo | e8dd681 | 2022-11-03 09:03:01 +0000 | [diff] [blame] | 1434 | {"name": "visible origin", "type": "origin 2D"}, |
| 1435 | {"name": "visible size", "type": "extent 2D"}, |
jchen10 | ef62b58 | 2022-06-22 03:14:26 +0000 | [diff] [blame] | 1436 | {"name": "do yuv to rgb conversion only", "type": "bool", "default": "false"}, |
Brandon Jones | cf4a85e | 2022-05-02 20:37:28 +0000 | [diff] [blame] | 1437 | {"name": "yuv to rgb conversion matrix", "type": "float", "annotation": "const*", |
Brandon Jones | 136a0a4 | 2022-05-24 01:41:43 +0000 | [diff] [blame] | 1438 | "length": 12, "optional": true}, |
Brandon Jones | cf4a85e | 2022-05-02 20:37:28 +0000 | [diff] [blame] | 1439 | {"name": "src transfer function parameters", "type": "float", "annotation": "const*", |
Brandon Jones | e61a390b | 2022-05-19 17:44:29 +0000 | [diff] [blame] | 1440 | "length": 7}, |
Brandon Jones | cf4a85e | 2022-05-02 20:37:28 +0000 | [diff] [blame] | 1441 | {"name": "dst transfer function parameters", "type": "float", "annotation": "const*", |
Brandon Jones | e61a390b | 2022-05-19 17:44:29 +0000 | [diff] [blame] | 1442 | "length": 7}, |
Brandon Jones | cf4a85e | 2022-05-02 20:37:28 +0000 | [diff] [blame] | 1443 | {"name": "gamut conversion matrix", "type": "float", "annotation": "const*", |
Brandon Jones | 85ceb08 | 2022-11-30 21:32:26 +0000 | [diff] [blame] | 1444 | "length": 9}, |
| 1445 | {"name": "flip y", "type": "bool", "default": "false"}, |
Brandon Jones | 713cd86 | 2023-01-04 21:27:32 +0000 | [diff] [blame] | 1446 | {"name": "rotation", "type": "external texture rotation", "default": "rotate 0 degrees"} |
Brandon Jones | 0e92e9b | 2021-04-01 20:46:42 +0000 | [diff] [blame] | 1447 | ] |
| 1448 | }, |
Kai Ninomiya | 7d174a1 | 2021-09-21 17:36:27 +0000 | [diff] [blame] | 1449 | "feature name": { |
| 1450 | "category": "enum", |
Kai Ninomiya | 7d174a1 | 2021-09-21 17:36:27 +0000 | [diff] [blame] | 1451 | "values": [ |
| 1452 | {"value": 0, "name": "undefined", "jsrepr": "undefined"}, |
Austin Eng | 51d13a4 | 2022-06-13 19:18:55 +0000 | [diff] [blame] | 1453 | {"value": 1, "name": "depth clip control"}, |
Brandon Jones | 6d48f57 | 2022-06-14 22:48:31 +0000 | [diff] [blame] | 1454 | {"value": 2, "name": "depth32 float stencil8"}, |
| 1455 | {"value": 3, "name": "timestamp query"}, |
| 1456 | {"value": 4, "name": "pipeline statistics query"}, |
| 1457 | {"value": 5, "name": "texture compression BC"}, |
| 1458 | {"value": 6, "name": "texture compression ETC2"}, |
| 1459 | {"value": 7, "name": "texture compression ASTC"}, |
| 1460 | {"value": 8, "name": "indirect first instance"}, |
Zhaoming Jiang | 7ca82ac | 2022-09-08 00:11:04 +0000 | [diff] [blame] | 1461 | {"value": 9, "name": "shader f16"}, |
Takahiro | d4dd547 | 2022-09-22 16:38:06 +0000 | [diff] [blame] | 1462 | {"value": 10, "name": "RG11B10 ufloat renderable"}, |
Jiawei Shao | f5cee3f | 2023-02-11 02:53:53 +0000 | [diff] [blame] | 1463 | {"value": 11, "name": "BGRA8 unorm storage"}, |
Austin Eng | 89ddadc | 2021-12-15 00:12:30 +0000 | [diff] [blame] | 1464 | {"value": 1001, "name": "dawn shader float 16", "tags": ["dawn"]}, |
| 1465 | {"value": 1002, "name": "dawn internal usages", "tags": ["dawn"]}, |
Austin Eng | 2f218e2 | 2021-12-22 19:02:23 +0000 | [diff] [blame] | 1466 | {"value": 1003, "name": "dawn multi planar formats", "tags": ["dawn"]}, |
Jiawei Shao | 9ebba36 | 2022-05-20 08:21:00 +0000 | [diff] [blame] | 1467 | {"value": 1004, "name": "dawn native", "tags": ["dawn", "native"]}, |
Li Hao | 74f6bc7 | 2022-10-28 04:51:16 +0000 | [diff] [blame] | 1468 | {"value": 1005, "name": "chromium experimental dp4a", "tags": ["dawn"]}, |
Le Hoang Quyen | 7971bfe | 2023-04-05 19:35:07 +0000 | [diff] [blame] | 1469 | {"value": 1006, "name": "timestamp query inside passes", "tags": ["dawn"]}, |
| 1470 | {"value": 1007, "name": "implicit device synchronization", "tags": ["dawn", "native"]} |
Kai Ninomiya | 7d174a1 | 2021-09-21 17:36:27 +0000 | [diff] [blame] | 1471 | ] |
| 1472 | }, |
Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 1473 | "filter mode": { |
| 1474 | "category": "enum", |
| 1475 | "values": [ |
Yunchao He | cfea934 | 2019-04-02 14:31:29 +0000 | [diff] [blame] | 1476 | {"value": 0, "name": "nearest"}, |
| 1477 | {"value": 1, "name": "linear"} |
Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 1478 | ] |
| 1479 | }, |
Austin Eng | fb42653 | 2017-08-01 14:22:52 -0400 | [diff] [blame] | 1480 | "float": { |
| 1481 | "category": "native" |
| 1482 | }, |
Yunchao He | c33a8c1 | 2019-04-11 18:46:54 +0000 | [diff] [blame] | 1483 | "front face": { |
| 1484 | "category": "enum", |
| 1485 | "values": [ |
| 1486 | {"value": 0, "name": "CCW"}, |
| 1487 | {"value": 1, "name": "CW"} |
| 1488 | ] |
| 1489 | }, |
Corentin Wallez | 8091584 | 2021-03-04 18:13:45 +0000 | [diff] [blame] | 1490 | "image copy buffer": { |
| 1491 | "category": "structure", |
Austin Eng | 0c82405 | 2021-09-20 16:07:25 +0000 | [diff] [blame] | 1492 | "extensible": "in", |
Corentin Wallez | 8091584 | 2021-03-04 18:13:45 +0000 | [diff] [blame] | 1493 | "members": [ |
| 1494 | {"name": "layout", "type": "texture data layout"}, |
| 1495 | {"name": "buffer", "type": "buffer"} |
| 1496 | ] |
| 1497 | }, |
| 1498 | "image copy texture": { |
| 1499 | "category": "structure", |
Austin Eng | 0c82405 | 2021-09-20 16:07:25 +0000 | [diff] [blame] | 1500 | "extensible": "in", |
Corentin Wallez | 8091584 | 2021-03-04 18:13:45 +0000 | [diff] [blame] | 1501 | "members": [ |
| 1502 | {"name": "texture", "type": "texture"}, |
| 1503 | {"name": "mip level", "type": "uint32_t", "default": "0"}, |
| 1504 | {"name": "origin", "type": "origin 3D"}, |
| 1505 | {"name": "aspect", "type": "texture aspect", "default": "all"} |
| 1506 | ] |
| 1507 | }, |
Yan,Shaobo | b4d8c80 | 2022-10-26 00:58:46 +0000 | [diff] [blame] | 1508 | "image copy external texture": { |
| 1509 | "category": "structure", |
| 1510 | "extensible": "in", |
| 1511 | "tags": ["dawn"], |
| 1512 | "members": [ |
| 1513 | {"name": "external texture", "type": "external texture"}, |
Yan,Shaobo | 8150d1c | 2023-03-24 03:43:56 +0000 | [diff] [blame] | 1514 | {"name": "origin", "type": "origin 3D"}, |
| 1515 | {"name": "natural size", "type": "extent 2D"} |
Yan,Shaobo | b4d8c80 | 2022-10-26 00:58:46 +0000 | [diff] [blame] | 1516 | ] |
| 1517 | }, |
Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 1518 | "index format": { |
| 1519 | "category": "enum", |
| 1520 | "values": [ |
Brandon Jones | 8575cb3 | 2020-08-27 01:13:35 +0000 | [diff] [blame] | 1521 | {"value": 0, "name": "undefined", "jsrepr": "undefined"}, |
| 1522 | {"value": 1, "name": "uint16"}, |
| 1523 | {"value": 2, "name": "uint32"} |
Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 1524 | ] |
| 1525 | }, |
Corentin Wallez | 5fc2c82 | 2020-01-10 13:06:48 +0000 | [diff] [blame] | 1526 | "instance": { |
Corentin Wallez | 3a1746e | 2020-01-15 13:14:12 +0000 | [diff] [blame] | 1527 | "category": "object", |
Le Hoang Quyen | 7971bfe | 2023-04-05 19:35:07 +0000 | [diff] [blame] | 1528 | "no autolock": true, |
Corentin Wallez | 3a1746e | 2020-01-15 13:14:12 +0000 | [diff] [blame] | 1529 | "methods": [ |
| 1530 | { |
| 1531 | "name": "create surface", |
| 1532 | "returns": "surface", |
| 1533 | "args": [ |
| 1534 | {"name": "descriptor", "type": "surface descriptor", "annotation": "const*"} |
| 1535 | ] |
Kai Ninomiya | 4e37acc | 2021-09-17 21:13:33 +0000 | [diff] [blame] | 1536 | }, |
| 1537 | { |
Le Hoang Quyen | 69e1c4b | 2023-03-14 19:03:10 +0000 | [diff] [blame] | 1538 | "name": "process events" |
Kai Ninomiya | 4e37acc | 2021-09-17 21:13:33 +0000 | [diff] [blame] | 1539 | }, |
| 1540 | { |
| 1541 | "name": "request adapter", |
Kai Ninomiya | 4e37acc | 2021-09-17 21:13:33 +0000 | [diff] [blame] | 1542 | "args": [ |
Corentin Wallez | 1260a53 | 2022-07-26 17:36:44 +0000 | [diff] [blame] | 1543 | {"name": "options", "type": "request adapter options", "annotation": "const*", "optional": true, "no_default": true}, |
Corentin Wallez | e00c6bd | 2021-12-13 17:37:17 +0000 | [diff] [blame] | 1544 | {"name": "callback", "type": "request adapter callback"}, |
Kai Ninomiya | 4e37acc | 2021-09-17 21:13:33 +0000 | [diff] [blame] | 1545 | {"name": "userdata", "type": "void", "annotation": "*"} |
| 1546 | ] |
Corentin Wallez | 3a1746e | 2020-01-15 13:14:12 +0000 | [diff] [blame] | 1547 | } |
| 1548 | ] |
Corentin Wallez | 5fc2c82 | 2020-01-10 13:06:48 +0000 | [diff] [blame] | 1549 | }, |
| 1550 | "instance descriptor": { |
| 1551 | "category": "structure", |
Austin Eng | 0c82405 | 2021-09-20 16:07:25 +0000 | [diff] [blame] | 1552 | "extensible": "in", |
Corentin Wallez | 5fc2c82 | 2020-01-10 13:06:48 +0000 | [diff] [blame] | 1553 | "members": [] |
| 1554 | }, |
Austin Eng | 2fbc170 | 2022-02-02 21:00:52 +0000 | [diff] [blame] | 1555 | "dawn instance descriptor": { |
| 1556 | "tags": ["dawn", "native"], |
| 1557 | "category": "structure", |
| 1558 | "chained": "in", |
Corentin Wallez | a45561b | 2022-07-14 12:58:25 +0000 | [diff] [blame] | 1559 | "chain roots": ["instance descriptor"], |
Austin Eng | 2fbc170 | 2022-02-02 21:00:52 +0000 | [diff] [blame] | 1560 | "members": [ |
| 1561 | {"name": "additional runtime search paths count", "type": "uint32_t", "default": 0}, |
| 1562 | {"name": "additional runtime search paths", "type": "char", "annotation": "const*const*", "length": "additional runtime search paths count"} |
| 1563 | ] |
| 1564 | }, |
Brandon Jones | 58a471a | 2021-02-08 19:48:06 +0000 | [diff] [blame] | 1565 | "vertex attribute": { |
Yunchao He | b220773 | 2019-02-14 00:35:39 +0000 | [diff] [blame] | 1566 | "category": "structure", |
| 1567 | "extensible": false, |
| 1568 | "members": [ |
Kai Ninomiya | ae1f25f | 2019-11-07 22:23:29 +0000 | [diff] [blame] | 1569 | {"name": "format", "type": "vertex format"}, |
| 1570 | {"name": "offset", "type": "uint64_t"}, |
| 1571 | {"name": "shader location", "type": "uint32_t"} |
Yunchao He | b220773 | 2019-02-14 00:35:39 +0000 | [diff] [blame] | 1572 | ] |
| 1573 | }, |
Brandon Jones | 58a471a | 2021-02-08 19:48:06 +0000 | [diff] [blame] | 1574 | "vertex buffer layout": { |
Yunchao He | 4dec737 | 2019-02-14 23:56:07 +0000 | [diff] [blame] | 1575 | "category": "structure", |
| 1576 | "extensible": false, |
| 1577 | "members": [ |
Kai Ninomiya | ae1f25f | 2019-11-07 22:23:29 +0000 | [diff] [blame] | 1578 | {"name": "array stride", "type": "uint64_t"}, |
Corentin Wallez | ff6c9ca6 | 2021-07-25 18:40:19 +0000 | [diff] [blame] | 1579 | {"name": "step mode", "type": "vertex step mode", "default": "vertex"}, |
Yunchao He | 2d4b529 | 2019-06-06 17:54:30 +0000 | [diff] [blame] | 1580 | {"name": "attribute count", "type": "uint32_t"}, |
Brandon Jones | 58a471a | 2021-02-08 19:48:06 +0000 | [diff] [blame] | 1581 | {"name": "attributes", "type": "vertex attribute", "annotation": "const*", "length": "attribute count"} |
Yunchao He | 4dec737 | 2019-02-14 23:56:07 +0000 | [diff] [blame] | 1582 | ] |
| 1583 | }, |
Corentin Wallez | ff6c9ca6 | 2021-07-25 18:40:19 +0000 | [diff] [blame] | 1584 | "vertex step mode": { |
Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 1585 | "category": "enum", |
| 1586 | "values": [ |
Takahiro | f3cf19f | 2022-05-31 17:24:49 +0000 | [diff] [blame] | 1587 | {"value": 0, "name": "vertex"}, |
| 1588 | {"value": 1, "name": "instance"}, |
Shrek Shao | 9ec183e | 2022-08-01 23:03:14 +0000 | [diff] [blame] | 1589 | {"value": 2, "name": "vertex buffer not used", "jsrepr": "undefined", "valid": true} |
Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 1590 | ] |
| 1591 | }, |
Kai Ninomiya | b985431 | 2017-08-11 14:36:20 -0700 | [diff] [blame] | 1592 | "load op": { |
| 1593 | "category": "enum", |
| 1594 | "values": [ |
Austin Eng | 74d4e53 | 2022-03-09 18:43:51 +0000 | [diff] [blame] | 1595 | {"value": 0, "name": "undefined", "jsrepr": "undefined"}, |
Brandon Jones | a20ce6f | 2022-02-03 17:59:04 +0000 | [diff] [blame] | 1596 | {"value": 1, "name": "clear"}, |
| 1597 | {"value": 2, "name": "load"} |
Kai Ninomiya | b985431 | 2017-08-11 14:36:20 -0700 | [diff] [blame] | 1598 | ] |
| 1599 | }, |
Corentin Wallez | 0d52f80 | 2020-07-14 12:30:14 +0000 | [diff] [blame] | 1600 | "map mode": { |
| 1601 | "category": "bitmask", |
| 1602 | "values": [ |
| 1603 | {"value": 0, "name": "none"}, |
| 1604 | {"value": 1, "name": "read"}, |
| 1605 | {"value": 2, "name": "write"} |
| 1606 | ] |
| 1607 | }, |
Corentin Wallez | eee3449 | 2022-03-16 18:44:16 +0000 | [diff] [blame] | 1608 | "mipmap filter mode": { |
| 1609 | "category": "enum", |
| 1610 | "tags": ["upstream"], |
| 1611 | "values": [ |
| 1612 | {"value": 0, "name": "nearest"}, |
| 1613 | {"value": 1, "name": "linear"} |
| 1614 | ] |
| 1615 | }, |
Jiawei Shao | 5e811ae | 2018-12-19 08:21:13 +0000 | [diff] [blame] | 1616 | "store op": { |
| 1617 | "category": "enum", |
| 1618 | "values": [ |
Austin Eng | 74d4e53 | 2022-03-09 18:43:51 +0000 | [diff] [blame] | 1619 | {"value": 0, "name": "undefined", "jsrepr": "undefined"}, |
Brandon Jones | a20ce6f | 2022-02-03 17:59:04 +0000 | [diff] [blame] | 1620 | {"value": 1, "name": "store"}, |
| 1621 | {"value": 2, "name": "discard"} |
Jiawei Shao | 5e811ae | 2018-12-19 08:21:13 +0000 | [diff] [blame] | 1622 | ] |
| 1623 | }, |
Brandon Jones | ac71e34 | 2018-11-28 17:54:13 +0000 | [diff] [blame] | 1624 | "origin 3D": { |
| 1625 | "category": "structure", |
| 1626 | "members": [ |
Corentin Wallez | 8f93871 | 2019-07-08 19:20:22 +0000 | [diff] [blame] | 1627 | {"name": "x", "type": "uint32_t", "default": "0"}, |
| 1628 | {"name": "y", "type": "uint32_t", "default": "0"}, |
| 1629 | {"name": "z", "type": "uint32_t", "default": "0"} |
Brandon Jones | ac71e34 | 2018-11-28 17:54:13 +0000 | [diff] [blame] | 1630 | ] |
| 1631 | }, |
Yan,Shaobo | e8dd681 | 2022-11-03 09:03:01 +0000 | [diff] [blame] | 1632 | "origin 2D": { |
| 1633 | "category": "structure", |
| 1634 | "tags": ["dawn"], |
| 1635 | "members": [ |
| 1636 | {"name": "x", "type": "uint32_t", "default": "0"}, |
| 1637 | {"name": "y", "type": "uint32_t", "default": "0"} |
| 1638 | ] |
| 1639 | }, |
Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 1640 | "pipeline layout": { |
Brandon Jones | 88aeeae | 2021-11-19 18:26:08 +0000 | [diff] [blame] | 1641 | "category": "object", |
| 1642 | "methods": [ |
| 1643 | { |
| 1644 | "name": "set label", |
| 1645 | "returns": "void", |
Brandon Jones | 88aeeae | 2021-11-19 18:26:08 +0000 | [diff] [blame] | 1646 | "args": [ |
| 1647 | {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"} |
| 1648 | ] |
| 1649 | } |
| 1650 | ] |
Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 1651 | }, |
Kai Ninomiya | f53f98b | 2018-06-27 16:21:39 -0700 | [diff] [blame] | 1652 | "pipeline layout descriptor": { |
| 1653 | "category": "structure", |
Austin Eng | 0c82405 | 2021-09-20 16:07:25 +0000 | [diff] [blame] | 1654 | "extensible": "in", |
Kai Ninomiya | f53f98b | 2018-06-27 16:21:39 -0700 | [diff] [blame] | 1655 | "members": [ |
François Beaufort | 277d2e1 | 2019-10-03 14:56:49 +0000 | [diff] [blame] | 1656 | {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true}, |
Jiawei Shao | 2030166 | 2019-02-21 00:45:19 +0000 | [diff] [blame] | 1657 | {"name": "bind group layout count", "type": "uint32_t"}, |
| 1658 | {"name": "bind group layouts", "type": "bind group layout", "annotation": "const*", "length": "bind group layout count"} |
Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 1659 | ] |
| 1660 | }, |
Kai Ninomiya | 261b05d | 2020-07-13 18:21:03 +0000 | [diff] [blame] | 1661 | "pipeline statistic name": { |
Hao Li | b6eff5a | 2020-06-11 00:34:14 +0000 | [diff] [blame] | 1662 | "category": "enum", |
| 1663 | "values": [ |
| 1664 | {"value": 0, "name": "vertex shader invocations"}, |
| 1665 | {"value": 1, "name": "clipper invocations"}, |
| 1666 | {"value": 2, "name": "clipper primitives out"}, |
| 1667 | {"value": 3, "name": "fragment shader invocations"}, |
| 1668 | {"value": 4, "name": "compute shader invocations"} |
| 1669 | ] |
| 1670 | }, |
Kai Ninomiya | 7d174a1 | 2021-09-21 17:36:27 +0000 | [diff] [blame] | 1671 | "power preference": { |
| 1672 | "category": "enum", |
Kai Ninomiya | 7d174a1 | 2021-09-21 17:36:27 +0000 | [diff] [blame] | 1673 | "values": [ |
Shrek Shao | ee50bc0 | 2022-02-08 20:21:40 +0000 | [diff] [blame] | 1674 | {"value": 0, "name": "undefined", "jsrepr": "undefined"}, |
Corentin Wallez | 6cd1cd9 | 2021-11-17 08:13:24 +0000 | [diff] [blame] | 1675 | {"value": 1, "name": "low power"}, |
| 1676 | {"value": 2, "name": "high performance"} |
Kai Ninomiya | 7d174a1 | 2021-09-21 17:36:27 +0000 | [diff] [blame] | 1677 | ] |
| 1678 | }, |
Corentin Wallez | d87e676 | 2020-01-23 17:20:38 +0000 | [diff] [blame] | 1679 | "present mode": { |
| 1680 | "category": "enum", |
Kai Ninomiya | 930e918 | 2021-09-17 19:44:43 +0000 | [diff] [blame] | 1681 | "emscripten_no_enum_table": true, |
Corentin Wallez | d87e676 | 2020-01-23 17:20:38 +0000 | [diff] [blame] | 1682 | "values": [ |
Corentin Wallez | 527045f | 2020-03-20 16:47:50 +0000 | [diff] [blame] | 1683 | {"value": 0, "name": "immediate"}, |
| 1684 | {"value": 1, "name": "mailbox"}, |
| 1685 | {"value": 2, "name": "fifo"} |
Corentin Wallez | d87e676 | 2020-01-23 17:20:38 +0000 | [diff] [blame] | 1686 | ] |
| 1687 | }, |
Jinho Bang | 0b82671 | 2019-10-07 12:23:09 +0000 | [diff] [blame] | 1688 | "programmable stage descriptor": { |
Yan, Shaobo | a492427 | 2018-12-10 19:47:22 +0000 | [diff] [blame] | 1689 | "category": "structure", |
Austin Eng | 0c82405 | 2021-09-20 16:07:25 +0000 | [diff] [blame] | 1690 | "extensible": "in", |
Yan, Shaobo | a492427 | 2018-12-10 19:47:22 +0000 | [diff] [blame] | 1691 | "members": [ |
| 1692 | {"name": "module", "type": "shader module"}, |
Kai Ninomiya | 7d174a1 | 2021-09-21 17:36:27 +0000 | [diff] [blame] | 1693 | {"name": "entry point", "type": "char", "annotation": "const*", "length": "strlen"}, |
shrekshao | e99ad76 | 2021-09-28 20:15:52 +0000 | [diff] [blame] | 1694 | {"name": "constant count", "type": "uint32_t", "default": 0}, |
| 1695 | {"name": "constants", "type": "constant entry", "annotation": "const*", "length": "constant count"} |
Yan, Shaobo | a492427 | 2018-12-10 19:47:22 +0000 | [diff] [blame] | 1696 | ] |
| 1697 | }, |
Austin Eng | 3e9e315 | 2017-07-24 13:54:19 -0400 | [diff] [blame] | 1698 | "primitive topology": { |
| 1699 | "category": "enum", |
| 1700 | "values": [ |
Austin Eng | 439d963 | 2017-07-26 18:10:44 -0400 | [diff] [blame] | 1701 | {"value": 0, "name": "point list"}, |
| 1702 | {"value": 1, "name": "line list"}, |
Austin Eng | 3e9e315 | 2017-07-24 13:54:19 -0400 | [diff] [blame] | 1703 | {"value": 2, "name": "line strip"}, |
Austin Eng | 439d963 | 2017-07-26 18:10:44 -0400 | [diff] [blame] | 1704 | {"value": 3, "name": "triangle list"}, |
Austin Eng | 3e9e315 | 2017-07-24 13:54:19 -0400 | [diff] [blame] | 1705 | {"value": 4, "name": "triangle strip"} |
| 1706 | ] |
| 1707 | }, |
Hao Li | b6eff5a | 2020-06-11 00:34:14 +0000 | [diff] [blame] | 1708 | "query set": { |
| 1709 | "category": "object", |
| 1710 | "methods": [ |
| 1711 | { |
Brandon Jones | 88aeeae | 2021-11-19 18:26:08 +0000 | [diff] [blame] | 1712 | "name": "set label", |
| 1713 | "returns": "void", |
Brandon Jones | 88aeeae | 2021-11-19 18:26:08 +0000 | [diff] [blame] | 1714 | "args": [ |
| 1715 | {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"} |
| 1716 | ] |
| 1717 | }, |
| 1718 | { |
Corentin Wallez | 45820ae | 2022-06-09 10:12:13 +0000 | [diff] [blame] | 1719 | "name": "get type", |
| 1720 | "returns": "query type" |
| 1721 | }, |
| 1722 | { |
| 1723 | "name": "get count", |
| 1724 | "returns": "uint32_t" |
| 1725 | }, |
| 1726 | { |
Hao Li | b6eff5a | 2020-06-11 00:34:14 +0000 | [diff] [blame] | 1727 | "name": "destroy" |
| 1728 | } |
| 1729 | ] |
| 1730 | }, |
| 1731 | "query set descriptor": { |
| 1732 | "category": "structure", |
Austin Eng | 0c82405 | 2021-09-20 16:07:25 +0000 | [diff] [blame] | 1733 | "extensible": "in", |
Hao Li | b6eff5a | 2020-06-11 00:34:14 +0000 | [diff] [blame] | 1734 | "members": [ |
| 1735 | {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true}, |
| 1736 | {"name": "type", "type": "query type"}, |
| 1737 | {"name": "count", "type": "uint32_t"}, |
Kai Ninomiya | 261b05d | 2020-07-13 18:21:03 +0000 | [diff] [blame] | 1738 | {"name": "pipeline statistics", "type": "pipeline statistic name", "annotation": "const*", "length": "pipeline statistics count"}, |
Corentin Wallez | 9585c46 | 2020-07-06 18:50:00 +0000 | [diff] [blame] | 1739 | {"name": "pipeline statistics count", "type": "uint32_t", "default": "0"} |
Hao Li | b6eff5a | 2020-06-11 00:34:14 +0000 | [diff] [blame] | 1740 | ] |
| 1741 | }, |
| 1742 | "query type": { |
| 1743 | "category": "enum", |
| 1744 | "values": [ |
| 1745 | {"value": 0, "name": "occlusion"}, |
| 1746 | {"value": 1, "name": "pipeline statistics"}, |
| 1747 | {"value": 2, "name": "timestamp"} |
| 1748 | ] |
| 1749 | }, |
Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 1750 | "queue": { |
| 1751 | "category": "object", |
| 1752 | "methods": [ |
| 1753 | { |
| 1754 | "name": "submit", |
| 1755 | "args": [ |
Jiawei Shao | 2030166 | 2019-02-21 00:45:19 +0000 | [diff] [blame] | 1756 | {"name": "command count", "type": "uint32_t"}, |
| 1757 | {"name": "commands", "type": "command buffer", "annotation": "const*", "length": "command count"} |
Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 1758 | ] |
Austin Eng | f0b761f | 2018-12-03 16:57:34 +0000 | [diff] [blame] | 1759 | }, |
| 1760 | { |
Corentin Wallez | c093db2 | 2021-02-25 13:17:01 +0000 | [diff] [blame] | 1761 | "name": "on submitted work done", |
Corentin Wallez | eee3449 | 2022-03-16 18:44:16 +0000 | [diff] [blame] | 1762 | "tags": ["dawn", "emscripten"], |
Corentin Wallez | c093db2 | 2021-02-25 13:17:01 +0000 | [diff] [blame] | 1763 | "args": [ |
| 1764 | {"name": "signal value", "type": "uint64_t"}, |
Corentin Wallez | e00c6bd | 2021-12-13 17:37:17 +0000 | [diff] [blame] | 1765 | {"name": "callback", "type": "queue work done callback"}, |
Corentin Wallez | c093db2 | 2021-02-25 13:17:01 +0000 | [diff] [blame] | 1766 | {"name": "userdata", "type": "void", "annotation": "*"} |
| 1767 | ] |
| 1768 | }, |
| 1769 | { |
Corentin Wallez | eee3449 | 2022-03-16 18:44:16 +0000 | [diff] [blame] | 1770 | "name": "on submitted work done", |
| 1771 | "tags": ["upstream"], |
| 1772 | "args": [ |
| 1773 | {"name": "callback", "type": "queue work done callback"}, |
| 1774 | {"name": "userdata", "type": "void", "annotation": "*"} |
| 1775 | ] |
| 1776 | }, |
| 1777 | { |
Corentin Wallez | 47a3341 | 2020-06-02 09:24:39 +0000 | [diff] [blame] | 1778 | "name": "write buffer", |
| 1779 | "args": [ |
| 1780 | {"name": "buffer", "type": "buffer"}, |
| 1781 | {"name": "buffer offset", "type": "uint64_t"}, |
| 1782 | {"name": "data", "type": "void", "annotation": "const*", "length": "size"}, |
| 1783 | {"name": "size", "type": "size_t"} |
| 1784 | ] |
Tomek Ponitka | a9c7d64 | 2020-07-08 18:42:30 +0000 | [diff] [blame] | 1785 | }, |
| 1786 | { |
| 1787 | "name": "write texture", |
| 1788 | "args": [ |
Corentin Wallez | 8091584 | 2021-03-04 18:13:45 +0000 | [diff] [blame] | 1789 | {"name": "destination", "type": "image copy texture", "annotation": "const*"}, |
Corentin Wallez | 1b9b53a | 2020-07-16 00:43:08 +0000 | [diff] [blame] | 1790 | {"name": "data", "type": "void", "annotation": "const*", "length": "data size"}, |
Tomek Ponitka | a9c7d64 | 2020-07-08 18:42:30 +0000 | [diff] [blame] | 1791 | {"name": "data size", "type": "size_t"}, |
| 1792 | {"name": "data layout", "type": "texture data layout", "annotation": "const*"}, |
Corentin Wallez | 1b9b53a | 2020-07-16 00:43:08 +0000 | [diff] [blame] | 1793 | {"name": "write size", "type": "extent 3D", "annotation": "const*"} |
Tomek Ponitka | a9c7d64 | 2020-07-08 18:42:30 +0000 | [diff] [blame] | 1794 | ] |
Yan, Shaobo | db8766b | 2020-11-04 02:30:16 +0000 | [diff] [blame] | 1795 | }, |
| 1796 | { |
| 1797 | "name": "copy texture for browser", |
Austin Eng | 0c82405 | 2021-09-20 16:07:25 +0000 | [diff] [blame] | 1798 | "extensible": "in", |
Kai Ninomiya | 930e918 | 2021-09-17 19:44:43 +0000 | [diff] [blame] | 1799 | "tags": ["dawn"], |
Yan, Shaobo | db8766b | 2020-11-04 02:30:16 +0000 | [diff] [blame] | 1800 | "args": [ |
Corentin Wallez | 8091584 | 2021-03-04 18:13:45 +0000 | [diff] [blame] | 1801 | {"name": "source", "type": "image copy texture", "annotation": "const*"}, |
| 1802 | {"name": "destination", "type": "image copy texture", "annotation": "const*"}, |
Yan, Shaobo | bb913a9 | 2020-12-02 08:13:09 +0000 | [diff] [blame] | 1803 | {"name": "copy size", "type": "extent 3D", "annotation": "const*"}, |
| 1804 | {"name": "options", "type": "copy texture for browser options", "annotation": "const*"} |
Yan, Shaobo | db8766b | 2020-11-04 02:30:16 +0000 | [diff] [blame] | 1805 | ] |
Brandon Jones | 8085367 | 2022-04-12 03:28:40 +0000 | [diff] [blame] | 1806 | }, |
| 1807 | { |
Yan,Shaobo | b4d8c80 | 2022-10-26 00:58:46 +0000 | [diff] [blame] | 1808 | "name": "copy external texture for browser", |
| 1809 | "extensible": "in", |
| 1810 | "tags": ["dawn"], |
| 1811 | "args": [ |
| 1812 | {"name": "source", "type": "image copy external texture", "annotation": "const*"}, |
| 1813 | {"name": "destination", "type": "image copy texture", "annotation": "const*"}, |
| 1814 | {"name": "copy size", "type": "extent 3D", "annotation": "const*"}, |
| 1815 | {"name": "options", "type": "copy texture for browser options", "annotation": "const*"} |
| 1816 | ] |
| 1817 | }, |
| 1818 | { |
Brandon Jones | 8085367 | 2022-04-12 03:28:40 +0000 | [diff] [blame] | 1819 | "name": "set label", |
| 1820 | "returns": "void", |
| 1821 | "args": [ |
| 1822 | {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"} |
| 1823 | ] |
Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 1824 | } |
| 1825 | ] |
| 1826 | }, |
Corentin Wallez | eee3449 | 2022-03-16 18:44:16 +0000 | [diff] [blame] | 1827 | "queue descriptor": { |
| 1828 | "category": "structure", |
| 1829 | "extensible": "in", |
Corentin Wallez | eee3449 | 2022-03-16 18:44:16 +0000 | [diff] [blame] | 1830 | "members": [ |
| 1831 | {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true} |
| 1832 | ] |
| 1833 | }, |
Corentin Wallez | c093db2 | 2021-02-25 13:17:01 +0000 | [diff] [blame] | 1834 | "queue work done callback": { |
fujunwei | 23f7162 | 2021-12-02 07:41:21 +0000 | [diff] [blame] | 1835 | "category": "function pointer", |
Corentin Wallez | c093db2 | 2021-02-25 13:17:01 +0000 | [diff] [blame] | 1836 | "args": [ |
| 1837 | {"name": "status", "type": "queue work done status"}, |
| 1838 | {"name": "userdata", "type": "void", "annotation": "*"} |
| 1839 | ] |
| 1840 | }, |
| 1841 | "queue work done status": { |
| 1842 | "category": "enum", |
Kai Ninomiya | 930e918 | 2021-09-17 19:44:43 +0000 | [diff] [blame] | 1843 | "emscripten_no_enum_table": true, |
Corentin Wallez | c093db2 | 2021-02-25 13:17:01 +0000 | [diff] [blame] | 1844 | "values": [ |
| 1845 | {"value": 0, "name": "success"}, |
| 1846 | {"value": 1, "name": "error"}, |
| 1847 | {"value": 2, "name": "unknown"}, |
| 1848 | {"value": 3, "name": "device lost"} |
| 1849 | ] |
| 1850 | }, |
Jiawei Shao | 5e811ae | 2018-12-19 08:21:13 +0000 | [diff] [blame] | 1851 | |
Austin Eng | 8a488c1 | 2019-08-13 22:12:54 +0000 | [diff] [blame] | 1852 | "render bundle": { |
| 1853 | "category": "object" |
| 1854 | }, |
| 1855 | |
| 1856 | "render bundle encoder": { |
| 1857 | "category": "object", |
Le Hoang Quyen | 7971bfe | 2023-04-05 19:35:07 +0000 | [diff] [blame] | 1858 | "no autolock": true, |
Austin Eng | 8a488c1 | 2019-08-13 22:12:54 +0000 | [diff] [blame] | 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 Wallez | 70c8c10 | 2019-10-09 16:08:42 +0000 | [diff] [blame] | 1871 | {"name": "dynamic offset count", "type": "uint32_t", "default": "0"}, |
Corentin Wallez | 75f554d | 2021-06-17 16:04:29 +0000 | [diff] [blame] | 1872 | {"name": "dynamic offsets", "type": "uint32_t", "annotation": "const*", "length": "dynamic offset count", "default": "nullptr"} |
Austin Eng | 8a488c1 | 2019-08-13 22:12:54 +0000 | [diff] [blame] | 1873 | ] |
| 1874 | }, |
| 1875 | { |
| 1876 | "name": "draw", |
| 1877 | "args": [ |
| 1878 | {"name": "vertex count", "type": "uint32_t"}, |
Corentin Wallez | 67b1ad7 | 2020-03-31 16:21:35 +0000 | [diff] [blame] | 1879 | {"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 Eng | 8a488c1 | 2019-08-13 22:12:54 +0000 | [diff] [blame] | 1882 | ] |
| 1883 | }, |
| 1884 | { |
| 1885 | "name": "draw indexed", |
| 1886 | "args": [ |
| 1887 | {"name": "index count", "type": "uint32_t"}, |
Corentin Wallez | 67b1ad7 | 2020-03-31 16:21:35 +0000 | [diff] [blame] | 1888 | {"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 Eng | 8a488c1 | 2019-08-13 22:12:54 +0000 | [diff] [blame] | 1892 | ] |
| 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 Ninomiya | 51bbbef | 2020-07-12 16:01:38 +0000 | [diff] [blame] | 1911 | {"name": "marker label", "type": "char", "annotation": "const*", "length": "strlen"} |
Austin Eng | 8a488c1 | 2019-08-13 22:12:54 +0000 | [diff] [blame] | 1912 | ] |
| 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 Beaufort | 91b2142 | 2019-10-10 07:29:58 +0000 | [diff] [blame] | 1925 | "name": "set vertex buffer", |
Austin Eng | 8a488c1 | 2019-08-13 22:12:54 +0000 | [diff] [blame] | 1926 | "args": [ |
François Beaufort | 91b2142 | 2019-10-10 07:29:58 +0000 | [diff] [blame] | 1927 | {"name": "slot", "type": "uint32_t"}, |
| 1928 | {"name": "buffer", "type": "buffer"}, |
Corentin Wallez | c244f53 | 2020-04-24 09:42:03 +0000 | [diff] [blame] | 1929 | {"name": "offset", "type": "uint64_t", "default": "0"}, |
Zhaoming Jiang | 2be4b84 | 2021-09-28 02:05:00 +0000 | [diff] [blame] | 1930 | {"name": "size", "type": "uint64_t", "default": "WGPU_WHOLE_SIZE"} |
Austin Eng | 8a488c1 | 2019-08-13 22:12:54 +0000 | [diff] [blame] | 1931 | ] |
| 1932 | }, |
| 1933 | { |
| 1934 | "name": "set index buffer", |
| 1935 | "args": [ |
| 1936 | {"name": "buffer", "type": "buffer"}, |
Corentin Wallez | 5fad85b | 2020-11-25 08:54:14 +0000 | [diff] [blame] | 1937 | {"name": "format", "type": "index format"}, |
Corentin Wallez | c244f53 | 2020-04-24 09:42:03 +0000 | [diff] [blame] | 1938 | {"name": "offset", "type": "uint64_t", "default": "0"}, |
Zhaoming Jiang | 2be4b84 | 2021-09-28 02:05:00 +0000 | [diff] [blame] | 1939 | {"name": "size", "type": "uint64_t", "default": "WGPU_WHOLE_SIZE"} |
Austin Eng | 8a488c1 | 2019-08-13 22:12:54 +0000 | [diff] [blame] | 1940 | ] |
| 1941 | }, |
| 1942 | { |
| 1943 | "name": "finish", |
| 1944 | "returns": "render bundle", |
| 1945 | "args": [ |
| 1946 | {"name": "descriptor", "type": "render bundle descriptor", "annotation": "const*", "optional": true} |
| 1947 | ] |
Brandon Jones | 828f674 | 2021-11-23 00:09:25 +0000 | [diff] [blame] | 1948 | }, |
| 1949 | { |
| 1950 | "name": "set label", |
| 1951 | "returns": "void", |
Brandon Jones | 828f674 | 2021-11-23 00:09:25 +0000 | [diff] [blame] | 1952 | "args": [ |
| 1953 | {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"} |
| 1954 | ] |
Austin Eng | 8a488c1 | 2019-08-13 22:12:54 +0000 | [diff] [blame] | 1955 | } |
| 1956 | ] |
| 1957 | }, |
| 1958 | |
| 1959 | "render bundle descriptor": { |
| 1960 | "category": "structure", |
Austin Eng | 0c82405 | 2021-09-20 16:07:25 +0000 | [diff] [blame] | 1961 | "extensible": "in", |
François Beaufort | 277d2e1 | 2019-10-03 14:56:49 +0000 | [diff] [blame] | 1962 | "members": [ |
| 1963 | {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true} |
| 1964 | ] |
Austin Eng | 8a488c1 | 2019-08-13 22:12:54 +0000 | [diff] [blame] | 1965 | }, |
| 1966 | |
| 1967 | "render bundle encoder descriptor": { |
| 1968 | "category": "structure", |
Austin Eng | 0c82405 | 2021-09-20 16:07:25 +0000 | [diff] [blame] | 1969 | "extensible": "in", |
Austin Eng | 8a488c1 | 2019-08-13 22:12:54 +0000 | [diff] [blame] | 1970 | "members": [ |
François Beaufort | 277d2e1 | 2019-10-03 14:56:49 +0000 | [diff] [blame] | 1971 | {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true}, |
Austin Eng | 8a488c1 | 2019-08-13 22:12:54 +0000 | [diff] [blame] | 1972 | {"name": "color formats count", "type": "uint32_t"}, |
| 1973 | {"name": "color formats", "type": "texture format", "annotation": "const*", "length": "color formats count"}, |
Corentin Wallez | d55bd7a | 2019-09-05 09:12:32 +0000 | [diff] [blame] | 1974 | {"name": "depth stencil format", "type": "texture format", "default": "undefined"}, |
Yunchao He | 79d2099 | 2021-10-15 16:56:13 +0000 | [diff] [blame] | 1975 | {"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 Eng | 8a488c1 | 2019-08-13 22:12:54 +0000 | [diff] [blame] | 1978 | ] |
| 1979 | }, |
| 1980 | |
Brandon Jones | 5e6a092 | 2021-04-17 01:51:53 +0000 | [diff] [blame] | 1981 | "render pass color attachment": { |
Jiawei Shao | 5e811ae | 2018-12-19 08:21:13 +0000 | [diff] [blame] | 1982 | "category": "structure", |
| 1983 | "members": [ |
Shrek Shao | 6d205fc | 2022-03-05 01:34:02 +0000 | [diff] [blame] | 1984 | {"name": "view", "type": "texture view", "optional": true}, |
Jiawei Shao | 5e811ae | 2018-12-19 08:21:13 +0000 | [diff] [blame] | 1985 | {"name": "resolve target", "type": "texture view", "optional": true}, |
| 1986 | {"name": "load op", "type": "load op"}, |
| 1987 | {"name": "store op", "type": "store op"}, |
Shrek Shao | b0987d6 | 2022-03-07 19:29:54 +0000 | [diff] [blame] | 1988 | {"name": "clear value", "type": "color"} |
Jiawei Shao | 5e811ae | 2018-12-19 08:21:13 +0000 | [diff] [blame] | 1989 | ] |
| 1990 | }, |
| 1991 | |
Brandon Jones | 5e6a092 | 2021-04-17 01:51:53 +0000 | [diff] [blame] | 1992 | "render pass depth stencil attachment": { |
Jiawei Shao | 5e811ae | 2018-12-19 08:21:13 +0000 | [diff] [blame] | 1993 | "category": "structure", |
| 1994 | "members": [ |
Corentin Wallez | 1ac4565 | 2021-09-14 10:42:22 +0000 | [diff] [blame] | 1995 | {"name": "view", "type": "texture view"}, |
Brandon Jones | a20ce6f | 2022-02-03 17:59:04 +0000 | [diff] [blame] | 1996 | {"name": "depth load op", "type": "load op", "default": "undefined"}, |
| 1997 | {"name": "depth store op", "type": "store op", "default": "undefined"}, |
Takahiro | 9754bc4 | 2023-03-01 13:34:59 +0000 | [diff] [blame] | 1998 | {"name": "depth clear value", "type": "float", "default": "NAN"}, |
Brandon Jones | 7695afc | 2020-07-10 23:13:58 +0000 | [diff] [blame] | 1999 | {"name": "depth read only", "type": "bool", "default": "false"}, |
Brandon Jones | a20ce6f | 2022-02-03 17:59:04 +0000 | [diff] [blame] | 2000 | {"name": "stencil load op", "type": "load op", "default": "undefined"}, |
| 2001 | {"name": "stencil store op", "type": "store op", "default": "undefined"}, |
Brandon Jones | 6e8c473 | 2022-02-19 00:44:12 +0000 | [diff] [blame] | 2002 | {"name": "stencil clear value", "type": "uint32_t", "default": "0"}, |
Corentin Wallez | 1ac4565 | 2021-09-14 10:42:22 +0000 | [diff] [blame] | 2003 | {"name": "stencil read only", "type": "bool", "default": "false"} |
Jiawei Shao | 5e811ae | 2018-12-19 08:21:13 +0000 | [diff] [blame] | 2004 | ] |
| 2005 | }, |
| 2006 | |
Corentin Wallez | 8d6b5d2 | 2018-05-11 13:04:44 -0400 | [diff] [blame] | 2007 | "render pass descriptor": { |
Jiawei Shao | b2c5023 | 2019-02-27 09:21:56 +0000 | [diff] [blame] | 2008 | "category": "structure", |
Austin Eng | 0c82405 | 2021-09-20 16:07:25 +0000 | [diff] [blame] | 2009 | "extensible": "in", |
Jiawei Shao | b2c5023 | 2019-02-27 09:21:56 +0000 | [diff] [blame] | 2010 | "members": [ |
François Beaufort | 277d2e1 | 2019-10-03 14:56:49 +0000 | [diff] [blame] | 2011 | {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true}, |
Jiawei Shao | b2c5023 | 2019-02-27 09:21:56 +0000 | [diff] [blame] | 2012 | {"name": "color attachment count", "type": "uint32_t"}, |
Brandon Jones | 5e6a092 | 2021-04-17 01:51:53 +0000 | [diff] [blame] | 2013 | {"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 Wallez | 6cd1cd9 | 2021-11-17 08:13:24 +0000 | [diff] [blame] | 2015 | {"name": "occlusion query set", "type": "query set", "optional": true}, |
Li Hao | 131c422 | 2022-03-05 01:22:52 +0000 | [diff] [blame] | 2016 | {"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 Shao | b2c5023 | 2019-02-27 09:21:56 +0000 | [diff] [blame] | 2018 | ] |
Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 2019 | }, |
Takahiro | 831296d | 2022-06-30 04:19:42 +0000 | [diff] [blame] | 2020 | "render pass descriptor max draw count": { |
| 2021 | "category": "structure", |
| 2022 | "chained": "in", |
Corentin Wallez | a45561b | 2022-07-14 12:58:25 +0000 | [diff] [blame] | 2023 | "chain roots": ["render pass descriptor"], |
Takahiro | 831296d | 2022-06-30 04:19:42 +0000 | [diff] [blame] | 2024 | "members": [ |
| 2025 | {"name": "max draw count", "type": "uint64_t", "default": 50000000} |
| 2026 | ] |
| 2027 | }, |
Corentin Wallez | 82fbccb | 2018-09-21 00:24:37 +0000 | [diff] [blame] | 2028 | "render pass encoder": { |
| 2029 | "category": "object", |
Le Hoang Quyen | 7971bfe | 2023-04-05 19:35:07 +0000 | [diff] [blame] | 2030 | "no autolock": true, |
Corentin Wallez | 82fbccb | 2018-09-21 00:24:37 +0000 | [diff] [blame] | 2031 | "methods": [ |
| 2032 | { |
Yan, Shaobo | 300eec0 | 2018-12-21 10:40:26 +0000 | [diff] [blame] | 2033 | "name": "set pipeline", |
Corentin Wallez | 82fbccb | 2018-09-21 00:24:37 +0000 | [diff] [blame] | 2034 | "args": [ |
| 2035 | {"name": "pipeline", "type": "render pipeline"} |
| 2036 | ] |
| 2037 | }, |
| 2038 | { |
Corentin Wallez | 82fbccb | 2018-09-21 00:24:37 +0000 | [diff] [blame] | 2039 | "name": "set bind group", |
| 2040 | "args": [ |
| 2041 | {"name": "group index", "type": "uint32_t"}, |
Yan, Shaobo | 991ab98 | 2019-03-18 06:01:37 +0000 | [diff] [blame] | 2042 | {"name": "group", "type": "bind group"}, |
Corentin Wallez | 70c8c10 | 2019-10-09 16:08:42 +0000 | [diff] [blame] | 2043 | {"name": "dynamic offset count", "type": "uint32_t", "default": "0"}, |
Corentin Wallez | 75f554d | 2021-06-17 16:04:29 +0000 | [diff] [blame] | 2044 | {"name": "dynamic offsets", "type": "uint32_t", "annotation": "const*", "length": "dynamic offset count", "default": "nullptr"} |
Corentin Wallez | 82fbccb | 2018-09-21 00:24:37 +0000 | [diff] [blame] | 2045 | ] |
| 2046 | }, |
| 2047 | { |
Jiawei Shao | c789b84 | 2018-12-10 05:20:19 +0000 | [diff] [blame] | 2048 | "name": "draw", |
Corentin Wallez | 82fbccb | 2018-09-21 00:24:37 +0000 | [diff] [blame] | 2049 | "args": [ |
| 2050 | {"name": "vertex count", "type": "uint32_t"}, |
Corentin Wallez | 67b1ad7 | 2020-03-31 16:21:35 +0000 | [diff] [blame] | 2051 | {"name": "instance count", "type": "uint32_t", "default": "1"}, |
| 2052 | {"name": "first vertex", "type": "uint32_t", "default": "0"}, |
| 2053 | {"name": "first instance", "type": "uint32_t", "default": "0"} |
Corentin Wallez | 82fbccb | 2018-09-21 00:24:37 +0000 | [diff] [blame] | 2054 | ] |
| 2055 | }, |
| 2056 | { |
Jiawei Shao | c789b84 | 2018-12-10 05:20:19 +0000 | [diff] [blame] | 2057 | "name": "draw indexed", |
Corentin Wallez | 82fbccb | 2018-09-21 00:24:37 +0000 | [diff] [blame] | 2058 | "args": [ |
| 2059 | {"name": "index count", "type": "uint32_t"}, |
Corentin Wallez | 67b1ad7 | 2020-03-31 16:21:35 +0000 | [diff] [blame] | 2060 | {"name": "instance count", "type": "uint32_t", "default": "1"}, |
| 2061 | {"name": "first index", "type": "uint32_t", "default": "0"}, |
| 2062 | {"name": "base vertex", "type": "int32_t", "default": "0"}, |
| 2063 | {"name": "first instance", "type": "uint32_t", "default": "0"} |
Corentin Wallez | 82fbccb | 2018-09-21 00:24:37 +0000 | [diff] [blame] | 2064 | ] |
| 2065 | }, |
| 2066 | { |
Idan Raiter | 05f7ad5 | 2019-06-10 20:56:27 +0000 | [diff] [blame] | 2067 | "name": "draw indirect", |
| 2068 | "args": [ |
| 2069 | {"name": "indirect buffer", "type": "buffer"}, |
| 2070 | {"name": "indirect offset", "type": "uint64_t"} |
| 2071 | ] |
| 2072 | }, |
| 2073 | { |
| 2074 | "name": "draw indexed indirect", |
| 2075 | "args": [ |
| 2076 | {"name": "indirect buffer", "type": "buffer"}, |
| 2077 | {"name": "indirect offset", "type": "uint64_t"} |
| 2078 | ] |
| 2079 | }, |
| 2080 | { |
Austin Eng | 8a488c1 | 2019-08-13 22:12:54 +0000 | [diff] [blame] | 2081 | "name": "execute bundles", |
| 2082 | "args": [ |
Corentin Wallez | 873df0a | 2022-09-30 20:34:08 +0000 | [diff] [blame] | 2083 | {"name": "bundle count", "type": "uint32_t"}, |
| 2084 | {"name": "bundles", "type": "render bundle", "annotation": "const*", "length": "bundle count"} |
Austin Eng | 8a488c1 | 2019-08-13 22:12:54 +0000 | [diff] [blame] | 2085 | ] |
| 2086 | }, |
| 2087 | { |
Brandon Jones | 11d32c8 | 2019-02-20 20:21:00 +0000 | [diff] [blame] | 2088 | "name": "insert debug marker", |
| 2089 | "args": [ |
Kai Ninomiya | 51bbbef | 2020-07-12 16:01:38 +0000 | [diff] [blame] | 2090 | {"name": "marker label", "type": "char", "annotation": "const*", "length": "strlen"} |
Brandon Jones | 11d32c8 | 2019-02-20 20:21:00 +0000 | [diff] [blame] | 2091 | ] |
| 2092 | }, |
| 2093 | { |
| 2094 | "name": "pop debug group", |
| 2095 | "args": [] |
| 2096 | }, |
| 2097 | { |
| 2098 | "name": "push debug group", |
| 2099 | "args": [ |
| 2100 | {"name": "group label", "type": "char", "annotation": "const*", "length": "strlen"} |
| 2101 | ] |
| 2102 | }, |
| 2103 | { |
Corentin Wallez | 82fbccb | 2018-09-21 00:24:37 +0000 | [diff] [blame] | 2104 | "name": "set stencil reference", |
| 2105 | "args": [ |
| 2106 | {"name": "reference", "type": "uint32_t"} |
| 2107 | ] |
| 2108 | }, |
| 2109 | { |
Brandon Jones | 413dcf8 | 2021-04-15 19:33:58 +0000 | [diff] [blame] | 2110 | "name": "set blend constant", |
| 2111 | "args": [ |
| 2112 | {"name": "color", "type": "color", "annotation": "const*"} |
| 2113 | ] |
| 2114 | }, |
| 2115 | { |
Yunchao He | 050ab49 | 2019-07-04 15:30:59 +0000 | [diff] [blame] | 2116 | "name": "set viewport", |
| 2117 | "args": [ |
| 2118 | {"name": "x", "type": "float"}, |
| 2119 | {"name": "y", "type": "float"}, |
| 2120 | {"name": "width", "type": "float"}, |
| 2121 | {"name": "height", "type": "float"}, |
| 2122 | {"name": "min depth", "type": "float"}, |
| 2123 | {"name": "max depth", "type": "float"} |
| 2124 | ] |
| 2125 | }, |
| 2126 | { |
Corentin Wallez | 82fbccb | 2018-09-21 00:24:37 +0000 | [diff] [blame] | 2127 | "name": "set scissor rect", |
| 2128 | "args": [ |
| 2129 | {"name": "x", "type": "uint32_t"}, |
| 2130 | {"name": "y", "type": "uint32_t"}, |
| 2131 | {"name": "width", "type": "uint32_t"}, |
| 2132 | {"name": "height", "type": "uint32_t"} |
| 2133 | ] |
| 2134 | }, |
| 2135 | { |
François Beaufort | 91b2142 | 2019-10-10 07:29:58 +0000 | [diff] [blame] | 2136 | "name": "set vertex buffer", |
Corentin Wallez | 82fbccb | 2018-09-21 00:24:37 +0000 | [diff] [blame] | 2137 | "args": [ |
François Beaufort | 91b2142 | 2019-10-10 07:29:58 +0000 | [diff] [blame] | 2138 | {"name": "slot", "type": "uint32_t"}, |
| 2139 | {"name": "buffer", "type": "buffer"}, |
Corentin Wallez | c244f53 | 2020-04-24 09:42:03 +0000 | [diff] [blame] | 2140 | {"name": "offset", "type": "uint64_t", "default": "0"}, |
Zhaoming Jiang | 2be4b84 | 2021-09-28 02:05:00 +0000 | [diff] [blame] | 2141 | {"name": "size", "type": "uint64_t", "default": "WGPU_WHOLE_SIZE"} |
Corentin Wallez | 82fbccb | 2018-09-21 00:24:37 +0000 | [diff] [blame] | 2142 | ] |
| 2143 | }, |
| 2144 | { |
| 2145 | "name": "set index buffer", |
| 2146 | "args": [ |
| 2147 | {"name": "buffer", "type": "buffer"}, |
Corentin Wallez | 5fad85b | 2020-11-25 08:54:14 +0000 | [diff] [blame] | 2148 | {"name": "format", "type": "index format"}, |
Corentin Wallez | c244f53 | 2020-04-24 09:42:03 +0000 | [diff] [blame] | 2149 | {"name": "offset", "type": "uint64_t", "default": "0"}, |
Zhaoming Jiang | 2be4b84 | 2021-09-28 02:05:00 +0000 | [diff] [blame] | 2150 | {"name": "size", "type": "uint64_t", "default": "WGPU_WHOLE_SIZE"} |
Corentin Wallez | 82fbccb | 2018-09-21 00:24:37 +0000 | [diff] [blame] | 2151 | ] |
| 2152 | }, |
| 2153 | { |
Hao Li | 01e4450 | 2020-11-18 09:47:52 +0000 | [diff] [blame] | 2154 | "name": "begin occlusion query", |
| 2155 | "args": [ |
| 2156 | {"name": "query index", "type": "uint32_t"} |
| 2157 | ] |
| 2158 | }, |
| 2159 | { |
Kai Ninomiya | 4e37acc | 2021-09-17 21:13:33 +0000 | [diff] [blame] | 2160 | "name": "begin pipeline statistics query", |
Shrek Shao | ee50bc0 | 2022-02-08 20:21:40 +0000 | [diff] [blame] | 2161 | "tags": ["upstream", "emscripten"], |
Kai Ninomiya | 4e37acc | 2021-09-17 21:13:33 +0000 | [diff] [blame] | 2162 | "args": [ |
| 2163 | {"name": "query set", "type": "query set"}, |
| 2164 | {"name": "query index", "type": "uint32_t"} |
| 2165 | ] |
| 2166 | }, |
| 2167 | { |
Hao Li | 01e4450 | 2020-11-18 09:47:52 +0000 | [diff] [blame] | 2168 | "name": "end occlusion query" |
| 2169 | }, |
| 2170 | { |
Hao Li | 5191adc | 2020-07-01 10:48:16 +0000 | [diff] [blame] | 2171 | "name": "write timestamp", |
Corentin Wallez | 6cd1cd9 | 2021-11-17 08:13:24 +0000 | [diff] [blame] | 2172 | "tags": ["emscripten", "dawn"], |
Hao Li | 5191adc | 2020-07-01 10:48:16 +0000 | [diff] [blame] | 2173 | "args": [ |
| 2174 | {"name": "query set", "type": "query set"}, |
| 2175 | {"name": "query index", "type": "uint32_t"} |
| 2176 | ] |
| 2177 | }, |
| 2178 | { |
Brandon Jones | 0fee4c1 | 2022-02-07 19:48:39 +0000 | [diff] [blame] | 2179 | "name": "end" |
| 2180 | }, |
| 2181 | { |
| 2182 | "name": "end pass", |
| 2183 | "tags": ["deprecated"] |
Kai Ninomiya | 4e37acc | 2021-09-17 21:13:33 +0000 | [diff] [blame] | 2184 | }, |
| 2185 | { |
| 2186 | "name": "end pipeline statistics query", |
Shrek Shao | ee50bc0 | 2022-02-08 20:21:40 +0000 | [diff] [blame] | 2187 | "tags": ["upstream", "emscripten"] |
Brandon Jones | 828f674 | 2021-11-23 00:09:25 +0000 | [diff] [blame] | 2188 | }, |
| 2189 | { |
| 2190 | "name": "set label", |
| 2191 | "returns": "void", |
Brandon Jones | 828f674 | 2021-11-23 00:09:25 +0000 | [diff] [blame] | 2192 | "args": [ |
| 2193 | {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"} |
| 2194 | ] |
Corentin Wallez | 82fbccb | 2018-09-21 00:24:37 +0000 | [diff] [blame] | 2195 | } |
| 2196 | ] |
| 2197 | }, |
Corentin Wallez | 6cd1cd9 | 2021-11-17 08:13:24 +0000 | [diff] [blame] | 2198 | "render pass timestamp location": { |
| 2199 | "category": "enum", |
Corentin Wallez | 6cd1cd9 | 2021-11-17 08:13:24 +0000 | [diff] [blame] | 2200 | "values": [ |
| 2201 | {"value": 0, "name": "beginning"}, |
| 2202 | {"value": 1, "name": "end"} |
| 2203 | ] |
| 2204 | }, |
| 2205 | "render pass timestamp write": { |
| 2206 | "category": "structure", |
Corentin Wallez | 6cd1cd9 | 2021-11-17 08:13:24 +0000 | [diff] [blame] | 2207 | "members": [ |
| 2208 | {"name": "query set", "type": "query set"}, |
| 2209 | {"name": "query index", "type": "uint32_t"}, |
| 2210 | {"name": "location", "type": "render pass timestamp location"} |
| 2211 | ] |
| 2212 | }, |
Corentin Wallez | 29ced28 | 2017-07-14 10:58:07 -0400 | [diff] [blame] | 2213 | "render pipeline": { |
Austin Eng | f6eb890 | 2019-11-22 17:02:22 +0000 | [diff] [blame] | 2214 | "category": "object", |
| 2215 | "methods": [ |
| 2216 | { |
| 2217 | "name": "get bind group layout", |
| 2218 | "returns": "bind group layout", |
| 2219 | "args": [ |
Corentin Wallez | 373a3ff | 2020-04-01 18:22:36 +0000 | [diff] [blame] | 2220 | {"name": "group index", "type": "uint32_t"} |
Austin Eng | f6eb890 | 2019-11-22 17:02:22 +0000 | [diff] [blame] | 2221 | ] |
Brandon Jones | c1bcbbf | 2021-09-02 18:39:53 +0000 | [diff] [blame] | 2222 | }, |
| 2223 | { |
| 2224 | "name": "set label", |
| 2225 | "returns": "void", |
| 2226 | "args": [ |
| 2227 | {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"} |
| 2228 | ] |
Austin Eng | f6eb890 | 2019-11-22 17:02:22 +0000 | [diff] [blame] | 2229 | } |
Austin Eng | 2092a66 | 2021-09-10 21:07:39 +0000 | [diff] [blame] | 2230 | |
| 2231 | ] |
| 2232 | }, |
| 2233 | |
| 2234 | "request device callback": { |
fujunwei | 23f7162 | 2021-12-02 07:41:21 +0000 | [diff] [blame] | 2235 | "category": "function pointer", |
Austin Eng | 2092a66 | 2021-09-10 21:07:39 +0000 | [diff] [blame] | 2236 | "args": [ |
| 2237 | {"name": "status", "type": "request device status"}, |
| 2238 | {"name": "device", "type": "device"}, |
Austin Eng | 5397f9f | 2021-12-14 23:22:46 +0000 | [diff] [blame] | 2239 | {"name": "message", "type": "char", "annotation": "const*", "length": "strlen", "optional": true}, |
Austin Eng | 2092a66 | 2021-09-10 21:07:39 +0000 | [diff] [blame] | 2240 | {"name": "userdata", "type": "void", "annotation": "*"} |
| 2241 | ] |
| 2242 | }, |
| 2243 | |
| 2244 | "request device status": { |
| 2245 | "category": "enum", |
Kai Ninomiya | 930e918 | 2021-09-17 19:44:43 +0000 | [diff] [blame] | 2246 | "emscripten_no_enum_table": true, |
Austin Eng | 2092a66 | 2021-09-10 21:07:39 +0000 | [diff] [blame] | 2247 | "values": [ |
| 2248 | {"value": 0, "name": "success"}, |
| 2249 | {"value": 1, "name": "error"}, |
| 2250 | {"value": 2, "name": "unknown"} |
Austin Eng | f6eb890 | 2019-11-22 17:02:22 +0000 | [diff] [blame] | 2251 | ] |
Corentin Wallez | 29ced28 | 2017-07-14 10:58:07 -0400 | [diff] [blame] | 2252 | }, |
Brandon Jones | 0702b70 | 2021-03-11 21:19:00 +0000 | [diff] [blame] | 2253 | |
| 2254 | "vertex state": { |
| 2255 | "category": "structure", |
Austin Eng | 0c82405 | 2021-09-20 16:07:25 +0000 | [diff] [blame] | 2256 | "extensible": "in", |
Brandon Jones | 0702b70 | 2021-03-11 21:19:00 +0000 | [diff] [blame] | 2257 | "members": [ |
| 2258 | {"name": "module", "type": "shader module"}, |
| 2259 | {"name": "entry point", "type": "char", "annotation": "const*", "length": "strlen"}, |
shrekshao | e99ad76 | 2021-09-28 20:15:52 +0000 | [diff] [blame] | 2260 | {"name": "constant count", "type": "uint32_t", "default": 0}, |
| 2261 | {"name": "constants", "type": "constant entry", "annotation": "const*", "length": "constant count"}, |
Austin Eng | 41b4c9d | 2021-04-16 07:19:35 +0000 | [diff] [blame] | 2262 | {"name": "buffer count", "type": "uint32_t", "default": 0}, |
Brandon Jones | 0702b70 | 2021-03-11 21:19:00 +0000 | [diff] [blame] | 2263 | {"name": "buffers", "type": "vertex buffer layout", "annotation": "const*", "length": "buffer count"} |
| 2264 | ] |
| 2265 | }, |
| 2266 | |
| 2267 | "primitive state": { |
| 2268 | "category": "structure", |
Austin Eng | 0c82405 | 2021-09-20 16:07:25 +0000 | [diff] [blame] | 2269 | "extensible": "in", |
Brandon Jones | 0702b70 | 2021-03-11 21:19:00 +0000 | [diff] [blame] | 2270 | "members": [ |
| 2271 | {"name": "topology", "type": "primitive topology", "default": "triangle list"}, |
| 2272 | {"name": "strip index format", "type": "index format", "default": "undefined"}, |
| 2273 | {"name": "front face", "type": "front face", "default": "CCW"}, |
| 2274 | {"name": "cull mode", "type": "cull mode", "default": "none"} |
| 2275 | ] |
| 2276 | }, |
| 2277 | |
Corentin Wallez | 53db01b | 2021-11-18 23:05:40 +0000 | [diff] [blame] | 2278 | "primitive depth clip control": { |
| 2279 | "category": "structure", |
| 2280 | "chained": "in", |
Corentin Wallez | a45561b | 2022-07-14 12:58:25 +0000 | [diff] [blame] | 2281 | "chain roots": ["primitive state"], |
Corentin Wallez | 53db01b | 2021-11-18 23:05:40 +0000 | [diff] [blame] | 2282 | "members": [ |
| 2283 | {"name": "unclipped depth", "type": "bool", "default": "false"} |
| 2284 | ] |
| 2285 | }, |
| 2286 | |
Brandon Jones | 0702b70 | 2021-03-11 21:19:00 +0000 | [diff] [blame] | 2287 | "depth stencil state": { |
| 2288 | "category": "structure", |
Austin Eng | 0c82405 | 2021-09-20 16:07:25 +0000 | [diff] [blame] | 2289 | "extensible": "in", |
Brandon Jones | 0702b70 | 2021-03-11 21:19:00 +0000 | [diff] [blame] | 2290 | "members": [ |
| 2291 | {"name": "format", "type": "texture format"}, |
Takahiro | 9754bc4 | 2023-03-01 13:34:59 +0000 | [diff] [blame] | 2292 | {"name": "depth write enabled", "type": "bool"}, |
| 2293 | {"name": "depth compare", "type": "compare function"}, |
Brandon Jones | 0702b70 | 2021-03-11 21:19:00 +0000 | [diff] [blame] | 2294 | {"name": "stencil front", "type": "stencil face state"}, |
| 2295 | {"name": "stencil back", "type": "stencil face state"}, |
| 2296 | {"name": "stencil read mask", "type": "uint32_t", "default": "0xFFFFFFFF"}, |
| 2297 | {"name": "stencil write mask", "type": "uint32_t", "default": "0xFFFFFFFF"}, |
| 2298 | {"name": "depth bias", "type": "int32_t", "default": "0"}, |
| 2299 | {"name": "depth bias slope scale", "type": "float", "default": "0.0f"}, |
| 2300 | {"name": "depth bias clamp", "type": "float", "default": "0.0f"} |
| 2301 | ] |
| 2302 | }, |
| 2303 | |
| 2304 | "multisample state": { |
| 2305 | "category": "structure", |
Austin Eng | 0c82405 | 2021-09-20 16:07:25 +0000 | [diff] [blame] | 2306 | "extensible": "in", |
Brandon Jones | 0702b70 | 2021-03-11 21:19:00 +0000 | [diff] [blame] | 2307 | "members": [ |
| 2308 | {"name": "count", "type": "uint32_t", "default": "1"}, |
| 2309 | {"name": "mask", "type": "uint32_t", "default": "0xFFFFFFFF"}, |
| 2310 | {"name": "alpha to coverage enabled", "type": "bool", "default": "false"} |
| 2311 | ] |
| 2312 | }, |
| 2313 | |
| 2314 | "fragment state": { |
| 2315 | "category": "structure", |
Austin Eng | 0c82405 | 2021-09-20 16:07:25 +0000 | [diff] [blame] | 2316 | "extensible": "in", |
Brandon Jones | 0702b70 | 2021-03-11 21:19:00 +0000 | [diff] [blame] | 2317 | "members": [ |
| 2318 | {"name": "module", "type": "shader module"}, |
| 2319 | {"name": "entry point", "type": "char", "annotation": "const*", "length": "strlen"}, |
shrekshao | e99ad76 | 2021-09-28 20:15:52 +0000 | [diff] [blame] | 2320 | {"name": "constant count", "type": "uint32_t", "default": 0}, |
| 2321 | {"name": "constants", "type": "constant entry", "annotation": "const*", "length": "constant count"}, |
Brandon Jones | 0702b70 | 2021-03-11 21:19:00 +0000 | [diff] [blame] | 2322 | {"name": "target count", "type": "uint32_t"}, |
| 2323 | {"name": "targets", "type": "color target state", "annotation": "const*", "length": "target count"} |
| 2324 | ] |
| 2325 | }, |
| 2326 | "color target state": { |
| 2327 | "category": "structure", |
Austin Eng | 0c82405 | 2021-09-20 16:07:25 +0000 | [diff] [blame] | 2328 | "extensible": "in", |
Brandon Jones | 0702b70 | 2021-03-11 21:19:00 +0000 | [diff] [blame] | 2329 | "members": [ |
| 2330 | {"name": "format", "type": "texture format"}, |
| 2331 | {"name": "blend", "type": "blend state", "annotation": "const*", "optional": true}, |
| 2332 | {"name": "write mask", "type": "color write mask", "default": "all"} |
| 2333 | ] |
| 2334 | }, |
| 2335 | "blend state": { |
| 2336 | "category": "structure", |
| 2337 | "extensible": false, |
| 2338 | "members": [ |
| 2339 | {"name": "color", "type": "blend component"}, |
| 2340 | {"name": "alpha", "type": "blend component"} |
| 2341 | ] |
| 2342 | }, |
| 2343 | |
Yan, Shaobo | a492427 | 2018-12-10 19:47:22 +0000 | [diff] [blame] | 2344 | "render pipeline descriptor": { |
| 2345 | "category": "structure", |
Austin Eng | 0c82405 | 2021-09-20 16:07:25 +0000 | [diff] [blame] | 2346 | "extensible": "in", |
Yan, Shaobo | a492427 | 2018-12-10 19:47:22 +0000 | [diff] [blame] | 2347 | "members": [ |
François Beaufort | 277d2e1 | 2019-10-03 14:56:49 +0000 | [diff] [blame] | 2348 | {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true}, |
Austin Eng | f6eb890 | 2019-11-22 17:02:22 +0000 | [diff] [blame] | 2349 | {"name": "layout", "type": "pipeline layout", "optional": true}, |
Brandon Jones | 0702b70 | 2021-03-11 21:19:00 +0000 | [diff] [blame] | 2350 | {"name": "vertex", "type": "vertex state"}, |
| 2351 | {"name": "primitive", "type": "primitive state"}, |
| 2352 | {"name": "depth stencil", "type": "depth stencil state", "annotation": "const*", "optional": true}, |
| 2353 | {"name": "multisample", "type": "multisample state"}, |
| 2354 | {"name": "fragment", "type": "fragment state", "annotation": "const*", "optional": true} |
| 2355 | ] |
| 2356 | }, |
| 2357 | |
Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 2358 | "sampler": { |
Brandon Jones | 88aeeae | 2021-11-19 18:26:08 +0000 | [diff] [blame] | 2359 | "category": "object", |
| 2360 | "methods": [ |
| 2361 | { |
| 2362 | "name": "set label", |
| 2363 | "returns": "void", |
Brandon Jones | 88aeeae | 2021-11-19 18:26:08 +0000 | [diff] [blame] | 2364 | "args": [ |
| 2365 | {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"} |
| 2366 | ] |
| 2367 | } |
| 2368 | ] |
Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 2369 | }, |
Corentin Wallez | 1ae19e8 | 2018-05-17 17:09:07 -0400 | [diff] [blame] | 2370 | "sampler descriptor": { |
| 2371 | "category": "structure", |
Austin Eng | 0c82405 | 2021-09-20 16:07:25 +0000 | [diff] [blame] | 2372 | "extensible": "in", |
Corentin Wallez | 1ae19e8 | 2018-05-17 17:09:07 -0400 | [diff] [blame] | 2373 | "members": [ |
François Beaufort | 277d2e1 | 2019-10-03 14:56:49 +0000 | [diff] [blame] | 2374 | {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true}, |
Corentin Wallez | 8f93871 | 2019-07-08 19:20:22 +0000 | [diff] [blame] | 2375 | {"name": "address mode u", "type": "address mode", "default": "clamp to edge"}, |
| 2376 | {"name": "address mode v", "type": "address mode", "default": "clamp to edge"}, |
| 2377 | {"name": "address mode w", "type": "address mode", "default": "clamp to edge"}, |
| 2378 | {"name": "mag filter", "type": "filter mode", "default": "nearest"}, |
| 2379 | {"name": "min filter", "type": "filter mode", "default": "nearest"}, |
Corentin Wallez | eee3449 | 2022-03-16 18:44:16 +0000 | [diff] [blame] | 2380 | {"name": "mipmap filter", "type": "filter mode", "default": "nearest", "tags": ["dawn", "emscripten"]}, |
| 2381 | {"name": "mipmap filter", "type": "mipmap filter mode", "default": "nearest", "tags": ["upstream"]}, |
Corentin Wallez | 8f93871 | 2019-07-08 19:20:22 +0000 | [diff] [blame] | 2382 | {"name": "lod min clamp", "type": "float", "default": "0.0f"}, |
| 2383 | {"name": "lod max clamp", "type": "float", "default": "1000.0f"}, |
shrekshao | f8c5e4a | 2020-12-24 03:11:17 +0000 | [diff] [blame] | 2384 | {"name": "compare", "type": "compare function", "default": "undefined"}, |
| 2385 | {"name": "max anisotropy", "type": "uint16_t", "default": "1"} |
Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 2386 | ] |
| 2387 | }, |
| 2388 | "shader module": { |
Brandon Jones | 6f2bbe9 | 2021-04-05 23:34:17 +0000 | [diff] [blame] | 2389 | "category": "object", |
| 2390 | "methods": [ |
| 2391 | { |
| 2392 | "name": "get compilation info", |
| 2393 | "args": [ |
Corentin Wallez | e00c6bd | 2021-12-13 17:37:17 +0000 | [diff] [blame] | 2394 | {"name": "callback", "type": "compilation info callback"}, |
Brandon Jones | 6f2bbe9 | 2021-04-05 23:34:17 +0000 | [diff] [blame] | 2395 | {"name": "userdata", "type": "void", "annotation": "*"} |
| 2396 | ] |
Brandon Jones | c1bcbbf | 2021-09-02 18:39:53 +0000 | [diff] [blame] | 2397 | }, |
| 2398 | { |
| 2399 | "name": "set label", |
| 2400 | "returns": "void", |
| 2401 | "args": [ |
| 2402 | {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"} |
| 2403 | ] |
Brandon Jones | 6f2bbe9 | 2021-04-05 23:34:17 +0000 | [diff] [blame] | 2404 | } |
| 2405 | ] |
Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 2406 | }, |
Corentin Wallez | df67103 | 2018-08-20 17:01:20 +0200 | [diff] [blame] | 2407 | "shader module descriptor": { |
| 2408 | "category": "structure", |
Austin Eng | 0c82405 | 2021-09-20 16:07:25 +0000 | [diff] [blame] | 2409 | "extensible": "in", |
Corentin Wallez | df67103 | 2018-08-20 17:01:20 +0200 | [diff] [blame] | 2410 | "members": [ |
Corentin Wallez | aa0731d | 2022-03-21 17:11:53 +0000 | [diff] [blame] | 2411 | {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true}, |
| 2412 | {"name": "hint count", "type": "uint32_t", "default": 0, "tags": ["upstream"]}, |
| 2413 | {"name": "hints", "type": "shader module compilation hint", "annotation": "const*", "length": "hint count", "tags": ["upstream"]} |
| 2414 | ] |
| 2415 | }, |
| 2416 | "shader module compilation hint": { |
| 2417 | "category": "structure", |
| 2418 | "extensible": "in", |
| 2419 | "tags": ["upstream"], |
| 2420 | "members": [ |
| 2421 | {"name": "entry point", "type": "char", "annotation": "const*", "length": "strlen"}, |
| 2422 | {"name": "layout", "type": "pipeline layout"} |
Corentin Wallez | fee2783 | 2020-04-21 08:04:48 +0000 | [diff] [blame] | 2423 | ] |
| 2424 | }, |
| 2425 | "shader module SPIRV descriptor": { |
| 2426 | "category": "structure", |
Austin Eng | 0c82405 | 2021-09-20 16:07:25 +0000 | [diff] [blame] | 2427 | "chained": "in", |
Corentin Wallez | a45561b | 2022-07-14 12:58:25 +0000 | [diff] [blame] | 2428 | "chain roots": ["shader module descriptor"], |
Corentin Wallez | fee2783 | 2020-04-21 08:04:48 +0000 | [diff] [blame] | 2429 | "members": [ |
Corentin Wallez | df67103 | 2018-08-20 17:01:20 +0200 | [diff] [blame] | 2430 | {"name": "code size", "type": "uint32_t"}, |
| 2431 | {"name": "code", "type": "uint32_t", "annotation": "const*", "length": "code size"} |
Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 2432 | ] |
| 2433 | }, |
Corentin Wallez | fee2783 | 2020-04-21 08:04:48 +0000 | [diff] [blame] | 2434 | "shader module WGSL descriptor": { |
| 2435 | "category": "structure", |
Austin Eng | 0c82405 | 2021-09-20 16:07:25 +0000 | [diff] [blame] | 2436 | "chained": "in", |
Corentin Wallez | a45561b | 2022-07-14 12:58:25 +0000 | [diff] [blame] | 2437 | "chain roots": ["shader module descriptor"], |
Corentin Wallez | fee2783 | 2020-04-21 08:04:48 +0000 | [diff] [blame] | 2438 | "members": [ |
Corentin Wallez | 53db01b | 2021-11-18 23:05:40 +0000 | [diff] [blame] | 2439 | {"name": "source", "type": "char", "annotation": "const*", "length": "strlen", "tags": ["dawn", "emscripten"]}, |
| 2440 | {"name": "code", "type": "char", "annotation": "const*", "length": "strlen", "tags": ["upstream"]} |
Corentin Wallez | fee2783 | 2020-04-21 08:04:48 +0000 | [diff] [blame] | 2441 | ] |
| 2442 | }, |
James Price | 132d8c7 | 2023-02-03 19:38:46 +0000 | [diff] [blame] | 2443 | "dawn shader module SPIRV options descriptor": { |
| 2444 | "category": "structure", |
| 2445 | "chained": "in", |
| 2446 | "chain roots": ["shader module descriptor"], |
| 2447 | "tags": ["dawn"], |
| 2448 | "members": [ |
| 2449 | {"name": "allow non uniform derivatives", "type": "bool", "default": "false"} |
| 2450 | ] |
| 2451 | }, |
Corentin Wallez | b9b088f | 2019-08-27 08:42:29 +0000 | [diff] [blame] | 2452 | "shader stage": { |
Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 2453 | "category": "bitmask", |
| 2454 | "values": [ |
Corentin Wallez | be985c1 | 2017-07-20 11:00:39 -0400 | [diff] [blame] | 2455 | {"value": 0, "name": "none"}, |
Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 2456 | {"value": 1, "name": "vertex"}, |
| 2457 | {"value": 2, "name": "fragment"}, |
| 2458 | {"value": 4, "name": "compute"} |
| 2459 | ] |
| 2460 | }, |
| 2461 | "stencil operation": { |
| 2462 | "category": "enum", |
| 2463 | "values": [ |
| 2464 | {"value": 0, "name": "keep"}, |
| 2465 | {"value": 1, "name": "zero"}, |
| 2466 | {"value": 2, "name": "replace"}, |
| 2467 | {"value": 3, "name": "invert"}, |
| 2468 | {"value": 4, "name": "increment clamp"}, |
| 2469 | {"value": 5, "name": "decrement clamp"}, |
| 2470 | {"value": 6, "name": "increment wrap"}, |
| 2471 | {"value": 7, "name": "decrement wrap"} |
Austin Eng | 1063439 | 2017-06-01 11:30:03 -0400 | [diff] [blame] | 2472 | ] |
Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 2473 | }, |
Brandon Jones | 0702b70 | 2021-03-11 21:19:00 +0000 | [diff] [blame] | 2474 | "stencil face state": { |
Yunchao He | 48485e3 | 2018-12-15 02:32:34 +0000 | [diff] [blame] | 2475 | "category": "structure", |
| 2476 | "extensible": false, |
| 2477 | "members": [ |
Corentin Wallez | 8f93871 | 2019-07-08 19:20:22 +0000 | [diff] [blame] | 2478 | {"name": "compare", "type": "compare function", "default": "always"}, |
| 2479 | {"name": "fail op", "type": "stencil operation", "default": "keep"}, |
| 2480 | {"name": "depth fail op", "type": "stencil operation", "default": "keep"}, |
| 2481 | {"name": "pass op", "type": "stencil operation", "default": "keep"} |
Yunchao He | 48485e3 | 2018-12-15 02:32:34 +0000 | [diff] [blame] | 2482 | ] |
| 2483 | }, |
Corentin Wallez | 3a1746e | 2020-01-15 13:14:12 +0000 | [diff] [blame] | 2484 | "surface": { |
Kai Ninomiya | 4e37acc | 2021-09-17 21:13:33 +0000 | [diff] [blame] | 2485 | "category": "object", |
Le Hoang Quyen | 7971bfe | 2023-04-05 19:35:07 +0000 | [diff] [blame] | 2486 | "no autolock": true, |
Kai Ninomiya | 4e37acc | 2021-09-17 21:13:33 +0000 | [diff] [blame] | 2487 | "methods": [ |
| 2488 | { |
| 2489 | "name": "get preferred format", |
| 2490 | "returns": "texture format", |
Shrek Shao | ee50bc0 | 2022-02-08 20:21:40 +0000 | [diff] [blame] | 2491 | "tags": ["upstream", "emscripten"], |
Kai Ninomiya | 4e37acc | 2021-09-17 21:13:33 +0000 | [diff] [blame] | 2492 | "args": [ |
| 2493 | {"name": "adapter", "type": "adapter"} |
| 2494 | ] |
| 2495 | } |
| 2496 | ] |
Corentin Wallez | 3a1746e | 2020-01-15 13:14:12 +0000 | [diff] [blame] | 2497 | }, |
| 2498 | "surface descriptor": { |
| 2499 | "category": "structure", |
Austin Eng | 0c82405 | 2021-09-20 16:07:25 +0000 | [diff] [blame] | 2500 | "extensible": "in", |
Corentin Wallez | 3a1746e | 2020-01-15 13:14:12 +0000 | [diff] [blame] | 2501 | "members": [ |
| 2502 | {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true} |
| 2503 | ] |
| 2504 | }, |
Shrek Shao | 1554a7d | 2022-03-08 20:56:10 +0000 | [diff] [blame] | 2505 | "surface descriptor from android native window": { |
| 2506 | "category": "structure", |
| 2507 | "chained": "in", |
Corentin Wallez | a45561b | 2022-07-14 12:58:25 +0000 | [diff] [blame] | 2508 | "chain roots": ["surface descriptor"], |
Shrek Shao | 1554a7d | 2022-03-08 20:56:10 +0000 | [diff] [blame] | 2509 | "tags": ["native"], |
| 2510 | "members": [ |
| 2511 | {"name": "window", "type": "void", "annotation": "*"} |
| 2512 | ] |
| 2513 | }, |
Corentin Wallez | 9585c46 | 2020-07-06 18:50:00 +0000 | [diff] [blame] | 2514 | "surface descriptor from canvas HTML selector": { |
Corentin Wallez | c2e1696 | 2020-01-22 21:37:26 +0000 | [diff] [blame] | 2515 | "category": "structure", |
Austin Eng | 0c82405 | 2021-09-20 16:07:25 +0000 | [diff] [blame] | 2516 | "chained": "in", |
Corentin Wallez | a45561b | 2022-07-14 12:58:25 +0000 | [diff] [blame] | 2517 | "chain roots": ["surface descriptor"], |
Corentin Wallez | c2e1696 | 2020-01-22 21:37:26 +0000 | [diff] [blame] | 2518 | "members": [ |
Corentin Wallez | 9585c46 | 2020-07-06 18:50:00 +0000 | [diff] [blame] | 2519 | {"name": "selector", "type": "char", "annotation": "const*", "length": "strlen"} |
Corentin Wallez | c2e1696 | 2020-01-22 21:37:26 +0000 | [diff] [blame] | 2520 | ] |
| 2521 | }, |
Corentin Wallez | 3a1746e | 2020-01-15 13:14:12 +0000 | [diff] [blame] | 2522 | "surface descriptor from metal layer": { |
| 2523 | "category": "structure", |
Austin Eng | 0c82405 | 2021-09-20 16:07:25 +0000 | [diff] [blame] | 2524 | "chained": "in", |
Corentin Wallez | a45561b | 2022-07-14 12:58:25 +0000 | [diff] [blame] | 2525 | "chain roots": ["surface descriptor"], |
Kai Ninomiya | 930e918 | 2021-09-17 19:44:43 +0000 | [diff] [blame] | 2526 | "tags": ["native"], |
Corentin Wallez | 3a1746e | 2020-01-15 13:14:12 +0000 | [diff] [blame] | 2527 | "members": [ |
| 2528 | {"name": "layer", "type": "void", "annotation": "*"} |
| 2529 | ] |
| 2530 | }, |
| 2531 | "surface descriptor from windows HWND": { |
| 2532 | "category": "structure", |
Austin Eng | 0c82405 | 2021-09-20 16:07:25 +0000 | [diff] [blame] | 2533 | "chained": "in", |
Corentin Wallez | a45561b | 2022-07-14 12:58:25 +0000 | [diff] [blame] | 2534 | "chain roots": ["surface descriptor"], |
Kai Ninomiya | 930e918 | 2021-09-17 19:44:43 +0000 | [diff] [blame] | 2535 | "tags": ["native"], |
Corentin Wallez | 3a1746e | 2020-01-15 13:14:12 +0000 | [diff] [blame] | 2536 | "members": [ |
| 2537 | {"name": "hinstance", "type": "void", "annotation": "*"}, |
| 2538 | {"name": "hwnd", "type": "void", "annotation": "*"} |
| 2539 | ] |
| 2540 | }, |
Corentin Wallez | aa0731d | 2022-03-21 17:11:53 +0000 | [diff] [blame] | 2541 | "surface descriptor from xcb window": { |
| 2542 | "category": "structure", |
| 2543 | "chained": "in", |
Corentin Wallez | a45561b | 2022-07-14 12:58:25 +0000 | [diff] [blame] | 2544 | "chain roots": ["surface descriptor"], |
Corentin Wallez | aa0731d | 2022-03-21 17:11:53 +0000 | [diff] [blame] | 2545 | "tags": ["upstream"], |
| 2546 | "members": [ |
| 2547 | {"name": "connection", "type": "void", "annotation": "*"}, |
| 2548 | {"name": "window", "type": "uint32_t"} |
| 2549 | ] |
| 2550 | }, |
Shrek Shao | 5b9b986 | 2022-03-09 19:04:21 +0000 | [diff] [blame] | 2551 | "surface descriptor from xlib window": { |
Corentin Wallez | 3a1746e | 2020-01-15 13:14:12 +0000 | [diff] [blame] | 2552 | "category": "structure", |
Austin Eng | 0c82405 | 2021-09-20 16:07:25 +0000 | [diff] [blame] | 2553 | "chained": "in", |
Corentin Wallez | a45561b | 2022-07-14 12:58:25 +0000 | [diff] [blame] | 2554 | "chain roots": ["surface descriptor"], |
Kai Ninomiya | 930e918 | 2021-09-17 19:44:43 +0000 | [diff] [blame] | 2555 | "tags": ["native"], |
Corentin Wallez | 3a1746e | 2020-01-15 13:14:12 +0000 | [diff] [blame] | 2556 | "members": [ |
| 2557 | {"name": "display", "type": "void", "annotation": "*"}, |
| 2558 | {"name": "window", "type": "uint32_t"} |
| 2559 | ] |
| 2560 | }, |
Shrek Shao | 1554a7d | 2022-03-08 20:56:10 +0000 | [diff] [blame] | 2561 | "surface descriptor from wayland surface": { |
| 2562 | "category": "structure", |
| 2563 | "chained": "in", |
Corentin Wallez | a45561b | 2022-07-14 12:58:25 +0000 | [diff] [blame] | 2564 | "chain roots": ["surface descriptor"], |
Shrek Shao | 1554a7d | 2022-03-08 20:56:10 +0000 | [diff] [blame] | 2565 | "tags": ["native"], |
| 2566 | "members": [ |
| 2567 | {"name": "display", "type": "void", "annotation": "*"}, |
| 2568 | {"name": "surface", "type": "void", "annotation": "*"} |
| 2569 | ] |
| 2570 | }, |
陈俊嘉 | 74326fe | 2021-04-27 16:43:27 +0000 | [diff] [blame] | 2571 | "surface descriptor from windows core window": { |
| 2572 | "category": "structure", |
Austin Eng | 0c82405 | 2021-09-20 16:07:25 +0000 | [diff] [blame] | 2573 | "chained": "in", |
Corentin Wallez | a45561b | 2022-07-14 12:58:25 +0000 | [diff] [blame] | 2574 | "chain roots": ["surface descriptor"], |
Kai Ninomiya | 930e918 | 2021-09-17 19:44:43 +0000 | [diff] [blame] | 2575 | "tags": ["dawn"], |
陈俊嘉 | 74326fe | 2021-04-27 16:43:27 +0000 | [diff] [blame] | 2576 | "members": [ |
| 2577 | {"name": "core window", "type": "void", "annotation": "*"} |
| 2578 | ] |
| 2579 | }, |
陈俊嘉 | 11379a3 | 2021-06-09 08:44:07 +0000 | [diff] [blame] | 2580 | "surface descriptor from windows swap chain panel": { |
| 2581 | "category": "structure", |
Austin Eng | 0c82405 | 2021-09-20 16:07:25 +0000 | [diff] [blame] | 2582 | "chained": "in", |
Corentin Wallez | a45561b | 2022-07-14 12:58:25 +0000 | [diff] [blame] | 2583 | "chain roots": ["surface descriptor"], |
Kai Ninomiya | 930e918 | 2021-09-17 19:44:43 +0000 | [diff] [blame] | 2584 | "tags": ["dawn"], |
陈俊嘉 | 11379a3 | 2021-06-09 08:44:07 +0000 | [diff] [blame] | 2585 | "members": [ |
| 2586 | {"name": "swap chain panel", "type": "void", "annotation": "*"} |
| 2587 | ] |
| 2588 | }, |
Kai Ninomiya | 35bf424 | 2017-07-19 15:41:17 -0700 | [diff] [blame] | 2589 | "swap chain": { |
| 2590 | "category": "object", |
| 2591 | "methods": [ |
Corentin Wallez | 604072b | 2019-11-12 18:30:11 +0000 | [diff] [blame] | 2592 | {"name": "get current texture view", "returns": "texture view"}, |
| 2593 | {"name": "present"} |
Kai Ninomiya | 35bf424 | 2017-07-19 15:41:17 -0700 | [diff] [blame] | 2594 | ] |
| 2595 | }, |
Corentin Wallez | 7be2a71 | 2019-02-15 11:15:58 +0000 | [diff] [blame] | 2596 | "swap chain descriptor": { |
| 2597 | "category": "structure", |
Austin Eng | 0c82405 | 2021-09-20 16:07:25 +0000 | [diff] [blame] | 2598 | "extensible": "in", |
Corentin Wallez | 7be2a71 | 2019-02-15 11:15:58 +0000 | [diff] [blame] | 2599 | "members": [ |
François Beaufort | 277d2e1 | 2019-10-03 14:56:49 +0000 | [diff] [blame] | 2600 | {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true}, |
Corentin Wallez | d87e676 | 2020-01-23 17:20:38 +0000 | [diff] [blame] | 2601 | {"name": "usage", "type": "texture usage"}, |
| 2602 | {"name": "format", "type": "texture format"}, |
| 2603 | {"name": "width", "type": "uint32_t"}, |
| 2604 | {"name": "height", "type": "uint32_t"}, |
Corentin Wallez | 087deed | 2023-04-07 14:59:55 +0000 | [diff] [blame] | 2605 | {"name": "present mode", "type": "present mode"} |
Kai Ninomiya | 35bf424 | 2017-07-19 15:41:17 -0700 | [diff] [blame] | 2606 | ] |
| 2607 | }, |
Corentin Wallez | 2b24c3d | 2020-01-15 09:54:42 +0000 | [diff] [blame] | 2608 | "s type": { |
| 2609 | "category": "enum", |
Kai Ninomiya | 930e918 | 2021-09-17 19:44:43 +0000 | [diff] [blame] | 2610 | "emscripten_no_enum_table": true, |
Corentin Wallez | 2b24c3d | 2020-01-15 09:54:42 +0000 | [diff] [blame] | 2611 | "values": [ |
Austin Eng | 76a8d0b | 2020-04-03 17:37:48 +0000 | [diff] [blame] | 2612 | {"value": 0, "name": "invalid", "valid": false}, |
Kai Ninomiya | 930e918 | 2021-09-17 19:44:43 +0000 | [diff] [blame] | 2613 | {"value": 1, "name": "surface descriptor from metal layer", "tags": ["native"]}, |
| 2614 | {"value": 2, "name": "surface descriptor from windows HWND", "tags": ["native"]}, |
Shrek Shao | 5b9b986 | 2022-03-09 19:04:21 +0000 | [diff] [blame] | 2615 | {"value": 3, "name": "surface descriptor from xlib window", "tags": ["native"]}, |
Corentin Wallez | 9585c46 | 2020-07-06 18:50:00 +0000 | [diff] [blame] | 2616 | {"value": 4, "name": "surface descriptor from canvas HTML selector"}, |
Corentin Wallez | fee2783 | 2020-04-21 08:04:48 +0000 | [diff] [blame] | 2617 | {"value": 5, "name": "shader module SPIRV descriptor"}, |
| 2618 | {"value": 6, "name": "shader module WGSL descriptor"}, |
Austin Eng | 51d13a4 | 2022-06-13 19:18:55 +0000 | [diff] [blame] | 2619 | {"value": 7, "name": "primitive depth clip control"}, |
Shrek Shao | 1554a7d | 2022-03-08 20:56:10 +0000 | [diff] [blame] | 2620 | {"value": 8, "name": "surface descriptor from wayland surface", "tags": ["native"]}, |
| 2621 | {"value": 9, "name": "surface descriptor from android native window", "tags": ["native"]}, |
Corentin Wallez | aa0731d | 2022-03-21 17:11:53 +0000 | [diff] [blame] | 2622 | {"value": 10, "name": "surface descriptor from xcb window", "tags": ["upstream"]}, |
| 2623 | {"value": 11, "name": "surface descriptor from windows core window", "tags": ["dawn"]}, |
| 2624 | {"value": 12, "name": "external texture binding entry", "tags": ["dawn"]}, |
| 2625 | {"value": 13, "name": "external texture binding layout", "tags": ["dawn"]}, |
| 2626 | {"value": 14, "name": "surface descriptor from windows swap chain panel", "tags": ["dawn"]}, |
Takahiro | 831296d | 2022-06-30 04:19:42 +0000 | [diff] [blame] | 2627 | {"value": 15, "name": "render pass descriptor max draw count"}, |
Corentin Wallez | 53db01b | 2021-11-18 23:05:40 +0000 | [diff] [blame] | 2628 | {"value": 1000, "name": "dawn texture internal usage descriptor", "tags": ["dawn"]}, |
Zhaoming Jiang | a12ff9a | 2023-01-30 09:16:51 +0000 | [diff] [blame] | 2629 | {"value": 1002, "name": "dawn toggles device descriptor", "tags": ["dawn", "native", "deprecated"]}, |
Austin Eng | 2fbc170 | 2022-02-02 21:00:52 +0000 | [diff] [blame] | 2630 | {"value": 1003, "name": "dawn encoder internal usage descriptor", "tags": ["dawn"]}, |
Loko Kung | 44f039d | 2022-03-01 22:59:40 +0000 | [diff] [blame] | 2631 | {"value": 1004, "name": "dawn instance descriptor", "tags": ["dawn", "native"]}, |
Jiawei Shao | 5a0f8d3 | 2022-09-23 00:29:46 +0000 | [diff] [blame] | 2632 | {"value": 1005, "name": "dawn cache device descriptor", "tags": ["dawn", "native"]}, |
Jiawei Shao | 806c583 | 2022-11-23 02:06:11 +0000 | [diff] [blame] | 2633 | {"value": 1006, "name": "dawn adapter properties power preference", "tags": ["dawn", "native"]}, |
Zhaoming Jiang | a12ff9a | 2023-01-30 09:16:51 +0000 | [diff] [blame] | 2634 | {"value": 1007, "name": "dawn buffer descriptor error info from wire client", "tags": ["dawn"]}, |
James Price | 132d8c7 | 2023-02-03 19:38:46 +0000 | [diff] [blame] | 2635 | {"value": 1008, "name": "dawn toggles descriptor", "tags": ["dawn", "native"]}, |
| 2636 | {"value": 1009, "name": "dawn shader module SPIRV options descriptor", "tags": ["dawn"]} |
Corentin Wallez | 2b24c3d | 2020-01-15 09:54:42 +0000 | [diff] [blame] | 2637 | ] |
| 2638 | }, |
Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 2639 | "texture": { |
| 2640 | "category": "object", |
| 2641 | "methods": [ |
| 2642 | { |
Austin Eng | b4b3ea0 | 2019-04-09 16:57:00 +0000 | [diff] [blame] | 2643 | "name": "create view", |
Jiawei Shao | 6329e5a | 2018-10-12 08:32:58 +0000 | [diff] [blame] | 2644 | "returns": "texture view", |
| 2645 | "args": [ |
Kai Ninomiya | 93196db | 2019-08-26 22:51:19 +0000 | [diff] [blame] | 2646 | {"name": "descriptor", "type": "texture view descriptor", "annotation": "const*", "optional": true} |
Jiawei Shao | 6329e5a | 2018-10-12 08:32:58 +0000 | [diff] [blame] | 2647 | ] |
Natasha Lee | cae68ff | 2019-03-27 22:04:10 +0000 | [diff] [blame] | 2648 | }, |
| 2649 | { |
Brandon Jones | c95e574 | 2021-08-19 20:47:28 +0000 | [diff] [blame] | 2650 | "name": "set label", |
| 2651 | "returns": "void", |
| 2652 | "args": [ |
| 2653 | {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"} |
| 2654 | ] |
| 2655 | }, |
| 2656 | { |
Corentin Wallez | 736e97c | 2022-06-08 18:14:02 +0000 | [diff] [blame] | 2657 | "name": "get width", |
| 2658 | "returns": "uint32_t" |
| 2659 | }, |
| 2660 | { |
| 2661 | "name": "get height", |
| 2662 | "returns": "uint32_t" |
| 2663 | }, |
| 2664 | { |
| 2665 | "name": "get depth or array layers", |
| 2666 | "returns": "uint32_t" |
| 2667 | }, |
| 2668 | { |
| 2669 | "name": "get mip level count", |
| 2670 | "returns": "uint32_t" |
| 2671 | }, |
| 2672 | { |
| 2673 | "name": "get sample count", |
| 2674 | "returns": "uint32_t" |
| 2675 | }, |
| 2676 | { |
| 2677 | "name": "get dimension", |
| 2678 | "returns": "texture dimension" |
| 2679 | }, |
| 2680 | { |
| 2681 | "name": "get format", |
| 2682 | "returns": "texture format" |
| 2683 | }, |
| 2684 | { |
| 2685 | "name": "get usage", |
| 2686 | "returns": "texture usage" |
| 2687 | }, |
| 2688 | { |
Natasha Lee | cae68ff | 2019-03-27 22:04:10 +0000 | [diff] [blame] | 2689 | "name": "destroy" |
Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 2690 | } |
| 2691 | ] |
| 2692 | }, |
Brandon Jones | ac71e34 | 2018-11-28 17:54:13 +0000 | [diff] [blame] | 2693 | "texture aspect": { |
Corentin Wallez | 5df84ce | 2019-07-08 08:55:21 +0000 | [diff] [blame] | 2694 | "category": "enum", |
Brandon Jones | ac71e34 | 2018-11-28 17:54:13 +0000 | [diff] [blame] | 2695 | "values": [ |
Corentin Wallez | 5df84ce | 2019-07-08 08:55:21 +0000 | [diff] [blame] | 2696 | {"value": 0, "name": "all"}, |
| 2697 | {"value": 1, "name": "stencil only"}, |
Bryan Bernhart | 14a2398 | 2021-02-05 20:11:24 +0000 | [diff] [blame] | 2698 | {"value": 2, "name": "depth only"}, |
Kai Ninomiya | 930e918 | 2021-09-17 19:44:43 +0000 | [diff] [blame] | 2699 | {"value": 3, "name": "plane 0 only", "tags": ["dawn"]}, |
| 2700 | {"value": 4, "name": "plane 1 only", "tags": ["dawn"]} |
Brandon Jones | ac71e34 | 2018-11-28 17:54:13 +0000 | [diff] [blame] | 2701 | ] |
| 2702 | }, |
Corentin Wallez | f463a20 | 2019-08-21 12:16:33 +0000 | [diff] [blame] | 2703 | "texture component type": { |
| 2704 | "category": "enum", |
Corentin Wallez | f53010c | 2023-03-01 16:59:56 +0000 | [diff] [blame] | 2705 | "tags": ["dawn"], |
Corentin Wallez | f463a20 | 2019-08-21 12:16:33 +0000 | [diff] [blame] | 2706 | "values": [ |
| 2707 | {"value": 0, "name": "float"}, |
| 2708 | {"value": 1, "name": "sint"}, |
Corentin Wallez | 4196a54 | 2020-10-16 14:13:16 +0000 | [diff] [blame] | 2709 | {"value": 2, "name": "uint"}, |
| 2710 | {"value": 3, "name": "depth comparison"} |
Corentin Wallez | f463a20 | 2019-08-21 12:16:33 +0000 | [diff] [blame] | 2711 | ] |
| 2712 | }, |
Tomek Ponitka | 0f5d496 | 2020-07-07 10:18:51 +0000 | [diff] [blame] | 2713 | "texture data layout": { |
| 2714 | "category": "structure", |
Austin Eng | 0c82405 | 2021-09-20 16:07:25 +0000 | [diff] [blame] | 2715 | "extensible": "in", |
Tomek Ponitka | 0f5d496 | 2020-07-07 10:18:51 +0000 | [diff] [blame] | 2716 | "members": [ |
| 2717 | {"name": "offset", "type": "uint64_t", "default": 0}, |
Kai Ninomiya | cf820d7 | 2020-12-16 07:53:30 +0000 | [diff] [blame] | 2718 | {"name": "bytes per row", "type": "uint32_t", "default": "WGPU_COPY_STRIDE_UNDEFINED"}, |
| 2719 | {"name": "rows per image", "type": "uint32_t", "default": "WGPU_COPY_STRIDE_UNDEFINED"} |
Tomek Ponitka | 0f5d496 | 2020-07-07 10:18:51 +0000 | [diff] [blame] | 2720 | ] |
| 2721 | }, |
Jiawei Shao | 425428f | 2018-08-27 08:44:48 +0800 | [diff] [blame] | 2722 | "texture descriptor": { |
| 2723 | "category": "structure", |
Austin Eng | 0c82405 | 2021-09-20 16:07:25 +0000 | [diff] [blame] | 2724 | "extensible": "in", |
Jiawei Shao | 425428f | 2018-08-27 08:44:48 +0800 | [diff] [blame] | 2725 | "members": [ |
François Beaufort | 277d2e1 | 2019-10-03 14:56:49 +0000 | [diff] [blame] | 2726 | {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true}, |
Corentin Wallez | 9e9e29f | 2019-08-27 08:21:39 +0000 | [diff] [blame] | 2727 | {"name": "usage", "type": "texture usage"}, |
Corentin Wallez | 8f93871 | 2019-07-08 19:20:22 +0000 | [diff] [blame] | 2728 | {"name": "dimension", "type": "texture dimension", "default": "2D"}, |
Corentin Wallez | 29353d6 | 2018-09-18 12:49:22 +0000 | [diff] [blame] | 2729 | {"name": "size", "type": "extent 3D"}, |
Jiawei Shao | 425428f | 2018-08-27 08:44:48 +0800 | [diff] [blame] | 2730 | {"name": "format", "type": "texture format"}, |
Corentin Wallez | 8f93871 | 2019-07-08 19:20:22 +0000 | [diff] [blame] | 2731 | {"name": "mip level count", "type": "uint32_t", "default": 1}, |
Corentin Wallez | eee3449 | 2022-03-16 18:44:16 +0000 | [diff] [blame] | 2732 | {"name": "sample count", "type": "uint32_t", "default": 1}, |
Austin Eng | 8e02ebf | 2022-03-31 03:53:04 +0000 | [diff] [blame] | 2733 | {"name": "view format count", "type": "uint32_t", "default": 0}, |
| 2734 | {"name": "view formats", "type": "texture format", "annotation": "const*", "length": "view format count"} |
Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 2735 | ] |
| 2736 | }, |
| 2737 | "texture dimension": { |
| 2738 | "category": "enum", |
| 2739 | "values": [ |
Corentin Wallez | f07e85c | 2019-07-15 20:47:56 +0000 | [diff] [blame] | 2740 | {"value": 0, "name": "1D"}, |
| 2741 | {"value": 1, "name": "2D"}, |
| 2742 | {"value": 2, "name": "3D"} |
Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 2743 | ] |
| 2744 | }, |
Corentin Wallez | a60799f | 2018-09-11 18:16:54 +0000 | [diff] [blame] | 2745 | "texture format": { |
| 2746 | "category": "enum", |
| 2747 | "values": [ |
Kai Ninomiya | 7b6246a | 2020-01-28 23:54:38 +0000 | [diff] [blame] | 2748 | {"value": 0, "name": "undefined", "valid": false, "jsrepr": "undefined"}, |
Kai Ninomiya | 930e918 | 2021-09-17 19:44:43 +0000 | [diff] [blame] | 2749 | |
Corentin Wallez | d55bd7a | 2019-09-05 09:12:32 +0000 | [diff] [blame] | 2750 | {"value": 1, "name": "R8 unorm"}, |
| 2751 | {"value": 2, "name": "R8 snorm"}, |
| 2752 | {"value": 3, "name": "R8 uint"}, |
| 2753 | {"value": 4, "name": "R8 sint"}, |
Corentin Wallez | 431d618 | 2019-07-01 09:58:07 +0000 | [diff] [blame] | 2754 | |
Corentin Wallez | d55bd7a | 2019-09-05 09:12:32 +0000 | [diff] [blame] | 2755 | {"value": 5, "name": "R16 uint"}, |
| 2756 | {"value": 6, "name": "R16 sint"}, |
| 2757 | {"value": 7, "name": "R16 float"}, |
| 2758 | {"value": 8, "name": "RG8 unorm"}, |
| 2759 | {"value": 9, "name": "RG8 snorm"}, |
| 2760 | {"value": 10, "name": "RG8 uint"}, |
| 2761 | {"value": 11, "name": "RG8 sint"}, |
Corentin Wallez | 431d618 | 2019-07-01 09:58:07 +0000 | [diff] [blame] | 2762 | |
Corentin Wallez | d55bd7a | 2019-09-05 09:12:32 +0000 | [diff] [blame] | 2763 | {"value": 12, "name": "R32 float"}, |
| 2764 | {"value": 13, "name": "R32 uint"}, |
| 2765 | {"value": 14, "name": "R32 sint"}, |
| 2766 | {"value": 15, "name": "RG16 uint"}, |
| 2767 | {"value": 16, "name": "RG16 sint"}, |
| 2768 | {"value": 17, "name": "RG16 float"}, |
| 2769 | {"value": 18, "name": "RGBA8 unorm"}, |
| 2770 | {"value": 19, "name": "RGBA8 unorm srgb"}, |
| 2771 | {"value": 20, "name": "RGBA8 snorm"}, |
| 2772 | {"value": 21, "name": "RGBA8 uint"}, |
| 2773 | {"value": 22, "name": "RGBA8 sint"}, |
| 2774 | {"value": 23, "name": "BGRA8 unorm"}, |
| 2775 | {"value": 24, "name": "BGRA8 unorm srgb"}, |
| 2776 | {"value": 25, "name": "RGB10 A2 unorm"}, |
Corentin Wallez | 2f6e4ec | 2020-08-19 21:51:20 +0000 | [diff] [blame] | 2777 | {"value": 26, "name": "RG11 B10 ufloat"}, |
| 2778 | {"value": 27, "name": "RGB9 E5 ufloat"}, |
Corentin Wallez | 431d618 | 2019-07-01 09:58:07 +0000 | [diff] [blame] | 2779 | |
Corentin Wallez | 2f6e4ec | 2020-08-19 21:51:20 +0000 | [diff] [blame] | 2780 | {"value": 28, "name": "RG32 float"}, |
| 2781 | {"value": 29, "name": "RG32 uint"}, |
| 2782 | {"value": 30, "name": "RG32 sint"}, |
| 2783 | {"value": 31, "name": "RGBA16 uint"}, |
| 2784 | {"value": 32, "name": "RGBA16 sint"}, |
| 2785 | {"value": 33, "name": "RGBA16 float"}, |
Corentin Wallez | 431d618 | 2019-07-01 09:58:07 +0000 | [diff] [blame] | 2786 | |
Corentin Wallez | 2f6e4ec | 2020-08-19 21:51:20 +0000 | [diff] [blame] | 2787 | {"value": 34, "name": "RGBA32 float"}, |
| 2788 | {"value": 35, "name": "RGBA32 uint"}, |
| 2789 | {"value": 36, "name": "RGBA32 sint"}, |
Corentin Wallez | 431d618 | 2019-07-01 09:58:07 +0000 | [diff] [blame] | 2790 | |
Kai Ninomiya | fa9ca44 | 2021-09-17 18:25:53 +0000 | [diff] [blame] | 2791 | {"value": 37, "name": "stencil8"}, |
| 2792 | {"value": 38, "name": "depth16 unorm"}, |
| 2793 | {"value": 39, "name": "depth24 plus"}, |
Bryan Bernhart | 536c7ae | 2021-02-16 19:55:09 +0000 | [diff] [blame] | 2794 | {"value": 40, "name": "depth24 plus stencil8"}, |
Brandon Jones | 6d48f57 | 2022-06-14 22:48:31 +0000 | [diff] [blame] | 2795 | {"value": 41, "name": "depth32 float"}, |
| 2796 | {"value": 42, "name": "depth32 float stencil8"}, |
Corentin Wallez | 431d618 | 2019-07-01 09:58:07 +0000 | [diff] [blame] | 2797 | |
Brandon Jones | 6d48f57 | 2022-06-14 22:48:31 +0000 | [diff] [blame] | 2798 | {"value": 43, "name": "BC1 RGBA unorm", "jsrepr": "'bc1-rgba-unorm'"}, |
| 2799 | {"value": 44, "name": "BC1 RGBA unorm srgb", "jsrepr": "'bc1-rgba-unorm-srgb'"}, |
| 2800 | {"value": 45, "name": "BC2 RGBA unorm", "jsrepr": "'bc2-rgba-unorm'"}, |
| 2801 | {"value": 46, "name": "BC2 RGBA unorm srgb", "jsrepr": "'bc2-rgba-unorm-srgb'"}, |
| 2802 | {"value": 47, "name": "BC3 RGBA unorm", "jsrepr": "'bc3-rgba-unorm'"}, |
| 2803 | {"value": 48, "name": "BC3 RGBA unorm srgb", "jsrepr": "'bc3-rgba-unorm-srgb'"}, |
| 2804 | {"value": 49, "name": "BC4 R unorm", "jsrepr": "'bc4-r-unorm'"}, |
| 2805 | {"value": 50, "name": "BC4 R snorm", "jsrepr": "'bc4-r-snorm'"}, |
| 2806 | {"value": 51, "name": "BC5 RG unorm", "jsrepr": "'bc5-rg-unorm'"}, |
| 2807 | {"value": 52, "name": "BC5 RG snorm", "jsrepr": "'bc5-rg-snorm'"}, |
| 2808 | {"value": 53, "name": "BC6H RGB ufloat", "jsrepr": "'bc6h-rgb-ufloat'"}, |
| 2809 | {"value": 54, "name": "BC6H RGB float", "jsrepr": "'bc6h-rgb-float'"}, |
| 2810 | {"value": 55, "name": "BC7 RGBA unorm", "jsrepr": "'bc7-rgba-unorm'"}, |
| 2811 | {"value": 56, "name": "BC7 RGBA unorm srgb", "jsrepr": "'bc7-rgba-unorm-srgb'"}, |
Loko Kung | c7226a7 | 2021-08-31 00:15:45 +0000 | [diff] [blame] | 2812 | |
Brandon Jones | 6d48f57 | 2022-06-14 22:48:31 +0000 | [diff] [blame] | 2813 | {"value": 57, "name": "ETC2 RGB8 unorm", "jsrepr": "'etc2-rgb8unorm'"}, |
| 2814 | {"value": 58, "name": "ETC2 RGB8 unorm srgb", "jsrepr": "'etc2-rgb8unorm-srgb'"}, |
| 2815 | {"value": 59, "name": "ETC2 RGB8A1 unorm", "jsrepr": "'etc2-rgb8a1unorm'"}, |
| 2816 | {"value": 60, "name": "ETC2 RGB8A1 unorm srgb", "jsrepr": "'etc2-rgb8a1unorm-srgb'"}, |
| 2817 | {"value": 61, "name": "ETC2 RGBA8 unorm", "jsrepr": "'etc2-rgba8unorm'"}, |
| 2818 | {"value": 62, "name": "ETC2 RGBA8 unorm srgb", "jsrepr": "'etc2-rgba8unorm-srgb'"}, |
| 2819 | {"value": 63, "name": "EAC R11 unorm", "jsrepr": "'eac-r11unorm'"}, |
| 2820 | {"value": 64, "name": "EAC R11 snorm", "jsrepr": "'eac-r11snorm'"}, |
| 2821 | {"value": 65, "name": "EAC RG11 unorm", "jsrepr": "'eac-rg11unorm'"}, |
| 2822 | {"value": 66, "name": "EAC RG11 snorm", "jsrepr": "'eac-rg11snorm'"}, |
Loko Kung | 37a8649 | 2021-09-07 18:39:04 +0000 | [diff] [blame] | 2823 | |
Brandon Jones | 6d48f57 | 2022-06-14 22:48:31 +0000 | [diff] [blame] | 2824 | {"value": 67, "name": "ASTC 4x4 unorm", "jsrepr": "'astc-4x4-unorm'"}, |
| 2825 | {"value": 68, "name": "ASTC 4x4 unorm srgb", "jsrepr": "'astc-4x4-unorm-srgb'"}, |
| 2826 | {"value": 69, "name": "ASTC 5x4 unorm", "jsrepr": "'astc-5x4-unorm'"}, |
| 2827 | {"value": 70, "name": "ASTC 5x4 unorm srgb", "jsrepr": "'astc-5x4-unorm-srgb'"}, |
| 2828 | {"value": 71, "name": "ASTC 5x5 unorm", "jsrepr": "'astc-5x5-unorm'"}, |
| 2829 | {"value": 72, "name": "ASTC 5x5 unorm srgb", "jsrepr": "'astc-5x5-unorm-srgb'"}, |
| 2830 | {"value": 73, "name": "ASTC 6x5 unorm", "jsrepr": "'astc-6x5-unorm'"}, |
| 2831 | {"value": 74, "name": "ASTC 6x5 unorm srgb", "jsrepr": "'astc-6x5-unorm-srgb'"}, |
| 2832 | {"value": 75, "name": "ASTC 6x6 unorm", "jsrepr": "'astc-6x6-unorm'"}, |
| 2833 | {"value": 76, "name": "ASTC 6x6 unorm srgb", "jsrepr": "'astc-6x6-unorm-srgb'"}, |
| 2834 | {"value": 77, "name": "ASTC 8x5 unorm", "jsrepr": "'astc-8x5-unorm'"}, |
| 2835 | {"value": 78, "name": "ASTC 8x5 unorm srgb", "jsrepr": "'astc-8x5-unorm-srgb'"}, |
| 2836 | {"value": 79, "name": "ASTC 8x6 unorm", "jsrepr": "'astc-8x6-unorm'"}, |
| 2837 | {"value": 80, "name": "ASTC 8x6 unorm srgb", "jsrepr": "'astc-8x6-unorm-srgb'"}, |
| 2838 | {"value": 81, "name": "ASTC 8x8 unorm", "jsrepr": "'astc-8x8-unorm'"}, |
| 2839 | {"value": 82, "name": "ASTC 8x8 unorm srgb", "jsrepr": "'astc-8x8-unorm-srgb'"}, |
| 2840 | {"value": 83, "name": "ASTC 10x5 unorm", "jsrepr": "'astc-10x5-unorm'"}, |
| 2841 | {"value": 84, "name": "ASTC 10x5 unorm srgb", "jsrepr": "'astc-10x5-unorm-srgb'"}, |
| 2842 | {"value": 85, "name": "ASTC 10x6 unorm", "jsrepr": "'astc-10x6-unorm'"}, |
| 2843 | {"value": 86, "name": "ASTC 10x6 unorm srgb", "jsrepr": "'astc-10x6-unorm-srgb'"}, |
| 2844 | {"value": 87, "name": "ASTC 10x8 unorm", "jsrepr": "'astc-10x8-unorm'"}, |
| 2845 | {"value": 88, "name": "ASTC 10x8 unorm srgb", "jsrepr": "'astc-10x8-unorm-srgb'"}, |
| 2846 | {"value": 89, "name": "ASTC 10x10 unorm", "jsrepr": "'astc-10x10-unorm'"}, |
| 2847 | {"value": 90, "name": "ASTC 10x10 unorm srgb", "jsrepr": "'astc-10x10-unorm-srgb'"}, |
| 2848 | {"value": 91, "name": "ASTC 12x10 unorm", "jsrepr": "'astc-12x10-unorm'"}, |
| 2849 | {"value": 92, "name": "ASTC 12x10 unorm srgb", "jsrepr": "'astc-12x10-unorm-srgb'"}, |
| 2850 | {"value": 93, "name": "ASTC 12x12 unorm", "jsrepr": "'astc-12x12-unorm'"}, |
| 2851 | {"value": 94, "name": "ASTC 12x12 unorm srgb", "jsrepr": "'astc-12x12-unorm-srgb'"}, |
Kai Ninomiya | fa9ca44 | 2021-09-17 18:25:53 +0000 | [diff] [blame] | 2852 | |
Brandon Jones | 6d48f57 | 2022-06-14 22:48:31 +0000 | [diff] [blame] | 2853 | {"value": 95, "name": "R8 BG8 Biplanar 420 unorm", "tags": ["dawn"]} |
Corentin Wallez | a60799f | 2018-09-11 18:16:54 +0000 | [diff] [blame] | 2854 | ] |
| 2855 | }, |
Corentin Wallez | 9e9e29f | 2019-08-27 08:21:39 +0000 | [diff] [blame] | 2856 | "texture usage": { |
Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 2857 | "category": "bitmask", |
| 2858 | "values": [ |
| 2859 | {"value": 0, "name": "none"}, |
Corentin Wallez | ec05355 | 2019-07-08 10:05:46 +0000 | [diff] [blame] | 2860 | {"value": 1, "name": "copy src"}, |
| 2861 | {"value": 2, "name": "copy dst"}, |
Brandon Jones | 27e17a6 | 2021-08-10 04:07:37 +0000 | [diff] [blame] | 2862 | {"value": 4, "name": "texture binding"}, |
| 2863 | {"value": 8, "name": "storage binding"}, |
Corentin Wallez | 6b08781 | 2020-10-27 15:35:56 +0000 | [diff] [blame] | 2864 | {"value": 16, "name": "render attachment"}, |
Kai Ninomiya | 930e918 | 2021-09-17 19:44:43 +0000 | [diff] [blame] | 2865 | {"value": 32, "name": "present", "tags": ["dawn"]} |
Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 2866 | ] |
| 2867 | }, |
Jiawei Shao | 6329e5a | 2018-10-12 08:32:58 +0000 | [diff] [blame] | 2868 | "texture view descriptor": { |
| 2869 | "category": "structure", |
Austin Eng | 0c82405 | 2021-09-20 16:07:25 +0000 | [diff] [blame] | 2870 | "extensible": "in", |
Jiawei Shao | 6329e5a | 2018-10-12 08:32:58 +0000 | [diff] [blame] | 2871 | "members": [ |
François Beaufort | 277d2e1 | 2019-10-03 14:56:49 +0000 | [diff] [blame] | 2872 | {"name": "label", "type": "char", "annotation": "const*", "length": "strlen", "optional": true}, |
Corentin Wallez | d55bd7a | 2019-09-05 09:12:32 +0000 | [diff] [blame] | 2873 | {"name": "format", "type": "texture format", "default": "undefined"}, |
| 2874 | {"name": "dimension", "type": "texture view dimension", "default": "undefined"}, |
Corentin Wallez | 8f93871 | 2019-07-08 19:20:22 +0000 | [diff] [blame] | 2875 | {"name": "base mip level", "type": "uint32_t", "default": "0"}, |
jchen10 | 4935c14 | 2021-09-15 06:27:25 +0000 | [diff] [blame] | 2876 | {"name": "mip level count", "type": "uint32_t", "default": "WGPU_MIP_LEVEL_COUNT_UNDEFINED"}, |
Corentin Wallez | 8f93871 | 2019-07-08 19:20:22 +0000 | [diff] [blame] | 2877 | {"name": "base array layer", "type": "uint32_t", "default": "0"}, |
jchen10 | 96ac969 | 2021-09-14 02:41:49 +0000 | [diff] [blame] | 2878 | {"name": "array layer count", "type": "uint32_t", "default": "WGPU_ARRAY_LAYER_COUNT_UNDEFINED"}, |
Corentin Wallez | dbe74bc | 2019-09-10 08:30:43 +0000 | [diff] [blame] | 2879 | {"name": "aspect", "type": "texture aspect", "default": "all"} |
Jiawei Shao | 6329e5a | 2018-10-12 08:32:58 +0000 | [diff] [blame] | 2880 | ] |
| 2881 | }, |
Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 2882 | "texture view": { |
Brandon Jones | 88aeeae | 2021-11-19 18:26:08 +0000 | [diff] [blame] | 2883 | "category": "object", |
| 2884 | "methods": [ |
| 2885 | { |
| 2886 | "name": "set label", |
| 2887 | "returns": "void", |
Brandon Jones | 88aeeae | 2021-11-19 18:26:08 +0000 | [diff] [blame] | 2888 | "args": [ |
| 2889 | {"name": "label", "type": "char", "annotation": "const*", "length": "strlen"} |
| 2890 | ] |
| 2891 | } |
| 2892 | ] |
Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 2893 | }, |
Jiawei Shao | 6329e5a | 2018-10-12 08:32:58 +0000 | [diff] [blame] | 2894 | "texture view dimension": { |
| 2895 | "category": "enum", |
| 2896 | "values": [ |
Kai Ninomiya | 7b6246a | 2020-01-28 23:54:38 +0000 | [diff] [blame] | 2897 | {"value": 0, "name": "undefined", "valid": false, "jsrepr": "undefined"}, |
Corentin Wallez | d55bd7a | 2019-09-05 09:12:32 +0000 | [diff] [blame] | 2898 | {"value": 1, "name": "1D"}, |
| 2899 | {"value": 2, "name": "2D"}, |
| 2900 | {"value": 3, "name": "2D array"}, |
| 2901 | {"value": 4, "name": "cube"}, |
| 2902 | {"value": 5, "name": "cube array"}, |
| 2903 | {"value": 6, "name": "3D"} |
Jiawei Shao | 6329e5a | 2018-10-12 08:32:58 +0000 | [diff] [blame] | 2904 | ] |
| 2905 | }, |
Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 2906 | "vertex format": { |
| 2907 | "category": "enum", |
| 2908 | "values": [ |
Brandon Jones | e3f10e3 | 2021-02-26 02:20:25 +0000 | [diff] [blame] | 2909 | {"value": 0, "name": "undefined", "valid": false, "jsrepr": "undefined"}, |
| 2910 | {"value": 1, "name": "uint8x2"}, |
| 2911 | {"value": 2, "name": "uint8x4"}, |
| 2912 | {"value": 3, "name": "sint8x2"}, |
| 2913 | {"value": 4, "name": "sint8x4"}, |
| 2914 | {"value": 5, "name": "unorm8x2"}, |
| 2915 | {"value": 6, "name": "unorm8x4"}, |
| 2916 | {"value": 7, "name": "snorm8x2"}, |
| 2917 | {"value": 8, "name": "snorm8x4"}, |
| 2918 | {"value": 9, "name": "uint16x2"}, |
| 2919 | {"value": 10, "name": "uint16x4"}, |
| 2920 | {"value": 11, "name": "sint16x2"}, |
| 2921 | {"value": 12, "name": "sint16x4"}, |
| 2922 | {"value": 13, "name": "unorm16x2"}, |
| 2923 | {"value": 14, "name": "unorm16x4"}, |
| 2924 | {"value": 15, "name": "snorm16x2"}, |
| 2925 | {"value": 16, "name": "snorm16x4"}, |
| 2926 | {"value": 17, "name": "float16x2"}, |
| 2927 | {"value": 18, "name": "float16x4"}, |
| 2928 | {"value": 19, "name": "float32"}, |
| 2929 | {"value": 20, "name": "float32x2"}, |
| 2930 | {"value": 21, "name": "float32x3"}, |
| 2931 | {"value": 22, "name": "float32x4"}, |
| 2932 | {"value": 23, "name": "uint32"}, |
| 2933 | {"value": 24, "name": "uint32x2"}, |
| 2934 | {"value": 25, "name": "uint32x3"}, |
| 2935 | {"value": 26, "name": "uint32x4"}, |
| 2936 | {"value": 27, "name": "sint32"}, |
| 2937 | {"value": 28, "name": "sint32x2"}, |
| 2938 | {"value": 29, "name": "sint32x3"}, |
Brandon Jones | 4139fa5 | 2021-05-21 01:29:17 +0000 | [diff] [blame] | 2939 | {"value": 30, "name": "sint32x4"} |
Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 2940 | ] |
| 2941 | }, |
fujunwei | 4e87690 | 2021-11-25 08:44:01 +0000 | [diff] [blame] | 2942 | "whole size" : { |
| 2943 | "category": "constant", |
| 2944 | "type": "uint64_t", |
| 2945 | "value": "(0xffffffffffffffffULL)" |
| 2946 | }, |
| 2947 | "whole map size" : { |
| 2948 | "category": "constant", |
| 2949 | "type": "size_t", |
| 2950 | "value": "SIZE_MAX" |
| 2951 | }, |
fujunwei | 4e87690 | 2021-11-25 08:44:01 +0000 | [diff] [blame] | 2952 | "copy stride undefined" : { |
| 2953 | "category": "constant", |
| 2954 | "type": "uint32_t", |
| 2955 | "value": "(0xffffffffUL)" |
| 2956 | }, |
| 2957 | "limit u32 undefined" : { |
| 2958 | "category": "constant", |
| 2959 | "type": "uint32_t", |
| 2960 | "value": "(0xffffffffUL)" |
| 2961 | }, |
| 2962 | "limit u64 undefined" : { |
| 2963 | "category": "constant", |
| 2964 | "type": "uint64_t", |
| 2965 | "value": "(0xffffffffffffffffULL)" |
| 2966 | }, |
| 2967 | "array layer count undefined" : { |
| 2968 | "category": "constant", |
| 2969 | "type": "uint32_t", |
| 2970 | "value": "(0xffffffffUL)" |
| 2971 | }, |
| 2972 | "mip level count undefined" : { |
| 2973 | "category": "constant", |
| 2974 | "type": "uint32_t", |
| 2975 | "value": "(0xffffffffUL)" |
| 2976 | }, |
Austin Eng | c7f416c | 2019-01-15 20:49:53 +0000 | [diff] [blame] | 2977 | "ObjectType": { |
| 2978 | "_comment": "Only used for the wire", |
| 2979 | "category": "native" |
| 2980 | }, |
| 2981 | "ObjectId": { |
| 2982 | "_comment": "Only used for the wire", |
| 2983 | "category": "native" |
| 2984 | }, |
| 2985 | "ObjectHandle": { |
| 2986 | "_comment": "Only used for the wire", |
| 2987 | "category": "native" |
| 2988 | }, |
Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 2989 | "void": { |
| 2990 | "category": "native" |
| 2991 | }, |
Corentin Wallez | 1325ab1 | 2020-06-30 11:51:14 +0000 | [diff] [blame] | 2992 | "void *": { |
| 2993 | "category": "native" |
| 2994 | }, |
| 2995 | "void const *": { |
| 2996 | "category": "native" |
| 2997 | }, |
Yunchao He | c33a8c1 | 2019-04-11 18:46:54 +0000 | [diff] [blame] | 2998 | "int32_t": { |
| 2999 | "category": "native" |
| 3000 | }, |
Corentin Wallez | 47a3341 | 2020-06-02 09:24:39 +0000 | [diff] [blame] | 3001 | "size_t": { |
| 3002 | "category": "native" |
| 3003 | }, |
shrekshao | f8c5e4a | 2020-12-24 03:11:17 +0000 | [diff] [blame] | 3004 | "uint16_t": { |
| 3005 | "category": "native" |
| 3006 | }, |
| 3007 | "uint32_t": { |
| 3008 | "category": "native" |
| 3009 | }, |
Kai Ninomiya | 35bf424 | 2017-07-19 15:41:17 -0700 | [diff] [blame] | 3010 | "uint64_t": { |
| 3011 | "category": "native" |
Corentin Wallez | a60799f | 2018-09-11 18:16:54 +0000 | [diff] [blame] | 3012 | }, |
| 3013 | "uint8_t": { |
| 3014 | "category": "native" |
Austin Eng | 0eff598 | 2021-07-27 19:59:58 +0000 | [diff] [blame] | 3015 | }, |
| 3016 | "dawn texture internal usage descriptor": { |
| 3017 | "category": "structure", |
Austin Eng | 0c82405 | 2021-09-20 16:07:25 +0000 | [diff] [blame] | 3018 | "chained": "in", |
Corentin Wallez | a45561b | 2022-07-14 12:58:25 +0000 | [diff] [blame] | 3019 | "chain roots": ["texture descriptor"], |
Kai Ninomiya | 930e918 | 2021-09-17 19:44:43 +0000 | [diff] [blame] | 3020 | "tags": ["dawn"], |
Austin Eng | 0eff598 | 2021-07-27 19:59:58 +0000 | [diff] [blame] | 3021 | "members": [ |
| 3022 | {"name": "internal usage", "type": "texture usage", "default": "none"} |
| 3023 | ] |
Austin Eng | aa9475e | 2022-01-18 21:54:25 +0000 | [diff] [blame] | 3024 | }, |
| 3025 | "dawn encoder internal usage descriptor": { |
| 3026 | "category": "structure", |
| 3027 | "chained": "in", |
Corentin Wallez | a45561b | 2022-07-14 12:58:25 +0000 | [diff] [blame] | 3028 | "chain roots": ["command encoder descriptor"], |
Austin Eng | aa9475e | 2022-01-18 21:54:25 +0000 | [diff] [blame] | 3029 | "tags": ["dawn"], |
| 3030 | "members": [ |
| 3031 | {"name": "use internal usages", "type": "bool", "default": "false"} |
| 3032 | ] |
Jiawei Shao | 5a0f8d3 | 2022-09-23 00:29:46 +0000 | [diff] [blame] | 3033 | }, |
| 3034 | "dawn adapter properties power preference": { |
| 3035 | "category": "structure", |
| 3036 | "chained": "out", |
| 3037 | "chain roots": ["adapter properties"], |
| 3038 | "tags": ["dawn"], |
| 3039 | "members": [ |
| 3040 | {"name": "power preference", "type": "power preference", "default": "undefined"} |
| 3041 | ] |
Jiawei Shao | 806c583 | 2022-11-23 02:06:11 +0000 | [diff] [blame] | 3042 | }, |
| 3043 | "dawn buffer descriptor error info from wire client": { |
| 3044 | "category": "structure", |
| 3045 | "chained": "in", |
| 3046 | "chain roots": ["buffer descriptor"], |
| 3047 | "tags": ["dawn"], |
| 3048 | "members": [ |
| 3049 | {"name": "out of memory", "type": "bool", "default": "false"} |
| 3050 | ] |
Austin Eng | 376f1c6 | 2017-05-30 20:03:44 -0400 | [diff] [blame] | 3051 | } |
| 3052 | } |