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
|
|
|
|
2022-01-27 18:33:47 +00:00
|
|
|
"_doc": "See docs/dawn/codegen.md",
|
2021-03-24 20:29:42 +00:00
|
|
|
|
2019-01-15 20:49:53 +00:00
|
|
|
"commands": {
|
|
|
|
"buffer map async": [
|
|
|
|
{ "name": "buffer id", "type": "ObjectId" },
|
2021-07-08 22:48:57 +00:00
|
|
|
{ "name": "request serial", "type": "uint64_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"},
|
2021-07-08 22:48:57 +00:00
|
|
|
{ "name": "size", "type": "uint64_t"}
|
2019-01-15 20:49:53 +00:00
|
|
|
],
|
|
|
|
"buffer update mapped data": [
|
|
|
|
{ "name": "buffer id", "type": "ObjectId" },
|
2021-07-08 22:48:57 +00:00
|
|
|
{ "name": "write data update info length", "type": "uint64_t" },
|
|
|
|
{ "name": "write data update info", "type": "uint8_t", "annotation": "const*", "length": "write data update info length", "skip_serialize": true},
|
|
|
|
{ "name": "offset", "type": "uint64_t"},
|
|
|
|
{ "name": "size", "type": "uint64_t"}
|
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" },
|
2021-07-08 22:48:57 +00:00
|
|
|
{ "name": "read handle create info length", "type": "uint64_t" },
|
|
|
|
{ "name": "read handle create info", "type": "uint8_t", "annotation": "const*", "length": "read handle create info length", "skip_serialize": true},
|
|
|
|
{ "name": "write handle create info length", "type": "uint64_t" },
|
|
|
|
{ "name": "write handle create info", "type": "uint8_t", "annotation": "const*", "length": "write 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-05-21 05:01:38 +00:00
|
|
|
{ "name": "descriptor", "type": "render pipeline descriptor", "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
|
|
|
],
|
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" }
|
|
|
|
],
|
2021-12-09 02:42:47 +00:00
|
|
|
"queue write buffer": [
|
2020-06-02 09:24:39 +00:00
|
|
|
{"name": "queue id", "type": "ObjectId" },
|
|
|
|
{"name": "buffer id", "type": "ObjectId" },
|
|
|
|
{"name": "buffer offset", "type": "uint64_t"},
|
2021-12-10 02:05:28 +00:00
|
|
|
{"name": "data", "type": "uint8_t", "annotation": "const*", "length": "size", "wire_is_data_only": true},
|
2021-02-18 22:36:19 +00:00
|
|
|
{"name": "size", "type": "uint64_t"}
|
2020-07-08 18:42:30 +00:00
|
|
|
],
|
2021-12-09 02:42:47 +00:00
|
|
|
"queue write texture": [
|
2020-07-08 18:42:30 +00:00
|
|
|
{"name": "queue id", "type": "ObjectId" },
|
2021-03-04 18:13:45 +00:00
|
|
|
{"name": "destination", "type": "image copy texture", "annotation": "const*"},
|
2021-12-10 02:05:28 +00:00
|
|
|
{"name": "data", "type": "uint8_t", "annotation": "const*", "length": "data size", "wire_is_data_only": true},
|
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" }
|
2021-12-15 21:52:17 +00:00
|
|
|
],
|
|
|
|
"instance request adapter": [
|
|
|
|
{ "name": "instance id", "type": "ObjectId" },
|
|
|
|
{ "name": "request serial", "type": "uint64_t" },
|
|
|
|
{ "name": "adapter object handle", "type": "ObjectHandle", "handle_type": "adapter"},
|
|
|
|
{ "name": "options", "type": "request adapter options", "annotation": "const*" }
|
|
|
|
],
|
|
|
|
"adapter request device": [
|
|
|
|
{ "name": "adapter id", "type": "ObjectId" },
|
|
|
|
{ "name": "request serial", "type": "uint64_t" },
|
|
|
|
{ "name": "device object handle", "type": "ObjectHandle", "handle_type": "device"},
|
|
|
|
{ "name": "descriptor", "type": "device descriptor", "annotation": "const*" }
|
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" },
|
2021-07-08 22:48:57 +00:00
|
|
|
{ "name": "request serial", "type": "uint64_t" },
|
2019-01-15 20:49:53 +00:00
|
|
|
{ "name": "status", "type": "uint32_t" },
|
2021-07-08 22:48:57 +00:00
|
|
|
{ "name": "read data update info length", "type": "uint64_t" },
|
|
|
|
{ "name": "read data update info", "type": "uint8_t", "annotation": "const*", "length": "read data update 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" }
|
|
|
|
],
|
Add the user-visible logging interface.
Details:
- Add the logging level type WGPULoggingType, including levels verbose,
info, warning, and error,
- Add the API SetLoggingCallback, which bind the callback to deal with
logging string,
- Add the return command DeviceLoggingCallback and related code,
- Add DeviceBase::EmitLog(WGPULoggingType, const char*) , and
DeviceBase::EmitLog(const char*) use WGPULoggingType_info as default,
to post logging from native or server device to bound callback
via CallbackTaskManager.
BUG: dawn:792
Change-Id: I107b9134ff8567a46fa452509799e10b6862b8d3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/52200
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Zhaoming Jiang <zhaoming.jiang@intel.com>
2021-06-04 07:10:56 +00:00
|
|
|
"device logging callback": [
|
|
|
|
{ "name": "device", "type": "ObjectHandle", "handle_type": "device" },
|
|
|
|
{ "name": "type", "type": "logging type"},
|
|
|
|
{ "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" },
|
2021-09-28 11:52:17 +00:00
|
|
|
{ "name": "reason", "type": "device lost reason" },
|
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" }
|
|
|
|
],
|
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 }
|
2021-12-15 21:52:17 +00:00
|
|
|
],
|
|
|
|
"instance request adapter callback": [
|
|
|
|
{ "name": "instance", "type": "ObjectHandle", "handle_type": "instance" },
|
|
|
|
{ "name": "request serial", "type": "uint64_t" },
|
|
|
|
{ "name": "status", "type": "request adapter status" },
|
|
|
|
{ "name": "message", "type": "char", "annotation": "const*", "length": "strlen", "optional": true },
|
|
|
|
{ "name": "properties", "type": "adapter properties", "annotation": "const*", "optional": "true" },
|
|
|
|
{ "name": "limits", "type": "supported limits", "annotation": "const*", "optional": "true" },
|
|
|
|
{ "name": "features count", "type": "uint32_t"},
|
|
|
|
{ "name": "features", "type": "feature name", "annotation": "const*", "length": "features count"}
|
|
|
|
],
|
|
|
|
"adapter request device callback": [
|
|
|
|
{ "name": "adapter", "type": "ObjectHandle", "handle_type": "adapter" },
|
|
|
|
{ "name": "request serial", "type": "uint64_t" },
|
|
|
|
{ "name": "status", "type": "request device status" },
|
|
|
|
{ "name": "message", "type": "char", "annotation": "const*", "length": "strlen", "optional": true },
|
|
|
|
{ "name": "limits", "type": "supported limits", "annotation": "const*", "optional": "true" },
|
|
|
|
{ "name": "features count", "type": "uint32_t"},
|
|
|
|
{ "name": "features", "type": "feature name", "annotation": "const*", "length": "features count"}
|
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",
|
2022-03-09 19:04:21 +00:00
|
|
|
"SurfaceDescriptorFromXlibWindow",
|
2021-06-09 08:44:07 +00:00
|
|
|
"SurfaceDescriptorFromWindowsCoreWindow",
|
2022-03-25 13:18:46 +00:00
|
|
|
"SurfaceDescriptorFromWindowsSwapChainPanel",
|
|
|
|
"SurfaceDescriptorFromAndroidNativeWindow"
|
2019-06-06 16:19:15 +00:00
|
|
|
],
|
2019-01-15 20:49:53 +00:00
|
|
|
"client_side_commands": [
|
2021-12-22 19:02:23 +00:00
|
|
|
"AdapterCreateDevice",
|
2021-12-14 23:22:46 +00:00
|
|
|
"AdapterGetProperties",
|
|
|
|
"AdapterGetLimits",
|
|
|
|
"AdapterHasFeature",
|
2021-12-15 00:12:30 +00:00
|
|
|
"AdapterEnumerateFeatures",
|
2021-12-14 23:22:46 +00:00
|
|
|
"AdapterRequestDevice",
|
2020-07-14 12:30:14 +00:00
|
|
|
"BufferMapAsync",
|
2020-06-30 11:51:14 +00:00
|
|
|
"BufferGetConstMappedRange",
|
|
|
|
"BufferGetMappedRange",
|
2022-12-19 19:06:51 +00:00
|
|
|
"BufferGetMapState",
|
2022-06-08 14:46:41 +00:00
|
|
|
"BufferGetSize",
|
|
|
|
"BufferGetUsage",
|
2020-07-29 17:01:11 +00:00
|
|
|
"DeviceCreateBuffer",
|
2021-02-22 18:27:36 +00:00
|
|
|
"DeviceCreateComputePipelineAsync",
|
|
|
|
"DeviceCreateRenderPipelineAsync",
|
2021-09-17 15:36:00 +00:00
|
|
|
"DeviceGetLimits",
|
2021-12-15 00:12:30 +00:00
|
|
|
"DeviceHasFeature",
|
|
|
|
"DeviceEnumerateFeatures",
|
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",
|
Add the user-visible logging interface.
Details:
- Add the logging level type WGPULoggingType, including levels verbose,
info, warning, and error,
- Add the API SetLoggingCallback, which bind the callback to deal with
logging string,
- Add the return command DeviceLoggingCallback and related code,
- Add DeviceBase::EmitLog(WGPULoggingType, const char*) , and
DeviceBase::EmitLog(const char*) use WGPULoggingType_info as default,
to post logging from native or server device to bound callback
via CallbackTaskManager.
BUG: dawn:792
Change-Id: I107b9134ff8567a46fa452509799e10b6862b8d3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/52200
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Zhaoming Jiang <zhaoming.jiang@intel.com>
2021-06-04 07:10:56 +00:00
|
|
|
"DeviceSetLoggingCallback",
|
2021-12-14 23:22:46 +00:00
|
|
|
"InstanceRequestAdapter",
|
2021-04-05 23:34:17 +00:00
|
|
|
"ShaderModuleGetCompilationInfo",
|
2022-06-09 10:12:13 +00:00
|
|
|
"QuerySetGetType",
|
|
|
|
"QuerySetGetCount",
|
2021-02-25 13:17:01 +00:00
|
|
|
"QueueOnSubmittedWorkDone",
|
2020-07-08 18:42:30 +00:00
|
|
|
"QueueWriteBuffer",
|
2022-06-08 18:14:02 +00:00
|
|
|
"QueueWriteTexture",
|
|
|
|
"TextureGetWidth",
|
|
|
|
"TextureGetHeight",
|
|
|
|
"TextureGetDepthOrArrayLayers",
|
|
|
|
"TextureGetMipLevelCount",
|
|
|
|
"TextureGetSampleCount",
|
|
|
|
"TextureGetDimension",
|
|
|
|
"TextureGetFormat",
|
|
|
|
"TextureGetUsage"
|
2019-01-15 20:49:53 +00:00
|
|
|
],
|
2019-01-30 03:00:17 +00:00
|
|
|
"client_handwritten_commands": [
|
2023-03-24 15:50:50 +00:00
|
|
|
"AdapterGetInstance",
|
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",
|
2022-06-09 10:12:13 +00:00
|
|
|
"DeviceCreateQuerySet",
|
2022-06-08 18:14:02 +00:00
|
|
|
"DeviceCreateTexture",
|
2022-07-20 16:07:44 +00:00
|
|
|
"DeviceCreateErrorTexture",
|
2022-08-18 18:02:00 +00:00
|
|
|
"DeviceGetAdapter",
|
2021-02-04 15:33:42 +00:00
|
|
|
"DeviceGetQueue",
|
2023-04-20 20:42:05 +00:00
|
|
|
"DeviceGetSupportedSurfaceUsage",
|
2022-03-22 14:45:34 +00:00
|
|
|
"DeviceInjectError"
|
2019-01-15 20:49:53 +00:00
|
|
|
],
|
|
|
|
"client_special_objects": [
|
2021-12-14 23:22:46 +00:00
|
|
|
"Adapter",
|
2019-01-15 20:49:53 +00:00
|
|
|
"Buffer",
|
|
|
|
"Device",
|
2021-12-14 23:22:46 +00:00
|
|
|
"Instance",
|
2022-06-09 10:12:13 +00:00
|
|
|
"QuerySet",
|
2021-04-05 23:34:17 +00:00
|
|
|
"Queue",
|
2022-06-08 18:14:02 +00:00
|
|
|
"ShaderModule",
|
|
|
|
"Texture"
|
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": [
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|