[msl] Add polyfill for textureDimensions()

Adds MSL member function definitions for get_width(), get_height(),
and get_depth().

Bug: 42251016
Change-Id: I05287fde1e07bff324904d0cf3d9f84bc9d533a8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/192780
Reviewed-by: dan sinclair <dsinclair@chromium.org>
diff --git a/src/tint/lang/msl/builtin_fn.cc b/src/tint/lang/msl/builtin_fn.cc
index 46b324c..a8c4604 100644
--- a/src/tint/lang/msl/builtin_fn.cc
+++ b/src/tint/lang/msl/builtin_fn.cc
@@ -64,6 +64,12 @@
             return "atomic_load_explicit";
         case BuiltinFn::kAtomicStoreExplicit:
             return "atomic_store_explicit";
+        case BuiltinFn::kGetWidth:
+            return "get_width";
+        case BuiltinFn::kGetHeight:
+            return "get_height";
+        case BuiltinFn::kGetDepth:
+            return "get_depth";
         case BuiltinFn::kSample:
             return "sample";
         case BuiltinFn::kThreadgroupBarrier:
diff --git a/src/tint/lang/msl/builtin_fn.h b/src/tint/lang/msl/builtin_fn.h
index 17703bf..e2dc320 100644
--- a/src/tint/lang/msl/builtin_fn.h
+++ b/src/tint/lang/msl/builtin_fn.h
@@ -58,6 +58,9 @@
     kAtomicFetchXorExplicit,
     kAtomicLoadExplicit,
     kAtomicStoreExplicit,
+    kGetWidth,
+    kGetHeight,
+    kGetDepth,
     kSample,
     kThreadgroupBarrier,
     kNone,
diff --git a/src/tint/lang/msl/intrinsic/data.cc b/src/tint/lang/msl/intrinsic/data.cc
index c3afbb3..3303b49 100644
--- a/src/tint/lang/msl/intrinsic/data.cc
+++ b/src/tint/lang/msl/intrinsic/data.cc
@@ -432,6 +432,144 @@
 };
 
 
+/// TypeMatcher for 'type texture_depth_multisampled_2d'
+constexpr TypeMatcher kTextureDepthMultisampled2DMatcher {
+/* match */ [](MatchState& state, const Type* ty) -> const Type* {
+    if (!MatchTextureDepthMultisampled2D(state, ty)) {
+      return nullptr;
+    }
+    return BuildTextureDepthMultisampled2D(state, ty);
+  },
+/* print */ []([[maybe_unused]] MatchState* state, StyledText& out) {
+    out << style::Type("texture_depth_multisampled_2d");
+  }
+};
+
+
+/// TypeMatcher for 'type texture_multisampled_2d'
+constexpr TypeMatcher kTextureMultisampled2DMatcher {
+/* match */ [](MatchState& state, const Type* ty) -> const Type* {
+  const Type* T = nullptr;
+    if (!MatchTextureMultisampled2D(state, ty, T)) {
+      return nullptr;
+    }
+    T = state.Type(T);
+    if (T == nullptr) {
+      return nullptr;
+    }
+    return BuildTextureMultisampled2D(state, ty, T);
+  },
+/* print */ []([[maybe_unused]] MatchState* state, StyledText& out) {StyledText T;
+  state->PrintType(T);
+    out << style::Type("texture_multisampled_2d", "<", T, ">");
+  }
+};
+
+
+/// TypeMatcher for 'type texture_storage_1d'
+constexpr TypeMatcher kTextureStorage1DMatcher {
+/* match */ [](MatchState& state, const Type* ty) -> const Type* {
+  Number F = Number::invalid;
+  Number A = Number::invalid;
+    if (!MatchTextureStorage1D(state, ty, F, A)) {
+      return nullptr;
+    }
+    F = state.Num(F);
+    if (!F.IsValid()) {
+      return nullptr;
+    }
+    A = state.Num(A);
+    if (!A.IsValid()) {
+      return nullptr;
+    }
+    return BuildTextureStorage1D(state, ty, F, A);
+  },
+/* print */ []([[maybe_unused]] MatchState* state, StyledText& out) {StyledText F;
+  state->PrintNum(F);StyledText A;
+  state->PrintNum(A);
+    out << style::Type("texture_storage_1d", "<", F, ", ", A, ">");
+  }
+};
+
+
+/// TypeMatcher for 'type texture_storage_2d'
+constexpr TypeMatcher kTextureStorage2DMatcher {
+/* match */ [](MatchState& state, const Type* ty) -> const Type* {
+  Number F = Number::invalid;
+  Number A = Number::invalid;
+    if (!MatchTextureStorage2D(state, ty, F, A)) {
+      return nullptr;
+    }
+    F = state.Num(F);
+    if (!F.IsValid()) {
+      return nullptr;
+    }
+    A = state.Num(A);
+    if (!A.IsValid()) {
+      return nullptr;
+    }
+    return BuildTextureStorage2D(state, ty, F, A);
+  },
+/* print */ []([[maybe_unused]] MatchState* state, StyledText& out) {StyledText F;
+  state->PrintNum(F);StyledText A;
+  state->PrintNum(A);
+    out << style::Type("texture_storage_2d", "<", F, ", ", A, ">");
+  }
+};
+
+
+/// TypeMatcher for 'type texture_storage_2d_array'
+constexpr TypeMatcher kTextureStorage2DArrayMatcher {
+/* match */ [](MatchState& state, const Type* ty) -> const Type* {
+  Number F = Number::invalid;
+  Number A = Number::invalid;
+    if (!MatchTextureStorage2DArray(state, ty, F, A)) {
+      return nullptr;
+    }
+    F = state.Num(F);
+    if (!F.IsValid()) {
+      return nullptr;
+    }
+    A = state.Num(A);
+    if (!A.IsValid()) {
+      return nullptr;
+    }
+    return BuildTextureStorage2DArray(state, ty, F, A);
+  },
+/* print */ []([[maybe_unused]] MatchState* state, StyledText& out) {StyledText F;
+  state->PrintNum(F);StyledText A;
+  state->PrintNum(A);
+    out << style::Type("texture_storage_2d_array", "<", F, ", ", A, ">");
+  }
+};
+
+
+/// TypeMatcher for 'type texture_storage_3d'
+constexpr TypeMatcher kTextureStorage3DMatcher {
+/* match */ [](MatchState& state, const Type* ty) -> const Type* {
+  Number F = Number::invalid;
+  Number A = Number::invalid;
+    if (!MatchTextureStorage3D(state, ty, F, A)) {
+      return nullptr;
+    }
+    F = state.Num(F);
+    if (!F.IsValid()) {
+      return nullptr;
+    }
+    A = state.Num(A);
+    if (!A.IsValid()) {
+      return nullptr;
+    }
+    return BuildTextureStorage3D(state, ty, F, A);
+  },
+/* print */ []([[maybe_unused]] MatchState* state, StyledText& out) {StyledText F;
+  state->PrintNum(F);StyledText A;
+  state->PrintNum(A);
+    out << style::Type("texture_storage_3d", "<", F, ", ", A, ">");
+  }
+};
+
+
 /// TypeMatcher for 'match iu32'
 constexpr TypeMatcher kIu32Matcher {
 /* match */ [](MatchState& state, const Type* ty) -> const Type* {
@@ -449,6 +587,26 @@
  kI32Matcher.print(nullptr, out); out << style::Plain(" or "); kU32Matcher.print(nullptr, out);}
 };
 
