Reland "[dawn][native] Some cleanup of DeviceLostEvent code." This is a reland of commit a2bc4fa3d9a37ff02bef22ab81a42d7cd7c34bc2 Original change's description: > [dawn][native] Some cleanup of DeviceLostEvent code. > > - Uses the refcount payload in RefCountedWithExternalCount to track > whether an external ref count exists. Note that we are using a > "ForTesting" function to implement the check of the count even > though this is not for testing. We are special casing this because > it is a valid check for the external ref count. This is needed to > explicitly handle the spec behavior that the device lost event > should pass nullptr for the device when the last external > reference has been dropped. > - Makes APIGetLostFuture use cached future id when possible. > - Moves the device lost related members in Device to private since > the mock isn't actually using the alternative constructor anymore. > Also removes said constructor. > - Finally, defer cleanup of the callback infos to the completion of > the device lost callback instead of having it called in two > different places, the callback and in > DeviceBase::WillDropLastExternalRef. > > Change-Id: I31b57391438c0782ba223884a72991ca77426bec > Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/299539 > Commit-Queue: Loko Kung <lokokung@google.com> > Reviewed-by: Kai Ninomiya <kainino@chromium.org> Change-Id: I32944d1e762bf425531c5b989c9757dde2a7df1d Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/301036 Commit-Queue: Loko Kung <lokokung@google.com> Reviewed-by: Kai Ninomiya <kainino@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.