Resolver: Validate resource binding decorations

Validate that:
* That resource variables have resource bindings
* Only resource variables have resource bindings
* That a [[binding]] decoration is paired with a [[group]]
* That binding points are not reused in the same entry point

Fixed: tint:235
Fixed: tint:645
Bug: tint:645
Change-Id: I2542934b4c6a2b4bbde48242932c04c796033a90
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/50500
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: David Neto <dneto@google.com>
This commit is contained in:
Ben Clayton
2021-05-10 19:16:46 +00:00
committed by Commit Bot service account
parent 6ba446fa5e
commit 3f968e7b05
26 changed files with 730 additions and 229 deletions

View File

@@ -381,7 +381,7 @@ class InspectorHelper : public ProgramBuilder {
}
void AddGlobalVariable(const std::string& name, ast::Type* type) {
Global(name, type, ast::StorageClass::kUniformConstant);
Global(name, type, ast::StorageClass::kPrivate);
}
/// Adds a depth texture variable to the program