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

Change-Id: I861aed231604a8bfba1f4cf3659b4863556fc3c4
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/34268
Reviewed-by: dan sinclair <dsinclair@chromium.org>
This commit is contained in:
Ben Clayton
2020-11-30 23:30:58 +00:00
parent 9857f81e94
commit d8457c15f1
32 changed files with 144 additions and 140 deletions

View File

@@ -184,8 +184,8 @@ bool BoundArrayAccessorsTransform::ProcessArrayAccessor(
}
auto* ret_type = expr->array()->result_type()->UnwrapAll();
if (!ret_type->Is<ast::type::ArrayType>() && !ret_type->IsMatrix() &&
!ret_type->IsVector()) {
if (!ret_type->Is<ast::type::ArrayType>() &&
!ret_type->Is<ast::type::MatrixType>() && !ret_type->IsVector()) {
return true;
}
@@ -204,7 +204,7 @@ bool BoundArrayAccessorsTransform::ProcessArrayAccessor(
} else {
// The row accessor would have been an embedded array accessor and already
// handled, so we just need to do columns here.
uint32_t size = ret_type->AsMatrix()->columns();
uint32_t size = ret_type->As<ast::type::MatrixType>()->columns();
if (!ProcessAccessExpression(expr, size)) {
return false;
}