[dawn][native] Make EventManager::SetFutureReady take Ref<TrackedEvent>. - Before, because EventManager::SetFutureReady took a TrackedEvent*, TSAN found that another thread could race on a WaitAny, and as soon as TrackedEvent::SetReadyToComplete was called, the waiting thread could complete the event instead of the thread that called SetFutureReady. Usually, this isn't a problem because the pointer that is passed to the function is backed by a Ref owned by the caller, however, in DeviceLost, part of the Complete function actually nulls out the Ref that the caller is expecting to exist to keep the Event alive. As a result, back in SetFutureReady, where we continue to use the pointer, we can end up using a destroyed TrackedEvent object. - This change ensures that now, an additional reference of the event exists and keeps the pointer alive for the duration of SetFutureReady. Bug: 491515775 Change-Id: I996901da9b3306fe7fbdbbf33afc562f3518f7b1 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/298635 Auto-Submit: Loko Kung <lokokung@google.com> Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@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.