[wire][client] Make buffer mapping in the client thread-safe. - Since the wire can now be multithreaded in Chrome, we need to make sure that the buffer mapping mechanisms are thread-safe. This change uses a recursive lock like we do in native to ensure that the mapping states are consistent across atomic operations. This change also now guarantees that calling GetMappedRange or any equivalents while in a successful map async callback always succeeds. Bug: 503971615, 523580515 Change-Id: I3f173d3a314fdc9984dd813ce772bc486c9c31be Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/317816 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Kai Ninomiya <kainino@chromium.org> Commit-Queue: Loko Kung <lokokung@google.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.