mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-29 16:35:43 +00:00
Expand the Option argument paradigm to: * Remove the requirement to always pass a 'type' parameter. Type inferencing is the easier, and increasingly common way to declare a variable, so this prevents a whole lot of `nullptr` smell which negatively impacts readability. * Accept attributes directly as arguments, removing the `utils::Vector{ ... }` smell. Rename `ProgramBuilder::VarOptionals` to `VarOptions`, and add equivalent `LetOptions`, `ConstOptions` and `OverrideOptions`. Clean up all the calls to `Var()`, `Let()`, `Const()` and `Override()`: * Use the `Group()` and `Binding()` helpers where possible * Removing `nullptr` type arguments * Replace attribute vectors with the list of attributes. * Remove already-defaulted `ast::StorageClass::kNone` arguments. * Remove already-defaulted `ast::Access::kUndefined` arguments. Finally, remove the `GroupAndBinding()` helper, which only existed because you needed to pass attributes as a vector. Change-Id: I8890e4eb0ffac9f9df2207b28a6f02a163e34d96 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/99580 Reviewed-by: Antonio Maiorano <amaiorano@google.com> Commit-Queue: Ben Clayton <bclayton@chromium.org>