Make Buffer::MapAsync() no autolock BufferBase was previously modified to use atomic mState to guard against concurrent access for MapAsync(), Unmap() and Destroy(). This extends the previous change so queue operations that use a buffer also update the state. This ensures that MapAync() doesn't run while a buffer is being used by queue. Queue::Submit() only updates buffer state when validation is enabled to avoid overhead from iterating commands to find all the buffers. Many temp/scratch buffers have to manually have their state toggled to satisfy the assertion in MarkUsedInPendingCommands(). ScopedUseBuffer RAII helper is added to simplify this. Bug: 425472913 Change-Id: I825b282caf707d10e92200812ccfbb1bea544ea8 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/278575 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Loko Kung <lokokung@google.com> Commit-Queue: Kyle Charbonneau <kylechar@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.