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