[dawn][wire] Check that buffer is mapped in DeserializeDataUpdate. Previously the target of the WriteHandle for a buffer was set as soon as the buffer is mapped. Between the time it was first mapped and the time DeserializeDataUpdate was called (right before Unmap), the buffer could be implicitly unmapped by a call to Device::Destroy. - Instead check for the buffer being mapped directly in DeserializeDataUpdate, which remove the need to track a mapWriteState on the ObjectData<WGPUBuffer>. - Update the change detecting WireTests to account to GetMappedRange being done in a different place now for writable buffers. - Add a new test that allows injecting WireCmds directly for even more precise but even more change detecting tests. - Add necessary backdoors to WireClient and WireTest need for the new tests. - Link dawn::wire statically in dawn_unittests as we now need to use some of its internals directly. Bug: 492139412 Change-Id: Ibe9ab95ae7456c6629434d4978f439ebfe41c4d1 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/296817 Reviewed-by: Loko Kung <lokokung@google.com> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
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.