+/// TypeMatcher for 'match fiu32'
+constexpr TypeMatcher kFiu32Matcher {
+/* match */ [](MatchState& state, const Type* ty) -> const Type* {
+    if (MatchF32(state, ty)) {
+      return BuildF32(state, ty);
+    }
+    if (MatchI32(state, ty)) {
+      return BuildI32(state, ty);
+    }
+    if (MatchU32(state, ty)) {
+      return BuildU32(state, ty);
+    }
+    return nullptr;
+  },
+/* print */ [](MatchState*, StyledText& out) {
+    // Note: We pass nullptr to the Matcher.print() functions, as matchers do not support
+    // template arguments, nor can they match sub-types. As such, they have no use for the MatchState.
+ kF32Matcher.print(nullptr, out); out << style::Plain(", "); kI32Matcher.print(nullptr, out); out << style::Plain(" or "); kU32Matcher.print(nullptr, out);}
+};
+
 /// EnumMatcher for 'match read_write'
 constexpr NumberMatcher kReadWriteMatcher {
 /* match */ [](MatchState&, Number number) -> Number {
@@ -517,7 +675,14 @@
   /* [19] */ kTextureDepth2DArrayMatcher,
   /* [20] */ kTextureDepthCubeMatcher,
   /* [21] */ kTextureDepthCubeArrayMatcher,
-  /* [22] */ kIu32Matcher,
+  /* [22] */ kTextureDepthMultisampled2DMatcher,
+  /* [23] */ kTextureMultisampled2DMatcher,
+  /* [24] */ kTextureStorage1DMatcher,
+  /* [25] */ kTextureStorage2DMatcher,
+  /* [26] */ kTextureStorage2DArrayMatcher,
+  /* [27] */ kTextureStorage3DMatcher,
+  /* [28] */ kIu32Matcher,
+  /* [29] */ kFiu32Matcher,
 };
 
 /// The template numbers, and number matchers
@@ -539,35 +704,63 @@
   /* [6] */ MatcherIndex(3),
   /* [7] */ MatcherIndex(0),
   /* [8] */ MatcherIndex(2),
-  /* [9] */ MatcherIndex(8),
-  /* [10] */ MatcherIndex(5),
-  /* [11] */ MatcherIndex(12),
-  /* [12] */ MatcherIndex(5),
-  /* [13] */ MatcherIndex(13),
-  /* [14] */ MatcherIndex(5),
-  /* [15] */ MatcherIndex(6),
-  /* [16] */ MatcherIndex(5),
-  /* [17] */ MatcherIndex(6),
-  /* [18] */ MatcherIndex(3),
-  /* [19] */ MatcherIndex(14),
-  /* [20] */ MatcherIndex(5),
-  /* [21] */ MatcherIndex(15),
-  /* [22] */ MatcherIndex(5),
-  /* [23] */ MatcherIndex(7),
-  /* [24] */ MatcherIndex(5),
-  /* [25] */ MatcherIndex(7),
-  /* [26] */ MatcherIndex(3),
-  /* [27] */ MatcherIndex(16),
-  /* [28] */ MatcherIndex(5),
-  /* [29] */ MatcherIndex(17),
-  /* [30] */ MatcherIndex(5),
-  /* [31] */ MatcherIndex(22),
-  /* [32] */ MatcherIndex(4),
-  /* [33] */ MatcherIndex(11),
-  /* [34] */ MatcherIndex(18),
-  /* [35] */ MatcherIndex(19),
-  /* [36] */ MatcherIndex(20),
-  /* [37] */ MatcherIndex(21),
+  /* [9] */ MatcherIndex(24),
+  /* [10] */ MatcherIndex(0),
+  /* [11] */ MatcherIndex(1),
+  /* [12] */ MatcherIndex(25),
+  /* [13] */ MatcherIndex(0),
+  /* [14] */ MatcherIndex(1),
+  /* [15] */ MatcherIndex(26),
+  /* [16] */ MatcherIndex(0),
+  /* [17] */ MatcherIndex(1),
+  /* [18] */ MatcherIndex(27),
+  /* [19] */ MatcherIndex(0),
+  /* [20] */ MatcherIndex(1),
+  /* [21] */ MatcherIndex(12),
+  /* [22] */ MatcherIndex(0),
+  /* [23] */ MatcherIndex(13),
+  /* [24] */ MatcherIndex(0),
+  /* [25] */ MatcherIndex(14),
+  /* [26] */ MatcherIndex(0),
+  /* [27] */ MatcherIndex(15),
+  /* [28] */ MatcherIndex(0),
+  /* [29] */ MatcherIndex(16),
+  /* [30] */ MatcherIndex(0),
+  /* [31] */ MatcherIndex(17),
+  /* [32] */ MatcherIndex(0),
+  /* [33] */ MatcherIndex(23),
+  /* [34] */ MatcherIndex(0),
+  /* [35] */ MatcherIndex(8),
+  /* [36] */ MatcherIndex(5),
+  /* [37] */ MatcherIndex(12),
+  /* [38] */ MatcherIndex(5),
+  /* [39] */ MatcherIndex(13),
+  /* [40] */ MatcherIndex(5),
+  /* [41] */ MatcherIndex(6),
+  /* [42] */ MatcherIndex(5),
+  /* [43] */ MatcherIndex(6),
+  /* [44] */ MatcherIndex(3),
+  /* [45] */ MatcherIndex(14),
+  /* [46] */ MatcherIndex(5),
+  /* [47] */ MatcherIndex(15),
+  /* [48] */ MatcherIndex(5),
+  /* [49] */ MatcherIndex(7),
+  /* [50] */ MatcherIndex(5),
+  /* [51] */ MatcherIndex(7),
+  /* [52] */ MatcherIndex(3),
+  /* [53] */ MatcherIndex(16),
+  /* [54] */ MatcherIndex(5),
+  /* [55] */ MatcherIndex(17),
+  /* [56] */ MatcherIndex(5),
+  /* [57] */ MatcherIndex(28),
+  /* [58] */ MatcherIndex(4),
+  /* [59] */ MatcherIndex(29),
+  /* [60] */ MatcherIndex(18),
+  /* [61] */ MatcherIndex(19),
+  /* [62] */ MatcherIndex(20),
+  /* [63] */ MatcherIndex(21),
+  /* [64] */ MatcherIndex(22),
+  /* [65] */ MatcherIndex(11),
 };
 
 static_assert(MatcherIndicesIndex::CanIndex(kMatcherIndices),
@@ -592,27 +785,27 @@
   {
     /* [3] */
     /* usage */ core::ParameterUsage::kNone,
-    /* matcher_indices */ MatcherIndicesIndex(32),
+    /* matcher_indices */ MatcherIndicesIndex(58),
   },
   {
     /* [4] */
     /* usage */ core::ParameterUsage::kNone,
-    /* matcher_indices */ MatcherIndicesIndex(32),
+    /* matcher_indices */ MatcherIndicesIndex(58),
   },
   {
     /* [5] */
     /* usage */ core::ParameterUsage::kTexture,
-    /* matcher_indices */ MatcherIndicesIndex(19),
+    /* matcher_indices */ MatcherIndicesIndex(45),
   },
   {
     /* [6] */
     /* usage */ core::ParameterUsage::kSampler,
-    /* matcher_indices */ MatcherIndicesIndex(33),
+    /* matcher_indices */ MatcherIndicesIndex(65),
   },
   {
     /* [7] */
     /* usage */ core::ParameterUsage::kCoords,
-    /* matcher_indices */ MatcherIndicesIndex(15),
+    /* matcher_indices */ MatcherIndicesIndex(41),
   },
   {
     /* [8] */
@@ -622,22 +815,22 @@
   {
     /* [9] */
     /* usage */ core::ParameterUsage::kOffset,
-    /* matcher_indices */ MatcherIndicesIndex(17),
+    /* matcher_indices */ MatcherIndicesIndex(43),
   },
   {
     /* [10] */
     /* usage */ core::ParameterUsage::kTexture,
-    /* matcher_indices */ MatcherIndicesIndex(35),
+    /* matcher_indices */ MatcherIndicesIndex(61),
   },
   {
     /* [11] */
     /* usage */ core::ParameterUsage::kSampler,
-    /* matcher_indices */ MatcherIndicesIndex(33),
+    /* matcher_indices */ MatcherIndicesIndex(65),
   },
   {
     /* [12] */
     /* usage */ core::ParameterUsage::kCoords,
-    /* matcher_indices */ MatcherIndicesIndex(15),
+    /* matcher_indices */ MatcherIndicesIndex(41),
   },
   {
     /* [13] */
@@ -647,62 +840,62 @@
   {
     /* [14] */
     /* usage */ core::ParameterUsage::kOffset,
-    /* matcher_indices */ MatcherIndicesIndex(17),
+    /* matcher_indices */ MatcherIndicesIndex(43),
   },
   {
     /* [15] */
     /* usage */ core::ParameterUsage::kTexture,
-    /* matcher_indices */ MatcherIndicesIndex(13),
+    /* matcher_indices */ MatcherIndicesIndex(39),
   },
   {
     /* [16] */
     /* usage */ core::ParameterUsage::kSampler,
-    /* matcher_indices */ MatcherIndicesIndex(33),
+    /* matcher_indices */ MatcherIndicesIndex(65),
   },
   {
     /* [17] */
     /* usage */ core::ParameterUsage::kCoords,
-    /* matcher_indices */ MatcherIndicesIndex(15),
+    /* matcher_indices */ MatcherIndicesIndex(41),
   },
   {
     /* [18] */
     /* usage */ core::ParameterUsage::kOffset,
-    /* matcher_indices */ MatcherIndicesIndex(17),
+    /* matcher_indices */ MatcherIndicesIndex(43),
   },
   {
     /* [19] */
     /* usage */ core::ParameterUsage::kTexture,
-    /* matcher_indices */ MatcherIndicesIndex(21),
+    /* matcher_indices */ MatcherIndicesIndex(47),
   },
   {
     /* [20] */
     /* usage */ core::ParameterUsage::kSampler,
-    /* matcher_indices */ MatcherIndicesIndex(33),
+    /* matcher_indices */ MatcherIndicesIndex(65),
   },
   {
     /* [21] */
     /* usage */ core::ParameterUsage::kCoords,
-    /* matcher_indices */ MatcherIndicesIndex(23),
+    /* matcher_indices */ MatcherIndicesIndex(49),
   },
   {
     /* [22] */
     /* usage */ core::ParameterUsage::kOffset,
-    /* matcher_indices */ MatcherIndicesIndex(25),
+    /* matcher_indices */ MatcherIndicesIndex(51),
   },
   {
     /* [23] */
     /* usage */ core::ParameterUsage::kTexture,
-    /* matcher_indices */ MatcherIndicesIndex(29),
+    /* matcher_indices */ MatcherIndicesIndex(55),
   },
   {
     /* [24] */
     /* usage */ core::ParameterUsage::kSampler,
-    /* matcher_indices */ MatcherIndicesIndex(33),
+    /* matcher_indices */ MatcherIndicesIndex(65),
   },
   {
     /* [25] */
     /* usage */ core::ParameterUsage::kCoords,
-    /* matcher_indices */ MatcherIndicesIndex(23),
+    /* matcher_indices */ MatcherIndicesIndex(49),
   },
   {
     /* [26] */
@@ -712,37 +905,37 @@
   {
     /* [27] */
     /* usage */ core::ParameterUsage::kTexture,
-    /* matcher_indices */ MatcherIndicesIndex(34),
+    /* matcher_indices */ MatcherIndicesIndex(60),
   },
   {
     /* [28] */
     /* usage */ core::ParameterUsage::kSampler,
-    /* matcher_indices */ MatcherIndicesIndex(33),
+    /* matcher_indices */ MatcherIndicesIndex(65),
   },
   {
     /* [29] */
     /* usage */ core::ParameterUsage::kCoords,
-    /* matcher_indices */ MatcherIndicesIndex(15),
+    /* matcher_indices */ MatcherIndicesIndex(41),
   },
   {
     /* [30] */
     /* usage */ core::ParameterUsage::kOffset,
-    /* matcher_indices */ MatcherIndicesIndex(17),
+    /* matcher_indices */ MatcherIndicesIndex(43),
   },
   {
     /* [31] */
     /* usage */ core::ParameterUsage::kTexture,
-    /* matcher_indices */ MatcherIndicesIndex(37),
+    /* matcher_indices */ MatcherIndicesIndex(63),
   },
   {
     /* [32] */
     /* usage */ core::ParameterUsage::kSampler,
-    /* matcher_indices */ MatcherIndicesIndex(33),
+    /* matcher_indices */ MatcherIndicesIndex(65),
   },
   {
     /* [33] */
     /* usage */ core::ParameterUsage::kCoords,
-    /* matcher_indices */ MatcherIndicesIndex(23),
+    /* matcher_indices */ MatcherIndicesIndex(49),
   },
   {
     /* [34] */
@@ -762,52 +955,52 @@
   {
     /* [37] */
     /* usage */ core::ParameterUsage::kNone,
-    /* matcher_indices */ MatcherIndicesIndex(32),
+    /* matcher_indices */ MatcherIndicesIndex(58),
   },
   {
     /* [38] */
     /* usage */ core::ParameterUsage::kTexture,
-    /* matcher_indices */ MatcherIndicesIndex(11),
+    /* matcher_indices */ MatcherIndicesIndex(37),
   },
   {
     /* [39] */
     /* usage */ core::ParameterUsage::kSampler,
-    /* matcher_indices */ MatcherIndicesIndex(33),
+    /* matcher_indices */ MatcherIndicesIndex(65),
   },
   {
     /* [40] */
     /* usage */ core::ParameterUsage::kCoords,
-    /* matcher_indices */ MatcherIndicesIndex(10),
+    /* matcher_indices */ MatcherIndicesIndex(36),
   },
   {
     /* [41] */
     /* usage */ core::ParameterUsage::kTexture,
-    /* matcher_indices */ MatcherIndicesIndex(27),
+    /* matcher_indices */ MatcherIndicesIndex(53),
   },
   {
     /* [42] */
     /* usage */ core::ParameterUsage::kSampler,
-    /* matcher_indices */ MatcherIndicesIndex(33),
+    /* matcher_indices */ MatcherIndicesIndex(65),
   },
   {
     /* [43] */
     /* usage */ core::ParameterUsage::kCoords,
-    /* matcher_indices */ MatcherIndicesIndex(23),
+    /* matcher_indices */ MatcherIndicesIndex(49),
   },
   {
     /* [44] */
     /* usage */ core::ParameterUsage::kTexture,
-    /* matcher_indices */ MatcherIndicesIndex(36),
+    /* matcher_indices */ MatcherIndicesIndex(62),
   },
   {
     /* [45] */
     /* usage */ core::ParameterUsage::kSampler,
-    /* matcher_indices */ MatcherIndicesIndex(33),
+    /* matcher_indices */ MatcherIndicesIndex(65),
   },
   {
     /* [46] */
     /* usage */ core::ParameterUsage::kCoords,
-    /* matcher_indices */ MatcherIndicesIndex(23),
+    /* matcher_indices */ MatcherIndicesIndex(49),
   },
   {
     /* [47] */
@@ -817,7 +1010,147 @@
   {
     /* [48] */
     /* usage */ core::ParameterUsage::kNone,
-    /* matcher_indices */ MatcherIndicesIndex(32),
+    /* matcher_indices */ MatcherIndicesIndex(58),
+  },
+  {
+    /* [49] */
+    /* usage */ core::ParameterUsage::kTexture,
+    /* matcher_indices */ MatcherIndicesIndex(23),
+  },
+  {
+    /* [50] */
+    /* usage */ core::ParameterUsage::kNone,
+    /* matcher_indices */ MatcherIndicesIndex(58),
+  },
+  {
+    /* [51] */
+    /* usage */ core::ParameterUsage::kTexture,
+    /* matcher_indices */ MatcherIndicesIndex(25),
+  },
+  {
+    /* [52] */
+    /* usage */ core::ParameterUsage::kNone,
+    /* matcher_indices */ MatcherIndicesIndex(58),
+  },
+  {
+    /* [53] */
+    /* usage */ core::ParameterUsage::kTexture,
+    /* matcher_indices */ MatcherIndicesIndex(27),
+  },
+  {
+    /* [54] */
+    /* usage */ core::ParameterUsage::kNone,
+    /* matcher_indices */ MatcherIndicesIndex(58),
+  },
+  {
+    /* [55] */
+    /* usage */ core::ParameterUsage::kTexture,
+    /* matcher_indices */ MatcherIndicesIndex(29),
+  },
+  {
+    /* [56] */
+    /* usage */ core::ParameterUsage::kNone,
+    /* matcher_indices */ MatcherIndicesIndex(58),
+  },
+  {
+    /* [57] */
+    /* usage */ core::ParameterUsage::kTexture,
+    /* matcher_indices */ MatcherIndicesIndex(31),
+  },
+  {
+    /* [58] */
+    /* usage */ core::ParameterUsage::kNone,
+    /* matcher_indices */ MatcherIndicesIndex(58),
+  },
+  {
+    /* [59] */
+    /* usage */ core::ParameterUsage::kTexture,
+    /* matcher_indices */ MatcherIndicesIndex(60),
+  },
+  {
+    /* [60] */
+    /* usage */ core::ParameterUsage::kNone,
+    /* matcher_indices */ MatcherIndicesIndex(58),
+  },
+  {
+    /* [61] */
+    /* usage */ core::ParameterUsage::kTexture,
+    /* matcher_indices */ MatcherIndicesIndex(61),
+  },
+  {
+    /* [62] */
+    /* usage */ core::ParameterUsage::kNone,
+    /* matcher_indices */ MatcherIndicesIndex(58),
+  },
+  {
+    /* [63] */
+    /* usage */ core::ParameterUsage::kTexture,
+    /* matcher_indices */ MatcherIndicesIndex(62),
+  },
+  {
+    /* [64] */
+    /* usage */ core::ParameterUsage::kNone,
+    /* matcher_indices */ MatcherIndicesIndex(58),
+  },
+  {
+    /* [65] */
+    /* usage */ core::ParameterUsage::kTexture,
+    /* matcher_indices */ MatcherIndicesIndex(63),
+  },
+  {
+    /* [66] */
+    /* usage */ core::ParameterUsage::kNone,
+    /* matcher_indices */ MatcherIndicesIndex(58),
+  },
+  {
+    /* [67] */
+    /* usage */ core::ParameterUsage::kTexture,
+    /* matcher_indices */ MatcherIndicesIndex(12),
+  },
+  {
+    /* [68] */
+    /* usage */ core::ParameterUsage::kNone,
+    /* matcher_indices */ MatcherIndicesIndex(58),
+  },
+  {
+    /* [69] */
+    /* usage */ core::ParameterUsage::kTexture,
+    /* matcher_indices */ MatcherIndicesIndex(15),
+  },
+  {
+    /* [70] */
+    /* usage */ core::ParameterUsage::kNone,
+    /* matcher_indices */ MatcherIndicesIndex(58),
+  },
+  {
+    /* [71] */
+    /* usage */ core::ParameterUsage::kTexture,
+    /* matcher_indices */ MatcherIndicesIndex(18),
+  },
+  {
+    /* [72] */
+    /* usage */ core::ParameterUsage::kNone,
+    /* matcher_indices */ MatcherIndicesIndex(58),
+  },
+  {
+    /* [73] */
+    /* usage */ core::ParameterUsage::kTexture,
+    /* matcher_indices */ MatcherIndicesIndex(21),
+  },
+  {
+    /* [74] */
+    /* usage */ core::ParameterUsage::kTexture,
+    /* matcher_indices */ MatcherIndicesIndex(33),
+  },
+  {
+    /* [75] */
+    /* usage */ core::ParameterUsage::kTexture,
+    /* matcher_indices */ MatcherIndicesIndex(64),
+  },
+  {
+    /* [76] */
+    /* usage */ core::ParameterUsage::kTexture,
+    /* matcher_indices */ MatcherIndicesIndex(9),
   },
 };
 
@@ -828,19 +1161,37 @@
   {
     /* [0] */
     /* name */ "T",
-    /* matcher_indices */ MatcherIndicesIndex(31),
+    /* matcher_indices */ MatcherIndicesIndex(57),
     /* kind */ TemplateInfo::Kind::kType,
   },
   {
     /* [1] */
     /* name */ "S",
-    /* matcher_indices */ MatcherIndicesIndex(32),
+    /* matcher_indices */ MatcherIndicesIndex(58),
     /* kind */ TemplateInfo::Kind::kNumber,
   },
   {
     /* [2] */
+    /* name */ "F",
+    /* matcher_indices */ MatcherIndicesIndex(/* invalid */),
+    /* kind */ TemplateInfo::Kind::kNumber,
+  },
+  {
+    /* [3] */
     /* name */ "A",
-    /* matcher_indices */ MatcherIndicesIndex(31),
+    /* matcher_indices */ MatcherIndicesIndex(/* invalid */),
+    /* kind */ TemplateInfo::Kind::kNumber,
+  },
+  {
+    /* [4] */
+    /* name */ "T",
+    /* matcher_indices */ MatcherIndicesIndex(59),
+    /* kind */ TemplateInfo::Kind::kType,
+  },
+  {
+    /* [5] */
+    /* name */ "A",
+    /* matcher_indices */ MatcherIndicesIndex(57),
     /* kind */ TemplateInfo::Kind::kType,
   },
 };
@@ -851,171 +1202,523 @@
 constexpr OverloadInfo kOverloads[] = {
   {
     /* [0] */
+    /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMemberFunction),
+    /* num_parameters */ 1,
+    /* num_explicit_templates */ 0,
+    /* num_templates   */ 1,
+    /* templates */ TemplateIndex(4),
+    /* parameters */ ParameterIndex(73),
+    /* return_matcher_indices */ MatcherIndicesIndex(58),
+    /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+  },
+  {
+    /* [1] */
+    /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMemberFunction),
+    /* num_parameters */ 2,
+    /* num_explicit_templates */ 0,
+    /* num_templates   */ 1,
+    /* templates */ TemplateIndex(4),
+    /* parameters */ ParameterIndex(49),
+    /* return_matcher_indices */ MatcherIndicesIndex(58),
+    /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+  },
+  {
+    /* [2] */
+    /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMemberFunction),
+    /* num_parameters */ 2,
+    /* num_explicit_templates */ 0,
+    /* num_templates   */ 1,
+    /* templates */ TemplateIndex(4),
+    /* parameters */ ParameterIndex(51),
+    /* return_matcher_indices */ MatcherIndicesIndex(58),
+    /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+  },
+  {
+    /* [3] */
+    /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMemberFunction),
+    /* num_parameters */ 2,
+    /* num_explicit_templates */ 0,
+    /* num_templates   */ 1,
+    /* templates */ TemplateIndex(4),
+    /* parameters */ ParameterIndex(53),
+    /* return_matcher_indices */ MatcherIndicesIndex(58),
+    /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+  },
+  {
+    /* [4] */
+    /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMemberFunction),
+    /* num_parameters */ 2,
+    /* num_explicit_templates */ 0,
+    /* num_templates   */ 1,
+    /* templates */ TemplateIndex(4),
+    /* parameters */ ParameterIndex(55),
+    /* return_matcher_indices */ MatcherIndicesIndex(58),
+    /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+  },
+  {
+    /* [5] */
+    /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMemberFunction),
+    /* num_parameters */ 2,
+    /* num_explicit_templates */ 0,
+    /* num_templates   */ 1,
+    /* templates */ TemplateIndex(4),
+    /* parameters */ ParameterIndex(57),
+    /* return_matcher_indices */ MatcherIndicesIndex(58),
+    /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+  },
+  {
+    /* [6] */
+    /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMemberFunction),
+    /* num_parameters */ 1,
+    /* num_explicit_templates */ 0,
+    /* num_templates   */ 1,
+    /* templates */ TemplateIndex(4),
+    /* parameters */ ParameterIndex(74),
+    /* return_matcher_indices */ MatcherIndicesIndex(58),
+    /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+  },
+  {
+    /* [7] */
+    /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMemberFunction),
+    /* num_parameters */ 2,
+    /* num_explicit_templates */ 0,
+    /* num_templates   */ 0,
+    /* templates */ TemplateIndex(/* invalid */),
+    /* parameters */ ParameterIndex(59),
+    /* return_matcher_indices */ MatcherIndicesIndex(58),
+    /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+  },
+  {
+    /* [8] */
+    /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMemberFunction),
+    /* num_parameters */ 2,
+    /* num_explicit_templates */ 0,
+    /* num_templates   */ 0,
+    /* templates */ TemplateIndex(/* invalid */),
+    /* parameters */ ParameterIndex(61),
+    /* return_matcher_indices */ MatcherIndicesIndex(58),
+    /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+  },
+  {
+    /* [9] */
+    /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMemberFunction),
+    /* num_parameters */ 2,
+    /* num_explicit_templates */ 0,
+    /* num_templates   */ 0,
+    /* templates */ TemplateIndex(/* invalid */),
+    /* parameters */ ParameterIndex(63),
+    /* return_matcher_indices */ MatcherIndicesIndex(58),
+    /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+  },
+  {
+    /* [10] */
+    /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMemberFunction),
+    /* num_parameters */ 2,
+    /* num_explicit_templates */ 0,
+    /* num_templates   */ 0,
+    /* templates */ TemplateIndex(/* invalid */),
+    /* parameters */ ParameterIndex(65),
+    /* return_matcher_indices */ MatcherIndicesIndex(58),
+    /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+  },
+  {
+    /* [11] */
+    /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMemberFunction),
+    /* num_parameters */ 1,
+    /* num_explicit_templates */ 0,
+    /* num_templates   */ 0,
+    /* templates */ TemplateIndex(/* invalid */),
+    /* parameters */ ParameterIndex(75),
+    /* return_matcher_indices */ MatcherIndicesIndex(58),
+    /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+  },
+  {
+    /* [12] */
+    /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMemberFunction),
+    /* num_parameters */ 1,
+    /* num_explicit_templates */ 0,
+    /* num_templates   */ 2,
+    /* templates */ TemplateIndex(2),
+    /* parameters */ ParameterIndex(76),
+    /* return_matcher_indices */ MatcherIndicesIndex(58),
+    /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+  },
+  {
+    /* [13] */
+    /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMemberFunction),
+    /* num_parameters */ 2,
+    /* num_explicit_templates */ 0,
+    /* num_templates   */ 2,
+    /* templates */ TemplateIndex(2),
+    /* parameters */ ParameterIndex(67),
+    /* return_matcher_indices */ MatcherIndicesIndex(58),
+    /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+  },
+  {
+    /* [14] */
+    /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMemberFunction),
+    /* num_parameters */ 2,
+    /* num_explicit_templates */ 0,
+    /* num_templates   */ 2,
+    /* templates */ TemplateIndex(2),
+    /* parameters */ ParameterIndex(69),
+    /* return_matcher_indices */ MatcherIndicesIndex(58),
+    /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+  },
+  {
+    /* [15] */
+    /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMemberFunction),
+    /* num_parameters */ 2,
+    /* num_explicit_templates */ 0,
+    /* num_templates   */ 2,
+    /* templates */ TemplateIndex(2),
+    /* parameters */ ParameterIndex(71),
+    /* return_matcher_indices */ MatcherIndicesIndex(58),
+    /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+  },
+  {
+    /* [16] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kMemberFunction),
     /* num_parameters */ 3,
     /* num_explicit_templates */ 0,
     /* num_templates   */ 0,
     /* templates */ TemplateIndex(/* invalid */),
     /* parameters */ ParameterIndex(38),
-    /* return_matcher_indices */ MatcherIndicesIndex(9),
+    /* return_matcher_indices */ MatcherIndicesIndex(35),
     /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
   },
   {
-    /* [1] */
+    /* [17] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kMemberFunction),
     /* num_parameters */ 3,
     /* num_explicit_templates */ 0,
     /* num_templates   */ 0,
     /* templates */ TemplateIndex(/* invalid */),
     /* parameters */ ParameterIndex(15),
-    /* return_matcher_indices */ MatcherIndicesIndex(9),
+    /* return_matcher_indices */ MatcherIndicesIndex(35),
     /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
   },
   {
-    /* [2] */
+    /* [18] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kMemberFunction),
     /* num_parameters */ 4,
     /* num_explicit_templates */ 0,
     /* num_templates   */ 0,
     /* templates */ TemplateIndex(/* invalid */),
     /* parameters */ ParameterIndex(15),
-    /* return_matcher_indices */ MatcherIndicesIndex(9),
+    /* return_matcher_indices */ MatcherIndicesIndex(35),
     /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
   },
   {
-    /* [3] */
+    /* [19] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kMemberFunction),
     /* num_parameters */ 4,
     /* num_explicit_templates */ 0,
     /* num_templates   */ 1,
-    /* templates */ TemplateIndex(2),
+    /* templates */ TemplateIndex(5),
     /* parameters */ ParameterIndex(5),
-    /* return_matcher_indices */ MatcherIndicesIndex(9),
+    /* return_matcher_indices */ MatcherIndicesIndex(35),
     /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
   },
   {
-    /* [4] */
+    /* [20] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kMemberFunction),
     /* num_parameters */ 5,
     /* num_explicit_templates */ 0,
     /* num_templates   */ 1,
-    /* templates */ TemplateIndex(2),
+    /* templates */ TemplateIndex(5),
     /* parameters */ ParameterIndex(5),
-    /* return_matcher_indices */ MatcherIndicesIndex(9),
+    /* return_matcher_indices */ MatcherIndicesIndex(35),
     /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
   },
   {
-    /* [5] */
+    /* [21] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kMemberFunction),
     /* num_parameters */ 3,
     /* num_explicit_templates */ 0,
     /* num_templates   */ 0,
     /* templates */ TemplateIndex(/* invalid */),
     /* parameters */ ParameterIndex(19),
-    /* return_matcher_indices */ MatcherIndicesIndex(9),
+    /* return_matcher_indices */ MatcherIndicesIndex(35),
     /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
   },
   {
-    /* [6] */
+    /* [22] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kMemberFunction),
     /* num_parameters */ 4,
     /* num_explicit_templates */ 0,
     /* num_templates   */ 0,
     /* templates */ TemplateIndex(/* invalid */),
     /* parameters */ ParameterIndex(19),
-    /* return_matcher_indices */ MatcherIndicesIndex(9),
+    /* return_matcher_indices */ MatcherIndicesIndex(35),
     /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
   },
   {
-    /* [7] */
+    /* [23] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kMemberFunction),
     /* num_parameters */ 3,
     /* num_explicit_templates */ 0,
     /* num_templates   */ 0,
     /* templates */ TemplateIndex(/* invalid */),
     /* parameters */ ParameterIndex(41),
-    /* return_matcher_indices */ MatcherIndicesIndex(9),
+    /* return_matcher_indices */ MatcherIndicesIndex(35),
     /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
   },
   {
-    /* [8] */
+    /* [24] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kMemberFunction),
     /* num_parameters */ 4,
     /* num_explicit_templates */ 0,
     /* num_templates   */ 1,
-    /* templates */ TemplateIndex(2),
+    /* templates */ TemplateIndex(5),
     /* parameters */ ParameterIndex(23),
-    /* return_matcher_indices */ MatcherIndicesIndex(9),
+    /* return_matcher_indices */ MatcherIndicesIndex(35),
     /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
   },
   {
-    /* [9] */
+    /* [25] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kMemberFunction),
     /* num_parameters */ 3,
     /* num_explicit_templates */ 0,
     /* num_templates   */ 0,
     /* templates */ TemplateIndex(/* invalid */),
     /* parameters */ ParameterIndex(27),
-    /* return_matcher_indices */ MatcherIndicesIndex(10),
+    /* return_matcher_indices */ MatcherIndicesIndex(36),
     /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
   },
   {
-    /* [10] */
+    /* [26] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kMemberFunction),
     /* num_parameters */ 4,
     /* num_explicit_templates */ 0,
     /* num_templates   */ 0,
     /* templates */ TemplateIndex(/* invalid */),
     /* parameters */ ParameterIndex(27),
-    /* return_matcher_indices */ MatcherIndicesIndex(10),
+    /* return_matcher_indices */ MatcherIndicesIndex(36),
     /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
   },
   {
-    /* [11] */
+    /* [27] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kMemberFunction),
     /* num_parameters */ 4,
     /* num_explicit_templates */ 0,
     /* num_templates   */ 1,
-    /* templates */ TemplateIndex(2),
+    /* templates */ TemplateIndex(5),
     /* parameters */ ParameterIndex(10),
-    /* return_matcher_indices */ MatcherIndicesIndex(10),
+    /* return_matcher_indices */ MatcherIndicesIndex(36),
     /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
   },
   {
-    /* [12] */
+    /* [28] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kMemberFunction),
     /* num_parameters */ 5,
     /* num_explicit_templates */ 0,
     /* num_templates   */ 1,
-    /* templates */ TemplateIndex(2),
+    /* templates */ TemplateIndex(5),
     /* parameters */ ParameterIndex(10),
-    /* return_matcher_indices */ MatcherIndicesIndex(10),
+    /* return_matcher_indices */ MatcherIndicesIndex(36),
     /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
   },
   {
-    /* [13] */
+    /* [29] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kMemberFunction),
     /* num_parameters */ 3,
     /* num_explicit_templates */ 0,
     /* num_templates   */ 0,
     /* templates */ TemplateIndex(/* invalid */),
     /* parameters */ ParameterIndex(44),
-    /* return_matcher_indices */ MatcherIndicesIndex(10),
+    /* return_matcher_indices */ MatcherIndicesIndex(36),
     /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
   },
   {
-    /* [14] */
+    /* [30] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kMemberFunction),
     /* num_parameters */ 4,
     /* num_explicit_templates */ 0,
     /* num_templates   */ 1,
-    /* templates */ TemplateIndex(2),
+    /* templates */ TemplateIndex(5),
     /* parameters */ ParameterIndex(31),
-    /* return_matcher_indices */ MatcherIndicesIndex(10),
+    /* return_matcher_indices */ MatcherIndicesIndex(36),
     /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
   },
   {
-    /* [15] */
+    /* [31] */
+    /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMemberFunction),
+    /* num_parameters */ 2,
+    /* num_explicit_templates */ 0,
+    /* num_templates   */ 1,
+    /* templates */ TemplateIndex(4),
+    /* parameters */ ParameterIndex(49),
+    /* return_matcher_indices */ MatcherIndicesIndex(58),
+    /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+  },
+  {
+    /* [32] */
+    /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMemberFunction),
+    /* num_parameters */ 2,
+    /* num_explicit_templates */ 0,
+    /* num_templates   */ 1,
+    /* templates */ TemplateIndex(4),
+    /* parameters */ ParameterIndex(51),
+    /* return_matcher_indices */ MatcherIndicesIndex(58),
+    /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+  },
+  {
+    /* [33] */
+    /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMemberFunction),
+    /* num_parameters */ 2,
+    /* num_explicit_templates */ 0,
+    /* num_templates   */ 1,
+    /* templates */ TemplateIndex(4),
+    /* parameters */ ParameterIndex(53),
+    /* return_matcher_indices */ MatcherIndicesIndex(58),
+    /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+  },
+  {
+    /* [34] */
+    /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMemberFunction),
+    /* num_parameters */ 2,
+    /* num_explicit_templates */ 0,
+    /* num_templates   */ 1,
+    /* templates */ TemplateIndex(4),
+    /* parameters */ ParameterIndex(55),
+    /* return_matcher_indices */ MatcherIndicesIndex(58),
+    /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+  },
+  {
+    /* [35] */
+    /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMemberFunction),
+    /* num_parameters */ 2,
+    /* num_explicit_templates */ 0,
+    /* num_templates   */ 1,
+    /* templates */ TemplateIndex(4),
+    /* parameters */ ParameterIndex(57),
+    /* return_matcher_indices */ MatcherIndicesIndex(58),
+    /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+  },
+  {
+    /* [36] */
+    /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMemberFunction),
+    /* num_parameters */ 1,
+    /* num_explicit_templates */ 0,
+    /* num_templates   */ 1,
+    /* templates */ TemplateIndex(4),
+    /* parameters */ ParameterIndex(74),
+    /* return_matcher_indices */ MatcherIndicesIndex(58),
+    /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+  },
+  {
+    /* [37] */
+    /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMemberFunction),
+    /* num_parameters */ 2,
+    /* num_explicit_templates */ 0,
+    /* num_templates   */ 0,
+    /* templates */ TemplateIndex(/* invalid */),
+    /* parameters */ ParameterIndex(59),
+    /* return_matcher_indices */ MatcherIndicesIndex(58),
+    /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+  },
+  {
+    /* [38] */
+    /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMemberFunction),
+    /* num_parameters */ 2,
+    /* num_explicit_templates */ 0,
+    /* num_templates   */ 0,
+    /* templates */ TemplateIndex(/* invalid */),
+    /* parameters */ ParameterIndex(61),
+    /* return_matcher_indices */ MatcherIndicesIndex(58),
+    /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+  },
+  {
+    /* [39] */
+    /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMemberFunction),
+    /* num_parameters */ 2,
+    /* num_explicit_templates */ 0,
+    /* num_templates   */ 0,
+    /* templates */ TemplateIndex(/* invalid */),
+    /* parameters */ ParameterIndex(63),
+    /* return_matcher_indices */ MatcherIndicesIndex(58),
+    /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+  },
+  {
+    /* [40] */
+    /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMemberFunction),
+    /* num_parameters */ 2,
+    /* num_explicit_templates */ 0,
+    /* num_templates   */ 0,
+    /* templates */ TemplateIndex(/* invalid */),
+    /* parameters */ ParameterIndex(65),
+    /* return_matcher_indices */ MatcherIndicesIndex(58),
+    /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+  },
+  {
+    /* [41] */
+    /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMemberFunction),
+    /* num_parameters */ 1,
+    /* num_explicit_templates */ 0,
+    /* num_templates   */ 0,
+    /* templates */ TemplateIndex(/* invalid */),
+    /* parameters */ ParameterIndex(75),
+    /* return_matcher_indices */ MatcherIndicesIndex(58),
+    /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+  },
+  {
+    /* [42] */
+    /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMemberFunction),
+    /* num_parameters */ 2,
+    /* num_explicit_templates */ 0,
+    /* num_templates   */ 2,
+    /* templates */ TemplateIndex(2),
+    /* parameters */ ParameterIndex(67),
+    /* return_matcher_indices */ MatcherIndicesIndex(58),
+    /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+  },
+  {
+    /* [43] */
+    /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMemberFunction),
+    /* num_parameters */ 2,
+    /* num_explicit_templates */ 0,
+    /* num_templates   */ 2,
+    /* templates */ TemplateIndex(2),
+    /* parameters */ ParameterIndex(69),
+    /* return_matcher_indices */ MatcherIndicesIndex(58),
+    /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+  },
+  {
+    /* [44] */
+    /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMemberFunction),
+    /* num_parameters */ 2,
+    /* num_explicit_templates */ 0,
+    /* num_templates   */ 2,
+    /* templates */ TemplateIndex(2),
+    /* parameters */ ParameterIndex(71),
+    /* return_matcher_indices */ MatcherIndicesIndex(58),
+    /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+  },
+  {
+    /* [45] */
+    /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMemberFunction),
+    /* num_parameters */ 2,
+    /* num_explicit_templates */ 0,
+    /* num_templates   */ 1,
+    /* templates */ TemplateIndex(4),
+    /* parameters */ ParameterIndex(53),
+    /* return_matcher_indices */ MatcherIndicesIndex(58),
+    /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+  },
+  {
+    /* [46] */
+    /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsVertexPipeline, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline, OverloadFlag::kMemberFunction),
+    /* num_parameters */ 2,
+    /* num_explicit_templates */ 0,
+    /* num_templates   */ 2,
+    /* templates */ TemplateIndex(2),
+    /* parameters */ ParameterIndex(71),
+    /* return_matcher_indices */ MatcherIndicesIndex(58),
+    /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
+  },
+  {
+    /* [47] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
     /* num_parameters */ 5,
     /* num_explicit_templates */ 0,
@@ -1026,7 +1729,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
   },
   {
-    /* [16] */
+    /* [48] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
     /* num_parameters */ 3,
     /* num_explicit_templates */ 0,
@@ -1037,7 +1740,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
   },
   {
-    /* [17] */
+    /* [49] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
     /* num_parameters */ 2,
     /* num_explicit_templates */ 0,
@@ -1048,7 +1751,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
   },
   {
-    /* [18] */
+    /* [50] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsFragmentPipeline, OverloadFlag::kSupportsComputePipeline),
     /* num_parameters */ 3,
     /* num_explicit_templates */ 0,
@@ -1059,7 +1762,7 @@
     /* const_eval_fn */ ConstEvalFunctionIndex(/* invalid */),
   },
   {
-    /* [19] */
+    /* [51] */
     /* flags */ OverloadFlags(OverloadFlag::kIsBuiltin, OverloadFlag::kSupportsComputePipeline),
     /* num_parameters */ 1,
     /* num_explicit_templates */ 0,
@@ -1079,70 +1782,117 @@
     /* [0] */
     /* fn atomic_compare_exchange_weak_explicit[T : iu32, S : workgroup_or_storage](ptr<S, atomic<T>, read_write>, ptr<function, T, read_write>, T, u32, u32) -> bool */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(15),
+    /* overloads */ OverloadIndex(47),
   },
   {
     /* [1] */
     /* fn atomic_exchange_explicit[T : iu32, S : workgroup_or_storage](ptr<S, atomic<T>, read_write>, T, u32) -> T */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(16),
+    /* overloads */ OverloadIndex(48),
   },
   {
     /* [2] */
     /* fn atomic_fetch_add_explicit[T : iu32, S : workgroup_or_storage](ptr<S, atomic<T>, read_write>, T, u32) -> T */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(16),
+    /* overloads */ OverloadIndex(48),
   },
   {
     /* [3] */
     /* fn atomic_fetch_and_explicit[T : iu32, S : workgroup_or_storage](ptr<S, atomic<T>, read_write>, T, u32) -> T */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(16),
+    /* overloads */ OverloadIndex(48),
   },
   {
     /* [4] */
     /* fn atomic_fetch_max_explicit[T : iu32, S : workgroup_or_storage](ptr<S, atomic<T>, read_write>, T, u32) -> T */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(16),
+    /* overloads */ OverloadIndex(48),
   },
   {
     /* [5] */
     /* fn atomic_fetch_min_explicit[T : iu32, S : workgroup_or_storage](ptr<S, atomic<T>, read_write>, T, u32) -> T */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(16),
+    /* overloads */ OverloadIndex(48),
   },
   {
     /* [6] */
     /* fn atomic_fetch_or_explicit[T : iu32, S : workgroup_or_storage](ptr<S, atomic<T>, read_write>, T, u32) -> T */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(16),
+    /* overloads */ OverloadIndex(48),
   },
   {
     /* [7] */
     /* fn atomic_fetch_sub_explicit[T : iu32, S : workgroup_or_storage](ptr<S, atomic<T>, read_write>, T, u32) -> T */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(16),
+    /* overloads */ OverloadIndex(48),
   },
   {
     /* [8] */
     /* fn atomic_fetch_xor_explicit[T : iu32, S : workgroup_or_storage](ptr<S, atomic<T>, read_write>, T, u32) -> T */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(16),
+    /* overloads */ OverloadIndex(48),
   },
   {
     /* [9] */
     /* fn atomic_load_explicit[T : iu32, S : workgroup_or_storage](ptr<S, atomic<T>, read_write>, u32) -> T */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(17),
+    /* overloads */ OverloadIndex(49),
   },
   {
     /* [10] */
     /* fn atomic_store_explicit[T : iu32, S : workgroup_or_storage](ptr<S, atomic<T>, read_write>, T, u32) */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(18),
+    /* overloads */ OverloadIndex(50),
   },
   {
     /* [11] */
+    /* fn get_width[T : fiu32](texture: texture_1d<T>) -> u32 */
+    /* fn get_width[T : fiu32](texture: texture_2d<T>, u32) -> u32 */
+    /* fn get_width[T : fiu32](texture: texture_2d_array<T>, u32) -> u32 */
+    /* fn get_width[T : fiu32](texture: texture_3d<T>, u32) -> u32 */
+    /* fn get_width[T : fiu32](texture: texture_cube<T>, u32) -> u32 */
+    /* fn get_width[T : fiu32](texture: texture_cube_array<T>, u32) -> u32 */
+    /* fn get_width[T : fiu32](texture: texture_multisampled_2d<T>) -> u32 */
+    /* fn get_width(texture: texture_depth_2d, u32) -> u32 */
+    /* fn get_width(texture: texture_depth_2d_array, u32) -> u32 */
+    /* fn get_width(texture: texture_depth_cube, u32) -> u32 */
+    /* fn get_width(texture: texture_depth_cube_array, u32) -> u32 */
+    /* fn get_width(texture: texture_depth_multisampled_2d) -> u32 */
+    /* fn get_width[F : texel_format, A : access](texture: texture_storage_1d<F, A>) -> u32 */
+    /* fn get_width[F : texel_format, A : access](texture: texture_storage_2d<F, A>, u32) -> u32 */
+    /* fn get_width[F : texel_format, A : access](texture: texture_storage_2d_array<F, A>, u32) -> u32 */
+    /* fn get_width[F : texel_format, A : access](texture: texture_storage_3d<F, A>, u32) -> u32 */
+    /* num overloads */ 16,
+    /* overloads */ OverloadIndex(0),
+  },
+  {
+    /* [12] */
+    /* fn get_height[T : fiu32](texture: texture_2d<T>, u32) -> u32 */
+    /* fn get_height[T : fiu32](texture: texture_2d_array<T>, u32) -> u32 */
+    /* fn get_height[T : fiu32](texture: texture_3d<T>, u32) -> u32 */
+    /* fn get_height[T : fiu32](texture: texture_cube<T>, u32) -> u32 */
+    /* fn get_height[T : fiu32](texture: texture_cube_array<T>, u32) -> u32 */
+    /* fn get_height[T : fiu32](texture: texture_multisampled_2d<T>) -> u32 */
+    /* fn get_height(texture: texture_depth_2d, u32) -> u32 */
+    /* fn get_height(texture: texture_depth_2d_array, u32) -> u32 */
+    /* fn get_height(texture: texture_depth_cube, u32) -> u32 */
+    /* fn get_height(texture: texture_depth_cube_array, u32) -> u32 */
+    /* fn get_height(texture: texture_depth_multisampled_2d) -> u32 */
+    /* fn get_height[F : texel_format, A : access](texture: texture_storage_2d<F, A>, u32) -> u32 */
+    /* fn get_height[F : texel_format, A : access](texture: texture_storage_2d_array<F, A>, u32) -> u32 */
+    /* fn get_height[F : texel_format, A : access](texture: texture_storage_3d<F, A>, u32) -> u32 */
+    /* num overloads */ 14,
+    /* overloads */ OverloadIndex(31),
+  },
+  {
+    /* [13] */
+    /* fn get_depth[T : fiu32](texture: texture_3d<T>, u32) -> u32 */
+    /* fn get_depth[F : texel_format, A : access](texture: texture_storage_3d<F, A>, u32) -> u32 */
+    /* num overloads */ 2,
+    /* overloads */ OverloadIndex(45),
+  },
+  {
+    /* [14] */
     /* fn sample(texture: texture_1d<f32>, sampler: sampler, coords: f32) -> vec4<f32> */
     /* fn sample(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>) -> vec4<f32> */
     /* fn sample(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> vec4<f32> */
@@ -1159,13 +1909,13 @@
     /* fn sample(texture: texture_depth_cube, sampler: sampler, coords: vec3<f32>) -> f32 */
     /* fn sample[A : iu32](texture: texture_depth_cube_array, sampler: sampler, coords: vec3<f32>, array_index: A) -> f32 */
     /* num overloads */ 15,
-    /* overloads */ OverloadIndex(0),
+    /* overloads */ OverloadIndex(16),
   },
   {
-    /* [12] */
+    /* [15] */
     /* fn threadgroup_barrier(u32) */
     /* num overloads */ 1,
-    /* overloads */ OverloadIndex(19),
+    /* overloads */ OverloadIndex(51),
   },
 };
 
