tint: Rename kInvalid to kUndefined for enums

This is a more neutral term for an unassigned enum value.

Change-Id: Ic69d912472f26fd8a2c8348281b27edfcc145eab
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/105480
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
This commit is contained in:
Ben Clayton
2022-10-12 18:49:15 +00:00
committed by Dawn LUCI CQ
parent 78c839be97
commit d2e0db3af2
53 changed files with 338 additions and 329 deletions

View File

@@ -182,7 +182,7 @@ ast::Extension Builtin::RequiredExtension() const {
if (IsDP4a()) {
return ast::Extension::kChromiumExperimentalDp4A;
}
return ast::Extension::kInvalid;
return ast::Extension::kUndefined;
}
} // namespace tint::sem

View File

@@ -25,7 +25,7 @@ namespace tint::sem {
Pointer::Pointer(const Type* subtype, ast::AddressSpace address_space, ast::Access access)
: subtype_(subtype), address_space_(address_space), access_(access) {
TINT_ASSERT(Semantic, !subtype->Is<Reference>());
TINT_ASSERT(Semantic, access != ast::Access::kInvalid);
TINT_ASSERT(Semantic, access != ast::Access::kUndefined);
}
size_t Pointer::Hash() const {

View File

@@ -24,7 +24,7 @@ namespace tint::sem {
Reference::Reference(const Type* subtype, ast::AddressSpace address_space, ast::Access access)
: subtype_(subtype), address_space_(address_space), access_(access) {
TINT_ASSERT(Semantic, !subtype->Is<Reference>());
TINT_ASSERT(Semantic, access != ast::Access::kInvalid);
TINT_ASSERT(Semantic, access != ast::Access::kUndefined);
}
size_t Reference::Hash() const {

View File

@@ -75,7 +75,7 @@ sem::Type* StorageTexture::SubtypeFor(ast::TexelFormat format, sem::TypeManager&
return type_mgr.Get<sem::F32>();
}
case ast::TexelFormat::kInvalid:
case ast::TexelFormat::kUndefined:
break;
}