Skip to content

Commit

Permalink
Revert "[dawn] Removes old non-overridden non-Future entry."
Browse files Browse the repository at this point in the history
This reverts commit fa07f30.

Reason for revert: Breaking Dawn->Chromium roll, need to update MLDrift.

Original change's description:
> [dawn] Removes old non-overridden non-Future entry.
>
> - Removes/Renames the following entry points and their
>   corresponding old Callbacks and CallbackInfos:
>     - ShaderModule::GetCompilationInfo
>     - Device::Create*PipelineAsync
>     - Device::PopErrorScope
>     - Buffer::MapAsync
>     - Queue::OnSubmittedWorkDone
>  - Note that "overridden" entry points will be removed in
>    multi-CL changes since those refer to entry points
>    where users may be manually overriding the C proc table.
>
> Bug: 369445924
> Change-Id: I074cac71587b64555288e44c9f483d9426c7abd0
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/216314
> Reviewed-by: Kai Ninomiya <[email protected]>
> Commit-Queue: Loko Kung <[email protected]>

Bug: 369445924
Change-Id: Ia93ea22936c5a37ba9d86fb9a34d10b1c5ebcbff
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/220294
Commit-Queue: Loko Kung <[email protected]>
Reviewed-by: Jiawei Shao <[email protected]>
Reviewed-by: Loko Kung <[email protected]>
Auto-Submit: Loko Kung <[email protected]>
  • Loading branch information
lokokung authored and Dawn LUCI CQ committed Dec 23, 2024
1 parent ef00af5 commit 23bb5c0
Show file tree
Hide file tree
Showing 38 changed files with 1,670 additions and 318 deletions.
5 changes: 4 additions & 1 deletion generator/templates/mock_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,10 @@ void ProcTableAsClass::GetProcTable({{Prefix}}ProcTable* table) {
object->m{{Suffix}}Userdata = userdata;
{% endfor %}

{% if method.name.get() not in LegacyCallbackFunctions %}
{% if method.name.get() == 'pop error scope' %}
//* Currently special casing popErrorScope since it has an old callback type.
On{{Suffix}}({{-as_varName(type.name)}}, {.nextInChain = nullptr, .mode = WGPUCallbackMode_AllowProcessEvents, .callback = nullptr, .oldCallback = oldCallback, .userdata = userdata});
{% elif method.name.get() not in LegacyCallbackFunctions %}
On{{Suffix}}(
{{-as_varName(type.name)}}
{%- for arg in method.arguments if arg.type.category != 'function pointer' and arg.type.name.get() != 'void *' -%}
Expand Down
256 changes: 249 additions & 7 deletions src/dawn/dawn.json

Large diffs are not rendered by default.

20 changes: 17 additions & 3 deletions src/dawn/dawn_wire.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
{ "name": "future", "type": "future" },
{ "name": "mode", "type": "map mode" },
{ "name": "offset", "type": "uint64_t"},
{ "name": "size", "type": "uint64_t"}
{ "name": "size", "type": "uint64_t"},
{ "name": "userdata count", "type": "uint8_t", "_comment": "TODO(crbug.com/dawn/2509): Remove this once Chromium overrides the correct functions in the proc table."}
],
"buffer update mapped data": [
{ "name": "buffer id", "type": "ObjectId", "id_type": "buffer" },
Expand Down Expand Up @@ -81,7 +82,8 @@
"queue on submitted work done": [
{ "name": "queue id", "type": "ObjectId", "id_type": "queue" },
{ "name": "event manager handle", "type": "ObjectHandle" },
{ "name": "future", "type": "future" }
{ "name": "future", "type": "future" },
{ "name": "userdata count", "type": "uint8_t", "_comment": "TODO(crbug.com/dawn/2509): Remove this once Chromium overrides the correct functions in the proc table."}
],
"queue write buffer": [
{"name": "queue id", "type": "ObjectId", "id_type": "queue" },
Expand Down Expand Up @@ -130,8 +132,10 @@
"buffer map async callback": [
{ "name": "event manager", "type": "ObjectHandle" },
{ "name": "future", "type": "future" },
{ "name": "status", "type": "map async status" },
{ "name": "status", "type": "buffer map async status" },
{ "name": "status2", "type": "map async status" },
{ "name": "message", "type": "string view" },
{ "name": "userdata count", "type": "uint8_t", "_comment": "TODO(crbug.com/dawn/2509): Remove this once Chromium overrides the correct functions in the proc table."},
{ "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 }
],
Expand Down Expand Up @@ -224,14 +228,20 @@
"AdapterRequestDeviceF",
"AdapterRequestDevice2",
"BufferMapAsync",
"BufferMapAsyncF",
"BufferMapAsync2",
"BufferGetConstMappedRange",
"BufferGetMappedRange",
"BufferGetMapState",
"BufferGetSize",
"BufferGetUsage",
"DeviceCreateBuffer",
"DeviceCreateComputePipelineAsync",
"DeviceCreateComputePipelineAsyncF",
"DeviceCreateComputePipelineAsync2",
"DeviceCreateRenderPipelineAsync",
"DeviceCreateRenderPipelineAsyncF",
"DeviceCreateRenderPipelineAsync2",
"DeviceGetAdapter",
"DeviceGetAdapterInfo",
"DeviceGetFeatures",
Expand All @@ -249,9 +259,13 @@
"InstanceRequestAdapterF",
"InstanceRequestAdapter2",
"ShaderModuleGetCompilationInfo",
"ShaderModuleGetCompilationInfoF",
"ShaderModuleGetCompilationInfo2",
"QuerySetGetType",
"QuerySetGetCount",
"QueueOnSubmittedWorkDone",
"QueueOnSubmittedWorkDoneF",
"QueueOnSubmittedWorkDone2",
"QueueWriteBuffer",
"QueueWriteTexture",
"SurfaceGetCapabilities",
Expand Down
Loading

0 comments on commit 23bb5c0

Please sign in to comment.