[dawn][native] Refactors the device-wide lock. - Makes the device lock much more similar to MutexProtected Guards. - While guards are usually the one that expose the Defer function, we put the Defer function on the Device instead because unlike usual Guards that only live in the scope of a lambda, the new DeviceGuard acts much more like a lock. - Use the guard everywhere instead of the lock so that we can use the Defer function where necessary in follow up changes. Bug: 40643114, 42241400 Change-Id: I7d02fe3bbf9697b7539a959cc746c7cd163ce9da Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/247995 Reviewed-by: Kai Ninomiya <kainino@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Loko Kung <lokokung@google.com> Reviewed-by: Geoff Lang <geofflang@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.