blob: 5c66ed6aa406a8577e8bd8c1802636239f298a0f [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": [
22 { "name": "buffer id", "type": "ObjectId" },
shrekshao6e680fc2021-07-08 22:48:57 +000023 { "name": "request serial", "type": "uint64_t" },
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": [
29 { "name": "buffer id", "type": "ObjectId" },
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": [
Austin Eng8ba0a012021-01-13 20:58:18 +000036 { "name": "device id", "type": "ObjectId" },
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": [
Austin Eng8ba0a012021-01-13 20:58:18 +000045 { "name": "device id", "type": "ObjectId" },
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": [
Austin Eng8ba0a012021-01-13 20:58:18 +000051 { "name": "device id", "type": "ObjectId" },
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": [
Austin Eng4d66fb22021-01-25 08:38:47 +000057 { "name": "device id", "type": "ObjectId" },
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": [
65 { "name": "queue id", "type": "ObjectId" },
66 { "name": "signal value", "type": "uint64_t" },
67 { "name": "request serial", "type": "uint64_t" }
68 ],
Jiawei Shaob6d80e02021-12-09 02:42:47 +000069 "queue write buffer": [
Corentin Wallez47a33412020-06-02 09:24:39 +000070 {"name": "queue id", "type": "ObjectId" },
71 {"name": "buffer id", "type": "ObjectId" },
72 {"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": [
Tomek Ponitkaa9c7d642020-07-08 18:42:30 +000077 {"name": "queue id", "type": "ObjectId" },
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": [
85 { "name": "shader module id", "type": "ObjectId" },
86 { "name": "request serial", "type": "uint64_t" }
Austin Eng07e76672021-12-15 21:52:17 +000087 ],
88 "instance request adapter": [
89 { "name": "instance id", "type": "ObjectId" },
90 { "name": "request serial", "type": "uint64_t" },
91 { "name": "adapter object handle", "type": "ObjectHandle", "handle_type": "adapter"},
92 { "name": "options", "type": "request adapter options", "annotation": "const*" }
93 ],
94 "adapter request device": [
95 { "name": "adapter id", "type": "ObjectId" },
96 { "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" },
shrekshao6e680fc2021-07-08 22:48:57 +0000104 { "name": "request serial", "type": "uint64_t" },
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" },
144 { "name": "request serial", "type": "uint64_t" },
145 { "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": [
Corentin Wallez3a1746e2020-01-15 13:14:12 +0000175 "SurfaceDescriptorFromMetalLayer",
176 "SurfaceDescriptorFromWindowsHWND",
Shrek Shao5b9b9862022-03-09 19:04:21 +0000177 "SurfaceDescriptorFromXlibWindow",
陈俊嘉11379a32021-06-09 08:44:07 +0000178 "SurfaceDescriptorFromWindowsCoreWindow",
179 "SurfaceDescriptorFromWindowsSwapChainPanel"
Corentin Wallez67ab1ea2019-06-06 16:19:15 +0000180 ],
Austin Engc7f416c2019-01-15 20:49:53 +0000181 "client_side_commands": [
Austin Eng2f218e22021-12-22 19:02:23 +0000182 "AdapterCreateDevice",
Austin Eng5397f9f2021-12-14 23:22:46 +0000183 "AdapterGetProperties",
184 "AdapterGetLimits",
185 "AdapterHasFeature",
Austin Eng89ddadc2021-12-15 00:12:30 +0000186 "AdapterEnumerateFeatures",
Austin Eng5397f9f2021-12-14 23:22:46 +0000187 "AdapterRequestDevice",
Corentin Wallez0d52f802020-07-14 12:30:14 +0000188 "BufferMapAsync",
Corentin Wallez1325ab12020-06-30 11:51:14 +0000189 "BufferGetConstMappedRange",
190 "BufferGetMappedRange",
Corentin Wallezf93fa6a2020-07-29 17:01:11 +0000191 "DeviceCreateBuffer",
Corentin Wallez2d3c2e32021-02-22 18:27:36 +0000192 "DeviceCreateComputePipelineAsync",
193 "DeviceCreateRenderPipelineAsync",
Austin Engbffc9662021-09-17 15:36:00 +0000194 "DeviceGetLimits",
Austin Eng89ddadc2021-12-15 00:12:30 +0000195 "DeviceHasFeature",
196 "DeviceEnumerateFeatures",
Corentin Wallez540abab2019-11-22 13:18:22 +0000197 "DevicePopErrorScope",
Natasha Lee9bba4a92019-12-18 18:59:20 +0000198 "DeviceSetDeviceLostCallback",
Corentin Wallez540abab2019-11-22 13:18:22 +0000199 "DeviceSetUncapturedErrorCallback",
Zhaoming Jiangb44000e2021-06-04 07:10:56 +0000200 "DeviceSetLoggingCallback",
Austin Eng5397f9f2021-12-14 23:22:46 +0000201 "InstanceRequestAdapter",
Brandon Jones6f2bbe92021-04-05 23:34:17 +0000202 "ShaderModuleGetCompilationInfo",
Corentin Wallezc093db22021-02-25 13:17:01 +0000203 "QueueOnSubmittedWorkDone",
Tomek Ponitkaa9c7d642020-07-08 18:42:30 +0000204 "QueueWriteBuffer",
205 "QueueWriteTexture"
Austin Engc7f416c2019-01-15 20:49:53 +0000206 ],
Austin Eng1139d1c2019-01-30 03:00:17 +0000207 "client_handwritten_commands": [
Corentin Wallez36cd1742020-04-08 10:23:35 +0000208 "BufferDestroy",
Austin Engc7f416c2019-01-15 20:49:53 +0000209 "BufferUnmap",
Corentin Wallez2f616dd2020-06-30 18:26:30 +0000210 "DeviceCreateErrorBuffer",
Corentin Wallez6d315da2021-02-04 15:33:42 +0000211 "DeviceGetQueue",
Corentin Wallez2f616dd2020-06-30 18:26:30 +0000212 "DeviceInjectError",
Brandon Jonesa5485782021-05-21 00:01:08 +0000213 "DevicePushErrorScope"
Austin Engc7f416c2019-01-15 20:49:53 +0000214 ],
215 "client_special_objects": [
Austin Eng5397f9f2021-12-14 23:22:46 +0000216 "Adapter",
Austin Engc7f416c2019-01-15 20:49:53 +0000217 "Buffer",
218 "Device",
Austin Eng5397f9f2021-12-14 23:22:46 +0000219 "Instance",
Brandon Jones6f2bbe92021-04-05 23:34:17 +0000220 "Queue",
221 "ShaderModule"
Austin Engc7f416c2019-01-15 20:49:53 +0000222 ],
223 "server_custom_pre_handler_commands": [
Corentin Wallez36cd1742020-04-08 10:23:35 +0000224 "BufferDestroy",
Austin Engc7f416c2019-01-15 20:49:53 +0000225 "BufferUnmap"
226 ],
Austin Eng62e83972019-02-11 19:39:46 +0000227 "server_handwritten_commands": [
Austin Engc7f416c2019-01-15 20:49:53 +0000228 "QueueSignal"
229 ],
230 "server_reverse_lookup_objects": [
Austin Engc7f416c2019-01-15 20:49:53 +0000231 ]
232 }
233}