dawn-cmake/generator/templates
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
..
dawn_native Add helper functions to iterate over ChainedStructs 2021-04-22 17:49:42 +00:00
dawn_wire dawn_wire: Move BufferConsumer to it's own file. Unify WIRE_TRY 2021-02-25 20:21:25 +00:00
opengl Refactor OpenGLVersion out of OpenGLFunctions. 2020-11-23 18:50:42 +00:00
.clang-format Add .clang-format files and format more files 2020-07-15 19:51:17 +00:00
dawn_proc.c Add Instance and CreateInstance to webgpu.h 2020-01-10 13:06:48 +00:00
dawn_proc_table.h Reland "Add a per-thread proc table using thread local storage" 2020-10-06 16:13:42 +00:00
dawn_thread_dispatch_proc.cpp Reland "Add a per-thread proc table using thread local storage" 2020-10-06 16:13:42 +00:00
library_webgpu_enum_tables.js Generators for Emscripten 2020-01-28 23:54:38 +00:00
mock_webgpu.cpp Autogenerate all of the wire callback mocks 2020-12-17 17:59:37 +00:00
mock_webgpu.h Autogenerate all of the wire callback mocks 2020-12-17 17:59:37 +00:00
webgpu.h Add ability to generate typedefs from dawn.json 2021-02-08 19:48:06 +00:00
webgpu_cpp.cpp Niceify formatting in webgpu_cpp 2020-07-30 19:02:43 +00:00
webgpu_cpp.h Add ability to generate typedefs from dawn.json 2021-02-08 19:48:06 +00:00
webgpu_struct_info.json Fixes for Emscripten generators 2020-07-15 08:57:49 +00:00