[metal] Implement commands scheduled future We need a thread-safe way to call waitUntilScheduled for a Dawn device for DrDC + Graphite on Mac. The existing WaitForCommandsToBeScheduled() method isn't thread-safe if the implicit_device_synchronization feature is not enabled for the Dawn device e.g. for WebGPU. This CL adds a `SharedTextureMemoryMetalEndAccessState` extension struct that contains a `commandsScheduledFuture`. This future is ready when the Metal command buffer submitted on `EndAccess` is in scheduled state. This future can be waited on any thread with wgpu::Instance::WaitAny. Bug: chromium:444702048 Change-Id: Icd97c05d6274d5cf9f607a0019e1d9ec6a6a6964 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/265038 Reviewed-by: Loko Kung <lokokung@google.com> Commit-Queue: Sunny Sachanandani <sunnyps@chromium.org> Auto-Submit: Sunny Sachanandani <sunnyps@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.