commit | e33022cfced373e48f5a2bd445ab0d37c88ecb2c | [log] [tgz] |
---|---|---|
author | Kyle Charbonneau <kylechar@google.com> | Thu Nov 14 22:30:05 2024 +0000 |
committer | Dawn LUCI CQ <dawn-scoped@luci-project-accounts.iam.gserviceaccount.com> | Thu Nov 14 22:30:05 2024 +0000 |
tree | 53c1a976f3338b12c35d0423aae4044f7e9ebf23 | |
parent | 7c12a031c1d8341634ce5c890ba5118f5527f4b4 [diff] |
Make monolithic PipelineCache thread safe When vulkan_monolithic_pipeline_cache is enabled there is a single VkPipelineCache+PipelineCache object owned by each device. That PipelineCache can be used by multiple worker threads at the same time so it needs to be thread safe. Change mMonolithicPipelineCache creation so it happens during device initialization. This avoids problems around multiple threads trying to create it lazily. This might decrease the chance of having previous pipeline cache data loaded from disk into BlobCache in time for creation. Also make PipelineCacheBase+PipelineCache more thread safe. Most member variables are already set at creation time and then never modified. mNeedsStore is an exception so use an atomic there. mStoredDataSize is another member variable that is modified after creation but SerializeToBlobImpl() should only be called from a single thread. Bug: 370343334 Change-Id: I1815c0866e24ca40e8544a2948bb814824e611df Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/214736 Reviewed-by: Loko Kung <lokokung@google.com> 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.