[dawn][native] Fixes TSAN issues with Device::mState. - Make mState an atomic so that when running without implicit synchronization, even though there may be a race, we don't trigger TSAN errors. - When running with implicit synchronization, take the DeviceGuard earlier in async Pipeline callbacks. Before, we couldn't take the DeviceGuard earlier because it could potentially cause us to take the lock more than once as a result of re-entrant callbacks, but now that the device lock is recursive this is no longer an issue, and taking the lock before checking the device state is possible and more correct. Bug: 445324864 Change-Id: I9bfe84c5a287e03437698bdee080435799e08363 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/263140 Commit-Queue: Loko Kung <lokokung@google.com> Reviewed-by: Kai Ninomiya <kainino@chromium.org> Auto-Submit: 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.