Add Symbol to struct type.

This CL adds a Symbol to the struct type along side the name. The name
will be removed in a future CL when the symbol is used everywhere.

Change-Id: I6c355908651ba0a155a1e0c9ed1192313a405568
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/35620
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Auto-Submit: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
This commit is contained in:
dan sinclair
2020-12-14 16:01:37 +00:00
committed by Commit Bot service account
parent 2abecbba16
commit 24bbbbb25f
35 changed files with 201 additions and 166 deletions

View File

@@ -224,7 +224,7 @@ ast::Variable* FirstIndexOffset::AddUniformBuffer(ast::Module* mod) {
decos.push_back(mod->create<ast::StructBlockDecoration>(Source{}));
auto* struct_type = mod->create<ast::type::Struct>(
kStructName,
mod->RegisterSymbol(kStructName), kStructName,
mod->create<ast::Struct>(Source{}, std::move(members), std::move(decos)));
auto* idx_var = mod->create<ast::Variable>(

View File

@@ -264,7 +264,7 @@ void VertexPulling::State::AddVertexStorageBuffers() {
decos.push_back(mod->create<ast::StructBlockDecoration>(Source{}));
auto* struct_type = mod->create<ast::type::Struct>(
kStructName,
mod->RegisterSymbol(kStructName), kStructName,
mod->create<ast::Struct>(Source{}, std::move(members), std::move(decos)));
for (uint32_t i = 0; i < cfg.vertex_state.size(); ++i) {