mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-10 05:57:51 +00:00
ast: Have all decorations derive from base class
This is the first step in unifying the way decorations are parsed - i.e. instead of parsing decorations in different ways based on the predicted grammar that follows, we can parse decorations blocks in a unified way, then later verify what we have is as expected. `StructDecoration` has been transformed from an `enum class` to a proper class so it can derive from `Decoration`. Bug: tint:282 Bug: tint:291 Change-Id: Iaf12d266068d03edf695acdf2cd21e6cc3ea8eb3 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/31663 Reviewed-by: dan sinclair <dsinclair@chromium.org> Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
committed by
Commit Bot service account
parent
4735f01193
commit
35298800a6
@@ -25,6 +25,7 @@
|
||||
#include "src/ast/scalar_constructor_expression.h"
|
||||
#include "src/ast/stride_decoration.h"
|
||||
#include "src/ast/struct.h"
|
||||
#include "src/ast/struct_block_decoration.h"
|
||||
#include "src/ast/struct_decoration.h"
|
||||
#include "src/ast/struct_member.h"
|
||||
#include "src/ast/struct_member_offset_decoration.h"
|
||||
@@ -234,7 +235,7 @@ void VertexPullingTransform::AddVertexStorageBuffers() {
|
||||
kStructBufferName, internal_array_type, std::move(member_dec)));
|
||||
|
||||
ast::StructDecorationList decos;
|
||||
decos.push_back(ast::StructDecoration::kBlock);
|
||||
decos.push_back(std::make_unique<ast::StructBlockDecoration>());
|
||||
|
||||
auto* struct_type =
|
||||
ctx_->type_mgr().Get(std::make_unique<ast::type::StructType>(
|
||||
|
||||
Reference in New Issue
Block a user