Remove ast::AccessControl::kInvalid

Also spruce up texture validation tests so that they validate error
messages.

Bug: tint:805
Change-Id: I6c86fc16014b127a7ef8254e5badf9b5bed08623
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/51860
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
This commit is contained in:
Antonio Maiorano
2021-05-21 14:32:38 +00:00
committed by Tint LUCI CQ
parent ee0b69ce53
commit 6cf7f2eca5
12 changed files with 162 additions and 139 deletions

View File

@@ -364,7 +364,7 @@ ast::Type* MaybeCreateASTAccessControl(CloneContext* ctx,
const sem::VariableUser* var_user,
ast::Type* ty) {
if (var_user &&
var_user->Variable()->AccessControl() != ast::AccessControl::kInvalid) {
var_user->Variable()->StorageClass() == ast::StorageClass::kStorage) {
return ctx->dst->create<ast::AccessControl>(
var_user->Variable()->AccessControl(), ty);
}