From e072465d83662dd12f583ad2b83d0a3fa5c42a08 Mon Sep 17 00:00:00 2001 From: Ben Clayton Date: Thu, 18 Mar 2021 16:44:24 +0000 Subject: [PATCH] Resolver: Handle AccessControl for storage-class propagation Fix msl tests that were impacted by this Change-Id: I00f4280c2f059358d9187babda9e44f2d16b096e Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/45244 Commit-Queue: Ben Clayton Reviewed-by: David Neto --- src/resolver/resolver.cc | 2 +- src/writer/msl/generator_impl_function_test.cc | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/resolver/resolver.cc b/src/resolver/resolver.cc index a412be29ce..5d6b756b61 100644 --- a/src/resolver/resolver.cc +++ b/src/resolver/resolver.cc @@ -1500,7 +1500,7 @@ Resolver::StructInfo* Resolver::Structure(type::Struct* str) { bool Resolver::ApplyStorageClassUsageToType(ast::StorageClass sc, type::Type* ty) { - ty = ty->UnwrapAliasIfNeeded(); + ty = ty->UnwrapIfNeeded(); if (auto* str = ty->As()) { auto* info = Structure(str); diff --git a/src/writer/msl/generator_impl_function_test.cc b/src/writer/msl/generator_impl_function_test.cc index fc8c55d650..8c67520efc 100644 --- a/src/writer/msl/generator_impl_function_test.cc +++ b/src/writer/msl/generator_impl_function_test.cc @@ -275,8 +275,8 @@ TEST_F(MslGeneratorImplTest, using namespace metal; struct Data { - int a; - float b; + /* 0x0000 */ int a; + /* 0x0004 */ float b; }; fragment void frag_main(device Data& coord [[buffer(0)]]) { @@ -319,8 +319,8 @@ TEST_F(MslGeneratorImplTest, using namespace metal; struct Data { - int a; - float b; + /* 0x0000 */ int a; + /* 0x0004 */ float b; }; fragment void frag_main(const device Data& coord [[buffer(0)]]) { @@ -591,8 +591,8 @@ TEST_F(MslGeneratorImplTest, using namespace metal; struct Data { - int a; - float b; + /* 0x0000 */ int a; + /* 0x0004 */ float b; }; float sub_func(device Data& coord, float param) { @@ -650,8 +650,8 @@ TEST_F(MslGeneratorImplTest, using namespace metal; struct Data { - int a; - float b; + /* 0x0000 */ int a; + /* 0x0004 */ float b; }; float sub_func(const device Data& coord, float param) { @@ -794,7 +794,7 @@ TEST_F(MslGeneratorImplTest, using namespace metal; struct Data { - float d; + /* 0x0000 */ float d; }; kernel void a(device Data& data [[buffer(0)]]) {