commit | ae9acbdf215860b1474735cd00abffc2ecd79f8f | [log] [tgz] |
---|---|---|
author | Kyle Charbonneau <kylechar@google.com> | Thu Nov 14 17:46:34 2024 +0000 |
committer | Dawn LUCI CQ <dawn-scoped@luci-project-accounts.iam.gserviceaccount.com> | Thu Nov 14 17:46:34 2024 +0000 |
tree | 2dde76ef508915807b44f0e3b44e563d766c74f4 | |
parent | 4e3843e3d51cad247ace0eabf3a35aab90b91fbe [diff] |
Use mutex with DeviceVk deallocation queue DeviceVk::mDescriptorAllocatorsPendingDeallocation can be accessed from an arbitrary thread without holding the device mutex. BindGroup destruction ends up appending values to the queue in Device::EnqueueDeferredDeallocation(). Add a mutex to protect mDescriptorAllocatorsPendingDeallocation against data races. Adding MutexProtected wouldn't work with the existing iteration through the queue. This is because mutex would only be held for the duration of IterateUpTo() function call which builds BeginEnd. BeginEnd holds iterators into the container and if the container is modified while BeginEnd exists those iterators may be invalidated. Instead, add SerialStorage::TakeUpTo() which makes a new container that contains all the elements up to specific serial and removes them from the original container. Bug: 372651189 Change-Id: I125a575e8b2ee632a681685ede744ae57f790bfa Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/214734 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Kyle Charbonneau <kylechar@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.