Convert the id attribute to expressions.
This CL updates the @id attribute to use expressions instead of
integers.
Bug: tint:1633
Change-Id: I3db9ab39f10a7f50f8d1e418ec508d4e709a24ff
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/106120
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
diff --git a/src/tint/resolver/dependency_graph.cc b/src/tint/resolver/dependency_graph.cc
index 514e0cb..4d67023 100644
--- a/src/tint/resolver/dependency_graph.cc
+++ b/src/tint/resolver/dependency_graph.cc
@@ -427,6 +427,10 @@
TraverseExpression(group->expr);
return true;
},
+ [&](const ast::IdAttribute* id) {
+ TraverseExpression(id->expr);
+ return true;
+ },
[&](const ast::StructMemberAlignAttribute* align) {
TraverseExpression(align->expr);
return true;
@@ -445,10 +449,9 @@
return;
}
- if (attr->IsAnyOf<ast::BuiltinAttribute, ast::IdAttribute, ast::InternalAttribute,
- ast::InterpolateAttribute, ast::InvariantAttribute,
- ast::LocationAttribute, ast::StageAttribute, ast::StrideAttribute,
- ast::StructMemberOffsetAttribute>()) {
+ if (attr->IsAnyOf<ast::BuiltinAttribute, ast::InternalAttribute, ast::InterpolateAttribute,
+ ast::InvariantAttribute, ast::LocationAttribute, ast::StageAttribute,
+ ast::StrideAttribute, ast::StructMemberOffsetAttribute>()) {
return;
}