writer/wgsl: Cut dependencies on sem info

There's now one remainin use of the semantic info in the WGSL writer - the transformation of [[offset]] into padded fields.
This does not belong in the WGSL writer, but instead part of the transform::Wgsl sanitizer.

Bug: tint:798
Change-Id: I95ba11f022c41150cc12de84a4085cd7d42019fe
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/50822
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: David Neto <dneto@google.com>
Reviewed-by: James Price <jrprice@google.com>
This commit is contained in:
Ben Clayton
2021-05-13 12:38:12 +00:00
committed by Commit Bot service account
parent 9b1ee6bdea
commit 688fe4477d
8 changed files with 49 additions and 73 deletions

View File

@@ -1042,9 +1042,10 @@ bool FunctionEmitter::EmitEntryPointAsWrapper() {
}
// Create and register the result type.
return_type = create<ast::Struct>(
Source{}, return_struct_sym, return_members, ast::DecorationList{});
parser_impl_.AddConstructedType(return_struct_sym, return_type->As<ast::NamedType>());
return_type = create<ast::Struct>(Source{}, return_struct_sym,
return_members, ast::DecorationList{});
parser_impl_.AddConstructedType(return_struct_sym,
return_type->As<ast::NamedType>());
// Add the return-value statement.
stmts.push_back(create<ast::ReturnStatement>(