commit | 5346e770c94a7e629d3c9769f9e9a6410bae6dff | [log] [tgz] |
---|---|---|
author | Brian Ho <hob@chromium.org> | Thu Apr 22 17:49:42 2021 +0000 |
committer | Commit Bot service account <commit-bot@chromium.org> | Thu Apr 22 17:49:42 2021 +0000 |
tree | 93da280c802fd05a48692ac7cf883863b03a8914 | |
parent | b48d1f4b3de38211d352b5ce0d7dcd2aecdce6e7 [diff] |
Add helper functions to iterate over ChainedStructs This CL adds two helpers for more ergonomic processing of ChainedStructs. 1. FindInChain(): Iterates through the chain and automatically casts the ChainedStruct into the appropriate child type before returning. 2. ValidateSTypes(): Verifies that the chain only contains structs with sTypes from a pre-defined set. This also allows the caller to specify one-of constraints. 3. ValidateSingleSType(): Verifies that the chain contains a single struct with a specific sType or is an empty chain. This is a common case of |ValidateSTypes()| and is separated out as a fast-path. Change-Id: I938df0bf2a9b1800b1105fb7f80fbde20bef8ec8 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47680 Commit-Queue: Brian Ho <hob@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Dawn is an open-source and cross-platform implementation of the work-in-progress 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)
(TODO)
Apache 2.0 Public License, please see LICENSE.
This is not an officially supported Google product.