2019-01-15 20:49:53 +00:00
|
|
|
{
|
|
|
|
"_comment": [
|
|
|
|
"Copyright 2019 The Dawn Authors",
|
|
|
|
"",
|
|
|
|
"Licensed under the Apache License, Version 2.0 (the \"License\");",
|
|
|
|
"you may not use this file except in compliance with the License.",
|
|
|
|
"You may obtain a copy of the License at",
|
|
|
|
"",
|
|
|
|
" http://www.apache.org/licenses/LICENSE-2.0",
|
|
|
|
"",
|
|
|
|
"Unless required by applicable law or agreed to in writing, software",
|
|
|
|
"distributed under the License is distributed on an \"AS IS\" BASIS,",
|
|
|
|
"WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.",
|
|
|
|
"See the License for the specific language governing permissions and",
|
|
|
|
"limitations under the License."
|
|
|
|
],
|
2021-03-24 20:29:42 +00:00
|
|
|
|
|
|
|
"_doc": "See docs/codegen.md",
|
|
|
|
|
2019-01-15 20:49:53 +00:00
|
|
|
"commands": {
|
|
|
|
"buffer map async": [
|
|
|
|
{ "name": "buffer id", "type": "ObjectId" },
|
|
|
|
{ "name": "request serial", "type": "uint32_t" },
|
2020-07-16 17:07:05 +00:00
|
|
|
{ "name": "mode", "type": "map mode" },
|
2021-02-18 22:36:19 +00:00
|
|
|
{ "name": "offset", "type": "uint64_t"},
|
|
|
|
{ "name": "size", "type": "uint64_t"},
|
2019-07-19 16:01:48 +00:00
|
|
|
{ "name": "handle create info length", "type": "uint64_t" },
|
|
|
|
{ "name": "handle create info", "type": "uint8_t", "annotation": "const*", "length": "handle create info length", "skip_serialize": true}
|
2019-01-15 20:49:53 +00:00
|
|
|
],
|
|
|
|
"buffer update mapped data": [
|
|
|
|
{ "name": "buffer id", "type": "ObjectId" },
|
2019-07-19 16:01:48 +00:00
|
|
|
{ "name": "write flush info length", "type": "uint64_t" },
|
|
|
|
{ "name": "write flush info", "type": "uint8_t", "annotation": "const*", "length": "write flush info length", "skip_serialize": true}
|
2019-01-15 20:49:53 +00:00
|
|
|
],
|
2020-07-29 17:01:11 +00:00
|
|
|
"device create buffer": [
|
2021-01-13 20:58:18 +00:00
|
|
|
{ "name": "device id", "type": "ObjectId" },
|
2019-05-22 18:49:59 +00:00
|
|
|
{ "name": "descriptor", "type": "buffer descriptor", "annotation": "const*" },
|
2019-07-19 16:01:48 +00:00
|
|
|
{ "name": "result", "type": "ObjectHandle", "handle_type": "buffer" },
|
|
|
|
{ "name": "handle create info length", "type": "uint64_t" },
|
|
|
|
{ "name": "handle create info", "type": "uint8_t", "annotation": "const*", "length": "handle create info length", "skip_serialize": true}
|
2019-05-22 18:49:59 +00:00
|
|
|
],
|
2021-02-22 18:27:36 +00:00
|
|
|
"device create compute pipeline async": [
|
2021-01-13 20:58:18 +00:00
|
|
|
{ "name": "device id", "type": "ObjectId" },
|
2020-10-19 01:56:08 +00:00
|
|
|
{ "name": "request serial", "type": "uint64_t" },
|
|
|
|
{ "name": "pipeline object handle", "type": "ObjectHandle", "handle_type": "compute pipeline"},
|
|
|
|
{ "name": "descriptor", "type": "compute pipeline descriptor", "annotation": "const*"}
|
|
|
|
],
|
2021-02-22 18:27:36 +00:00
|
|
|
"device create render pipeline async": [
|
2021-01-13 20:58:18 +00:00
|
|
|
{ "name": "device id", "type": "ObjectId" },
|
2020-10-21 04:37:41 +00:00
|
|
|
{ "name": "request serial", "type": "uint64_t" },
|
|
|
|
{ "name": "pipeline object handle", "type": "ObjectHandle", "handle_type": "render pipeline"},
|
2021-03-21 23:13:04 +00:00
|
|
|
{ "name": "descriptor", "type": "render pipeline descriptor 2", "annotation": "const*"}
|
2020-10-21 04:37:41 +00:00
|
|
|
],
|
2019-09-04 22:54:03 +00:00
|
|
|
"device pop error scope": [
|
2021-01-25 08:38:47 +00:00
|
|
|
{ "name": "device id", "type": "ObjectId" },
|
2019-09-04 22:54:03 +00:00
|
|
|
{ "name": "request serial", "type": "uint64_t" }
|
|
|
|
],
|
2019-01-15 20:49:53 +00:00
|
|
|
"destroy object": [
|
|
|
|
{ "name": "object type", "type": "ObjectType" },
|
|
|
|
{ "name": "object id", "type": "ObjectId" }
|
2020-06-02 09:24:39 +00:00
|
|
|
],
|
2020-08-28 21:23:50 +00:00
|
|
|
"fence on completion": [
|
|
|
|
{ "name": "fence id", "type": "ObjectId" },
|
|
|
|
{ "name": "value", "type": "uint64_t" },
|
|
|
|
{ "name": "request serial", "type": "uint64_t" }
|
|
|
|
],
|
2021-02-25 13:17:01 +00:00
|
|
|
"queue on submitted work done": [
|
|
|
|
{ "name": "queue id", "type": "ObjectId" },
|
|
|
|
{ "name": "signal value", "type": "uint64_t" },
|
|
|
|
{ "name": "request serial", "type": "uint64_t" }
|
|
|
|
],
|
2020-06-02 09:24:39 +00:00
|
|
|
"queue write buffer internal": [
|
|
|
|
{"name": "queue id", "type": "ObjectId" },
|
|
|
|
{"name": "buffer id", "type": "ObjectId" },
|
|
|
|
{"name": "buffer offset", "type": "uint64_t"},
|
|
|
|
{"name": "data", "type": "uint8_t", "annotation": "const*", "length": "size"},
|
2021-02-18 22:36:19 +00:00
|
|
|
{"name": "size", "type": "uint64_t"}
|
2020-07-08 18:42:30 +00:00
|
|
|
],
|
|
|
|
"queue write texture internal": [
|
|
|
|
{"name": "queue id", "type": "ObjectId" },
|
2021-03-04 18:13:45 +00:00
|
|
|
{"name": "destination", "type": "image copy texture", "annotation": "const*"},
|
2020-07-15 18:06:07 +00:00
|
|
|
{"name": "data", "type": "uint8_t", "annotation": "const*", "length": "data size"},
|
2021-02-18 22:36:19 +00:00
|
|
|
{"name": "data size", "type": "uint64_t"},
|
2020-07-08 18:42:30 +00:00
|
|
|
{"name": "data layout", "type": "texture data layout", "annotation": "const*"},
|
|
|
|
{"name": "writeSize", "type": "extent 3D", "annotation": "const*"}
|
2021-04-05 23:34:17 +00:00
|
|
|
],
|
|
|
|
"shader module get compilation info": [
|
|
|
|
{ "name": "shader module id", "type": "ObjectId" },
|
|
|
|
{ "name": "request serial", "type": "uint64_t" }
|
2019-01-15 20:49:53 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
"return commands": {
|
2020-07-17 07:38:36 +00:00
|
|
|
"buffer map async callback": [
|
2019-01-30 03:00:17 +00:00
|
|
|
{ "name": "buffer", "type": "ObjectHandle", "handle_type": "buffer" },
|
2019-01-15 20:49:53 +00:00
|
|
|
{ "name": "request serial", "type": "uint32_t" },
|
|
|
|
{ "name": "status", "type": "uint32_t" },
|
2020-07-17 07:38:36 +00:00
|
|
|
{ "name": "read initial data info length", "type": "uint64_t" },
|
|
|
|
{ "name": "read initial data info", "type": "uint8_t", "annotation": "const*", "length": "read initial data info length", "skip_serialize": true }
|
2019-01-15 20:49:53 +00:00
|
|
|
],
|
2021-02-22 18:27:36 +00:00
|
|
|
"device create compute pipeline async callback": [
|
2021-01-25 08:38:47 +00:00
|
|
|
{ "name": "device", "type": "ObjectHandle", "handle_type": "device" },
|
2020-10-19 01:56:08 +00:00
|
|
|
{ "name": "request serial", "type": "uint64_t" },
|
2021-02-22 18:27:36 +00:00
|
|
|
{ "name": "status", "type": "create pipeline async status" },
|
2020-10-21 04:37:41 +00:00
|
|
|
{ "name": "message", "type": "char", "annotation": "const*", "length": "strlen" }
|
|
|
|
],
|
2021-02-22 18:27:36 +00:00
|
|
|
"device create render pipeline async callback": [
|
2021-01-25 08:38:47 +00:00
|
|
|
{ "name": "device", "type": "ObjectHandle", "handle_type": "device" },
|
2020-10-21 04:37:41 +00:00
|
|
|
{ "name": "request serial", "type": "uint64_t" },
|
2021-02-22 18:27:36 +00:00
|
|
|
{ "name": "status", "type": "create pipeline async status" },
|
2020-10-21 04:37:41 +00:00
|
|
|
{ "name": "message", "type": "char", "annotation": "const*", "length": "strlen" }
|
2020-10-19 01:56:08 +00:00
|
|
|
],
|
2019-08-27 21:43:56 +00:00
|
|
|
"device uncaptured error callback": [
|
2021-01-25 08:38:47 +00:00
|
|
|
{ "name": "device", "type": "ObjectHandle", "handle_type": "device" },
|
2019-08-27 21:41:56 +00:00
|
|
|
{ "name": "type", "type": "error type"},
|
2019-01-15 20:49:53 +00:00
|
|
|
{ "name": "message", "type": "char", "annotation": "const*", "length": "strlen" }
|
|
|
|
],
|
2019-12-18 18:59:20 +00:00
|
|
|
"device lost callback" : [
|
2021-01-25 08:38:47 +00:00
|
|
|
{ "name": "device", "type": "ObjectHandle", "handle_type": "device" },
|
2019-12-18 18:59:20 +00:00
|
|
|
{ "name": "message", "type": "char", "annotation": "const*", "length": "strlen" }
|
|
|
|
],
|
2019-09-04 22:54:03 +00:00
|
|
|
"device pop error scope callback": [
|
2021-01-25 08:38:47 +00:00
|
|
|
{ "name": "device", "type": "ObjectHandle", "handle_type": "device" },
|
2019-09-04 22:54:03 +00:00
|
|
|
{ "name": "request serial", "type": "uint64_t" },
|
|
|
|
{ "name": "type", "type": "error type" },
|
|
|
|
{ "name": "message", "type": "char", "annotation": "const*", "length": "strlen" }
|
|
|
|
],
|
2020-08-28 21:23:50 +00:00
|
|
|
"fence on completion callback": [
|
|
|
|
{ "name": "fence", "type": "ObjectHandle", "handle_type": "fence" },
|
|
|
|
{ "name": "request serial", "type": "uint64_t" },
|
|
|
|
{ "name": "status", "type": "fence completion status" }
|
|
|
|
],
|
2019-01-15 20:49:53 +00:00
|
|
|
"fence update completed value": [
|
2019-01-30 03:00:17 +00:00
|
|
|
{ "name": "fence", "type": "ObjectHandle", "handle_type": "fence" },
|
2019-01-15 20:49:53 +00:00
|
|
|
{ "name": "value", "type": "uint64_t" }
|
2021-02-25 13:17:01 +00:00
|
|
|
],
|
|
|
|
"queue work done callback": [
|
|
|
|
{ "name": "queue", "type": "ObjectHandle", "handle_type": "queue" },
|
|
|
|
{ "name": "request serial", "type": "uint64_t" },
|
|
|
|
{ "name": "status", "type": "queue work done status" }
|
2021-04-05 23:34:17 +00:00
|
|
|
],
|
|
|
|
"shader module get compilation info callback": [
|
|
|
|
{ "name": "shader module", "type": "ObjectHandle", "handle_type": "shader module" },
|
|
|
|
{ "name": "request serial", "type": "uint64_t" },
|
|
|
|
{ "name": "status", "type": "compilation info request status" },
|
|
|
|
{ "name": "info", "type": "compilation info", "annotation": "const*", "optional": true }
|
2019-01-15 20:49:53 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
"special items": {
|
2019-06-06 16:19:15 +00:00
|
|
|
"client_side_structures": [
|
2020-01-15 13:14:12 +00:00
|
|
|
"SurfaceDescriptorFromMetalLayer",
|
|
|
|
"SurfaceDescriptorFromWindowsHWND",
|
2021-04-27 16:43:27 +00:00
|
|
|
"SurfaceDescriptorFromXlib",
|
|
|
|
"SurfaceDescriptorFromWindowsCoreWindow"
|
2019-06-06 16:19:15 +00:00
|
|
|
],
|
2019-01-15 20:49:53 +00:00
|
|
|
"client_side_commands": [
|
2020-07-14 12:30:14 +00:00
|
|
|
"BufferMapAsync",
|
2020-06-30 11:51:14 +00:00
|
|
|
"BufferGetConstMappedRange",
|
|
|
|
"BufferGetMappedRange",
|
2020-07-29 17:01:11 +00:00
|
|
|
"DeviceCreateBuffer",
|
2021-02-22 18:27:36 +00:00
|
|
|
"DeviceCreateComputePipelineAsync",
|
|
|
|
"DeviceCreateRenderPipelineAsync",
|
2019-11-22 13:18:22 +00:00
|
|
|
"DevicePopErrorScope",
|
2019-12-18 18:59:20 +00:00
|
|
|
"DeviceSetDeviceLostCallback",
|
2019-11-22 13:18:22 +00:00
|
|
|
"DeviceSetUncapturedErrorCallback",
|
|
|
|
"FenceGetCompletedValue",
|
2020-06-02 09:24:39 +00:00
|
|
|
"FenceOnCompletion",
|
2021-04-05 23:34:17 +00:00
|
|
|
"ShaderModuleGetCompilationInfo",
|
2021-02-25 13:17:01 +00:00
|
|
|
"QueueOnSubmittedWorkDone",
|
2020-07-08 18:42:30 +00:00
|
|
|
"QueueWriteBuffer",
|
|
|
|
"QueueWriteTexture"
|
2019-01-15 20:49:53 +00:00
|
|
|
],
|
2019-01-30 03:00:17 +00:00
|
|
|
"client_handwritten_commands": [
|
2020-04-08 10:23:35 +00:00
|
|
|
"BufferDestroy",
|
2019-01-15 20:49:53 +00:00
|
|
|
"BufferUnmap",
|
2020-06-30 18:26:30 +00:00
|
|
|
"DeviceCreateErrorBuffer",
|
2020-04-23 21:21:52 +00:00
|
|
|
"DeviceGetDefaultQueue",
|
2021-02-04 15:33:42 +00:00
|
|
|
"DeviceGetQueue",
|
2020-06-30 18:26:30 +00:00
|
|
|
"DeviceInjectError",
|
2019-09-04 22:54:03 +00:00
|
|
|
"DevicePushErrorScope",
|
2020-08-28 21:23:50 +00:00
|
|
|
"QueueCreateFence"
|
2019-01-15 20:49:53 +00:00
|
|
|
],
|
|
|
|
"client_special_objects": [
|
|
|
|
"Buffer",
|
|
|
|
"Device",
|
2020-06-30 17:53:08 +00:00
|
|
|
"Fence",
|
2021-04-05 23:34:17 +00:00
|
|
|
"Queue",
|
|
|
|
"ShaderModule"
|
2019-01-15 20:49:53 +00:00
|
|
|
],
|
|
|
|
"server_custom_pre_handler_commands": [
|
2020-04-08 10:23:35 +00:00
|
|
|
"BufferDestroy",
|
2019-01-15 20:49:53 +00:00
|
|
|
"BufferUnmap"
|
|
|
|
],
|
2019-02-11 19:39:46 +00:00
|
|
|
"server_handwritten_commands": [
|
2019-01-15 20:49:53 +00:00
|
|
|
"QueueSignal"
|
|
|
|
],
|
|
|
|
"server_reverse_lookup_objects": [
|
|
|
|
"Fence"
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|