WebGPU Backend: Implement SharedTextureMemory, SharedFence (Metal) Adds starting implementation of SharedTextureMemory, SharedFence in the webgpu backend (when inner backend is Metal). This CL should setup framework and indicates future implementation route for other inner backends. Notes: - Pending Shared Access: Only call wgpu.sharedTextureMemoryAccess in Texture::SynchronizeTextureBeforeUse if there is GPU Access. - Added webgpu::Texture::SynchronizeTextureBeforeUse and PrepareResourcesForSyncScope in webgpu::CommandBuffer to correctly track and sync texture states in frontend. - In metal a GetCommandsScheduledFuture is needed to get a future to wait when EndAccess is called. Since the public WGPUQueue API does not currently expose a way to retrieve a "commands scheduled" future, we do instanceWait on future returned by the inner queue onSubmittedWorkDone to block till the end of access. This is a CPU only wait. Bug: 483147423 Change-Id: I0d248d61c770e6a9fdbaec7ec72e9243d7bd363b Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/292155 Reviewed-by: Loko Kung <lokokung@google.com> Commit-Queue: Shrek Shao <shrekshao@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.