Replace Type::(Is|As)AccessControl with Castable

Change-Id: I833c92be270236fefd1e77a7a145dede757e93e9
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/34262
Reviewed-by: dan sinclair <dsinclair@chromium.org>
This commit is contained in:
Ben Clayton
2020-11-30 23:30:58 +00:00
parent 69aabb51a9
commit a8d87788da
26 changed files with 248 additions and 246 deletions

View File

@@ -181,7 +181,7 @@ std::vector<ResourceBinding> Inspector::GetUniformBufferResourceBindings(
ast::Variable* var = nullptr;
ast::Function::BindingInfo binding_info;
std::tie(var, binding_info) = ruv;
if (!var->type()->IsAccessControl()) {
if (!var->type()->Is<ast::type::AccessControlType>()) {
continue;
}
auto* unwrapped_type = var->type()->UnwrapIfNeeded();
@@ -303,11 +303,11 @@ std::vector<ResourceBinding> Inspector::GetStorageBufferResourceBindingsImpl(
ast::Variable* var = nullptr;
ast::Function::BindingInfo binding_info;
std::tie(var, binding_info) = rsv;
if (!var->type()->IsAccessControl()) {
if (!var->type()->Is<ast::type::AccessControlType>()) {
continue;
}
auto* ac_type = var->type()->AsAccessControl();
auto* ac_type = var->type()->As<ast::type::AccessControlType>();
if (read_only != ac_type->IsReadOnly()) {
continue;
}