diff --git a/src/tint/lang/msl/msl.def b/src/tint/lang/msl/msl.def
index 235f697..47f6c3c 100644
--- a/src/tint/lang/msl/msl.def
+++ b/src/tint/lang/msl/msl.def
@@ -37,6 +37,7 @@
 
 import "src/tint/lang/core/access.def"
 import "src/tint/lang/core/address_space.def"
+import "src/tint/lang/core/texel_format.def"
 
 ////////////////////////////////////////////////////////////////////////////////
 // Enum matchers                                                              //
@@ -73,12 +74,19 @@
 type texture_depth_2d_array
 type texture_depth_cube
 type texture_depth_cube_array
+type texture_depth_multisampled_2d
+type texture_multisampled_2d<T>
+type texture_storage_1d<F: texel_format, A: access>
+type texture_storage_2d<F: texel_format, A: access>
+type texture_storage_2d_array<F: texel_format, A: access>
+type texture_storage_3d<F: texel_format, A: access>
 
 ////////////////////////////////////////////////////////////////////////////////
 // Type matchers                                                              //
 ////////////////////////////////////////////////////////////////////////////////
 
 match iu32: i32 | u32
+match fiu32: f32 | i32 | u32
 
 ////////////////////////////////////////////////////////////////////////////////
 // Builtin Functions                                                          //
@@ -95,6 +103,41 @@
 @stage("fragment", "compute") fn atomic_load_explicit[T: iu32, S: workgroup_or_storage](ptr<S, atomic<T>, read_write>, u32) -> T
 @stage("fragment", "compute") fn atomic_store_explicit[T: iu32, S: workgroup_or_storage](ptr<S, atomic<T>, read_write>, T, u32)
 
+@member_function fn get_width[T: fiu32](texture: texture_1d<T>) -> u32
+@member_function fn get_width[T: fiu32](texture: texture_2d<T>, u32) -> u32
+@member_function fn get_width[T: fiu32](texture: texture_2d_array<T>, u32) -> u32
+@member_function fn get_width[T: fiu32](texture: texture_3d<T>, u32) -> u32
+@member_function fn get_width[T: fiu32](texture: texture_cube<T>, u32) -> u32
+@member_function fn get_width[T: fiu32](texture: texture_cube_array<T>, u32) -> u32
+@member_function fn get_width[T: fiu32](texture: texture_multisampled_2d<T>) -> u32
+@member_function fn get_width(texture: texture_depth_2d, u32) -> u32
+@member_function fn get_width(texture: texture_depth_2d_array, u32) -> u32
+@member_function fn get_width(texture: texture_depth_cube, u32) -> u32
+@member_function fn get_width(texture: texture_depth_cube_array, u32) -> u32
+@member_function fn get_width(texture: texture_depth_multisampled_2d) -> u32
+@member_function fn get_width[F: texel_format, A: access](texture: texture_storage_1d<F, A>) -> u32
+@member_function fn get_width[F: texel_format, A: access](texture: texture_storage_2d<F, A>, u32) -> u32
+@member_function fn get_width[F: texel_format, A: access](texture: texture_storage_2d_array<F, A>, u32) -> u32
+@member_function fn get_width[F: texel_format, A: access](texture: texture_storage_3d<F, A>, u32) -> u32
+
+@member_function fn get_height[T: fiu32](texture: texture_2d<T>, u32) -> u32
+@member_function fn get_height[T: fiu32](texture: texture_2d_array<T>, u32) -> u32
+@member_function fn get_height[T: fiu32](texture: texture_3d<T>, u32) -> u32
+@member_function fn get_height[T: fiu32](texture: texture_cube<T>, u32) -> u32
+@member_function fn get_height[T: fiu32](texture: texture_cube_array<T>, u32) -> u32
+@member_function fn get_height[T: fiu32](texture: texture_multisampled_2d<T>) -> u32
+@member_function fn get_height(texture: texture_depth_2d, u32) -> u32
+@member_function fn get_height(texture: texture_depth_2d_array, u32) -> u32
+@member_function fn get_height(texture: texture_depth_cube, u32) -> u32
+@member_function fn get_height(texture: texture_depth_cube_array, u32) -> u32
+@member_function fn get_height(texture: texture_depth_multisampled_2d) -> u32
+@member_function fn get_height[F: texel_format, A: access](texture: texture_storage_2d<F, A>, u32) -> u32
+@member_function fn get_height[F: texel_format, A: access](texture: texture_storage_2d_array<F, A>, u32) -> u32
+@member_function fn get_height[F: texel_format, A: access](texture: texture_storage_3d<F, A>, u32) -> u32
+
+@member_function fn get_depth[T: fiu32](texture: texture_3d<T>, u32) -> u32
+@member_function fn get_depth[F: texel_format, A: access](texture: texture_storage_3d<F, A>, u32) -> u32
+
 @member_function @stage("fragment") fn sample(texture: texture_1d<f32>, sampler: sampler, coords: f32) -> vec4<f32>
 @member_function @stage("fragment") fn sample(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>) -> vec4<f32>
 @member_function @stage("fragment") fn sample(texture: texture_2d<f32>, sampler: sampler, coords: vec2<f32>, @const offset: vec2<i32>) -> vec4<f32>
diff --git a/src/tint/lang/msl/writer/raise/builtin_polyfill.cc b/src/tint/lang/msl/writer/raise/builtin_polyfill.cc
index b5bbaf1..8e8ef6d 100644
--- a/src/tint/lang/msl/writer/raise/builtin_polyfill.cc
+++ b/src/tint/lang/msl/writer/raise/builtin_polyfill.cc
@@ -36,6 +36,10 @@
 #include "src/tint/lang/core/ir/core_builtin_call.h"
 #include "src/tint/lang/core/ir/function.h"
 #include "src/tint/lang/core/ir/validator.h"
+#include "src/tint/lang/core/type/depth_multisampled_texture.h"
+#include "src/tint/lang/core/type/multisampled_texture.h"
+#include "src/tint/lang/core/type/texture.h"
+#include "src/tint/lang/core/type/texture_dimension.h"
 #include "src/tint/lang/msl/barrier_type.h"
 #include "src/tint/lang/msl/builtin_fn.h"
 #include "src/tint/lang/msl/ir/builtin_call.h"
@@ -80,6 +84,7 @@
                     case core::BuiltinFn::kAtomicStore:
                     case core::BuiltinFn::kAtomicSub:
                     case core::BuiltinFn::kAtomicXor:
+                    case core::BuiltinFn::kTextureDimensions:
                     case core::BuiltinFn::kTextureSample:
                     case core::BuiltinFn::kStorageBarrier:
                     case core::BuiltinFn::kWorkgroupBarrier:
@@ -131,6 +136,9 @@
                     break;
 
                 // Texture builtins.
+                case core::BuiltinFn::kTextureDimensions:
+                    TextureDimensions(builtin);
+                    break;
                 case core::BuiltinFn::kTextureSample:
                     TextureSample(builtin);
                     break;
@@ -205,6 +213,52 @@
         builtin->Destroy();
     }
 
+    /// Replace a textureDimensions call with the equivalent MSL intrinsics.
+    /// @param builtin the builtin call instruction
+    void TextureDimensions(core::ir::CoreBuiltinCall* builtin) {
+        auto* tex = builtin->Args()[0];
+        auto* type = tex->Type()->As<core::type::Texture>();
+        bool needs_lod_arg = type->dim() != core::type::TextureDimension::k1d &&
+                             !type->Is<core::type::MultisampledTexture>() &&
+                             !type->Is<core::type::DepthMultisampledTexture>();
+
+        b.InsertBefore(builtin, [&] {
+            // If we need a LOD argument, use the one provided or default to 0.
+            core::ir::Value* lod = nullptr;
+            if (needs_lod_arg) {
+                if (builtin->Args().Length() == 1) {
+                    lod = b.Value(u32(0));
+                } else {
+                    lod = builtin->Args()[1];
+                    if (lod->Type()->is_signed_integer_scalar()) {
+                        lod = b.Convert<u32>(lod)->Result(0);
+                    }
+                }
+            }
+
+            // Call MSL member functions to get the dimensions of the image.
+            Vector<core::ir::InstructionResult*, 4> values;
+            auto get_dim = [&](msl::BuiltinFn fn) {
+                auto* call = b.MemberCall<msl::ir::MemberBuiltinCall>(ty.u32(), fn, tex);
+                if (lod) {
+                    call->AppendArg(lod);
+                }
+                values.Push(call->Result(0));
+            };
+            get_dim(msl::BuiltinFn::kGetWidth);
+            if (type->dim() != core::type::TextureDimension::k1d) {
+                get_dim(msl::BuiltinFn::kGetHeight);
+                if (type->dim() == core::type::TextureDimension::k3d) {
+                    get_dim(msl::BuiltinFn::kGetDepth);
+                }
+            }
+
+            // Reconstruct the original result type from the individual dimensions.
+            b.ConstructWithResult(builtin->DetachResult(), std::move(values));
+        });
+        builtin->Destroy();
+    }
+
     /// Replace a textureSample call with the equivalent MSL intrinsic.
     /// @param builtin the builtin call instruction
     void TextureSample(core::ir::CoreBuiltinCall* builtin) {
diff --git a/src/tint/lang/msl/writer/raise/builtin_polyfill_test.cc b/src/tint/lang/msl/writer/raise/builtin_polyfill_test.cc
index 904e1fa..e5b17de 100644
--- a/src/tint/lang/msl/writer/raise/builtin_polyfill_test.cc
+++ b/src/tint/lang/msl/writer/raise/builtin_polyfill_test.cc
@@ -36,6 +36,7 @@
 #include "src/tint/lang/core/type/atomic.h"
 #include "src/tint/lang/core/type/builtin_structs.h"
 #include "src/tint/lang/core/type/sampled_texture.h"
+#include "src/tint/lang/core/type/texture_dimension.h"
 
 using namespace tint::core::fluent_types;     // NOLINT
 using namespace tint::core::number_suffixes;  // NOLINT
@@ -752,6 +753,151 @@
     EXPECT_EQ(expect, str());
 }
 
