blob: 3f334d6b8d2188263ff508d04a8b5200f00826bd [file] [log] [blame]
Austin Engc7f416c2019-01-15 20:49:53 +00001{
2 "_comment": [
3 "Copyright 2019 The Dawn Authors",
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 Wallez6d0438c2021-03-24 20:29:42 +000017
Ben Clayton26c31f62022-01-27 18:33:47 +000018 "_doc": "See docs/dawn/codegen.md",
Corentin Wallez6d0438c2021-03-24 20:29:42 +000019
Austin Engc7f416c2019-01-15 20:49:53 +000020 "commands": {
21 "buffer map async": [
Brendon Tiszka27521c62023-05-15 22:22:07 +000022 { "name": "buffer id", "type": "ObjectId", "id_type": "buffer" },
Loko Kunga9239212023-09-27 21:36:28 +000023 { "name": "future", "type": "future" },
Corentin Wallezc15c6eb2020-07-16 17:07:05 +000024 { "name": "mode", "type": "map mode" },
Austin Engf104fea2021-02-18 22:36:19 +000025 { "name": "offset", "type": "uint64_t"},
shrekshao6e680fc2021-07-08 22:48:57 +000026 { "name": "size", "type": "uint64_t"}
Austin Engc7f416c2019-01-15 20:49:53 +000027 ],
28 "buffer update mapped data": [
Brendon Tiszka27521c62023-05-15 22:22:07 +000029 { "name": "buffer id", "type": "ObjectId", "id_type": "buffer" },
shrekshao6e680fc2021-07-08 22:48:57 +000030 { "name": "write data update info length", "type": "uint64_t" },
31 { "name": "write data update info", "type": "uint8_t", "annotation": "const*", "length": "write data update info length", "skip_serialize": true},
32 { "name": "offset", "type": "uint64_t"},
33 { "name": "size", "type": "uint64_t"}
Austin Engc7f416c2019-01-15 20:49:53 +000034 ],
Corentin Wallezf93fa6a2020-07-29 17:01:11 +000035 "device create buffer": [
Brendon Tiszka27521c62023-05-15 22:22:07 +000036 { "name": "device id", "type": "ObjectId", "id_type": "device" },
Austin Eng76e3de42019-05-22 18:49:59 +000037 { "name": "descriptor", "type": "buffer descriptor", "annotation": "const*" },
Austin Eng6a5418a2019-07-19 16:01:48 +000038 { "name": "result", "type": "ObjectHandle", "handle_type": "buffer" },
shrekshao6e680fc2021-07-08 22:48:57 +000039 { "name": "read handle create info length", "type": "uint64_t" },
40 { "name": "read handle create info", "type": "uint8_t", "annotation": "const*", "length": "read handle create info length", "skip_serialize": true},
41 { "name": "write handle create info length", "type": "uint64_t" },
42 { "name": "write handle create info", "type": "uint8_t", "annotation": "const*", "length": "write handle create info length", "skip_serialize": true}
Austin Eng76e3de42019-05-22 18:49:59 +000043 ],
Corentin Wallez2d3c2e32021-02-22 18:27:36 +000044 "device create compute pipeline async": [
Brendon Tiszka27521c62023-05-15 22:22:07 +000045 { "name": "device id", "type": "ObjectId", "id_type": "device"},
Jiawei Shaoae5f9502020-10-19 01:56:08 +000046 { "name": "request serial", "type": "uint64_t" },
47 { "name": "pipeline object handle", "type": "ObjectHandle", "handle_type": "compute pipeline"},
48 { "name": "descriptor", "type": "compute pipeline descriptor", "annotation": "const*"}
49 ],
Corentin Wallez2d3c2e32021-02-22 18:27:36 +000050 "device create render pipeline async": [
Brendon Tiszka27521c62023-05-15 22:22:07 +000051 { "name": "device id", "type": "ObjectId", "id_type": "device" },
Jiawei Shao03e14002020-10-21 04:37:41 +000052 { "name": "request serial", "type": "uint64_t" },
53 { "name": "pipeline object handle", "type": "ObjectHandle", "handle_type": "render pipeline"},
Brandon Jones41c87d92021-05-21 05:01:38 +000054 { "name": "descriptor", "type": "render pipeline descriptor", "annotation": "const*"}
Jiawei Shao03e14002020-10-21 04:37:41 +000055 ],
Austin Eng45238d72019-09-04 22:54:03 +000056 "device pop error scope": [
Brendon Tiszka27521c62023-05-15 22:22:07 +000057 { "name": "device id", "type": "ObjectId", "id_type": "device" },
Austin Eng45238d72019-09-04 22:54:03 +000058 { "name": "request serial", "type": "uint64_t" }
59 ],
Austin Engc7f416c2019-01-15 20:49:53 +000060 "destroy object": [
61 { "name": "object type", "type": "ObjectType" },
62 { "name": "object id", "type": "ObjectId" }
Corentin Wallez47a33412020-06-02 09:24:39 +000063 ],
Corentin Wallezc093db22021-02-25 13:17:01 +000064 "queue on submitted work done": [
Brendon Tiszka27521c62023-05-15 22:22:07 +000065 { "name": "queue id", "type": "ObjectId", "id_type": "queue" },
Corentin Wallezc093db22021-02-25 13:17:01 +000066 { "name": "signal value", "type": "uint64_t" },
Loko Kunga9239212023-09-27 21:36:28 +000067 { "name": "future", "type": "future" }
Corentin Wallezc093db22021-02-25 13:17:01 +000068 ],
Jiawei Shaob6d80e02021-12-09 02:42:47 +000069 "queue write buffer": [
Brendon Tiszka27521c62023-05-15 22:22:07 +000070 {"name": "queue id", "type": "ObjectId", "id_type": "queue" },
71 {"name": "buffer id", "type": "ObjectId", "id_type": "buffer" },
Corentin Wallez47a33412020-06-02 09:24:39 +000072 {"name": "buffer offset", "type": "uint64_t"},
Jiawei Shao1f25ea92021-12-10 02:05:28 +000073 {"name": "data", "type": "uint8_t", "annotation": "const*", "length": "size", "wire_is_data_only": true},
Austin Engf104fea2021-02-18 22:36:19 +000074 {"name": "size", "type": "uint64_t"}
Tomek Ponitkaa9c7d642020-07-08 18:42:30 +000075 ],
Jiawei Shaob6d80e02021-12-09 02:42:47 +000076 "queue write texture": [
Brendon Tiszka27521c62023-05-15 22:22:07 +000077 {"name": "queue id", "type": "ObjectId", "id_type": "queue" },
Corentin Wallez80915842021-03-04 18:13:45 +000078 {"name": "destination", "type": "image copy texture", "annotation": "const*"},
Jiawei Shao1f25ea92021-12-10 02:05:28 +000079 {"name": "data", "type": "uint8_t", "annotation": "const*", "length": "data size", "wire_is_data_only": true},
Austin Engf104fea2021-02-18 22:36:19 +000080 {"name": "data size", "type": "uint64_t"},
Tomek Ponitkaa9c7d642020-07-08 18:42:30 +000081 {"name": "data layout", "type": "texture data layout", "annotation": "const*"},
82 {"name": "writeSize", "type": "extent 3D", "annotation": "const*"}
Brandon Jones6f2bbe92021-04-05 23:34:17 +000083 ],
84 "shader module get compilation info": [
Brendon Tiszka27521c62023-05-15 22:22:07 +000085 { "name": "shader module id", "type": "ObjectId", "id_type": "shader module" },
Brandon Jones6f2bbe92021-04-05 23:34:17 +000086 { "name": "request serial", "type": "uint64_t" }
Austin Eng07e76672021-12-15 21:52:17 +000087 ],
88 "instance request adapter": [
Brendon Tiszka27521c62023-05-15 22:22:07 +000089 { "name": "instance id", "type": "ObjectId", "id_type": "instance" },
Austin Eng07e76672021-12-15 21:52:17 +000090 { "name": "request serial", "type": "uint64_t" },
91 { "name": "adapter object handle", "type": "ObjectHandle", "handle_type": "adapter"},
Gregg Tavares0bdf2da2023-05-24 12:39:46 +000092 { "name": "options", "type": "request adapter options", "annotation": "const*", "optional": true }
Austin Eng07e76672021-12-15 21:52:17 +000093 ],
94 "adapter request device": [
Brendon Tiszka27521c62023-05-15 22:22:07 +000095 { "name": "adapter id", "type": "ObjectId", "id_type": "adapter" },
Austin Eng07e76672021-12-15 21:52:17 +000096 { "name": "request serial", "type": "uint64_t" },
97 { "name": "device object handle", "type": "ObjectHandle", "handle_type": "device"},
98 { "name": "descriptor", "type": "device descriptor", "annotation": "const*" }
Austin Engc7f416c2019-01-15 20:49:53 +000099 ]
100 },
101 "return commands": {
Corentin Wallez450b6f42020-07-17 07:38:36 +0000102 "buffer map async callback": [
Austin Eng1139d1c2019-01-30 03:00:17 +0000103 { "name": "buffer", "type": "ObjectHandle", "handle_type": "buffer" },
Loko Kunga9239212023-09-27 21:36:28 +0000104 { "name": "future", "type": "future" },
Austin Engc7f416c2019-01-15 20:49:53 +0000105 { "name": "status", "type": "uint32_t" },
shrekshao6e680fc2021-07-08 22:48:57 +0000106 { "name": "read data update info length", "type": "uint64_t" },
107 { "name": "read data update info", "type": "uint8_t", "annotation": "const*", "length": "read data update info length", "skip_serialize": true }
Austin Engc7f416c2019-01-15 20:49:53 +0000108 ],
Corentin Wallez2d3c2e32021-02-22 18:27:36 +0000109 "device create compute pipeline async callback": [
Austin Eng4d66fb22021-01-25 08:38:47 +0000110 { "name": "device", "type": "ObjectHandle", "handle_type": "device" },
Jiawei Shaoae5f9502020-10-19 01:56:08 +0000111 { "name": "request serial", "type": "uint64_t" },
Corentin Wallez2d3c2e32021-02-22 18:27:36 +0000112 { "name": "status", "type": "create pipeline async status" },
Jiawei Shao03e14002020-10-21 04:37:41 +0000113 { "name": "message", "type": "char", "annotation": "const*", "length": "strlen" }
114 ],
Corentin Wallez2d3c2e32021-02-22 18:27:36 +0000115 "device create render pipeline async callback": [
Austin Eng4d66fb22021-01-25 08:38:47 +0000116 { "name": "device", "type": "ObjectHandle", "handle_type": "device" },
Jiawei Shao03e14002020-10-21 04:37:41 +0000117 { "name": "request serial", "type": "uint64_t" },
Corentin Wallez2d3c2e32021-02-22 18:27:36 +0000118 { "name": "status", "type": "create pipeline async status" },
Jiawei Shao03e14002020-10-21 04:37:41 +0000119 { "name": "message", "type": "char", "annotation": "const*", "length": "strlen" }
Jiawei Shaoae5f9502020-10-19 01:56:08 +0000120 ],
Austin Eng45ea7e62019-08-27 21:43:56 +0000121 "device uncaptured error callback": [
Austin Eng4d66fb22021-01-25 08:38:47 +0000122 { "name": "device", "type": "ObjectHandle", "handle_type": "device" },
Austin Engcb0cb652019-08-27 21:41:56 +0000123 { "name": "type", "type": "error type"},
Austin Engc7f416c2019-01-15 20:49:53 +0000124 { "name": "message", "type": "char", "annotation": "const*", "length": "strlen" }
125 ],
Zhaoming Jiangb44000e2021-06-04 07:10:56 +0000126 "device logging callback": [
127 { "name": "device", "type": "ObjectHandle", "handle_type": "device" },
128 { "name": "type", "type": "logging type"},
129 { "name": "message", "type": "char", "annotation": "const*", "length": "strlen" }
130 ],
Natasha Lee9bba4a92019-12-18 18:59:20 +0000131 "device lost callback" : [
Austin Eng4d66fb22021-01-25 08:38:47 +0000132 { "name": "device", "type": "ObjectHandle", "handle_type": "device" },
Kai Ninomiya51791e02021-09-28 11:52:17 +0000133 { "name": "reason", "type": "device lost reason" },
Natasha Lee9bba4a92019-12-18 18:59:20 +0000134 { "name": "message", "type": "char", "annotation": "const*", "length": "strlen" }
135 ],
Austin Eng45238d72019-09-04 22:54:03 +0000136 "device pop error scope callback": [
Austin Eng4d66fb22021-01-25 08:38:47 +0000137 { "name": "device", "type": "ObjectHandle", "handle_type": "device" },
Austin Eng45238d72019-09-04 22:54:03 +0000138 { "name": "request serial", "type": "uint64_t" },
139 { "name": "type", "type": "error type" },
140 { "name": "message", "type": "char", "annotation": "const*", "length": "strlen" }
141 ],
Corentin Wallezc093db22021-02-25 13:17:01 +0000142 "queue work done callback": [
143 { "name": "queue", "type": "ObjectHandle", "handle_type": "queue" },
Loko Kunga9239212023-09-27 21:36:28 +0000144 { "name": "future", "type": "future" },
Corentin Wallezc093db22021-02-25 13:17:01 +0000145 { "name": "status", "type": "queue work done status" }
Brandon Jones6f2bbe92021-04-05 23:34:17 +0000146 ],
147 "shader module get compilation info callback": [
148 { "name": "shader module", "type": "ObjectHandle", "handle_type": "shader module" },
149 { "name": "request serial", "type": "uint64_t" },
150 { "name": "status", "type": "compilation info request status" },
151 { "name": "info", "type": "compilation info", "annotation": "const*", "optional": true }
Austin Eng07e76672021-12-15 21:52:17 +0000152 ],
153 "instance request adapter callback": [
154 { "name": "instance", "type": "ObjectHandle", "handle_type": "instance" },
155 { "name": "request serial", "type": "uint64_t" },
156 { "name": "status", "type": "request adapter status" },
157 { "name": "message", "type": "char", "annotation": "const*", "length": "strlen", "optional": true },
158 { "name": "properties", "type": "adapter properties", "annotation": "const*", "optional": "true" },
159 { "name": "limits", "type": "supported limits", "annotation": "const*", "optional": "true" },
160 { "name": "features count", "type": "uint32_t"},
161 { "name": "features", "type": "feature name", "annotation": "const*", "length": "features count"}
162 ],
163 "adapter request device callback": [
164 { "name": "adapter", "type": "ObjectHandle", "handle_type": "adapter" },
165 { "name": "request serial", "type": "uint64_t" },
166 { "name": "status", "type": "request device status" },
167 { "name": "message", "type": "char", "annotation": "const*", "length": "strlen", "optional": true },
168 { "name": "limits", "type": "supported limits", "annotation": "const*", "optional": "true" },
169 { "name": "features count", "type": "uint32_t"},
170 { "name": "features", "type": "feature name", "annotation": "const*", "length": "features count"}
Austin Engc7f416c2019-01-15 20:49:53 +0000171 ]
172 },
173 "special items": {
Corentin Wallez67ab1ea2019-06-06 16:19:15 +0000174 "client_side_structures": [
Kai Ninomiyabe98f272023-09-11 20:47:26 +0000175 "FutureWaitInfo",
Corentin Wallez3a1746e2020-01-15 13:14:12 +0000176 "SurfaceDescriptorFromMetalLayer",
177 "SurfaceDescriptorFromWindowsHWND",
Shrek Shao5b9b9862022-03-09 19:04:21 +0000178 "SurfaceDescriptorFromXlibWindow",
陈俊嘉11379a32021-06-09 08:44:07 +0000179 "SurfaceDescriptorFromWindowsCoreWindow",
Alexander Vestinf2556ab2022-03-25 13:18:46 +0000180 "SurfaceDescriptorFromWindowsSwapChainPanel",
181 "SurfaceDescriptorFromAndroidNativeWindow"
Corentin Wallez67ab1ea2019-06-06 16:19:15 +0000182 ],
Austin Engc7f416c2019-01-15 20:49:53 +0000183 "client_side_commands": [
Austin Eng2f218e22021-12-22 19:02:23 +0000184 "AdapterCreateDevice",
Austin Eng5397f9f2021-12-14 23:22:46 +0000185 "AdapterGetProperties",
186 "AdapterGetLimits",
187 "AdapterHasFeature",
Austin Eng89ddadc2021-12-15 00:12:30 +0000188 "AdapterEnumerateFeatures",
Austin Eng5397f9f2021-12-14 23:22:46 +0000189 "AdapterRequestDevice",
Corentin Wallez0d52f802020-07-14 12:30:14 +0000190 "BufferMapAsync",
Loko Kunga9239212023-09-27 21:36:28 +0000191 "BufferMapAsyncF",
Corentin Wallez1325ab12020-06-30 11:51:14 +0000192 "BufferGetConstMappedRange",
193 "BufferGetMappedRange",
Takahiro915e55a2022-12-19 19:06:51 +0000194 "BufferGetMapState",
Corentin Wallezd4281872022-06-08 14:46:41 +0000195 "BufferGetSize",
196 "BufferGetUsage",
Corentin Wallezf93fa6a2020-07-29 17:01:11 +0000197 "DeviceCreateBuffer",
Corentin Wallez2d3c2e32021-02-22 18:27:36 +0000198 "DeviceCreateComputePipelineAsync",
199 "DeviceCreateRenderPipelineAsync",
Austin Engbffc9662021-09-17 15:36:00 +0000200 "DeviceGetLimits",
Austin Eng89ddadc2021-12-15 00:12:30 +0000201 "DeviceHasFeature",
202 "DeviceEnumerateFeatures",
Corentin Wallez540abab2019-11-22 13:18:22 +0000203 "DevicePopErrorScope",
Natasha Lee9bba4a92019-12-18 18:59:20 +0000204 "DeviceSetDeviceLostCallback",
Corentin Wallez540abab2019-11-22 13:18:22 +0000205 "DeviceSetUncapturedErrorCallback",
Zhaoming Jiangb44000e2021-06-04 07:10:56 +0000206 "DeviceSetLoggingCallback",
Austin Eng5397f9f2021-12-14 23:22:46 +0000207 "InstanceRequestAdapter",
Brandon Jones6f2bbe92021-04-05 23:34:17 +0000208 "ShaderModuleGetCompilationInfo",
Corentin Wallez45820ae2022-06-09 10:12:13 +0000209 "QuerySetGetType",
210 "QuerySetGetCount",
Corentin Wallezc093db22021-02-25 13:17:01 +0000211 "QueueOnSubmittedWorkDone",
Kai Ninomiyabe98f272023-09-11 20:47:26 +0000212 "QueueOnSubmittedWorkDoneF",
Tomek Ponitkaa9c7d642020-07-08 18:42:30 +0000213 "QueueWriteBuffer",
Corentin Wallez736e97c2022-06-08 18:14:02 +0000214 "QueueWriteTexture",
215 "TextureGetWidth",
216 "TextureGetHeight",
217 "TextureGetDepthOrArrayLayers",
218 "TextureGetMipLevelCount",
219 "TextureGetSampleCount",
220 "TextureGetDimension",
221 "TextureGetFormat",
222 "TextureGetUsage"
Austin Engc7f416c2019-01-15 20:49:53 +0000223 ],
Austin Eng1139d1c2019-01-30 03:00:17 +0000224 "client_handwritten_commands": [
Le Hoang Quyen99b80812023-03-24 15:50:50 +0000225 "AdapterGetInstance",
Corentin Wallez36cd1742020-04-08 10:23:35 +0000226 "BufferDestroy",
Austin Engc7f416c2019-01-15 20:49:53 +0000227 "BufferUnmap",
Austin Engbf324352022-08-18 18:02:00 +0000228 "DeviceGetAdapter",
Corentin Wallez6d315da2021-02-04 15:33:42 +0000229 "DeviceGetQueue",
Le Hoang Quyen33557312023-04-20 20:42:05 +0000230 "DeviceGetSupportedSurfaceUsage",
Corentin Wallez943a1a22023-05-26 10:32:17 +0000231 "DeviceInjectError",
Kai Ninomiyabe98f272023-09-11 20:47:26 +0000232 "InstanceProcessEvents",
233 "InstanceWaitAny",
Corentin Wallez943a1a22023-05-26 10:32:17 +0000234 "SwapChainGetCurrentTexture"
Austin Engc7f416c2019-01-15 20:49:53 +0000235 ],
236 "client_special_objects": [
Austin Eng5397f9f2021-12-14 23:22:46 +0000237 "Adapter",
Austin Engc7f416c2019-01-15 20:49:53 +0000238 "Buffer",
239 "Device",
Austin Eng5397f9f2021-12-14 23:22:46 +0000240 "Instance",
Corentin Wallez45820ae2022-06-09 10:12:13 +0000241 "QuerySet",
Brandon Jones6f2bbe92021-04-05 23:34:17 +0000242 "Queue",
Corentin Wallez736e97c2022-06-08 18:14:02 +0000243 "ShaderModule",
Corentin Wallez943a1a22023-05-26 10:32:17 +0000244 "SwapChain",
Corentin Wallez736e97c2022-06-08 18:14:02 +0000245 "Texture"
Austin Engc7f416c2019-01-15 20:49:53 +0000246 ],
247 "server_custom_pre_handler_commands": [
Corentin Wallez36cd1742020-04-08 10:23:35 +0000248 "BufferDestroy",
Austin Engc7f416c2019-01-15 20:49:53 +0000249 "BufferUnmap"
250 ],
Austin Eng62e83972019-02-11 19:39:46 +0000251 "server_handwritten_commands": [
Austin Engc7f416c2019-01-15 20:49:53 +0000252 "QueueSignal"
253 ],
254 "server_reverse_lookup_objects": [
Austin Engc7f416c2019-01-15 20:49:53 +0000255 ]
256 }
257}