tint/writer/msl: Remove TODO and old logic
crbug.com/tint/1580 has been implemented for some time. Remove the bodge to handle constant value lets. Bug: tint:1580 Change-Id: I9a71ed8f91b6c9925fa0557bcb4c95d90461421f Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/99704 Commit-Queue: Antonio Maiorano <amaiorano@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Ben Clayton <bclayton@google.com> Auto-Submit: Ben Clayton <bclayton@google.com> Reviewed-by: Antonio Maiorano <amaiorano@google.com>
This commit is contained in:
parent
58794ae118
commit
5d7de871b4
|
@ -1764,14 +1764,8 @@ bool GeneratorImpl::EmitLiteral(std::ostream& out, const ast::LiteralExpression*
|
|||
|
||||
bool GeneratorImpl::EmitExpression(std::ostream& out, const ast::Expression* expr) {
|
||||
if (auto* sem = builder_.Sem().Get(expr)) {
|
||||
if (auto* user = sem->As<sem::VariableUser>();
|
||||
!user || !user->Variable()->Declaration()->Is<ast::Let>()) {
|
||||
// Disable constant inlining if the constant expression is from a 'let' declaration.
|
||||
// TODO(crbug.com/tint/1580): Once 'const' is implemented, 'let' will no longer resolve
|
||||
// to a shader-creation time constant value, and this can be removed.
|
||||
if (auto constant = sem->ConstantValue()) {
|
||||
return EmitConstant(out, constant);
|
||||
}
|
||||
if (auto constant = sem->ConstantValue()) {
|
||||
return EmitConstant(out, constant);
|
||||
}
|
||||
}
|
||||
return Switch(
|
||||
|
|
Loading…
Reference in New Issue