[dawn][wire] Use MemoryHandle instead of Read/WriteHandle
A few changes that were difficult to do separately from the
usage of MemoryHandle in wire/{client, server} were:
- Make DeserializeCreateRead/WriteHandle optional now that they are no
longer used inside of Dawn. They will be removed once the Chromium
implementation is deleted.
- Use `std::byte` in dawn_wire.json for the serialized handle
creation data and data updates: this matches the interface of
MemoryHandle and avoids the need from conversions from spans of
uint8_t to spans of std::byte. (required adding `std::byte` as a
native type in dawn.json).
- Change ChunkedCommandSerializer CommandExtensions to take a
span<std::byte> instead of a void* (further spanification is in a TODO).
- Change server::MapUserData to use size_t for offset and size, the use
of uint64_t was a leftover from a time when the MapAsync arguments
where using uint64_t.
Changes that make use of MemoryHandle are:
- Implement MemoryHandle in both Client/ServerInlineMemoryTransferService.
- Implement MemoryHandle in both Client/ServerMemoryTransferService_mock.
- Use MemoryHandle instead of WriteHandle in client/Queue.cpp and
ServerQueue.cpp.
- Use a single MemoryHandle in client::Buffer instead of both ReadHandle
and WriteHandle.
- Use a single MemoryHandle in server::BufferMapState.
- Update WireMemoryTransferServiceTests mock calls to expect
MemoryHandle calls instead.
Bug: 492456046, 524776858, 512465980, 524406299, 526537224, 526537254, 526549345
Change-Id: I3097d65bc282e93d75e53adf241221b146d32460
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/317635
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Loko Kung <lokokung@google.com>
Reviewed-by: Shao, Jiawei <jiawei.shao@intel.com>
Dawn is an open-source and cross-platform implementation of the WebGPU standard. More precisely it implements webgpu.h that is a one-to-one mapping with the WebGPU IDL. Dawn is meant to be integrated as part of a larger system and is the underlying implementation of WebGPU in Chromium.
Dawn provides several WebGPU building blocks:
webgpu.h version that Dawn implements.webgpu.h.Helpful links:
Developer documentation:
User documentation: (TODO, figure out what overlaps with the webgpu.h docs)
BSD 3-Clause License, please see LICENSE.
This is not an officially supported Google product.