+TEST_F(MslWriter_BuiltinPolyfillTest, TextureDimensions_1d) {
+    auto* t = b.FunctionParam(
+        "t", ty.Get<core::type::SampledTexture>(core::type::TextureDimension::k1d, ty.f32()));
+    auto* func = b.Function("foo", ty.u32());
+    func->SetParams({t});
+    b.Append(func->Block(), [&] {
+        auto* result = b.Call<u32>(core::BuiltinFn::kTextureDimensions, t);
+        b.Return(func, result);
+    });
+
+    auto* src = R"(
+%foo = func(%t:texture_1d<f32>):u32 {
+  $B1: {
+    %3:u32 = textureDimensions %t
+    ret %3
+  }
+}
+)";
+    EXPECT_EQ(src, str());
+
+    auto* expect = R"(
+%foo = func(%t:texture_1d<f32>):u32 {
+  $B1: {
+    %3:u32 = %t.get_width
+    %4:u32 = construct %3
+    ret %4
+  }
+}
+)";
+
+    Run(BuiltinPolyfill);
+
+    EXPECT_EQ(expect, str());
+}
+
+TEST_F(MslWriter_BuiltinPolyfillTest, TextureDimensions_2d_WithoutLod) {
+    auto* t = b.FunctionParam(
+        "t", ty.Get<core::type::SampledTexture>(core::type::TextureDimension::k2d, ty.f32()));
+    auto* func = b.Function("foo", ty.vec2<u32>());
+    func->SetParams({t});
+    b.Append(func->Block(), [&] {
+        auto* result = b.Call<vec2<u32>>(core::BuiltinFn::kTextureDimensions, t);
+        b.Return(func, result);
+    });
+
+    auto* src = R"(
+%foo = func(%t:texture_2d<f32>):vec2<u32> {
+  $B1: {
+    %3:vec2<u32> = textureDimensions %t
+    ret %3
+  }
+}
+)";
+    EXPECT_EQ(src, str());
+
+    auto* expect = R"(
+%foo = func(%t:texture_2d<f32>):vec2<u32> {
+  $B1: {
+    %3:u32 = %t.get_width 0u
+    %4:u32 = %t.get_height 0u
+    %5:vec2<u32> = construct %3, %4
+    ret %5
+  }
+}
+)";
+
+    Run(BuiltinPolyfill);
+
+    EXPECT_EQ(expect, str());
+}
+
+TEST_F(MslWriter_BuiltinPolyfillTest, TextureDimensions_2d_WithI32Lod) {
+    auto* t = b.FunctionParam(
+        "t", ty.Get<core::type::SampledTexture>(core::type::TextureDimension::k2d, ty.f32()));
+    auto* func = b.Function("foo", ty.vec2<u32>());
+    func->SetParams({t});
+    b.Append(func->Block(), [&] {
+        auto* result = b.Call<vec2<u32>>(core::BuiltinFn::kTextureDimensions, t, 3_i);
+        b.Return(func, result);
+    });
+
+    auto* src = R"(
+%foo = func(%t:texture_2d<f32>):vec2<u32> {
+  $B1: {
+    %3:vec2<u32> = textureDimensions %t, 3i
+    ret %3
+  }
+}
+)";
+    EXPECT_EQ(src, str());
+
+    auto* expect = R"(
+%foo = func(%t:texture_2d<f32>):vec2<u32> {
+  $B1: {
+    %3:u32 = convert 3i
+    %4:u32 = %t.get_width %3
+    %5:u32 = %t.get_height %3
+    %6:vec2<u32> = construct %4, %5
+    ret %6
+  }
+}
+)";
+
+    Run(BuiltinPolyfill);
+
+    EXPECT_EQ(expect, str());
+}
+
+TEST_F(MslWriter_BuiltinPolyfillTest, TextureDimensions_3d) {
+    auto* t = b.FunctionParam(
+        "t", ty.Get<core::type::SampledTexture>(core::type::TextureDimension::k3d, ty.f32()));
+    auto* func = b.Function("foo", ty.vec3<u32>());
+    func->SetParams({t});
+    b.Append(func->Block(), [&] {
+        auto* result = b.Call<vec3<u32>>(core::BuiltinFn::kTextureDimensions, t);
+        b.Return(func, result);
+    });
+
+    auto* src = R"(
+%foo = func(%t:texture_3d<f32>):vec3<u32> {
+  $B1: {
+    %3:vec3<u32> = textureDimensions %t
+    ret %3
+  }
+}
+)";
+    EXPECT_EQ(src, str());
+
+    auto* expect = R"(
+%foo = func(%t:texture_3d<f32>):vec3<u32> {
+  $B1: {
+    %3:u32 = %t.get_width 0u
+    %4:u32 = %t.get_height 0u
+    %5:u32 = %t.get_depth 0u
+    %6:vec3<u32> = construct %3, %4, %5
+    ret %6
+  }
+}
+)";
+
+    Run(BuiltinPolyfill);
+
+    EXPECT_EQ(expect, str());
+}
+
 TEST_F(MslWriter_BuiltinPolyfillTest, TextureSample) {
     auto* t = b.FunctionParam(
         "t", ty.Get<core::type::SampledTexture>(core::type::TextureDimension::k2d, ty.f32()));
diff --git a/test/tint/builtins/gen/literal/textureDimensions/00229f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/00229f.wgsl.expected.ir.msl
index 849a6c6..aa16cc8 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/00229f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/00229f.wgsl.expected.ir.msl
@@ -1,43 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture3d<float, access::read> arg_0;
+  device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_3d<r8unorm, read>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_00229f(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint const v_1 = tint_module_vars.arg_0.get_height(0u);
+  uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_00229f = func():void {
-  $B2: {
-    %4:texture_storage_3d<r8unorm, read> = load %arg_0
-    %5:vec3<u32> = textureDimensions %4
-    %res:ptr<function, vec3<u32>, read_write> = var, %5
-    %7:vec3<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_00229f(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_00229f
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture3d<float, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_00229f(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_00229f
-    ret
-  }
+kernel void compute_main(texture3d<float, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_00229f(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_00229f
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture3d<float, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/00348c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/00348c.wgsl.expected.ir.msl
index 6e14327..5612acc4 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/00348c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/00348c.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d_ms<int, access::read> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_multisampled_2d<i32>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_00348c(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width();
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height());
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_00348c = func():void {
-  $B2: {
-    %4:texture_multisampled_2d<i32> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_00348c(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_00348c
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d_ms<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_00348c(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_00348c
-    ret
-  }
+kernel void compute_main(texture2d_ms<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_00348c(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_00348c
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d_ms<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/022903.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/022903.wgsl.expected.ir.msl
index 7232e7e..b76a274 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/022903.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/022903.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture1d<int, access::sample> arg_0;
+  device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_1d<i32>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void textureDimensions_022903(tint_module_vars_struct tint_module_vars) {
+  uint res = uint(tint_module_vars.arg_0.get_width());
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_022903 = func():void {
-  $B2: {
-    %4:texture_1d<i32> = load %arg_0
-    %5:u32 = textureDimensions %4, 1u
-    %res:ptr<function, u32, read_write> = var, %5
-    %7:u32 = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_022903(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_022903
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture1d<int, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_022903(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_022903
-    ret
-  }
+kernel void compute_main(texture1d<int, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_022903(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_022903
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture1d<int, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0329b0.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/0329b0.wgsl.expected.ir.msl
index e8cd0aa..b6246e7 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/0329b0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/0329b0.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture1d<int, access::read> arg_0;
+  device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_1d<rgba16sint, read>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void textureDimensions_0329b0(tint_module_vars_struct tint_module_vars) {
+  uint res = uint(tint_module_vars.arg_0.get_width());
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_0329b0 = func():void {
-  $B2: {
-    %4:texture_storage_1d<rgba16sint, read> = load %arg_0
-    %5:u32 = textureDimensions %4
-    %res:ptr<function, u32, read_write> = var, %5
-    %7:u32 = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_0329b0(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_0329b0
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture1d<int, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_0329b0(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_0329b0
-    ret
-  }
+kernel void compute_main(texture1d<int, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_0329b0(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_0329b0
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture1d<int, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/033ea7.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/033ea7.wgsl.expected.ir.msl
index 94e7998..555d9ce 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/033ea7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/033ea7.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture1d<float, access::read> arg_0;
+  device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_1d<rgba8unorm, read>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void textureDimensions_033ea7(tint_module_vars_struct tint_module_vars) {
+  uint res = uint(tint_module_vars.arg_0.get_width());
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_033ea7 = func():void {
-  $B2: {
-    %4:texture_storage_1d<rgba8unorm, read> = load %arg_0
-    %5:u32 = textureDimensions %4
-    %res:ptr<function, u32, read_write> = var, %5
-    %7:u32 = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_033ea7(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_033ea7
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture1d<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_033ea7(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_033ea7
-    ret
-  }
+kernel void compute_main(texture1d<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_033ea7(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_033ea7
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture1d<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/07f1ba.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/07f1ba.wgsl.expected.ir.msl
index 7bd43fe..45eb12e 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/07f1ba.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/07f1ba.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d<float, access::read> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_2d<rgba16float, read>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_07f1ba(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_07f1ba = func():void {
-  $B2: {
-    %4:texture_storage_2d<rgba16float, read> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_07f1ba(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_07f1ba
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_07f1ba(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_07f1ba
-    ret
-  }
+kernel void compute_main(texture2d<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_07f1ba(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_07f1ba
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/088918.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/088918.wgsl.expected.ir.msl
index 8b222cb..c9f3f3f 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/088918.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/088918.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d<float, access::read> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_2d<rgba8unorm, read>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_088918(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_088918 = func():void {
-  $B2: {
-    %4:texture_storage_2d<rgba8unorm, read> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_088918(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_088918
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_088918(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_088918
-    ret
-  }
+kernel void compute_main(texture2d<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_088918(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_088918
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0890c6.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/0890c6.wgsl.expected.ir.msl
index 601df6f..c278052 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/0890c6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/0890c6.wgsl.expected.ir.msl
@@ -1,43 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture3d<float, access::sample> arg_0;
+  device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_3d<f32>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_0890c6(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(1u);
+  uint const v_1 = tint_module_vars.arg_0.get_height(1u);
+  uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(1u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_0890c6 = func():void {
-  $B2: {
-    %4:texture_3d<f32> = load %arg_0
-    %5:vec3<u32> = textureDimensions %4, 1u
-    %res:ptr<function, vec3<u32>, read_write> = var, %5
-    %7:vec3<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_0890c6(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_0890c6
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture3d<float, access::sample> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_0890c6(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_0890c6
-    ret
-  }
+kernel void compute_main(texture3d<float, access::sample> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_0890c6(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_0890c6
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture3d<float, access::sample> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/08e371.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/08e371.wgsl.expected.ir.msl
index b091661..cc4524b 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/08e371.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/08e371.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d<int, access::read> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_2d<rg32sint, read>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_08e371(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_08e371 = func():void {
-  $B2: {
-    %4:texture_storage_2d<rg32sint, read> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_08e371(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_08e371
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_08e371(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_08e371
-    ret
-  }
+kernel void compute_main(texture2d<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_08e371(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_08e371
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/09140b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/09140b.wgsl.expected.ir.msl
index 7cecfa5..28af2b2 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/09140b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/09140b.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture1d<uint, access::write> arg_0;
+  device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_1d<rgba32uint, write>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void textureDimensions_09140b(tint_module_vars_struct tint_module_vars) {
+  uint res = uint(tint_module_vars.arg_0.get_width());
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_09140b = func():void {
-  $B2: {
-    %4:texture_storage_1d<rgba32uint, write> = load %arg_0
-    %5:u32 = textureDimensions %4
-    %res:ptr<function, u32, read_write> = var, %5
-    %7:u32 = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_09140b(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_09140b
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture1d<uint, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_09140b(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_09140b
-    ret
-  }
+kernel void compute_main(texture1d<uint, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_09140b(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_09140b
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture1d<uint, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0baa0d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/0baa0d.wgsl.expected.ir.msl
index 3fe3ba8..b6dbf30 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/0baa0d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/0baa0d.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d<float, access::write> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_2d<r32float, write>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_0baa0d(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_0baa0d = func():void {
-  $B2: {
-    %4:texture_storage_2d<r32float, write> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_0baa0d(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_0baa0d
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_0baa0d(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_0baa0d
-    ret
-  }
+kernel void compute_main(texture2d<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_0baa0d(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_0baa0d
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0c0b0c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/0c0b0c.wgsl.expected.ir.msl
index 2b0db04..fc7dfc6 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/0c0b0c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/0c0b0c.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture1d<float, access::write> arg_0;
+  device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_1d<rgba16float, write>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void textureDimensions_0c0b0c(tint_module_vars_struct tint_module_vars) {
+  uint res = uint(tint_module_vars.arg_0.get_width());
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_0c0b0c = func():void {
-  $B2: {
-    %4:texture_storage_1d<rgba16float, write> = load %arg_0
-    %5:u32 = textureDimensions %4
-    %res:ptr<function, u32, read_write> = var, %5
-    %7:u32 = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_0c0b0c(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_0c0b0c
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture1d<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_0c0b0c(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_0c0b0c
-    ret
-  }
+kernel void compute_main(texture1d<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_0c0b0c(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_0c0b0c
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture1d<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0d4a7c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/0d4a7c.wgsl.expected.ir.msl
index 587df6b..9e33e93 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/0d4a7c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/0d4a7c.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d<uint, access::read> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_2d<rgba32uint, read>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_0d4a7c(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_0d4a7c = func():void {
-  $B2: {
-    %4:texture_storage_2d<rgba32uint, read> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_0d4a7c(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_0d4a7c
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_0d4a7c(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_0d4a7c
-    ret
-  }
+kernel void compute_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_0d4a7c(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_0d4a7c
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/0ff9a4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/0ff9a4.wgsl.expected.ir.msl
index ebdcefa..da4a72f 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/0ff9a4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/0ff9a4.wgsl.expected.ir.msl
@@ -1,43 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  depthcube_array<float, access::sample> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_depth_cube_array, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_0ff9a4(tint_module_vars_struct tint_module_vars) {
+  uint const v = uint(1);
+  uint const v_1 = tint_module_vars.arg_0.get_width(v);
+  uint2 res = uint2(v_1, tint_module_vars.arg_0.get_height(v));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_0ff9a4 = func():void {
-  $B2: {
-    %4:texture_depth_cube_array = load %arg_0
-    %5:vec2<u32> = textureDimensions %4, 1i
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_0ff9a4(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_0ff9a4
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_0ff9a4(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_0ff9a4
-    ret
-  }
+kernel void compute_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_0ff9a4(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_0ff9a4
-    ret
-  }
+vertex vertex_main_outputs vertex_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/135176.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/135176.wgsl.expected.ir.msl
index 8bf1674..4cda88f5 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/135176.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/135176.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d_array<float, access::read> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_2d_array<r32float, read>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_135176(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_135176 = func():void {
-  $B2: {
-    %4:texture_storage_2d_array<r32float, read> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_135176(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_135176
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_135176(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_135176
-    ret
-  }
+kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_135176(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_135176
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/13f8db.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/13f8db.wgsl.expected.ir.msl
index 022bcd6..7ff0065 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/13f8db.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/13f8db.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d<float, access::sample> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_2d<f32>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_13f8db(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(1u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(1u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_13f8db = func():void {
-  $B2: {
-    %4:texture_2d<f32> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4, 1u
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_13f8db(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_13f8db
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_13f8db(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_13f8db
-    ret
-  }
+kernel void compute_main(texture2d<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_13f8db(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_13f8db
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/1417dd.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/1417dd.wgsl.expected.ir.msl
index 8a98008..c366330 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/1417dd.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/1417dd.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d<int, access::write> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_2d<rgba16sint, write>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_1417dd(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_1417dd = func():void {
-  $B2: {
-    %4:texture_storage_2d<rgba16sint, write> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_1417dd(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_1417dd
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d<int, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_1417dd(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_1417dd
-    ret
-  }
+kernel void compute_main(texture2d<int, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_1417dd(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_1417dd
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d<int, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/15aa17.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/15aa17.wgsl.expected.ir.msl
index 0d1b2e3..de354cc 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/15aa17.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/15aa17.wgsl.expected.ir.msl
@@ -1,43 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture3d<int, access::write> arg_0;
+  device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_3d<rgba32sint, write>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_15aa17(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint const v_1 = tint_module_vars.arg_0.get_height(0u);
+  uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_15aa17 = func():void {
-  $B2: {
-    %4:texture_storage_3d<rgba32sint, write> = load %arg_0
-    %5:vec3<u32> = textureDimensions %4
-    %res:ptr<function, vec3<u32>, read_write> = var, %5
-    %7:vec3<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_15aa17(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_15aa17
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture3d<int, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_15aa17(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_15aa17
-    ret
-  }
+kernel void compute_main(texture3d<int, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_15aa17(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_15aa17
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture3d<int, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/15b577.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/15b577.wgsl.expected.ir.msl
index a2d9dc6..97ccb0e 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/15b577.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/15b577.wgsl.expected.ir.msl
@@ -1,43 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d<uint, access::sample> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_2d<u32>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_15b577(tint_module_vars_struct tint_module_vars) {
+  uint const v = uint(1);
+  uint const v_1 = tint_module_vars.arg_0.get_width(v);
+  uint2 res = uint2(v_1, tint_module_vars.arg_0.get_height(v));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_15b577 = func():void {
-  $B2: {
-    %4:texture_2d<u32> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4, 1i
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_15b577(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_15b577
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_15b577(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_15b577
-    ret
-  }
+kernel void compute_main(texture2d<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_15b577(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_15b577
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/18f19f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/18f19f.wgsl.expected.ir.msl
index 5c1e999..b97c564 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/18f19f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/18f19f.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d<float, access::write> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_2d<r8unorm, write>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_18f19f(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_18f19f = func():void {
-  $B2: {
-    %4:texture_storage_2d<r8unorm, write> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_18f19f(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_18f19f
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_18f19f(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_18f19f
-    ret
-  }
+kernel void compute_main(texture2d<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_18f19f(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_18f19f
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/1a2be7.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/1a2be7.wgsl.expected.ir.msl
index f4d7661..44ba07b 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/1a2be7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/1a2be7.wgsl.expected.ir.msl
@@ -1,43 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture3d<int, access::sample> arg_0;
+  device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_3d<i32>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_1a2be7(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint const v_1 = tint_module_vars.arg_0.get_height(0u);
+  uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_1a2be7 = func():void {
-  $B2: {
-    %4:texture_3d<i32> = load %arg_0
-    %5:vec3<u32> = textureDimensions %4
-    %res:ptr<function, vec3<u32>, read_write> = var, %5
-    %7:vec3<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_1a2be7(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_1a2be7
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture3d<int, access::sample> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_1a2be7(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_1a2be7
-    ret
-  }
+kernel void compute_main(texture3d<int, access::sample> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_1a2be7(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_1a2be7
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture3d<int, access::sample> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/1b720f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/1b720f.wgsl.expected.ir.msl
index 087679b..df1267d 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/1b720f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/1b720f.wgsl.expected.ir.msl
@@ -1,43 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture3d<int, access::read> arg_0;
+  device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_3d<rgba16sint, read>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_1b720f(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint const v_1 = tint_module_vars.arg_0.get_height(0u);
+  uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_1b720f = func():void {
-  $B2: {
-    %4:texture_storage_3d<rgba16sint, read> = load %arg_0
-    %5:vec3<u32> = textureDimensions %4
-    %res:ptr<function, vec3<u32>, read_write> = var, %5
-    %7:vec3<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_1b720f(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_1b720f
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture3d<int, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_1b720f(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_1b720f
-    ret
-  }
+kernel void compute_main(texture3d<int, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_1b720f(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_1b720f
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture3d<int, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/1bc428.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/1bc428.wgsl.expected.ir.msl
index b74d04f..4a8957e 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/1bc428.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/1bc428.wgsl.expected.ir.msl
@@ -1,43 +1,33 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture3d<float, access::sample> arg_0;
+  device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_3d<f32>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_1bc428(tint_module_vars_struct tint_module_vars) {
+  uint const v = uint(1);
+  uint const v_1 = tint_module_vars.arg_0.get_width(v);
+  uint const v_2 = tint_module_vars.arg_0.get_height(v);
+  uint3 res = uint3(v_1, v_2, tint_module_vars.arg_0.get_depth(v));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_1bc428 = func():void {
-  $B2: {
-    %4:texture_3d<f32> = load %arg_0
-    %5:vec3<u32> = textureDimensions %4, 1i
-    %res:ptr<function, vec3<u32>, read_write> = var, %5
-    %7:vec3<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_1bc428(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_1bc428
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture3d<float, access::sample> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_1bc428(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_1bc428
-    ret
-  }
+kernel void compute_main(texture3d<float, access::sample> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_1bc428(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_1bc428
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture3d<float, access::sample> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/1bd78c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/1bd78c.wgsl.expected.ir.msl
index c3ac928..c54e0a6 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/1bd78c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/1bd78c.wgsl.expected.ir.msl
@@ -1,43 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d<float, access::sample> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_2d<f32>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_1bd78c(tint_module_vars_struct tint_module_vars) {
+  uint const v = uint(1);
+  uint const v_1 = tint_module_vars.arg_0.get_width(v);
+  uint2 res = uint2(v_1, tint_module_vars.arg_0.get_height(v));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_1bd78c = func():void {
-  $B2: {
-    %4:texture_2d<f32> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4, 1i
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_1bd78c(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_1bd78c
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_1bd78c(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_1bd78c
-    ret
-  }
+kernel void compute_main(texture2d<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_1bd78c(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_1bd78c
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/212362.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/212362.wgsl.expected.ir.msl
index 9ae2b94..9a4ad98 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/212362.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/212362.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture1d<float, access::read> arg_0;
+  device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_1d<r32float, read>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void textureDimensions_212362(tint_module_vars_struct tint_module_vars) {
+  uint res = uint(tint_module_vars.arg_0.get_width());
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_212362 = func():void {
-  $B2: {
-    %4:texture_storage_1d<r32float, read> = load %arg_0
-    %5:u32 = textureDimensions %4
-    %res:ptr<function, u32, read_write> = var, %5
-    %7:u32 = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_212362(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_212362
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture1d<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_212362(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_212362
-    ret
-  }
+kernel void compute_main(texture1d<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_212362(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_212362
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture1d<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/224113.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/224113.wgsl.expected.ir.msl
index 01a873d..5e7443d 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/224113.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/224113.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d<float, access::write> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_2d<rgba8unorm, write>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_224113(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_224113 = func():void {
-  $B2: {
-    %4:texture_storage_2d<rgba8unorm, write> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_224113(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_224113
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_224113(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_224113
-    ret
-  }
+kernel void compute_main(texture2d<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_224113(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_224113
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/22b5b6.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/22b5b6.wgsl.expected.ir.msl
index 62e3a16..795a58a 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/22b5b6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/22b5b6.wgsl.expected.ir.msl
@@ -1,43 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texturecube_array<uint, access::sample> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_cube_array<u32>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_22b5b6(tint_module_vars_struct tint_module_vars) {
+  uint const v = uint(1);
+  uint const v_1 = tint_module_vars.arg_0.get_width(v);
+  uint2 res = uint2(v_1, tint_module_vars.arg_0.get_height(v));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_22b5b6 = func():void {
-  $B2: {
-    %4:texture_cube_array<u32> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4, 1i
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_22b5b6(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_22b5b6
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texturecube_array<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_22b5b6(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_22b5b6
-    ret
-  }
+kernel void compute_main(texturecube_array<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_22b5b6(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_22b5b6
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texturecube_array<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/24db07.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/24db07.wgsl.expected.ir.msl
index a6dfb5c..b734f66 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/24db07.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/24db07.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d<float, access::sample> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_2d<f32>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_24db07(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_24db07 = func():void {
-  $B2: {
-    %4:texture_2d<f32> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_24db07(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_24db07
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_24db07(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_24db07
-    ret
-  }
+kernel void compute_main(texture2d<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_24db07(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_24db07
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/25d284.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/25d284.wgsl.expected.ir.msl
index 0da591d..03a4f08 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/25d284.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/25d284.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d_array<float, access::write> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_2d_array<r8unorm, write>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_25d284(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_25d284 = func():void {
-  $B2: {
-    %4:texture_storage_2d_array<r8unorm, write> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_25d284(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_25d284
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_25d284(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_25d284
-    ret
-  }
+kernel void compute_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_25d284(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_25d284
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/2674d8.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/2674d8.wgsl.expected.ir.msl
index d004de9..0013656 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/2674d8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/2674d8.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d_array<uint, access::write> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_2d_array<rg32uint, write>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_2674d8(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_2674d8 = func():void {
-  $B2: {
-    %4:texture_storage_2d_array<rg32uint, write> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_2674d8(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_2674d8
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_2674d8(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_2674d8
-    ret
-  }
+kernel void compute_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_2674d8(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_2674d8
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/268ddb.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/268ddb.wgsl.expected.ir.msl
index f3ace0c..0c9bfeb 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/268ddb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/268ddb.wgsl.expected.ir.msl
@@ -1,43 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture3d<uint, access::read> arg_0;
+  device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_3d<rgba32uint, read>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_268ddb(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint const v_1 = tint_module_vars.arg_0.get_height(0u);
+  uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_268ddb = func():void {
-  $B2: {
-    %4:texture_storage_3d<rgba32uint, read> = load %arg_0
-    %5:vec3<u32> = textureDimensions %4
-    %res:ptr<function, vec3<u32>, read_write> = var, %5
-    %7:vec3<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_268ddb(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_268ddb
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_268ddb(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_268ddb
-    ret
-  }
+kernel void compute_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_268ddb(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_268ddb
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/26d6bf.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/26d6bf.wgsl.expected.ir.msl
index c1f845d..b13431c 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/26d6bf.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/26d6bf.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture1d<float, access::sample> arg_0;
+  device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_1d<f32>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void textureDimensions_26d6bf(tint_module_vars_struct tint_module_vars) {
+  uint res = uint(tint_module_vars.arg_0.get_width());
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_26d6bf = func():void {
-  $B2: {
-    %4:texture_1d<f32> = load %arg_0
-    %5:u32 = textureDimensions %4
-    %res:ptr<function, u32, read_write> = var, %5
-    %7:u32 = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_26d6bf(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_26d6bf
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture1d<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_26d6bf(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_26d6bf
-    ret
-  }
+kernel void compute_main(texture1d<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_26d6bf(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_26d6bf
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture1d<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/284c27.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/284c27.wgsl.expected.ir.msl
index 7d0faea..9cfd27a 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/284c27.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/284c27.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture1d<float, access::read> arg_0;
+  device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_1d<rg32float, read>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void textureDimensions_284c27(tint_module_vars_struct tint_module_vars) {
+  uint res = uint(tint_module_vars.arg_0.get_width());
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_284c27 = func():void {
-  $B2: {
-    %4:texture_storage_1d<rg32float, read> = load %arg_0
-    %5:u32 = textureDimensions %4
-    %res:ptr<function, u32, read_write> = var, %5
-    %7:u32 = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_284c27(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_284c27
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture1d<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_284c27(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_284c27
-    ret
-  }
+kernel void compute_main(texture1d<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_284c27(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_284c27
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture1d<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/2bafdf.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/2bafdf.wgsl.expected.ir.msl
index 9760498..6bde090 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/2bafdf.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/2bafdf.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture1d<float, access::read> arg_0;
+  device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_1d<bgra8unorm, read>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void textureDimensions_2bafdf(tint_module_vars_struct tint_module_vars) {
+  uint res = uint(tint_module_vars.arg_0.get_width());
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_2bafdf = func():void {
-  $B2: {
-    %4:texture_storage_1d<bgra8unorm, read> = load %arg_0
-    %5:u32 = textureDimensions %4
-    %res:ptr<function, u32, read_write> = var, %5
-    %7:u32 = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_2bafdf(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_2bafdf
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture1d<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_2bafdf(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_2bafdf
-    ret
-  }
+kernel void compute_main(texture1d<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_2bafdf(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_2bafdf
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture1d<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/2dc5c5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/2dc5c5.wgsl.expected.ir.msl
index a95e06f..62a2677 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/2dc5c5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/2dc5c5.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture1d<uint, access::read> arg_0;
+  device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_1d<rgba8uint, read>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void textureDimensions_2dc5c5(tint_module_vars_struct tint_module_vars) {
+  uint res = uint(tint_module_vars.arg_0.get_width());
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_2dc5c5 = func():void {
-  $B2: {
-    %4:texture_storage_1d<rgba8uint, read> = load %arg_0
-    %5:u32 = textureDimensions %4
-    %res:ptr<function, u32, read_write> = var, %5
-    %7:u32 = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_2dc5c5(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_2dc5c5
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_2dc5c5(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_2dc5c5
-    ret
-  }
+kernel void compute_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_2dc5c5(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_2dc5c5
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/2e443d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/2e443d.wgsl.expected.ir.msl
index 14a2522..2dae4c6 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/2e443d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/2e443d.wgsl.expected.ir.msl
@@ -1,43 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d<int, access::sample> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_2d<i32>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_2e443d(tint_module_vars_struct tint_module_vars) {
+  uint const v = uint(1);
+  uint const v_1 = tint_module_vars.arg_0.get_width(v);
+  uint2 res = uint2(v_1, tint_module_vars.arg_0.get_height(v));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_2e443d = func():void {
-  $B2: {
-    %4:texture_2d<i32> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4, 1i
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_2e443d(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_2e443d
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_2e443d(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_2e443d
-    ret
-  }
+kernel void compute_main(texture2d<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_2e443d(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_2e443d
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/2fd2a4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/2fd2a4.wgsl.expected.ir.msl
index 4c813e5..e86ecd3 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/2fd2a4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/2fd2a4.wgsl.expected.ir.msl
@@ -1,43 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d_array<float, access::sample> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_2d_array<f32>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_2fd2a4(tint_module_vars_struct tint_module_vars) {
+  uint const v = uint(1);
+  uint const v_1 = tint_module_vars.arg_0.get_width(v);
+  uint2 res = uint2(v_1, tint_module_vars.arg_0.get_height(v));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_2fd2a4 = func():void {
-  $B2: {
-    %4:texture_2d_array<f32> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4, 1i
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_2fd2a4(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_2fd2a4
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_2fd2a4(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_2fd2a4
-    ret
-  }
+kernel void compute_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_2fd2a4(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_2fd2a4
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/2ff32a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/2ff32a.wgsl.expected.ir.msl
index 5d4bba5..5502af7 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/2ff32a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/2ff32a.wgsl.expected.ir.msl
@@ -1,43 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture3d<float, access::read> arg_0;
+  device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_3d<r32float, read>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_2ff32a(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint const v_1 = tint_module_vars.arg_0.get_height(0u);
+  uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_2ff32a = func():void {
-  $B2: {
-    %4:texture_storage_3d<r32float, read> = load %arg_0
-    %5:vec3<u32> = textureDimensions %4
-    %res:ptr<function, vec3<u32>, read_write> = var, %5
-    %7:vec3<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_2ff32a(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_2ff32a
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture3d<float, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_2ff32a(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_2ff32a
-    ret
-  }
+kernel void compute_main(texture3d<float, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_2ff32a(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_2ff32a
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture3d<float, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/305dd5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/305dd5.wgsl.expected.ir.msl
index 7ebfbd1..9cbf58d 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/305dd5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/305dd5.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d_array<uint, access::read> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_2d_array<r32uint, read>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_305dd5(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_305dd5 = func():void {
-  $B2: {
-    %4:texture_storage_2d_array<r32uint, read> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_305dd5(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_305dd5
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_305dd5(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_305dd5
-    ret
-  }
+kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_305dd5(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_305dd5
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/31799c.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/31799c.wgsl.expected.ir.msl
index fb3c196..658f478 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/31799c.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/31799c.wgsl.expected.ir.msl
@@ -1,43 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture3d<uint, access::write> arg_0;
+  device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_3d<r32uint, write>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_31799c(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint const v_1 = tint_module_vars.arg_0.get_height(0u);
+  uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_31799c = func():void {
-  $B2: {
-    %4:texture_storage_3d<r32uint, write> = load %arg_0
-    %5:vec3<u32> = textureDimensions %4
-    %res:ptr<function, vec3<u32>, read_write> = var, %5
-    %7:vec3<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_31799c(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_31799c
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture3d<uint, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_31799c(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_31799c
-    ret
-  }
+kernel void compute_main(texture3d<uint, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_31799c(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_31799c
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture3d<uint, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/346fee.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/346fee.wgsl.expected.ir.msl
index cc3c5ac..904b549 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/346fee.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/346fee.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texturecube_array<uint, access::sample> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_cube_array<u32>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_346fee(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(1u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(1u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_346fee = func():void {
-  $B2: {
-    %4:texture_cube_array<u32> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4, 1u
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_346fee(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_346fee
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texturecube_array<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_346fee(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_346fee
-    ret
-  }
+kernel void compute_main(texturecube_array<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_346fee(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_346fee
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texturecube_array<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/35a7e5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/35a7e5.wgsl.expected.ir.msl
index dac4208..825286f 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/35a7e5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/35a7e5.wgsl.expected.ir.msl
@@ -1,43 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture3d<uint, access::write> arg_0;
+  device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_3d<rgba16uint, write>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_35a7e5(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint const v_1 = tint_module_vars.arg_0.get_height(0u);
+  uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_35a7e5 = func():void {
-  $B2: {
-    %4:texture_storage_3d<rgba16uint, write> = load %arg_0
-    %5:vec3<u32> = textureDimensions %4
-    %res:ptr<function, vec3<u32>, read_write> = var, %5
-    %7:vec3<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_35a7e5(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_35a7e5
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture3d<uint, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_35a7e5(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_35a7e5
-    ret
-  }
+kernel void compute_main(texture3d<uint, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_35a7e5(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_35a7e5
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture3d<uint, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/35ee69.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/35ee69.wgsl.expected.ir.msl
index 2d3dfdc..c63c5f8 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/35ee69.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/35ee69.wgsl.expected.ir.msl
@@ -1,43 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture3d<uint, access::write> arg_0;
+  device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_3d<rg32uint, write>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_35ee69(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint const v_1 = tint_module_vars.arg_0.get_height(0u);
+  uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_35ee69 = func():void {
-  $B2: {
-    %4:texture_storage_3d<rg32uint, write> = load %arg_0
-    %5:vec3<u32> = textureDimensions %4
-    %res:ptr<function, vec3<u32>, read_write> = var, %5
-    %7:vec3<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_35ee69(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_35ee69
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture3d<uint, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_35ee69(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_35ee69
-    ret
-  }
+kernel void compute_main(texture3d<uint, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_35ee69(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_35ee69
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture3d<uint, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/378a65.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/378a65.wgsl.expected.ir.msl
index 3900345..cefaab6 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/378a65.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/378a65.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d<int, access::write> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_2d<rgba8sint, write>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_378a65(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_378a65 = func():void {
-  $B2: {
-    %4:texture_storage_2d<rgba8sint, write> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_378a65(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_378a65
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d<int, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_378a65(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_378a65
-    ret
-  }
+kernel void compute_main(texture2d<int, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_378a65(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_378a65
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d<int, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/382b16.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/382b16.wgsl.expected.ir.msl
index 9af7332..e905b50 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/382b16.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/382b16.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texturecube<float, access::sample> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_cube<f32>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_382b16(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(1u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(1u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_382b16 = func():void {
-  $B2: {
-    %4:texture_cube<f32> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4, 1u
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_382b16(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_382b16
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texturecube<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_382b16(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_382b16
-    ret
-  }
+kernel void compute_main(texturecube<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_382b16(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_382b16
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texturecube<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/3963d0.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/3963d0.wgsl.expected.ir.msl
index 8754cd9..682cd74 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/3963d0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/3963d0.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texturecube_array<int, access::sample> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_cube_array<i32>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_3963d0(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(1u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(1u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_3963d0 = func():void {
-  $B2: {
-    %4:texture_cube_array<i32> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4, 1u
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_3963d0(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_3963d0
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texturecube_array<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_3963d0(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_3963d0
-    ret
-  }
+kernel void compute_main(texturecube_array<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_3963d0(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_3963d0
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texturecube_array<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/397dab.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/397dab.wgsl.expected.ir.msl
index 1e11e55..789e47e 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/397dab.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/397dab.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d_array<uint, access::read> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_2d_array<rgba8uint, read>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_397dab(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_397dab = func():void {
-  $B2: {
-    %4:texture_storage_2d_array<rgba8uint, read> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_397dab(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_397dab
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_397dab(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_397dab
-    ret
-  }
+kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_397dab(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_397dab
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/3a5bb1.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/3a5bb1.wgsl.expected.ir.msl
index a025279..7e826c5 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/3a5bb1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/3a5bb1.wgsl.expected.ir.msl
@@ -1,43 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture3d<float, access::write> arg_0;
+  device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_3d<rgba32float, write>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_3a5bb1(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint const v_1 = tint_module_vars.arg_0.get_height(0u);
+  uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_3a5bb1 = func():void {
-  $B2: {
-    %4:texture_storage_3d<rgba32float, write> = load %arg_0
-    %5:vec3<u32> = textureDimensions %4
-    %res:ptr<function, vec3<u32>, read_write> = var, %5
-    %7:vec3<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_3a5bb1(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_3a5bb1
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture3d<float, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_3a5bb1(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_3a5bb1
-    ret
-  }
+kernel void compute_main(texture3d<float, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_3a5bb1(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_3a5bb1
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture3d<float, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/3a7b69.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/3a7b69.wgsl.expected.ir.msl
index 120e276..0fcdd6e 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/3a7b69.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/3a7b69.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d_array<float, access::write> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_2d_array<rgba8unorm, write>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_3a7b69(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_3a7b69 = func():void {
-  $B2: {
-    %4:texture_storage_2d_array<rgba8unorm, write> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_3a7b69(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_3a7b69
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_3a7b69(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_3a7b69
-    ret
-  }
+kernel void compute_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_3a7b69(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_3a7b69
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/3af3e7.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/3af3e7.wgsl.expected.ir.msl
index c68bbe6..be19d1b 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/3af3e7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/3af3e7.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture1d<float, access::write> arg_0;
+  device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_1d<rgba8unorm, write>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void textureDimensions_3af3e7(tint_module_vars_struct tint_module_vars) {
+  uint res = uint(tint_module_vars.arg_0.get_width());
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_3af3e7 = func():void {
-  $B2: {
-    %4:texture_storage_1d<rgba8unorm, write> = load %arg_0
-    %5:u32 = textureDimensions %4
-    %res:ptr<function, u32, read_write> = var, %5
-    %7:u32 = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_3af3e7(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_3af3e7
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture1d<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_3af3e7(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_3af3e7
-    ret
-  }
+kernel void compute_main(texture1d<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_3af3e7(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_3af3e7
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture1d<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/3b38f6.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/3b38f6.wgsl.expected.ir.msl
index 6dacb37..b2b2b91 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/3b38f6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/3b38f6.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  depth2d<float, access::sample> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_depth_2d, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_3b38f6(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_3b38f6 = func():void {
-  $B2: {
-    %4:texture_depth_2d = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_3b38f6(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_3b38f6
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(depth2d<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_3b38f6(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_3b38f6
-    ret
-  }
+kernel void compute_main(depth2d<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_3b38f6(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_3b38f6
-    ret
-  }
+vertex vertex_main_outputs vertex_main(depth2d<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/3baab5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/3baab5.wgsl.expected.ir.msl
index 0b67c6a..2928021 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/3baab5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/3baab5.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d_array<uint, access::write> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_2d_array<rgba8uint, write>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_3baab5(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_3baab5 = func():void {
-  $B2: {
-    %4:texture_storage_2d_array<rgba8uint, write> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_3baab5(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_3baab5
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_3baab5(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_3baab5
-    ret
-  }
+kernel void compute_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_3baab5(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_3baab5
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/3c66f0.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/3c66f0.wgsl.expected.ir.msl
index 2061f4b..b67c01e 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/3c66f0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/3c66f0.wgsl.expected.ir.msl
@@ -1,43 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texturecube_array<int, access::sample> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_cube_array<i32>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_3c66f0(tint_module_vars_struct tint_module_vars) {
+  uint const v = uint(1);
+  uint const v_1 = tint_module_vars.arg_0.get_width(v);
+  uint2 res = uint2(v_1, tint_module_vars.arg_0.get_height(v));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_3c66f0 = func():void {
-  $B2: {
-    %4:texture_cube_array<i32> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4, 1i
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_3c66f0(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_3c66f0
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texturecube_array<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_3c66f0(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_3c66f0
-    ret
-  }
+kernel void compute_main(texturecube_array<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_3c66f0(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_3c66f0
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texturecube_array<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/3f3474.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/3f3474.wgsl.expected.ir.msl
index 4bf0dfb..03df67a 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/3f3474.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/3f3474.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d_ms<float, access::read> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_multisampled_2d<f32>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_3f3474(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width();
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height());
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_3f3474 = func():void {
-  $B2: {
-    %4:texture_multisampled_2d<f32> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_3f3474(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_3f3474
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d_ms<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_3f3474(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_3f3474
-    ret
-  }
+kernel void compute_main(texture2d_ms<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_3f3474(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_3f3474
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d_ms<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/3fc3dc.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/3fc3dc.wgsl.expected.ir.msl
index ec59950..1268bb6 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/3fc3dc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/3fc3dc.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d_array<float, access::sample> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_2d_array<f32>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_3fc3dc(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(1u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(1u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_3fc3dc = func():void {
-  $B2: {
-    %4:texture_2d_array<f32> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4, 1u
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_3fc3dc(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_3fc3dc
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_3fc3dc(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_3fc3dc
-    ret
-  }
+kernel void compute_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_3fc3dc(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_3fc3dc
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/3ff0a5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/3ff0a5.wgsl.expected.ir.msl
index c51a938..986fa1c 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/3ff0a5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/3ff0a5.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d_array<int, access::read> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_2d_array<r32sint, read>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_3ff0a5(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_3ff0a5 = func():void {
-  $B2: {
-    %4:texture_storage_2d_array<r32sint, read> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_3ff0a5(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_3ff0a5
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_3ff0a5(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_3ff0a5
-    ret
-  }
+kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_3ff0a5(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_3ff0a5
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/40c671.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/40c671.wgsl.expected.ir.msl
index 25a3c15..7bae585 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/40c671.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/40c671.wgsl.expected.ir.msl
@@ -1,43 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture3d<int, access::write> arg_0;
+  device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_3d<rgba8sint, write>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_40c671(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint const v_1 = tint_module_vars.arg_0.get_height(0u);
+  uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_40c671 = func():void {
-  $B2: {
-    %4:texture_storage_3d<rgba8sint, write> = load %arg_0
-    %5:vec3<u32> = textureDimensions %4
-    %res:ptr<function, vec3<u32>, read_write> = var, %5
-    %7:vec3<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_40c671(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_40c671
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture3d<int, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_40c671(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_40c671
-    ret
-  }
+kernel void compute_main(texture3d<int, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_40c671(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_40c671
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture3d<int, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/40da20.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/40da20.wgsl.expected.ir.msl
index 208291e..cbdd6e7 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/40da20.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/40da20.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d<float, access::read> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_2d<r8unorm, read>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_40da20(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_40da20 = func():void {
-  $B2: {
-    %4:texture_storage_2d<r8unorm, read> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_40da20(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_40da20
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_40da20(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_40da20
-    ret
-  }
+kernel void compute_main(texture2d<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_40da20(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_40da20
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/40ecf4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/40ecf4.wgsl.expected.ir.msl
index c705907..7672d7b 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/40ecf4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/40ecf4.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d_array<uint, access::write> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_2d_array<rgba16uint, write>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_40ecf4(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_40ecf4 = func():void {
-  $B2: {
-    %4:texture_storage_2d_array<rgba16uint, write> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_40ecf4(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_40ecf4
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_40ecf4(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_40ecf4
-    ret
-  }
+kernel void compute_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_40ecf4(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_40ecf4
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/41545f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/41545f.wgsl.expected.ir.msl
index 2fa16a6..3bc56f0 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/41545f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/41545f.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d_array<uint, access::write> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_2d_array<r32uint, write>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_41545f(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_41545f = func():void {
-  $B2: {
-    %4:texture_storage_2d_array<r32uint, write> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_41545f(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_41545f
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_41545f(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_41545f
-    ret
-  }
+kernel void compute_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_41545f(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_41545f
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/423519.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/423519.wgsl.expected.ir.msl
index 53deb29..e620ac6 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/423519.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/423519.wgsl.expected.ir.msl
@@ -1,43 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture3d<uint, access::read> arg_0;
+  device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_3d<r32uint, read>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_423519(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint const v_1 = tint_module_vars.arg_0.get_height(0u);
+  uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_423519 = func():void {
-  $B2: {
-    %4:texture_storage_3d<r32uint, read> = load %arg_0
-    %5:vec3<u32> = textureDimensions %4
-    %res:ptr<function, vec3<u32>, read_write> = var, %5
-    %7:vec3<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_423519(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_423519
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_423519(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_423519
-    ret
-  }
+kernel void compute_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_423519(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_423519
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/439651.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/439651.wgsl.expected.ir.msl
index 0217d47..050d7b9 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/439651.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/439651.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d<int, access::write> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_2d<rg32sint, write>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_439651(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_439651 = func():void {
-  $B2: {
-    %4:texture_storage_2d<rg32sint, write> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_439651(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_439651
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d<int, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_439651(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_439651
-    ret
-  }
+kernel void compute_main(texture2d<int, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_439651(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_439651
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d<int, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/445376.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/445376.wgsl.expected.ir.msl
index a204183..5c45362 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/445376.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/445376.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d_array<uint, access::sample> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_2d_array<u32>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_445376(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_445376 = func():void {
-  $B2: {
-    %4:texture_2d_array<u32> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_445376(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_445376
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_445376(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_445376
-    ret
-  }
+kernel void compute_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_445376(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_445376
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/44b358.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/44b358.wgsl.expected.ir.msl
index 43f5263..213a904 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/44b358.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/44b358.wgsl.expected.ir.msl
@@ -1,43 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture3d<uint, access::write> arg_0;
+  device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_3d<rgba32uint, write>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_44b358(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint const v_1 = tint_module_vars.arg_0.get_height(0u);
+  uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_44b358 = func():void {
-  $B2: {
-    %4:texture_storage_3d<rgba32uint, write> = load %arg_0
-    %5:vec3<u32> = textureDimensions %4
-    %res:ptr<function, vec3<u32>, read_write> = var, %5
-    %7:vec3<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_44b358(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_44b358
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture3d<uint, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_44b358(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_44b358
-    ret
-  }
+kernel void compute_main(texture3d<uint, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_44b358(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_44b358
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture3d<uint, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/452fc1.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/452fc1.wgsl.expected.ir.msl
index 5745a04..f42ee2f 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/452fc1.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/452fc1.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d_array<uint, access::write> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_2d_array<rgba32uint, write>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_452fc1(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_452fc1 = func():void {
-  $B2: {
-    %4:texture_storage_2d_array<rgba32uint, write> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_452fc1(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_452fc1
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_452fc1(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_452fc1
-    ret
-  }
+kernel void compute_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_452fc1(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_452fc1
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/46f0fc.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/46f0fc.wgsl.expected.ir.msl
index c3a792c..b6907bb 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/46f0fc.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/46f0fc.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d_array<float, access::sample> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_2d_array<f32>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_46f0fc(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_46f0fc = func():void {
-  $B2: {
-    %4:texture_2d_array<f32> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_46f0fc(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_46f0fc
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_46f0fc(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_46f0fc
-    ret
-  }
+kernel void compute_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_46f0fc(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_46f0fc
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/4716a4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/4716a4.wgsl.expected.ir.msl
index fd0adfb..d878f96 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/4716a4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/4716a4.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d_array<int, access::read> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_2d_array<rgba8sint, read>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_4716a4(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_4716a4 = func():void {
-  $B2: {
-    %4:texture_storage_2d_array<rgba8sint, read> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_4716a4(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_4716a4
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_4716a4(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_4716a4
-    ret
-  }
+kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_4716a4(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_4716a4
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/475c10.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/475c10.wgsl.expected.ir.msl
index ef7d399..1536dec 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/475c10.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/475c10.wgsl.expected.ir.msl
@@ -1,43 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture3d<uint, access::read> arg_0;
+  device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_3d<rgba8uint, read>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_475c10(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint const v_1 = tint_module_vars.arg_0.get_height(0u);
+  uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_475c10 = func():void {
-  $B2: {
-    %4:texture_storage_3d<rgba8uint, read> = load %arg_0
-    %5:vec3<u32> = textureDimensions %4
-    %res:ptr<function, vec3<u32>, read_write> = var, %5
-    %7:vec3<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_475c10(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_475c10
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_475c10(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_475c10
-    ret
-  }
+kernel void compute_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_475c10(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_475c10
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture3d<uint, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/49a067.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/49a067.wgsl.expected.ir.msl
index b1f3fd8..16a2d7a 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/49a067.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/49a067.wgsl.expected.ir.msl
@@ -1,43 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texturecube<float, access::sample> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_cube<f32>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_49a067(tint_module_vars_struct tint_module_vars) {
+  uint const v = uint(1);
+  uint const v_1 = tint_module_vars.arg_0.get_width(v);
+  uint2 res = uint2(v_1, tint_module_vars.arg_0.get_height(v));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_49a067 = func():void {
-  $B2: {
-    %4:texture_cube<f32> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4, 1i
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_49a067(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_49a067
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texturecube<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_49a067(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_49a067
-    ret
-  }
+kernel void compute_main(texturecube<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_49a067(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_49a067
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texturecube<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/4acec7.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/4acec7.wgsl.expected.ir.msl
index 3c1c43b..e8582f2 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/4acec7.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/4acec7.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d_array<float, access::write> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_2d_array<rg32float, write>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_4acec7(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_4acec7 = func():void {
-  $B2: {
-    %4:texture_storage_2d_array<rg32float, write> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_4acec7(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_4acec7
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_4acec7(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_4acec7
-    ret
-  }
+kernel void compute_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_4acec7(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_4acec7
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/4b26ef.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/4b26ef.wgsl.expected.ir.msl
index 50f413f..95c0033 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/4b26ef.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/4b26ef.wgsl.expected.ir.msl
@@ -1,43 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture3d<float, access::write> arg_0;
+  device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_3d<rgba8unorm, write>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_4b26ef(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint const v_1 = tint_module_vars.arg_0.get_height(0u);
+  uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_4b26ef = func():void {
-  $B2: {
-    %4:texture_storage_3d<rgba8unorm, write> = load %arg_0
-    %5:vec3<u32> = textureDimensions %4
-    %res:ptr<function, vec3<u32>, read_write> = var, %5
-    %7:vec3<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_4b26ef(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_4b26ef
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture3d<float, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_4b26ef(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_4b26ef
-    ret
-  }
+kernel void compute_main(texture3d<float, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_4b26ef(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_4b26ef
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture3d<float, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/4be71b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/4be71b.wgsl.expected.ir.msl
index 11f227a..5bffd21 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/4be71b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/4be71b.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d<uint, access::sample> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_2d<u32>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_4be71b(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_4be71b = func():void {
-  $B2: {
-    %4:texture_2d<u32> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_4be71b(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_4be71b
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_4be71b(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_4be71b
-    ret
-  }
+kernel void compute_main(texture2d<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_4be71b(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_4be71b
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/4d1f71.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/4d1f71.wgsl.expected.ir.msl
index 0dba440..7de8086 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/4d1f71.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/4d1f71.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d_array<uint, access::read> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_2d_array<rg32uint, read>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_4d1f71(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_4d1f71 = func():void {
-  $B2: {
-    %4:texture_storage_2d_array<rg32uint, read> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_4d1f71(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_4d1f71
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_4d1f71(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_4d1f71
-    ret
-  }
+kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_4d1f71(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_4d1f71
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/528c0e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/528c0e.wgsl.expected.ir.msl
index 5e77cb4..fa46126 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/528c0e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/528c0e.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d_array<uint, access::sample> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_2d_array<u32>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_528c0e(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(1u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(1u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_528c0e = func():void {
-  $B2: {
-    %4:texture_2d_array<u32> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4, 1u
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_528c0e(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_528c0e
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_528c0e(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_528c0e
-    ret
-  }
+kernel void compute_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_528c0e(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_528c0e
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/52cf60.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/52cf60.wgsl.expected.ir.msl
index 531b168..74ff9ed 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/52cf60.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/52cf60.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d<float, access::read> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_2d<rg32float, read>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_52cf60(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_52cf60 = func():void {
-  $B2: {
-    %4:texture_storage_2d<rg32float, read> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_52cf60(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_52cf60
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_52cf60(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_52cf60
-    ret
-  }
+kernel void compute_main(texture2d<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_52cf60(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_52cf60
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/534ef8.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/534ef8.wgsl.expected.ir.msl
index f968e3c..e25eed4 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/534ef8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/534ef8.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d<int, access::read> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_2d<rgba8sint, read>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_534ef8(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_534ef8 = func():void {
-  $B2: {
-    %4:texture_storage_2d<rgba8sint, read> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_534ef8(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_534ef8
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_534ef8(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_534ef8
-    ret
-  }
+kernel void compute_main(texture2d<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_534ef8(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_534ef8
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/542c62.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/542c62.wgsl.expected.ir.msl
index ecbc4a0..1fd7a2f 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/542c62.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/542c62.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture1d<float, access::write> arg_0;
+  device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_1d<r8unorm, write>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void textureDimensions_542c62(tint_module_vars_struct tint_module_vars) {
+  uint res = uint(tint_module_vars.arg_0.get_width());
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_542c62 = func():void {
-  $B2: {
-    %4:texture_storage_1d<r8unorm, write> = load %arg_0
-    %5:u32 = textureDimensions %4
-    %res:ptr<function, u32, read_write> = var, %5
-    %7:u32 = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_542c62(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_542c62
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture1d<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_542c62(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_542c62
-    ret
-  }
+kernel void compute_main(texture1d<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_542c62(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_542c62
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture1d<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/58a82d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/58a82d.wgsl.expected.ir.msl
index 2e1f885..bc33d41 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/58a82d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/58a82d.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture1d<uint, access::write> arg_0;
+  device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_1d<rgba16uint, write>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void textureDimensions_58a82d(tint_module_vars_struct tint_module_vars) {
+  uint res = uint(tint_module_vars.arg_0.get_width());
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_58a82d = func():void {
-  $B2: {
-    %4:texture_storage_1d<rgba16uint, write> = load %arg_0
-    %5:u32 = textureDimensions %4
-    %res:ptr<function, u32, read_write> = var, %5
-    %7:u32 = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_58a82d(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_58a82d
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture1d<uint, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_58a82d(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_58a82d
-    ret
-  }
+kernel void compute_main(texture1d<uint, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_58a82d(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_58a82d
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture1d<uint, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/591981.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/591981.wgsl.expected.ir.msl
index 97fd934..8af8435 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/591981.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/591981.wgsl.expected.ir.msl
@@ -1,43 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture3d<int, access::write> arg_0;
+  device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_3d<rgba16sint, write>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_591981(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint const v_1 = tint_module_vars.arg_0.get_height(0u);
+  uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_591981 = func():void {
-  $B2: {
-    %4:texture_storage_3d<rgba16sint, write> = load %arg_0
-    %5:vec3<u32> = textureDimensions %4
-    %res:ptr<function, vec3<u32>, read_write> = var, %5
-    %7:vec3<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_591981(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_591981
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture3d<int, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_591981(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_591981
-    ret
-  }
+kernel void compute_main(texture3d<int, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_591981(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_591981
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture3d<int, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/599ab5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/599ab5.wgsl.expected.ir.msl
index 25db417..df671d0 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/599ab5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/599ab5.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d<float, access::write> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_2d<rgba16float, write>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_599ab5(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_599ab5 = func():void {
-  $B2: {
-    %4:texture_storage_2d<rgba16float, write> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_599ab5(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_599ab5
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_599ab5(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_599ab5
-    ret
-  }
+kernel void compute_main(texture2d<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_599ab5(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_599ab5
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/5b4b10.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/5b4b10.wgsl.expected.ir.msl
index 5d70969..96c1bc3 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/5b4b10.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/5b4b10.wgsl.expected.ir.msl
@@ -1,43 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture3d<float, access::write> arg_0;
+  device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_3d<bgra8unorm, write>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_5b4b10(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint const v_1 = tint_module_vars.arg_0.get_height(0u);
+  uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_5b4b10 = func():void {
-  $B2: {
-    %4:texture_storage_3d<bgra8unorm, write> = load %arg_0
-    %5:vec3<u32> = textureDimensions %4
-    %res:ptr<function, vec3<u32>, read_write> = var, %5
-    %7:vec3<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_5b4b10(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_5b4b10
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture3d<float, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_5b4b10(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_5b4b10
-    ret
-  }
+kernel void compute_main(texture3d<float, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_5b4b10(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_5b4b10
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture3d<float, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/5df042.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/5df042.wgsl.expected.ir.msl
index 18e817d..4f7edf7 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/5df042.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/5df042.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture1d<int, access::sample> arg_0;
+  device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_1d<i32>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void textureDimensions_5df042(tint_module_vars_struct tint_module_vars) {
+  uint res = uint(tint_module_vars.arg_0.get_width());
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_5df042 = func():void {
-  $B2: {
-    %4:texture_1d<i32> = load %arg_0
-    %5:u32 = textureDimensions %4
-    %res:ptr<function, u32, read_write> = var, %5
-    %7:u32 = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_5df042(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_5df042
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture1d<int, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_5df042(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_5df042
-    ret
-  }
+kernel void compute_main(texture1d<int, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_5df042(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_5df042
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture1d<int, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/607979.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/607979.wgsl.expected.ir.msl
index 9e9f649..db2fcee 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/607979.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/607979.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture1d<int, access::write> arg_0;
+  device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_1d<r32sint, write>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void textureDimensions_607979(tint_module_vars_struct tint_module_vars) {
+  uint res = uint(tint_module_vars.arg_0.get_width());
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_607979 = func():void {
-  $B2: {
-    %4:texture_storage_1d<r32sint, write> = load %arg_0
-    %5:u32 = textureDimensions %4
-    %res:ptr<function, u32, read_write> = var, %5
-    %7:u32 = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_607979(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_607979
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture1d<int, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_607979(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_607979
-    ret
-  }
+kernel void compute_main(texture1d<int, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_607979(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_607979
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture1d<int, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/609d34.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/609d34.wgsl.expected.ir.msl
index 2a9cae2..de8ac6b 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/609d34.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/609d34.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d_array<float, access::read> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_2d_array<rgba8snorm, read>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_609d34(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_609d34 = func():void {
-  $B2: {
-    %4:texture_storage_2d_array<rgba8snorm, read> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_609d34(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_609d34
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_609d34(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_609d34
-    ret
-  }
+kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_609d34(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_609d34
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/62cb5a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/62cb5a.wgsl.expected.ir.msl
index 3131f5a..1ec04cd 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/62cb5a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/62cb5a.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d_array<int, access::sample> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_2d_array<i32>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_62cb5a(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_62cb5a = func():void {
-  $B2: {
-    %4:texture_2d_array<i32> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_62cb5a(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_62cb5a
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d_array<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_62cb5a(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_62cb5a
-    ret
-  }
+kernel void compute_main(texture2d_array<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_62cb5a(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_62cb5a
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d_array<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/62e7ae.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/62e7ae.wgsl.expected.ir.msl
index 4216195..7eccb11 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/62e7ae.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/62e7ae.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d<uint, access::read> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_2d<rgba8uint, read>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_62e7ae(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_62e7ae = func():void {
-  $B2: {
-    %4:texture_storage_2d<rgba8uint, read> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_62e7ae(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_62e7ae
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_62e7ae(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_62e7ae
-    ret
-  }
+kernel void compute_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_62e7ae(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_62e7ae
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/64dc74.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/64dc74.wgsl.expected.ir.msl
index 75fcd8a..9558d72 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/64dc74.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/64dc74.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texturecube<int, access::sample> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_cube<i32>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_64dc74(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(1u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(1u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_64dc74 = func():void {
-  $B2: {
-    %4:texture_cube<i32> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4, 1u
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_64dc74(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_64dc74
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texturecube<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_64dc74(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_64dc74
-    ret
-  }
+kernel void compute_main(texturecube<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_64dc74(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_64dc74
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texturecube<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/674058.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/674058.wgsl.expected.ir.msl
index 01f1ff4..03bcfc6 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/674058.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/674058.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d_array<int, access::write> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_2d_array<r32sint, write>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_674058(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_674058 = func():void {
-  $B2: {
-    %4:texture_storage_2d_array<r32sint, write> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_674058(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_674058
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d_array<int, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_674058(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_674058
-    ret
-  }
+kernel void compute_main(texture2d_array<int, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_674058(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_674058
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d_array<int, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/6dae40.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/6dae40.wgsl.expected.ir.msl
index adb7d86..311c8f9 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/6dae40.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/6dae40.wgsl.expected.ir.msl
@@ -1,43 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture3d<float, access::read> arg_0;
+  device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_3d<rg32float, read>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_6dae40(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint const v_1 = tint_module_vars.arg_0.get_height(0u);
+  uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_6dae40 = func():void {
-  $B2: {
-    %4:texture_storage_3d<rg32float, read> = load %arg_0
-    %5:vec3<u32> = textureDimensions %4
-    %res:ptr<function, vec3<u32>, read_write> = var, %5
-    %7:vec3<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_6dae40(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_6dae40
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture3d<float, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_6dae40(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_6dae40
-    ret
-  }
+kernel void compute_main(texture3d<float, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_6dae40(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_6dae40
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture3d<float, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/6dbef4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/6dbef4.wgsl.expected.ir.msl
index 824418f..ff3521c 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/6dbef4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/6dbef4.wgsl.expected.ir.msl
@@ -1,43 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture3d<int, access::read> arg_0;
+  device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_3d<rg32sint, read>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_6dbef4(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint const v_1 = tint_module_vars.arg_0.get_height(0u);
+  uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_6dbef4 = func():void {
-  $B2: {
-    %4:texture_storage_3d<rg32sint, read> = load %arg_0
-    %5:vec3<u32> = textureDimensions %4
-    %res:ptr<function, vec3<u32>, read_write> = var, %5
-    %7:vec3<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_6dbef4(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_6dbef4
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture3d<int, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_6dbef4(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_6dbef4
-    ret
-  }
+kernel void compute_main(texture3d<int, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_6dbef4(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_6dbef4
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture3d<int, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/6e6c7a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/6e6c7a.wgsl.expected.ir.msl
index f3a3e71..d1a3a69 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/6e6c7a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/6e6c7a.wgsl.expected.ir.msl
@@ -1,43 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture3d<uint, access::sample> arg_0;
+  device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_3d<u32>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_6e6c7a(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(1u);
+  uint const v_1 = tint_module_vars.arg_0.get_height(1u);
+  uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(1u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_6e6c7a = func():void {
-  $B2: {
-    %4:texture_3d<u32> = load %arg_0
-    %5:vec3<u32> = textureDimensions %4, 1u
-    %res:ptr<function, vec3<u32>, read_write> = var, %5
-    %7:vec3<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_6e6c7a(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_6e6c7a
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture3d<uint, access::sample> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_6e6c7a(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_6e6c7a
-    ret
-  }
+kernel void compute_main(texture3d<uint, access::sample> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_6e6c7a(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_6e6c7a
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture3d<uint, access::sample> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/6e72c5.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/6e72c5.wgsl.expected.ir.msl
index 6b1da73..4e23d00 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/6e72c5.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/6e72c5.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d<float, access::read> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_2d<r32float, read>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_6e72c5(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_6e72c5 = func():void {
-  $B2: {
-    %4:texture_storage_2d<r32float, read> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_6e72c5(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_6e72c5
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_6e72c5(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_6e72c5
-    ret
-  }
+kernel void compute_main(texture2d<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_6e72c5(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_6e72c5
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/6f1b5d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/6f1b5d.wgsl.expected.ir.msl
index d5ac0d7..c89a142 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/6f1b5d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/6f1b5d.wgsl.expected.ir.msl
@@ -1,43 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  depth2d<float, access::sample> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_depth_2d, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_6f1b5d(tint_module_vars_struct tint_module_vars) {
+  uint const v = uint(1);
+  uint const v_1 = tint_module_vars.arg_0.get_width(v);
+  uint2 res = uint2(v_1, tint_module_vars.arg_0.get_height(v));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_6f1b5d = func():void {
-  $B2: {
-    %4:texture_depth_2d = load %arg_0
-    %5:vec2<u32> = textureDimensions %4, 1i
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_6f1b5d(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_6f1b5d
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(depth2d<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_6f1b5d(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_6f1b5d
-    ret
-  }
+kernel void compute_main(depth2d<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_6f1b5d(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_6f1b5d
-    ret
-  }
+vertex vertex_main_outputs vertex_main(depth2d<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/709357.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/709357.wgsl.expected.ir.msl
index 61d2869..b27ed02 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/709357.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/709357.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture1d<uint, access::read> arg_0;
+  device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_1d<rgba16uint, read>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void textureDimensions_709357(tint_module_vars_struct tint_module_vars) {
+  uint res = uint(tint_module_vars.arg_0.get_width());
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_709357 = func():void {
-  $B2: {
-    %4:texture_storage_1d<rgba16uint, read> = load %arg_0
-    %5:u32 = textureDimensions %4
-    %res:ptr<function, u32, read_write> = var, %5
-    %7:u32 = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_709357(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_709357
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_709357(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_709357
-    ret
-  }
+kernel void compute_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_709357(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_709357
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7228de.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/7228de.wgsl.expected.ir.msl
index 79806b5..7355e69 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/7228de.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/7228de.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture1d<uint, access::write> arg_0;
+  device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_1d<r32uint, write>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void textureDimensions_7228de(tint_module_vars_struct tint_module_vars) {
+  uint res = uint(tint_module_vars.arg_0.get_width());
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_7228de = func():void {
-  $B2: {
-    %4:texture_storage_1d<r32uint, write> = load %arg_0
-    %5:u32 = textureDimensions %4
-    %res:ptr<function, u32, read_write> = var, %5
-    %7:u32 = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_7228de(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_7228de
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture1d<uint, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_7228de(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_7228de
-    ret
-  }
+kernel void compute_main(texture1d<uint, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_7228de(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_7228de
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture1d<uint, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7327fa.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/7327fa.wgsl.expected.ir.msl
index 16fb52c..df4c8ef 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/7327fa.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/7327fa.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d<float, access::read> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_2d<rgba8snorm, read>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_7327fa(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_7327fa = func():void {
-  $B2: {
-    %4:texture_storage_2d<rgba8snorm, read> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_7327fa(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_7327fa
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_7327fa(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_7327fa
-    ret
-  }
+kernel void compute_main(texture2d<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_7327fa(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_7327fa
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/756031.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/756031.wgsl.expected.ir.msl
index a1e6f57..ce7b4fd 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/756031.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/756031.wgsl.expected.ir.msl
@@ -1,43 +1,33 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture3d<int, access::sample> arg_0;
+  device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_3d<i32>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_756031(tint_module_vars_struct tint_module_vars) {
+  uint const v = uint(1);
+  uint const v_1 = tint_module_vars.arg_0.get_width(v);
+  uint const v_2 = tint_module_vars.arg_0.get_height(v);
+  uint3 res = uint3(v_1, v_2, tint_module_vars.arg_0.get_depth(v));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_756031 = func():void {
-  $B2: {
-    %4:texture_3d<i32> = load %arg_0
-    %5:vec3<u32> = textureDimensions %4, 1i
-    %res:ptr<function, vec3<u32>, read_write> = var, %5
-    %7:vec3<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_756031(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_756031
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture3d<int, access::sample> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_756031(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_756031
-    ret
-  }
+kernel void compute_main(texture3d<int, access::sample> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_756031(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_756031
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture3d<int, access::sample> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/756304.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/756304.wgsl.expected.ir.msl
index b11235e..051ee3b 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/756304.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/756304.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d_array<float, access::write> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_2d_array<r32float, write>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_756304(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_756304 = func():void {
-  $B2: {
-    %4:texture_storage_2d_array<r32float, write> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_756304(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_756304
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_756304(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_756304
-    ret
-  }
+kernel void compute_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_756304(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_756304
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/790e57.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/790e57.wgsl.expected.ir.msl
index ac9fe31..238b095 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/790e57.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/790e57.wgsl.expected.ir.msl
@@ -1,43 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture3d<int, access::read> arg_0;
+  device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_3d<rgba8sint, read>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_790e57(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint const v_1 = tint_module_vars.arg_0.get_height(0u);
+  uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_790e57 = func():void {
-  $B2: {
-    %4:texture_storage_3d<rgba8sint, read> = load %arg_0
-    %5:vec3<u32> = textureDimensions %4
-    %res:ptr<function, vec3<u32>, read_write> = var, %5
-    %7:vec3<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_790e57(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_790e57
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture3d<int, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_790e57(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_790e57
-    ret
-  }
+kernel void compute_main(texture3d<int, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_790e57(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_790e57
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture3d<int, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/797c30.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/797c30.wgsl.expected.ir.msl
index 5363267..8eb94d2 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/797c30.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/797c30.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture1d<uint, access::read> arg_0;
+  device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_1d<rgba32uint, read>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void textureDimensions_797c30(tint_module_vars_struct tint_module_vars) {
+  uint res = uint(tint_module_vars.arg_0.get_width());
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_797c30 = func():void {
-  $B2: {
-    %4:texture_storage_1d<rgba32uint, read> = load %arg_0
-    %5:u32 = textureDimensions %4
-    %res:ptr<function, u32, read_write> = var, %5
-    %7:u32 = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_797c30(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_797c30
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_797c30(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_797c30
-    ret
-  }
+kernel void compute_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_797c30(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_797c30
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/79d168.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/79d168.wgsl.expected.ir.msl
index b9aeac2..796b5a3 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/79d168.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/79d168.wgsl.expected.ir.msl
@@ -1,43 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  depthcube<float, access::sample> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_depth_cube, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_79d168(tint_module_vars_struct tint_module_vars) {
+  uint const v = uint(1);
+  uint const v_1 = tint_module_vars.arg_0.get_width(v);
+  uint2 res = uint2(v_1, tint_module_vars.arg_0.get_height(v));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_79d168 = func():void {
-  $B2: {
-    %4:texture_depth_cube = load %arg_0
-    %5:vec2<u32> = textureDimensions %4, 1i
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_79d168(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_79d168
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(depthcube<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_79d168(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_79d168
-    ret
-  }
+kernel void compute_main(depthcube<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_79d168(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_79d168
-    ret
-  }
+vertex vertex_main_outputs vertex_main(depthcube<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7a3890.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/7a3890.wgsl.expected.ir.msl
index 4bacd6e..953ded3 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/7a3890.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/7a3890.wgsl.expected.ir.msl
@@ -1,43 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture3d<uint, access::sample> arg_0;
+  device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_3d<u32>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_7a3890(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint const v_1 = tint_module_vars.arg_0.get_height(0u);
+  uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_7a3890 = func():void {
-  $B2: {
-    %4:texture_3d<u32> = load %arg_0
-    %5:vec3<u32> = textureDimensions %4
-    %res:ptr<function, vec3<u32>, read_write> = var, %5
-    %7:vec3<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_7a3890(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_7a3890
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture3d<uint, access::sample> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_7a3890(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_7a3890
-    ret
-  }
+kernel void compute_main(texture3d<uint, access::sample> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_7a3890(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_7a3890
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture3d<uint, access::sample> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7a9e30.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/7a9e30.wgsl.expected.ir.msl
index 58f4d8e..5dd23dc 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/7a9e30.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/7a9e30.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texturecube<uint, access::sample> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_cube<u32>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_7a9e30(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_7a9e30 = func():void {
-  $B2: {
-    %4:texture_cube<u32> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_7a9e30(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_7a9e30
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texturecube<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_7a9e30(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_7a9e30
-    ret
-  }
+kernel void compute_main(texturecube<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_7a9e30(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_7a9e30
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texturecube<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7c753b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/7c753b.wgsl.expected.ir.msl
index d4ae4d4..c4b0111 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/7c753b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/7c753b.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture1d<float, access::read> arg_0;
+  device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_1d<rgba32float, read>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void textureDimensions_7c753b(tint_module_vars_struct tint_module_vars) {
+  uint res = uint(tint_module_vars.arg_0.get_width());
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_7c753b = func():void {
-  $B2: {
-    %4:texture_storage_1d<rgba32float, read> = load %arg_0
-    %5:u32 = textureDimensions %4
-    %res:ptr<function, u32, read_write> = var, %5
-    %7:u32 = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_7c753b(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_7c753b
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture1d<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_7c753b(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_7c753b
-    ret
-  }
+kernel void compute_main(texture1d<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_7c753b(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_7c753b
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture1d<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7d8439.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/7d8439.wgsl.expected.ir.msl
index 88fcff8..fa8047f 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/7d8439.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/7d8439.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture1d<uint, access::read> arg_0;
+  device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_1d<rg32uint, read>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void textureDimensions_7d8439(tint_module_vars_struct tint_module_vars) {
+  uint res = uint(tint_module_vars.arg_0.get_width());
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_7d8439 = func():void {
-  $B2: {
-    %4:texture_storage_1d<rg32uint, read> = load %arg_0
-    %5:u32 = textureDimensions %4
-    %res:ptr<function, u32, read_write> = var, %5
-    %7:u32 = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_7d8439(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_7d8439
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_7d8439(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_7d8439
-    ret
-  }
+kernel void compute_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_7d8439(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_7d8439
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture1d<uint, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/7edb05.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/7edb05.wgsl.expected.ir.msl
index eb022fb..46e72c5 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/7edb05.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/7edb05.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d_array<uint, access::read> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_2d_array<rgba16uint, read>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_7edb05(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_7edb05 = func():void {
-  $B2: {
-    %4:texture_storage_2d_array<rgba16uint, read> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_7edb05(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_7edb05
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_7edb05(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_7edb05
-    ret
-  }
+kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_7edb05(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_7edb05
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/8057cb.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/8057cb.wgsl.expected.ir.msl
index c1ab7fe..8ac6891 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/8057cb.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/8057cb.wgsl.expected.ir.msl
@@ -1,43 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture3d<float, access::read> arg_0;
+  device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_3d<bgra8unorm, read>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_8057cb(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint const v_1 = tint_module_vars.arg_0.get_height(0u);
+  uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_8057cb = func():void {
-  $B2: {
-    %4:texture_storage_3d<bgra8unorm, read> = load %arg_0
-    %5:vec3<u32> = textureDimensions %4
-    %res:ptr<function, vec3<u32>, read_write> = var, %5
-    %7:vec3<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_8057cb(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_8057cb
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture3d<float, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_8057cb(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_8057cb
-    ret
-  }
+kernel void compute_main(texture3d<float, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_8057cb(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_8057cb
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture3d<float, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/841ebe.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/841ebe.wgsl.expected.ir.msl
index 17df82a..c493b1f 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/841ebe.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/841ebe.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture1d<int, access::read> arg_0;
+  device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_1d<rgba8sint, read>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void textureDimensions_841ebe(tint_module_vars_struct tint_module_vars) {
+  uint res = uint(tint_module_vars.arg_0.get_width());
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_841ebe = func():void {
-  $B2: {
-    %4:texture_storage_1d<rgba8sint, read> = load %arg_0
-    %5:u32 = textureDimensions %4
-    %res:ptr<function, u32, read_write> = var, %5
-    %7:u32 = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_841ebe(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_841ebe
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture1d<int, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_841ebe(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_841ebe
-    ret
-  }
+kernel void compute_main(texture1d<int, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_841ebe(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_841ebe
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture1d<int, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/84f363.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/84f363.wgsl.expected.ir.msl
index aa9df4d..ae7a2e6 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/84f363.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/84f363.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture1d<float, access::write> arg_0;
+  device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_1d<bgra8unorm, write>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void textureDimensions_84f363(tint_module_vars_struct tint_module_vars) {
+  uint res = uint(tint_module_vars.arg_0.get_width());
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_84f363 = func():void {
-  $B2: {
-    %4:texture_storage_1d<bgra8unorm, write> = load %arg_0
-    %5:u32 = textureDimensions %4
-    %res:ptr<function, u32, read_write> = var, %5
-    %7:u32 = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_84f363(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_84f363
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture1d<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_84f363(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_84f363
-    ret
-  }
+kernel void compute_main(texture1d<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_84f363(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_84f363
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture1d<float, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/867ead.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/867ead.wgsl.expected.ir.msl
index 617e797..59df37e 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/867ead.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/867ead.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d_array<float, access::write> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_2d_array<rgba8snorm, write>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_867ead(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_867ead = func():void {
-  $B2: {
-    %4:texture_storage_2d_array<rgba8snorm, write> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_867ead(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_867ead
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_867ead(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_867ead
-    ret
-  }
+kernel void compute_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_867ead(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_867ead
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d_array<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/879b73.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/879b73.wgsl.expected.ir.msl
index 746ecfc..74bd7bb 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/879b73.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/879b73.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texturecube_array<float, access::sample> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_cube_array<f32>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_879b73(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_879b73 = func():void {
-  $B2: {
-    %4:texture_cube_array<f32> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_879b73(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_879b73
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texturecube_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_879b73(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_879b73
-    ret
-  }
+kernel void compute_main(texturecube_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_879b73(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_879b73
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texturecube_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/87b42d.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/87b42d.wgsl.expected.ir.msl
index 8f63c38..b072961 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/87b42d.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/87b42d.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d_array<uint, access::read> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_2d_array<rgba32uint, read>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_87b42d(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_87b42d = func():void {
-  $B2: {
-    %4:texture_storage_2d_array<rgba32uint, read> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_87b42d(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_87b42d
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_87b42d(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_87b42d
-    ret
-  }
+kernel void compute_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_87b42d(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_87b42d
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/881dd4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/881dd4.wgsl.expected.ir.msl
index 74863db..ae8873d 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/881dd4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/881dd4.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d_array<float, access::read> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_2d_array<rgba8unorm, read>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_881dd4(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_881dd4 = func():void {
-  $B2: {
-    %4:texture_storage_2d_array<rgba8unorm, read> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_881dd4(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_881dd4
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_881dd4(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_881dd4
-    ret
-  }
+kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_881dd4(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_881dd4
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/8a35f9.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/8a35f9.wgsl.expected.ir.msl
index c071be2..b6b7ad8 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/8a35f9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/8a35f9.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d<float, access::write> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_2d<rg32float, write>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_8a35f9(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_8a35f9 = func():void {
-  $B2: {
-    %4:texture_storage_2d<rg32float, write> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_8a35f9(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_8a35f9
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_8a35f9(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_8a35f9
-    ret
-  }
+kernel void compute_main(texture2d<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_8a35f9(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_8a35f9
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d<float, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/8af728.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/8af728.wgsl.expected.ir.msl
index 8934ef5..bc4c83c 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/8af728.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/8af728.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d_array<float, access::read> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_2d_array<r8unorm, read>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_8af728(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_8af728 = func():void {
-  $B2: {
-    %4:texture_storage_2d_array<r8unorm, read> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_8af728(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_8af728
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_8af728(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_8af728
-    ret
-  }
+kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_8af728(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_8af728
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/8e15f4.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/8e15f4.wgsl.expected.ir.msl
index 07f2d52..5631094 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/8e15f4.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/8e15f4.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d<uint, access::read> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_2d<rg32uint, read>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_8e15f4(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_8e15f4 = func():void {
-  $B2: {
-    %4:texture_storage_2d<rg32uint, read> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_8e15f4(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_8e15f4
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_8e15f4(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_8e15f4
-    ret
-  }
+kernel void compute_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_8e15f4(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_8e15f4
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d<uint, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/8e5de6.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/8e5de6.wgsl.expected.ir.msl
index 5b50de8..3e14e39 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/8e5de6.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/8e5de6.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture1d<int, access::read> arg_0;
+  device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_1d<r32sint, read>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void textureDimensions_8e5de6(tint_module_vars_struct tint_module_vars) {
+  uint res = uint(tint_module_vars.arg_0.get_width());
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_8e5de6 = func():void {
-  $B2: {
-    %4:texture_storage_1d<r32sint, read> = load %arg_0
-    %5:u32 = textureDimensions %4
-    %res:ptr<function, u32, read_write> = var, %5
-    %7:u32 = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_8e5de6(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_8e5de6
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture1d<int, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_8e5de6(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_8e5de6
-    ret
-  }
+kernel void compute_main(texture1d<int, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_8e5de6(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_8e5de6
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture1d<int, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/8efd47.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/8efd47.wgsl.expected.ir.msl
index 20db69d..7dfecec 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/8efd47.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/8efd47.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture1d<int, access::write> arg_0;
+  device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_1d<rgba32sint, write>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void textureDimensions_8efd47(tint_module_vars_struct tint_module_vars) {
+  uint res = uint(tint_module_vars.arg_0.get_width());
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_8efd47 = func():void {
-  $B2: {
-    %4:texture_storage_1d<rgba32sint, write> = load %arg_0
-    %5:u32 = textureDimensions %4
-    %res:ptr<function, u32, read_write> = var, %5
-    %7:u32 = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_8efd47(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_8efd47
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture1d<int, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_8efd47(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_8efd47
-    ret
-  }
+kernel void compute_main(texture1d<int, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_8efd47(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_8efd47
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture1d<int, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/902179.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/902179.wgsl.expected.ir.msl
index b32850f..77ce935 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/902179.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/902179.wgsl.expected.ir.msl
@@ -1,43 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture3d<float, access::write> arg_0;
+  device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_3d<r32float, write>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_902179(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint const v_1 = tint_module_vars.arg_0.get_height(0u);
+  uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_902179 = func():void {
-  $B2: {
-    %4:texture_storage_3d<r32float, write> = load %arg_0
-    %5:vec3<u32> = textureDimensions %4
-    %res:ptr<function, vec3<u32>, read_write> = var, %5
-    %7:vec3<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_902179(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_902179
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture3d<float, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_902179(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_902179
-    ret
-  }
+kernel void compute_main(texture3d<float, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_902179(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_902179
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture3d<float, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/904b0f.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/904b0f.wgsl.expected.ir.msl
index 936e48b..1cdf3c8 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/904b0f.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/904b0f.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d_array<int, access::read> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_2d_array<rgba16sint, read>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_904b0f(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_904b0f = func():void {
-  $B2: {
-    %4:texture_storage_2d_array<rgba16sint, read> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_904b0f(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_904b0f
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_904b0f(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_904b0f
-    ret
-  }
+kernel void compute_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_904b0f(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_904b0f
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d_array<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/90dd74.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/90dd74.wgsl.expected.ir.msl
index 98ef490..d93429b 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/90dd74.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/90dd74.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d_array<int, access::write> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_2d_array<rgba16sint, write>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_90dd74(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_90dd74 = func():void {
-  $B2: {
-    %4:texture_storage_2d_array<rgba16sint, write> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_90dd74(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_90dd74
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d_array<int, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_90dd74(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_90dd74
-    ret
-  }
+kernel void compute_main(texture2d_array<int, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_90dd74(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_90dd74
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d_array<int, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/920006.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/920006.wgsl.expected.ir.msl
index 698b4b1..35359af 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/920006.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/920006.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture1d<uint, access::sample> arg_0;
+  device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_1d<u32>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void textureDimensions_920006(tint_module_vars_struct tint_module_vars) {
+  uint res = uint(tint_module_vars.arg_0.get_width());
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_920006 = func():void {
-  $B2: {
-    %4:texture_1d<u32> = load %arg_0
-    %5:u32 = textureDimensions %4, 1i
-    %res:ptr<function, u32, read_write> = var, %5
-    %7:u32 = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_920006(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_920006
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture1d<uint, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_920006(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_920006
-    ret
-  }
+kernel void compute_main(texture1d<uint, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_920006(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_920006
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture1d<uint, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/92552e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/92552e.wgsl.expected.ir.msl
index 94b54b9..444a9a1 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/92552e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/92552e.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture1d<int, access::write> arg_0;
+  device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_1d<rgba8sint, write>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void textureDimensions_92552e(tint_module_vars_struct tint_module_vars) {
+  uint res = uint(tint_module_vars.arg_0.get_width());
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_92552e = func():void {
-  $B2: {
-    %4:texture_storage_1d<rgba8sint, write> = load %arg_0
-    %5:u32 = textureDimensions %4
-    %res:ptr<function, u32, read_write> = var, %5
-    %7:u32 = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_92552e(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_92552e
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture1d<int, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_92552e(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_92552e
-    ret
-  }
+kernel void compute_main(texture1d<int, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_92552e(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_92552e
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture1d<int, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9573f3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/9573f3.wgsl.expected.ir.msl
index f3de2e7..d7c9da8 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/9573f3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/9573f3.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d<uint, access::write> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_2d<rg32uint, write>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_9573f3(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_9573f3 = func():void {
-  $B2: {
-    %4:texture_storage_2d<rg32uint, write> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_9573f3(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_9573f3
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d<uint, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_9573f3(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_9573f3
-    ret
-  }
+kernel void compute_main(texture2d<uint, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_9573f3(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_9573f3
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d<uint, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/965645.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/965645.wgsl.expected.ir.msl
index 69d9637..3717cf7 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/965645.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/965645.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture1d<uint, access::sample> arg_0;
+  device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_1d<u32>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void textureDimensions_965645(tint_module_vars_struct tint_module_vars) {
+  uint res = uint(tint_module_vars.arg_0.get_width());
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_965645 = func():void {
-  $B2: {
-    %4:texture_1d<u32> = load %arg_0
-    %5:u32 = textureDimensions %4
-    %res:ptr<function, u32, read_write> = var, %5
-    %7:u32 = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_965645(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_965645
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture1d<uint, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_965645(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_965645
-    ret
-  }
+kernel void compute_main(texture1d<uint, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_965645(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_965645
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture1d<uint, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/98b2d3.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/98b2d3.wgsl.expected.ir.msl
index 0d26142..d4a1059 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/98b2d3.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/98b2d3.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texturecube_array<int, access::sample> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_cube_array<i32>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_98b2d3(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_98b2d3 = func():void {
-  $B2: {
-    %4:texture_cube_array<i32> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_98b2d3(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_98b2d3
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texturecube_array<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_98b2d3(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_98b2d3
-    ret
-  }
+kernel void compute_main(texturecube_array<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_98b2d3(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_98b2d3
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texturecube_array<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/991ea9.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/991ea9.wgsl.expected.ir.msl
index 1d45751..bac2431 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/991ea9.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/991ea9.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  depth2d<float, access::sample> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_depth_2d, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_991ea9(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(1u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(1u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_991ea9 = func():void {
-  $B2: {
-    %4:texture_depth_2d = load %arg_0
-    %5:vec2<u32> = textureDimensions %4, 1u
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_991ea9(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_991ea9
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(depth2d<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_991ea9(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_991ea9
-    ret
-  }
+kernel void compute_main(depth2d<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_991ea9(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_991ea9
-    ret
-  }
+vertex vertex_main_outputs vertex_main(depth2d<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9b10a0.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/9b10a0.wgsl.expected.ir.msl
index d9e55ec..f80a0b3 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/9b10a0.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/9b10a0.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d_array<float, access::read> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_2d_array<bgra8unorm, read>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_9b10a0(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_9b10a0 = func():void {
-  $B2: {
-    %4:texture_storage_2d_array<bgra8unorm, read> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_9b10a0(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_9b10a0
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_9b10a0(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_9b10a0
-    ret
-  }
+kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_9b10a0(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_9b10a0
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9b223b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/9b223b.wgsl.expected.ir.msl
index cfd4e1e..872c311 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/9b223b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/9b223b.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texturecube<float, access::sample> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_cube<f32>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_9b223b(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_9b223b = func():void {
-  $B2: {
-    %4:texture_cube<f32> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_9b223b(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_9b223b
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texturecube<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_9b223b(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_9b223b
-    ret
-  }
+kernel void compute_main(texturecube<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_9b223b(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_9b223b
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texturecube<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9baf27.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/9baf27.wgsl.expected.ir.msl
index 09fa746..0ba6b4c 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/9baf27.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/9baf27.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texturecube<uint, access::sample> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_cube<u32>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_9baf27(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(1u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(1u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_9baf27 = func():void {
-  $B2: {
-    %4:texture_cube<u32> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4, 1u
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_9baf27(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_9baf27
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texturecube<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_9baf27(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_9baf27
-    ret
-  }
+kernel void compute_main(texturecube<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_9baf27(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_9baf27
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texturecube<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9c7a00.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/9c7a00.wgsl.expected.ir.msl
index 0af581f..36456fc 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/9c7a00.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/9c7a00.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture1d<uint, access::sample> arg_0;
+  device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_1d<u32>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void textureDimensions_9c7a00(tint_module_vars_struct tint_module_vars) {
+  uint res = uint(tint_module_vars.arg_0.get_width());
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_9c7a00 = func():void {
-  $B2: {
-    %4:texture_1d<u32> = load %arg_0
-    %5:u32 = textureDimensions %4, 1u
-    %res:ptr<function, u32, read_write> = var, %5
-    %7:u32 = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_9c7a00(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_9c7a00
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture1d<uint, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_9c7a00(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_9c7a00
-    ret
-  }
+kernel void compute_main(texture1d<uint, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_9c7a00(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_9c7a00
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture1d<uint, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9cd4ca.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/9cd4ca.wgsl.expected.ir.msl
index 07f2ef3..080af2f 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/9cd4ca.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/9cd4ca.wgsl.expected.ir.msl
@@ -1,43 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texturecube<uint, access::sample> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_cube<u32>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_9cd4ca(tint_module_vars_struct tint_module_vars) {
+  uint const v = uint(1);
+  uint const v_1 = tint_module_vars.arg_0.get_width(v);
+  uint2 res = uint2(v_1, tint_module_vars.arg_0.get_height(v));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_9cd4ca = func():void {
-  $B2: {
-    %4:texture_cube<u32> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4, 1i
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_9cd4ca(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_9cd4ca
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texturecube<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_9cd4ca(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_9cd4ca
-    ret
-  }
+kernel void compute_main(texturecube<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_9cd4ca(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_9cd4ca
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texturecube<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9cd8ad.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/9cd8ad.wgsl.expected.ir.msl
index 2cafaac..8d02903 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/9cd8ad.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/9cd8ad.wgsl.expected.ir.msl
@@ -1,43 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture3d<float, access::write> arg_0;
+  device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_3d<rg32float, write>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_9cd8ad(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint const v_1 = tint_module_vars.arg_0.get_height(0u);
+  uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_9cd8ad = func():void {
-  $B2: {
-    %4:texture_storage_3d<rg32float, write> = load %arg_0
-    %5:vec3<u32> = textureDimensions %4
-    %res:ptr<function, vec3<u32>, read_write> = var, %5
-    %7:vec3<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_9cd8ad(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_9cd8ad
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture3d<float, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_9cd8ad(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_9cd8ad
-    ret
-  }
+kernel void compute_main(texture3d<float, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_9cd8ad(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_9cd8ad
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture3d<float, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9d0bac.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/9d0bac.wgsl.expected.ir.msl
index 112a8d0..2773b27 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/9d0bac.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/9d0bac.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d<float, access::read> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_2d<rgba32float, read>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_9d0bac(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_9d0bac = func():void {
-  $B2: {
-    %4:texture_storage_2d<rgba32float, read> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_9d0bac(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_9d0bac
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_9d0bac(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_9d0bac
-    ret
-  }
+kernel void compute_main(texture2d<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_9d0bac(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_9d0bac
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9d68b8.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/9d68b8.wgsl.expected.ir.msl
index 72d63e4..402c0f1 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/9d68b8.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/9d68b8.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture1d<float, access::read> arg_0;
+  device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_1d<rgba8snorm, read>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void textureDimensions_9d68b8(tint_module_vars_struct tint_module_vars) {
+  uint res = uint(tint_module_vars.arg_0.get_width());
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_9d68b8 = func():void {
-  $B2: {
-    %4:texture_storage_1d<rgba8snorm, read> = load %arg_0
-    %5:u32 = textureDimensions %4
-    %res:ptr<function, u32, read_write> = var, %5
-    %7:u32 = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_9d68b8(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_9d68b8
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture1d<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_9d68b8(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_9d68b8
-    ret
-  }
+kernel void compute_main(texture1d<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_9d68b8(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_9d68b8
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture1d<float, access::read> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9dc27a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/9dc27a.wgsl.expected.ir.msl
index 69c15a9..7a003a5 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/9dc27a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/9dc27a.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d_array<float, access::read> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_2d_array<rg32float, read>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_9dc27a(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_9dc27a = func():void {
-  $B2: {
-    %4:texture_storage_2d_array<rg32float, read> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_9dc27a(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_9dc27a
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_9dc27a(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_9dc27a
-    ret
-  }
+kernel void compute_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_9dc27a(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_9dc27a
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d_array<float, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9e0794.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/9e0794.wgsl.expected.ir.msl
index be32208..cd0a008 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/9e0794.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/9e0794.wgsl.expected.ir.msl
@@ -1,43 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d_array<uint, access::sample> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_2d_array<u32>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_9e0794(tint_module_vars_struct tint_module_vars) {
+  uint const v = uint(1);
+  uint const v_1 = tint_module_vars.arg_0.get_width(v);
+  uint2 res = uint2(v_1, tint_module_vars.arg_0.get_height(v));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_9e0794 = func():void {
-  $B2: {
-    %4:texture_2d_array<u32> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4, 1i
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_9e0794(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_9e0794
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_9e0794(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_9e0794
-    ret
-  }
+kernel void compute_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_9e0794(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_9e0794
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d_array<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/9fcc3b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/9fcc3b.wgsl.expected.ir.msl
index e3ad776..bff6553 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/9fcc3b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/9fcc3b.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  depthcube_array<float, access::sample> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_depth_cube_array, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_9fcc3b(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_9fcc3b = func():void {
-  $B2: {
-    %4:texture_depth_cube_array = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_9fcc3b(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_9fcc3b
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_9fcc3b(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_9fcc3b
-    ret
-  }
+kernel void compute_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_9fcc3b(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_9fcc3b
-    ret
-  }
+vertex vertex_main_outputs vertex_main(depthcube_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/a1598a.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/a1598a.wgsl.expected.ir.msl
index fd21c6f..8bd00ca 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/a1598a.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/a1598a.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texturecube_array<uint, access::sample> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_cube_array<u32>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_a1598a(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_a1598a = func():void {
-  $B2: {
-    %4:texture_cube_array<u32> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_a1598a(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_a1598a
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texturecube_array<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_a1598a(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_a1598a
-    ret
-  }
+kernel void compute_main(texturecube_array<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_a1598a(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_a1598a
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texturecube_array<uint, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/a20ba2.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/a20ba2.wgsl.expected.ir.msl
index fd6e2c5..678f89f 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/a20ba2.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/a20ba2.wgsl.expected.ir.msl
@@ -1,43 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture3d<float, access::write> arg_0;
+  device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_3d<r8unorm, write>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_a20ba2(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint const v_1 = tint_module_vars.arg_0.get_height(0u);
+  uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_a20ba2 = func():void {
-  $B2: {
-    %4:texture_storage_3d<r8unorm, write> = load %arg_0
-    %5:vec3<u32> = textureDimensions %4
-    %res:ptr<function, vec3<u32>, read_write> = var, %5
-    %7:vec3<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_a20ba2(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_a20ba2
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture3d<float, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_a20ba2(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_a20ba2
-    ret
-  }
+kernel void compute_main(texture3d<float, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_a20ba2(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_a20ba2
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture3d<float, access::write> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/a25d9b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/a25d9b.wgsl.expected.ir.msl
index 0bb63bb..a85de12 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/a25d9b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/a25d9b.wgsl.expected.ir.msl
@@ -1,43 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture3d<float, access::read> arg_0;
+  device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_3d<rgba8unorm, read>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_a25d9b(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint const v_1 = tint_module_vars.arg_0.get_height(0u);
+  uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_a25d9b = func():void {
-  $B2: {
-    %4:texture_storage_3d<rgba8unorm, read> = load %arg_0
-    %5:vec3<u32> = textureDimensions %4
-    %res:ptr<function, vec3<u32>, read_write> = var, %5
-    %7:vec3<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_a25d9b(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_a25d9b
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture3d<float, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_a25d9b(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_a25d9b
-    ret
-  }
+kernel void compute_main(texture3d<float, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_a25d9b(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_a25d9b
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture3d<float, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/a2ba5e.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/a2ba5e.wgsl.expected.ir.msl
index 6dfbdf2..b353b0d 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/a2ba5e.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/a2ba5e.wgsl.expected.ir.msl
@@ -1,43 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texturecube<int, access::sample> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_cube<i32>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_a2ba5e(tint_module_vars_struct tint_module_vars) {
+  uint const v = uint(1);
+  uint const v_1 = tint_module_vars.arg_0.get_width(v);
+  uint2 res = uint2(v_1, tint_module_vars.arg_0.get_height(v));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_a2ba5e = func():void {
-  $B2: {
-    %4:texture_cube<i32> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4, 1i
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_a2ba5e(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_a2ba5e
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texturecube<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_a2ba5e(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_a2ba5e
-    ret
-  }
+kernel void compute_main(texturecube<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_a2ba5e(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_a2ba5e
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texturecube<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/a3ea91.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/a3ea91.wgsl.expected.ir.msl
index 0686639..1573c11 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/a3ea91.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/a3ea91.wgsl.expected.ir.msl
@@ -1,43 +1,32 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture3d<float, access::read> arg_0;
+  device uint3* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_3d<rgba16float, read>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec3<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_a3ea91(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint const v_1 = tint_module_vars.arg_0.get_height(0u);
+  uint3 res = uint3(v, v_1, tint_module_vars.arg_0.get_depth(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_a3ea91 = func():void {
-  $B2: {
-    %4:texture_storage_3d<rgba16float, read> = load %arg_0
-    %5:vec3<u32> = textureDimensions %4
-    %res:ptr<function, vec3<u32>, read_write> = var, %5
-    %7:vec3<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_a3ea91(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_a3ea91
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture3d<float, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_a3ea91(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_a3ea91
-    ret
-  }
+kernel void compute_main(texture3d<float, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_a3ea91(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_a3ea91
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture3d<float, access::read> arg_0 [[texture(0)]], device uint3* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/a48049.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/a48049.wgsl.expected.ir.msl
index 46fc59b..adc75d0 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/a48049.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/a48049.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d<int, access::sample> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_2d<i32>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_a48049(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(1u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(1u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_a48049 = func():void {
-  $B2: {
-    %4:texture_2d<i32> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4, 1u
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_a48049(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_a48049
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_a48049(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_a48049
-    ret
-  }
+kernel void compute_main(texture2d<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_a48049(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_a48049
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d<int, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/a4cd56.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/a4cd56.wgsl.expected.ir.msl
index 4961dc8..0b12217 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/a4cd56.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/a4cd56.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  depth2d_array<float, access::sample> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_depth_2d_array, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_a4cd56(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_a4cd56 = func():void {
-  $B2: {
-    %4:texture_depth_2d_array = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_a4cd56(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_a4cd56
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_a4cd56(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_a4cd56
-    ret
-  }
+kernel void compute_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_a4cd56(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_a4cd56
-    ret
-  }
+vertex vertex_main_outputs vertex_main(depth2d_array<float, access::sample> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/a65776.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/a65776.wgsl.expected.ir.msl
index 2a10b20..a084bc7 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/a65776.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/a65776.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d<int, access::read> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_2d<rgba16sint, read>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_a65776(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_a65776 = func():void {
-  $B2: {
-    %4:texture_storage_2d<rgba16sint, read> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_a65776(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_a65776
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_a65776(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_a65776
-    ret
-  }
+kernel void compute_main(texture2d<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_a65776(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_a65776
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d<int, access::read> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/aa4353.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/aa4353.wgsl.expected.ir.msl
index 8f68441..38d6210 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/aa4353.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/aa4353.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d<int, access::write> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_2d<rgba32sint, write>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_aa4353(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_aa4353 = func():void {
-  $B2: {
-    %4:texture_storage_2d<rgba32sint, write> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_aa4353(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_aa4353
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d<int, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_aa4353(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_aa4353
-    ret
-  }
+kernel void compute_main(texture2d<int, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_aa4353(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_aa4353
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture2d<int, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/aac604.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/aac604.wgsl.expected.ir.msl
index b4f729e..4912240 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/aac604.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/aac604.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture1d<float, access::sample> arg_0;
+  device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_1d<f32>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void textureDimensions_aac604(tint_module_vars_struct tint_module_vars) {
+  uint res = uint(tint_module_vars.arg_0.get_width());
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_aac604 = func():void {
-  $B2: {
-    %4:texture_1d<f32> = load %arg_0
-    %5:u32 = textureDimensions %4, 1u
-    %res:ptr<function, u32, read_write> = var, %5
-    %7:u32 = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_aac604(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_aac604
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture1d<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_aac604(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_aac604
-    ret
-  }
+kernel void compute_main(texture1d<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_aac604(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_aac604
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture1d<float, access::sample> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/ad7d3b.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/ad7d3b.wgsl.expected.ir.msl
index 1a0e6ca..ab1a5fa 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/ad7d3b.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/ad7d3b.wgsl.expected.ir.msl
@@ -1,43 +1,30 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture1d<uint, access::write> arg_0;
+  device uint* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_1d<rgba8uint, write>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, u32, read_write> = var @binding_point(2, 0)
+void textureDimensions_ad7d3b(tint_module_vars_struct tint_module_vars) {
+  uint res = uint(tint_module_vars.arg_0.get_width());
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_ad7d3b = func():void {
-  $B2: {
-    %4:texture_storage_1d<rgba8uint, write> = load %arg_0
-    %5:u32 = textureDimensions %4
-    %res:ptr<function, u32, read_write> = var, %5
-    %7:u32 = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_ad7d3b(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_ad7d3b
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture1d<uint, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_ad7d3b(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_ad7d3b
-    ret
-  }
+kernel void compute_main(texture1d<uint, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_ad7d3b(tint_module_vars);
 }
-%compute_main = @compute @workgroup_size(1, 1, 1) func():void {
-  $B5: {
-    %13:void = call %textureDimensions_ad7d3b
-    ret
-  }
+vertex vertex_main_outputs vertex_main(texture1d<uint, access::write> arg_0 [[texture(0)]], device uint* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  return vertex_main_outputs{.tint_symbol=vertex_main_inner(tint_module_vars)};
 }
-
-unhandled variable address space
-********************************************************************
-*  The tint shader compiler has encountered an unexpected error.   *
-*                                                                  *
-*  Please help us fix this issue by submitting a bug report at     *
-*  crbug.com/tint with the source program that triggered the bug.  *
-********************************************************************
diff --git a/test/tint/builtins/gen/literal/textureDimensions/af46ab.wgsl.expected.ir.msl b/test/tint/builtins/gen/literal/textureDimensions/af46ab.wgsl.expected.ir.msl
index 949d892..2cdf5b7 100644
--- a/test/tint/builtins/gen/literal/textureDimensions/af46ab.wgsl.expected.ir.msl
+++ b/test/tint/builtins/gen/literal/textureDimensions/af46ab.wgsl.expected.ir.msl
@@ -1,43 +1,31 @@
-SKIP: FAILED
+#include <metal_stdlib>
+using namespace metal;
+struct tint_module_vars_struct {
+  texture2d_array<int, access::write> arg_0;
+  device uint2* prevent_dce;
+};
+struct vertex_main_outputs {
+  float4 tint_symbol [[position]];
+};
 
-../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: $B1: {  # root
-  %arg_0:ptr<handle, texture_storage_2d_array<rg32sint, write>, read> = var @binding_point(1, 0)
-  %prevent_dce:ptr<storage, vec2<u32>, read_write> = var @binding_point(2, 0)
+void textureDimensions_af46ab(tint_module_vars_struct tint_module_vars) {
+  uint const v = tint_module_vars.arg_0.get_width(0u);
+  uint2 res = uint2(v, tint_module_vars.arg_0.get_height(0u));
+  (*tint_module_vars.prevent_dce) = res;
 }
-
-%textureDimensions_af46ab = func():void {
-  $B2: {
-    %4:texture_storage_2d_array<rg32sint, write> = load %arg_0
-    %5:vec2<u32> = textureDimensions %4
-    %res:ptr<function, vec2<u32>, read_write> = var, %5
-    %7:vec2<u32> = load %res
-    store %prevent_dce, %7
-    ret
-  }
+float4 vertex_main_inner(tint_module_vars_struct tint_module_vars) {
+  textureDimensions_af46ab(tint_module_vars);
+  return float4(0.0f);
 }
-%vertex_main = @vertex func():vec4<f32> [@position] {
-  $B3: {
-    %9:void = call %textureDimensions_af46ab
-    ret vec4<f32>(0.0f)
-  }
+fragment void fragment_main(texture2d_array<int, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_af46ab(tint_module_vars);
 }
-%fragment_main = @fragment func():void {
-  $B4: {
-    %11:void = call %textureDimensions_af46ab
-    ret
-  }
+kernel void compute_main(texture2d_array<int, access::write> arg_0 [[texture(0)]], device uint2* prevent_dce [[buffer(0)]]) {
+  tint_module_vars_struct const tint_module_vars = tint_module_vars_struct{.arg_0=arg_0, .prevent_dce=prevent_dce};
+  textureDimensions_af46ab(t