[dawn][native] Allow directly iterating over bindings of one type. The BindGroupLayout reorders bindings and sorts them by type. This means that all buffers have a contiguous range, same for all textures, samplers, etc. Code looking at BGLs can use this to directly iterate over the bindings they are interested in instead of looping over bindings and calling MatchVariant or std::get_if. Introduce the scaffolding to support this kind of iteration and use it to make more robust the places in the code that already assumed that buffers are at the start. Bug: 439565641 Change-Id: I235f6df8ee2f0a3dc3a86ac715b47d0f9028b31c Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/257554 Reviewed-by: Loko Kung <lokokung@google.com> Reviewed-by: Geoff Lang <geofflang@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.