ast::AccessControl: Remove 'Only' suffix from enums

As requested in:
https://dawn-review.googlesource.com/c/tint/+/52503/1..3/src/intrinsics.def#38

Bug: tint:832
Change-Id: I88881d0654305cdbc6c05256e227a3b048fbff29
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/52640
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: David Neto <dneto@google.com>
This commit is contained in:
Ben Clayton
2021-05-31 19:40:30 +00:00
committed by Tint LUCI CQ
parent 3264765bc2
commit 646f4a9958
37 changed files with 173 additions and 179 deletions

View File

@@ -641,7 +641,7 @@ std::vector<ResourceBinding> Inspector::GetStorageBufferResourceBindingsImpl(
auto* var = rsv.first;
auto binding_info = rsv.second;
if (read_only != (var->AccessControl() == ast::AccessControl::kReadOnly)) {
if (read_only != (var->AccessControl() == ast::AccessControl::kRead)) {
continue;
}
@@ -724,7 +724,7 @@ std::vector<ResourceBinding> Inspector::GetStorageTextureResourceBindingsImpl(
auto* texture_type = var->Type()->UnwrapRef()->As<sem::StorageTexture>();
if (read_only !=
(texture_type->access_control() == ast::AccessControl::kReadOnly)) {
(texture_type->access_control() == ast::AccessControl::kRead)) {
continue;
}

View File

@@ -256,7 +256,7 @@ class InspectorHelper : public ProgramBuilder {
std::vector<ast::Type*> member_types) {
MakeStructType(name, member_types, true);
return [this, name] {
return ty.access(ast::AccessControl::kReadOnly, ty.type_name(name));
return ty.access(ast::AccessControl::kRead, ty.type_name(name));
};
}
@@ -575,8 +575,8 @@ class InspectorHelper : public ProgramBuilder {
ast::Type* MakeStorageTextureTypes(ast::TextureDimension dim,
ast::ImageFormat format,
bool read_only) {
auto ac = read_only ? ast::AccessControl::kReadOnly
: ast::AccessControl::kWriteOnly;
auto ac =
read_only ? ast::AccessControl::kRead : ast::AccessControl::kWrite;
auto* tex = ty.storage_texture(dim, format);
return ty.access(ac, tex);