commit | 1ac84c800aa8d5f2d89154ef6960b7ce40e80392 | [log] [tgz] |
---|---|---|
author | Corentin Wallez <cwallez@chromium.org> | Wed Sep 03 09:15:31 2025 -0700 |
committer | Dawn LUCI CQ <dawn-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed Sep 03 09:15:31 2025 -0700 |
tree | f5f9fcb5446f59ddf72fb4803c1fbebb720ff506 | |
parent | 2ea3b76dff86887d82258a25e2c59d4ff7d2906b [diff] |
[dawn][native] Update typeId metadata for dynamic binding arrays. This metadata is used inside shaders to know what to return for hasBinding<T>(resource_binding, iu32) for the various kinds of T. This CL adds all the mechanisms to track and update the typeIds but only makes the difference between "empty" and "texture_2d<f32>". - In Textures, add a map of all the (DynamicArrayState, slot) they are referenced in, and maintain it as DynamicArrayStates are created and destroyed. (this map contains WeakRefs to the DynamicArrayState to break what would otherwise be a ref cycle), - Add support for Hash to WeakRef for the above map. - Notify the DynamicArrayState on texture.Pin/Unpin so that it can track the "pinned" status of each slot. - In DynamicArrayState maintain the tint::ResourceType for each slot and return a list of updates to the metadata that backends must perform before using the dynamic binding array. - In the Vulkan backend, implement this update of the binding array metadata. - Fix an issue in Vulkan where setting a destroyed texture in the dynamic binding array at creation, would cause a VK_NULL_HANDLE to be written in vkWriteDescriptorSets, which is invalid. - Add a bunch of tests that hasBinding works correctly to exercise the newly added code paths. Bug: 435317394 Change-Id: Ie5a4568f033cb3f8d0d7dac29a9575514564a32e Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/259875 Reviewed-by: dan sinclair <dsinclair@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Auto-Submit: Corentin Wallez <cwallez@chromium.org> Commit-Queue: 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.