mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-09 21:47:47 +00:00
Add MemoryTransfer interfaces to the wire
This patch adds MemoryTransfer client/server interfaces and uses it to implement data transfers for buffer mapping. This patch also provides a default "inline" implementation of the MemoryTransfer which is used if the embedder does not provide one on initialization. Because implementations of MemoryTransfer perform their own serialization, a skip_serialize option is added to WireCmd records. Bug: dawn:156 Change-Id: I2fa035517628a3ad465b0bc18a6ffc477e2bd67f Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/8642 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Austin Eng <enga@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
49aae0f3bd
commit
6a5418a760
@@ -73,8 +73,12 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
|
||||
ASSERT(nullDevice.Get() != nullptr);
|
||||
|
||||
DevNull devNull;
|
||||
std::unique_ptr<dawn_wire::WireServer> wireServer(
|
||||
new dawn_wire::WireServer(nullDevice.Get(), procs, &devNull));
|
||||
dawn_wire::WireServerDescriptor serverDesc = {};
|
||||
serverDesc.device = nullDevice.Get();
|
||||
serverDesc.procs = &procs;
|
||||
serverDesc.serializer = &devNull;
|
||||
|
||||
std::unique_ptr<dawn_wire::WireServer> wireServer(new dawn_wire::WireServer(serverDesc));
|
||||
|
||||
wireServer->HandleCommands(reinterpret_cast<const char*>(data), size);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user