writer/wgsl: Simplify workgroup_size emission

We can just use the top-level EmitExpression() here.

Change-Id: I3ab346525b6d49f6a986abb5d89aa792171c1db3
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/63060
Auto-Submit: James Price <jrprice@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
This commit is contained in:
James Price 2021-09-02 09:49:50 +00:00 committed by Tint LUCI CQ
parent 44a0adf9b4
commit cf57896d52
1 changed files with 2 additions and 12 deletions

View File

@ -651,19 +651,9 @@ bool GeneratorImpl::EmitDecorations(std::ostream& out,
if (i > 0) { if (i > 0) {
out << ", "; out << ", ";
} }
if (auto* ident = values[i]->As<ast::IdentifierExpression>()) { if (!EmitExpression(out, values[i])) {
if (!EmitIdentifier(out, ident)) {
return false; return false;
} }
} else if (auto* scalar =
values[i]->As<ast::ScalarConstructorExpression>()) {
if (!EmitScalarConstructor(out, scalar)) {
return false;
}
} else {
TINT_ICE(Writer, diagnostics_)
<< "Unsupported workgroup_size expression";
}
} }
} }
out << ")"; out << ")";