dawn-cmake/generator
Brian Ho 5346e770c9 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>
2021-04-22 17:49:42 +00:00
..
templates Add helper functions to iterate over ChainedStructs 2021-04-22 17:49:42 +00:00
BUILD.gn Add .clang-format files and format more files 2020-07-15 19:51:17 +00:00
CMakeLists.txt CMakeLists: make DAWN_THIRD_PARTY_DIR an option. 2020-10-20 14:26:10 +00:00
dawn_generator.gni BUILD.gn: Delete stale generated files in Dawn's gen dir. 2019-09-19 23:30:42 +00:00
dawn_json_generator.py Add helper functions to iterate over ChainedStructs 2021-04-22 17:49:42 +00:00
extract_json.py Avoid unnecessary recompiles with code generators. 2021-03-23 19:06:02 +00:00
generator_lib.gni Add .clang-format files and format more files 2020-07-15 19:51:17 +00:00
generator_lib.py Skip None paths when looking for modules 2020-10-20 14:46:10 +00:00
opengl_loader_generator.py Add .clang-format files and format more files 2020-07-15 19:51:17 +00:00
remove_files.py Add .clang-format files and format more files 2020-07-15 19:51:17 +00:00