tint/intrinsics: Texture queries now return unsigned integer / vectors

To match the spec.

Also add a bunch of missing texture test cases to
src/tint/ast/builtin_texture_helper_test.cc. Fix all the tests that were
broken because these were not being exercised.

Fixed: tint:1526
Change-Id: I207b51d307bbdc054b595e0e0e0fd3330607e171
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/106681
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Auto-Submit: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
diff --git a/test/tint/builtins/gen/var/textureDimensions/002b2a.wgsl b/test/tint/builtins/gen/var/textureDimensions/002b2a.wgsl
deleted file mode 100644
index 8ca4261..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/002b2a.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_1d<f32>;
-
-// fn textureDimensions(texture: texture_1d<f32>) -> i32
-fn textureDimensions_002b2a() {
-  var res: i32 = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_002b2a();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_002b2a();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_002b2a();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/002b2a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/002b2a.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 29d0c12..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/002b2a.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-Texture1D<float4> arg_0 : register(t0, space1);
-
-void textureDimensions_002b2a() {
-  int tint_tmp;
-  arg_0.GetDimensions(tint_tmp);
-  int res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_002b2a();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_002b2a();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_002b2a();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/002b2a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/002b2a.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 29d0c12..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/002b2a.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-Texture1D<float4> arg_0 : register(t0, space1);
-
-void textureDimensions_002b2a() {
-  int tint_tmp;
-  arg_0.GetDimensions(tint_tmp);
-  int res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_002b2a();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_002b2a();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_002b2a();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/002b2a.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/002b2a.wgsl.expected.glsl
deleted file mode 100644
index 9ee3490..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/002b2a.wgsl.expected.glsl
+++ /dev/null
@@ -1,75 +0,0 @@
-SKIP: FAILED
-
-#version 310 es
-
-uniform highp sampler1D arg_0_1;
-void textureDimensions_002b2a() {
-  int res = textureSize(arg_0_1, 0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_002b2a();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'sampler1D' : Reserved word. 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision mediump float;
-
-uniform highp sampler1D arg_0_1;
-void textureDimensions_002b2a() {
-  int res = textureSize(arg_0_1, 0);
-}
-
-void fragment_main() {
-  textureDimensions_002b2a();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:4: 'sampler1D' : Reserved word. 
-ERROR: 0:4: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-
-uniform highp sampler1D arg_0_1;
-void textureDimensions_002b2a() {
-  int res = textureSize(arg_0_1, 0);
-}
-
-void compute_main() {
-  textureDimensions_002b2a();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'sampler1D' : Reserved word. 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/002b2a.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/002b2a.wgsl.expected.msl
deleted file mode 100644
index b5b2121..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/002b2a.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_002b2a(texture1d<float, access::sample> tint_symbol_1) {
-  int res = int(tint_symbol_1.get_width(0));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture1d<float, access::sample> tint_symbol_2) {
-  textureDimensions_002b2a(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture1d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture1d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_002b2a(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture1d<float, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_002b2a(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/002b2a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/002b2a.wgsl.expected.spvasm
deleted file mode 100644
index 178d73b..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/002b2a.wgsl.expected.spvasm
+++ /dev/null
@@ -1,76 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 37
-; Schema: 0
-               OpCapability Shader
-               OpCapability Sampled1D
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_002b2a "textureDimensions_002b2a"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-         %11 = OpTypeImage %float 1D 0 0 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %12 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %int_0 = OpConstant %int 0
-%_ptr_Function_int = OpTypePointer Function %int
-         %22 = OpConstantNull %int
-         %23 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_002b2a = OpFunction %void None %12
-         %15 = OpLabel
-        %res = OpVariable %_ptr_Function_int Function %22
-         %18 = OpLoad %11 %arg_0
-         %16 = OpImageQuerySizeLod %int %18 %int_0
-               OpStore %res %16
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %23
-         %25 = OpLabel
-         %26 = OpFunctionCall %void %textureDimensions_002b2a
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %12
-         %28 = OpLabel
-         %29 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %29
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %12
-         %32 = OpLabel
-         %33 = OpFunctionCall %void %textureDimensions_002b2a
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %12
-         %35 = OpLabel
-         %36 = OpFunctionCall %void %textureDimensions_002b2a
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/002b2a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/002b2a.wgsl.expected.wgsl
deleted file mode 100644
index 5f09068..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/002b2a.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_1d<f32>;
-
-fn textureDimensions_002b2a() {
-  var res : i32 = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_002b2a();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_002b2a();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_002b2a();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/00348c.wgsl b/test/tint/builtins/gen/var/textureDimensions/00348c.wgsl
new file mode 100644
index 0000000..2079209
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/00348c.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_multisampled_2d<i32>;
+
+// fn textureDimensions(texture: texture_multisampled_2d<i32>) -> vec2<u32>
+fn textureDimensions_00348c() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_00348c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_00348c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_00348c();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/00348c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/00348c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e613aa1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/00348c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DMS<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_00348c() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_00348c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_00348c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_00348c();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/00348c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/00348c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..e613aa1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/00348c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DMS<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_00348c() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_00348c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_00348c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_00348c();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/00348c.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/00348c.wgsl.expected.glsl
new file mode 100644
index 0000000..dd2e0ef
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/00348c.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp isampler2DMS arg_0_1;
+void textureDimensions_00348c() {
+  uvec2 res = uvec2(textureSize(arg_0_1));
+}
+
+vec4 vertex_main() {
+  textureDimensions_00348c();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isampler2DMS arg_0_1;
+void textureDimensions_00348c() {
+  uvec2 res = uvec2(textureSize(arg_0_1));
+}
+
+void fragment_main() {
+  textureDimensions_00348c();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp isampler2DMS arg_0_1;
+void textureDimensions_00348c() {
+  uvec2 res = uvec2(textureSize(arg_0_1));
+}
+
+void compute_main() {
+  textureDimensions_00348c();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/00348c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/00348c.wgsl.expected.msl
new file mode 100644
index 0000000..cf3f493
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/00348c.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_00348c(texture2d_ms<int, access::read> tint_symbol_1) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_ms<int, access::read> tint_symbol_2) {
+  textureDimensions_00348c(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_ms<int, access::read> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_ms<int, access::read> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_00348c(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_ms<int, access::read> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_00348c(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/00348c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/00348c.wgsl.expected.spvasm
new file mode 100644
index 0000000..5045f2d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/00348c.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_00348c "textureDimensions_00348c"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 0 1 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %23 = OpConstantNull %v2uint
+         %24 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_00348c = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %23
+         %20 = OpLoad %11 %arg_0
+         %17 = OpImageQuerySize %v2uint %20
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %textureDimensions_00348c
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %29 = OpLabel
+         %30 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %30
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureDimensions_00348c
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureDimensions_00348c
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/00348c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/00348c.wgsl.expected.wgsl
new file mode 100644
index 0000000..17daeec
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/00348c.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_multisampled_2d<i32>;
+
+fn textureDimensions_00348c() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_00348c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_00348c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_00348c();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/012b82.wgsl b/test/tint/builtins/gen/var/textureDimensions/012b82.wgsl
deleted file mode 100644
index 3fd6388..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/012b82.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32sint, write>;
-
-// fn textureDimensions(texture: texture_storage_2d_array<r32sint, write>) -> vec2<i32>
-fn textureDimensions_012b82() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_012b82();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_012b82();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_012b82();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/012b82.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/012b82.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 56fb818..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/012b82.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2DArray<int4> arg_0 : register(u0, space1);
-
-void textureDimensions_012b82() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_012b82();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_012b82();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_012b82();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/012b82.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/012b82.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 56fb818..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/012b82.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2DArray<int4> arg_0 : register(u0, space1);
-
-void textureDimensions_012b82() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_012b82();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_012b82();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_012b82();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/012b82.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/012b82.wgsl.expected.glsl
deleted file mode 100644
index 9ae3c1b..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/012b82.wgsl.expected.glsl
+++ /dev/null
@@ -1,52 +0,0 @@
-#version 310 es
-
-layout(r32i) uniform highp writeonly iimage2DArray arg_0;
-void textureDimensions_012b82() {
-  ivec2 res = imageSize(arg_0).xy;
-}
-
-vec4 vertex_main() {
-  textureDimensions_012b82();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-layout(r32i) uniform highp writeonly iimage2DArray arg_0;
-void textureDimensions_012b82() {
-  ivec2 res = imageSize(arg_0).xy;
-}
-
-void fragment_main() {
-  textureDimensions_012b82();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-layout(r32i) uniform highp writeonly iimage2DArray arg_0;
-void textureDimensions_012b82() {
-  ivec2 res = imageSize(arg_0).xy;
-}
-
-void compute_main() {
-  textureDimensions_012b82();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/012b82.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/012b82.wgsl.expected.msl
deleted file mode 100644
index f53807b..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/012b82.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_012b82(texture2d_array<int, access::write> tint_symbol_1) {
-  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture2d_array<int, access::write> tint_symbol_2) {
-  textureDimensions_012b82(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture2d_array<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture2d_array<int, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_012b82(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture2d_array<int, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_012b82(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/012b82.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/012b82.wgsl.expected.spvasm
deleted file mode 100644
index 4e8d502..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/012b82.wgsl.expected.spvasm
+++ /dev/null
@@ -1,78 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 39
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_012b82 "textureDimensions_012b82"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-        %int = OpTypeInt 32 1
-         %11 = OpTypeImage %int 2D 0 1 0 2 R32i
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-      %v2int = OpTypeVector %int 2
-      %v3int = OpTypeVector %int 3
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %24 = OpConstantNull %v2int
-         %25 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_012b82 = OpFunction %void None %13
-         %16 = OpLabel
-        %res = OpVariable %_ptr_Function_v2int Function %24
-         %21 = OpLoad %11 %arg_0
-         %19 = OpImageQuerySize %v3int %21
-         %17 = OpVectorShuffle %v2int %19 %19 0 1
-               OpStore %res %17
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %25
-         %27 = OpLabel
-         %28 = OpFunctionCall %void %textureDimensions_012b82
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %30 = OpLabel
-         %31 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %31
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %34 = OpLabel
-         %35 = OpFunctionCall %void %textureDimensions_012b82
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %37 = OpLabel
-         %38 = OpFunctionCall %void %textureDimensions_012b82
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/012b82.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/012b82.wgsl.expected.wgsl
deleted file mode 100644
index 216df4f..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/012b82.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32sint, write>;
-
-fn textureDimensions_012b82() {
-  var res : vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_012b82();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_012b82();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_012b82();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/022903.wgsl b/test/tint/builtins/gen/var/textureDimensions/022903.wgsl
new file mode 100644
index 0000000..1f251f3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/022903.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_1d<i32>;
+
+// fn textureDimensions(texture: texture_1d<i32>, level: u32) -> u32
+fn textureDimensions_022903() {
+  var arg_1 = 1u;
+  var res: u32 = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_022903();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_022903();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_022903();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/022903.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/022903.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..bd4bed3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/022903.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_022903() {
+  uint arg_1 = 1u;
+  int2 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y);
+  uint res = tint_tmp.x;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_022903();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_022903();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_022903();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/022903.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/022903.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..bd4bed3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/022903.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_022903() {
+  uint arg_1 = 1u;
+  int2 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y);
+  uint res = tint_tmp.x;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_022903();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_022903();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_022903();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/022903.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/022903.wgsl.expected.glsl
new file mode 100644
index 0000000..5a365cf
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/022903.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp isampler1D arg_0_1;
+void textureDimensions_022903() {
+  uint arg_1 = 1u;
+  uint res = uint(textureSize(arg_0_1, int(arg_1)));
+}
+
+vec4 vertex_main() {
+  textureDimensions_022903();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'isampler1D' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp isampler1D arg_0_1;
+void textureDimensions_022903() {
+  uint arg_1 = 1u;
+  uint res = uint(textureSize(arg_0_1, int(arg_1)));
+}
+
+void fragment_main() {
+  textureDimensions_022903();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'isampler1D' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp isampler1D arg_0_1;
+void textureDimensions_022903() {
+  uint arg_1 = 1u;
+  uint res = uint(textureSize(arg_0_1, int(arg_1)));
+}
+
+void compute_main() {
+  textureDimensions_022903();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'isampler1D' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/022903.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/022903.wgsl.expected.msl
new file mode 100644
index 0000000..e5800b7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/022903.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_022903(texture1d<int, access::sample> tint_symbol_1) {
+  uint arg_1 = 1u;
+  uint res = tint_symbol_1.get_width(0);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<int, access::sample> tint_symbol_2) {
+  textureDimensions_022903(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<int, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<int, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_022903(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<int, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_022903(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/022903.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/022903.wgsl.expected.spvasm
new file mode 100644
index 0000000..3cf4046
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/022903.wgsl.expected.spvasm
@@ -0,0 +1,81 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 40
+; Schema: 0
+               OpCapability Shader
+               OpCapability Sampled1D
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_022903 "textureDimensions_022903"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 1D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %21 = OpConstantNull %uint
+         %26 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_022903 = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %21
+        %res = OpVariable %_ptr_Function_uint Function %21
+               OpStore %arg_1 %uint_1
+         %23 = OpLoad %11 %arg_0
+         %24 = OpLoad %uint %arg_1
+         %22 = OpImageQuerySizeLod %uint %23 %24
+               OpStore %res %22
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %26
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %textureDimensions_022903
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %31 = OpLabel
+         %32 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %32
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureDimensions_022903
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureDimensions_022903
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/022903.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/022903.wgsl.expected.wgsl
new file mode 100644
index 0000000..d3eea65
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/022903.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_1d<i32>;
+
+fn textureDimensions_022903() {
+  var arg_1 = 1u;
+  var res : u32 = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_022903();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_022903();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_022903();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/08753d.wgsl b/test/tint/builtins/gen/var/textureDimensions/08753d.wgsl
deleted file mode 100644
index 2b1e057..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/08753d.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_1d<rgba16sint, write>;
-
-// fn textureDimensions(texture: texture_storage_1d<rgba16sint, write>) -> i32
-fn textureDimensions_08753d() {
-  var res: i32 = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_08753d();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_08753d();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_08753d();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/08753d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/08753d.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 83011ff..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/08753d.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture1D<int4> arg_0 : register(u0, space1);
-
-void textureDimensions_08753d() {
-  int tint_tmp;
-  arg_0.GetDimensions(tint_tmp);
-  int res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_08753d();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_08753d();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_08753d();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/08753d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/08753d.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 83011ff..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/08753d.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture1D<int4> arg_0 : register(u0, space1);
-
-void textureDimensions_08753d() {
-  int tint_tmp;
-  arg_0.GetDimensions(tint_tmp);
-  int res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_08753d();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_08753d();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_08753d();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/08753d.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/08753d.wgsl.expected.glsl
deleted file mode 100644
index 0b0f9e3..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/08753d.wgsl.expected.glsl
+++ /dev/null
@@ -1,78 +0,0 @@
-SKIP: FAILED
-
-#version 310 es
-
-layout(rgba16i) uniform highp writeonly iimage1D arg_0;
-void textureDimensions_08753d() {
-  int res = imageSize(arg_0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_08753d();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'iimage1D' : Reserved word. 
-WARNING: 0:3: 'layout' : useless application of layout qualifier 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision mediump float;
-
-layout(rgba16i) uniform highp writeonly iimage1D arg_0;
-void textureDimensions_08753d() {
-  int res = imageSize(arg_0);
-}
-
-void fragment_main() {
-  textureDimensions_08753d();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:4: 'iimage1D' : Reserved word. 
-WARNING: 0:4: 'layout' : useless application of layout qualifier 
-ERROR: 0:4: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-
-layout(rgba16i) uniform highp writeonly iimage1D arg_0;
-void textureDimensions_08753d() {
-  int res = imageSize(arg_0);
-}
-
-void compute_main() {
-  textureDimensions_08753d();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'iimage1D' : Reserved word. 
-WARNING: 0:3: 'layout' : useless application of layout qualifier 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/08753d.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/08753d.wgsl.expected.msl
deleted file mode 100644
index a1fa2f3..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/08753d.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_08753d(texture1d<int, access::write> tint_symbol_1) {
-  int res = int(tint_symbol_1.get_width(0));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture1d<int, access::write> tint_symbol_2) {
-  textureDimensions_08753d(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture1d<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture1d<int, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_08753d(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture1d<int, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_08753d(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/08753d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/08753d.wgsl.expected.spvasm
deleted file mode 100644
index 8854f38..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/08753d.wgsl.expected.spvasm
+++ /dev/null
@@ -1,76 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 36
-; Schema: 0
-               OpCapability Shader
-               OpCapability Image1D
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_08753d "textureDimensions_08753d"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-        %int = OpTypeInt 32 1
-         %11 = OpTypeImage %int 1D 0 0 0 2 Rgba16i
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-%_ptr_Function_int = OpTypePointer Function %int
-         %21 = OpConstantNull %int
-         %22 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_08753d = OpFunction %void None %13
-         %16 = OpLabel
-        %res = OpVariable %_ptr_Function_int Function %21
-         %18 = OpLoad %11 %arg_0
-         %17 = OpImageQuerySize %int %18
-               OpStore %res %17
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %22
-         %24 = OpLabel
-         %25 = OpFunctionCall %void %textureDimensions_08753d
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %27 = OpLabel
-         %28 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %28
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %31 = OpLabel
-         %32 = OpFunctionCall %void %textureDimensions_08753d
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %34 = OpLabel
-         %35 = OpFunctionCall %void %textureDimensions_08753d
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/08753d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/08753d.wgsl.expected.wgsl
deleted file mode 100644
index 443a678..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/08753d.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba16sint, write>;
-
-fn textureDimensions_08753d() {
-  var res : i32 = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_08753d();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_08753d();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_08753d();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0890c6.wgsl b/test/tint/builtins/gen/var/textureDimensions/0890c6.wgsl
new file mode 100644
index 0000000..15aa62d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0890c6.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_3d<f32>;
+
+// fn textureDimensions(texture: texture_3d<f32>, level: u32) -> vec3<u32>
+fn textureDimensions_0890c6() {
+  var arg_1 = 1u;
+  var res: vec3<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_0890c6();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_0890c6();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_0890c6();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0890c6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/0890c6.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..deb887d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0890c6.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_0890c6() {
+  uint arg_1 = 1u;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  uint3 res = tint_tmp.xyz;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_0890c6();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_0890c6();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_0890c6();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0890c6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/0890c6.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..deb887d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0890c6.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_0890c6() {
+  uint arg_1 = 1u;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  uint3 res = tint_tmp.xyz;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_0890c6();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_0890c6();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_0890c6();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0890c6.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/0890c6.wgsl.expected.glsl
new file mode 100644
index 0000000..7b2d34c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0890c6.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp sampler3D arg_0_1;
+void textureDimensions_0890c6() {
+  uint arg_1 = 1u;
+  uvec3 res = uvec3(textureSize(arg_0_1, int(arg_1)));
+}
+
+vec4 vertex_main() {
+  textureDimensions_0890c6();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler3D arg_0_1;
+void textureDimensions_0890c6() {
+  uint arg_1 = 1u;
+  uvec3 res = uvec3(textureSize(arg_0_1, int(arg_1)));
+}
+
+void fragment_main() {
+  textureDimensions_0890c6();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler3D arg_0_1;
+void textureDimensions_0890c6() {
+  uint arg_1 = 1u;
+  uvec3 res = uvec3(textureSize(arg_0_1, int(arg_1)));
+}
+
+void compute_main() {
+  textureDimensions_0890c6();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0890c6.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/0890c6.wgsl.expected.msl
new file mode 100644
index 0000000..15b653c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0890c6.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_0890c6(texture3d<float, access::sample> tint_symbol_1) {
+  uint arg_1 = 1u;
+  uint3 res = uint3(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1), tint_symbol_1.get_depth(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::sample> tint_symbol_2) {
+  textureDimensions_0890c6(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_0890c6(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture3d<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_0890c6(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/0890c6.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/0890c6.wgsl.expected.spvasm
new file mode 100644
index 0000000..1d35261
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0890c6.wgsl.expected.spvasm
@@ -0,0 +1,82 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 42
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_0890c6 "textureDimensions_0890c6"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 3D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %20 = OpConstantNull %uint
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+         %27 = OpConstantNull %v3uint
+         %28 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_0890c6 = OpFunction %void None %12
+         %15 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %20
+        %res = OpVariable %_ptr_Function_v3uint Function %27
+               OpStore %arg_1 %uint_1
+         %23 = OpLoad %11 %arg_0
+         %24 = OpLoad %uint %arg_1
+         %21 = OpImageQuerySizeLod %v3uint %23 %24
+               OpStore %res %21
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %28
+         %30 = OpLabel
+         %31 = OpFunctionCall %void %textureDimensions_0890c6
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %33 = OpLabel
+         %34 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %34
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureDimensions_0890c6
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureDimensions_0890c6
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/0890c6.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/0890c6.wgsl.expected.wgsl
new file mode 100644
index 0000000..1f688e5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0890c6.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_3d<f32>;
+
+fn textureDimensions_0890c6() {
+  var arg_1 = 1u;
+  var res : vec3<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_0890c6();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_0890c6();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_0890c6();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/09140b.wgsl b/test/tint/builtins/gen/var/textureDimensions/09140b.wgsl
new file mode 100644
index 0000000..6a49738
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/09140b.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba32uint, write>;
+
+// fn textureDimensions(texture: texture_storage_1d<rgba32uint, write>) -> u32
+fn textureDimensions_09140b() {
+  var res: u32 = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_09140b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_09140b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_09140b();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/09140b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/09140b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f718b0a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/09140b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<uint4> arg_0 : register(u0, space1);
+
+void textureDimensions_09140b() {
+  int tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_09140b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_09140b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_09140b();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/09140b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/09140b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..f718b0a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/09140b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<uint4> arg_0 : register(u0, space1);
+
+void textureDimensions_09140b() {
+  int tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_09140b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_09140b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_09140b();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/09140b.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/09140b.wgsl.expected.glsl
new file mode 100644
index 0000000..67cfd46
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/09140b.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32ui) uniform highp writeonly uimage1D arg_0;
+void textureDimensions_09140b() {
+  uint res = uint(imageSize(arg_0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_09140b();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'uimage1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rgba32ui) uniform highp writeonly uimage1D arg_0;
+void textureDimensions_09140b() {
+  uint res = uint(imageSize(arg_0));
+}
+
+void fragment_main() {
+  textureDimensions_09140b();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'uimage1D' : Reserved word. 
+WARNING: 0:4: 'layout' : useless application of layout qualifier 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32ui) uniform highp writeonly uimage1D arg_0;
+void textureDimensions_09140b() {
+  uint res = uint(imageSize(arg_0));
+}
+
+void compute_main() {
+  textureDimensions_09140b();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'uimage1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/09140b.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/09140b.wgsl.expected.msl
new file mode 100644
index 0000000..5294978
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/09140b.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_09140b(texture1d<uint, access::write> tint_symbol_1) {
+  uint res = tint_symbol_1.get_width(0);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<uint, access::write> tint_symbol_2) {
+  textureDimensions_09140b(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_09140b(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_09140b(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/09140b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/09140b.wgsl.expected.spvasm
new file mode 100644
index 0000000..f5cdeef
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/09140b.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_09140b "textureDimensions_09140b"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 1D 0 0 0 2 Rgba32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %21 = OpConstantNull %uint
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_09140b = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_uint Function %21
+         %18 = OpLoad %11 %arg_0
+         %17 = OpImageQuerySize %uint %18
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %textureDimensions_09140b
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %27 = OpLabel
+         %28 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %28
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureDimensions_09140b
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureDimensions_09140b
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/09140b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/09140b.wgsl.expected.wgsl
new file mode 100644
index 0000000..a07543a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/09140b.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba32uint, write>;
+
+fn textureDimensions_09140b() {
+  var res : u32 = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_09140b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_09140b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_09140b();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl b/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl
deleted file mode 100644
index 5f926ae..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2022 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_depth_2d_array;
-
-// fn textureDimensions(texture: texture_depth_2d_array, level: u32) -> vec2<i32>
-fn textureDimensions_0a1ce8() {
-  var arg_1 = 1u;
-  var res: vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_0a1ce8();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_0a1ce8();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_0a1ce8();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 6a8a99e..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-Texture2DArray arg_0 : register(t0, space1);
-
-void textureDimensions_0a1ce8() {
-  uint arg_1 = 1u;
-  int4 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_0a1ce8();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_0a1ce8();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_0a1ce8();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 6a8a99e..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-Texture2DArray arg_0 : register(t0, space1);
-
-void textureDimensions_0a1ce8() {
-  uint arg_1 = 1u;
-  int4 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_0a1ce8();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_0a1ce8();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_0a1ce8();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl.expected.glsl
deleted file mode 100644
index ef24d5e..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl.expected.glsl
+++ /dev/null
@@ -1,55 +0,0 @@
-#version 310 es
-
-uniform highp sampler2DArray arg_0_1;
-void textureDimensions_0a1ce8() {
-  uint arg_1 = 1u;
-  ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
-}
-
-vec4 vertex_main() {
-  textureDimensions_0a1ce8();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-uniform highp sampler2DArray arg_0_1;
-void textureDimensions_0a1ce8() {
-  uint arg_1 = 1u;
-  ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
-}
-
-void fragment_main() {
-  textureDimensions_0a1ce8();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-uniform highp sampler2DArray arg_0_1;
-void textureDimensions_0a1ce8() {
-  uint arg_1 = 1u;
-  ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
-}
-
-void compute_main() {
-  textureDimensions_0a1ce8();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl.expected.msl
deleted file mode 100644
index da0abf0..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl.expected.msl
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_0a1ce8(depth2d_array<float, access::sample> tint_symbol_1) {
-  uint arg_1 = 1u;
-  int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(depth2d_array<float, access::sample> tint_symbol_2) {
-  textureDimensions_0a1ce8(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_0a1ce8(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(depth2d_array<float, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_0a1ce8(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl.expected.spvasm
deleted file mode 100644
index 9e9dc56..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl.expected.spvasm
+++ /dev/null
@@ -1,85 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 45
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_0a1ce8 "textureDimensions_0a1ce8"
-               OpName %arg_1 "arg_1"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-         %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %12 = OpTypeFunction %void
-       %uint = OpTypeInt 32 0
-     %uint_1 = OpConstant %uint 1
-%_ptr_Function_uint = OpTypePointer Function %uint
-         %20 = OpConstantNull %uint
-        %int = OpTypeInt 32 1
-      %v2int = OpTypeVector %int 2
-      %v3int = OpTypeVector %int 3
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %30 = OpConstantNull %v2int
-         %31 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_0a1ce8 = OpFunction %void None %12
-         %15 = OpLabel
-      %arg_1 = OpVariable %_ptr_Function_uint Function %20
-        %res = OpVariable %_ptr_Function_v2int Function %30
-               OpStore %arg_1 %uint_1
-         %26 = OpLoad %11 %arg_0
-         %27 = OpLoad %uint %arg_1
-         %24 = OpImageQuerySizeLod %v3int %26 %27
-         %21 = OpVectorShuffle %v2int %24 %24 0 1
-               OpStore %res %21
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %31
-         %33 = OpLabel
-         %34 = OpFunctionCall %void %textureDimensions_0a1ce8
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %12
-         %36 = OpLabel
-         %37 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %37
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %12
-         %40 = OpLabel
-         %41 = OpFunctionCall %void %textureDimensions_0a1ce8
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %12
-         %43 = OpLabel
-         %44 = OpFunctionCall %void %textureDimensions_0a1ce8
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl.expected.wgsl
deleted file mode 100644
index cec85de..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0a1ce8.wgsl.expected.wgsl
+++ /dev/null
@@ -1,22 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
-
-fn textureDimensions_0a1ce8() {
-  var arg_1 = 1u;
-  var res : vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_0a1ce8();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_0a1ce8();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_0a1ce8();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0baa0d.wgsl b/test/tint/builtins/gen/var/textureDimensions/0baa0d.wgsl
new file mode 100644
index 0000000..c3117f5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0baa0d.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<r32float, write>;
+
+// fn textureDimensions(texture: texture_storage_2d<r32float, write>) -> vec2<u32>
+fn textureDimensions_0baa0d() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_0baa0d();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_0baa0d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_0baa0d();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0baa0d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/0baa0d.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b1a4736
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0baa0d.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<float4> arg_0 : register(u0, space1);
+
+void textureDimensions_0baa0d() {
+  int2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_0baa0d();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_0baa0d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_0baa0d();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0baa0d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/0baa0d.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b1a4736
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0baa0d.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<float4> arg_0 : register(u0, space1);
+
+void textureDimensions_0baa0d() {
+  int2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_0baa0d();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_0baa0d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_0baa0d();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0baa0d.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/0baa0d.wgsl.expected.glsl
new file mode 100644
index 0000000..52bbc21
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0baa0d.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(r32f) uniform highp writeonly image2D arg_0;
+void textureDimensions_0baa0d() {
+  uvec2 res = uvec2(imageSize(arg_0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_0baa0d();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(r32f) uniform highp writeonly image2D arg_0;
+void textureDimensions_0baa0d() {
+  uvec2 res = uvec2(imageSize(arg_0));
+}
+
+void fragment_main() {
+  textureDimensions_0baa0d();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(r32f) uniform highp writeonly image2D arg_0;
+void textureDimensions_0baa0d() {
+  uvec2 res = uvec2(imageSize(arg_0));
+}
+
+void compute_main() {
+  textureDimensions_0baa0d();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0baa0d.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/0baa0d.wgsl.expected.msl
new file mode 100644
index 0000000..3776c05
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0baa0d.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_0baa0d(texture2d<float, access::write> tint_symbol_1) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::write> tint_symbol_2) {
+  textureDimensions_0baa0d(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_0baa0d(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_0baa0d(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/0baa0d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/0baa0d.wgsl.expected.spvasm
new file mode 100644
index 0000000..f1c67a7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0baa0d.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_0baa0d "textureDimensions_0baa0d"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 2 R32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %22 = OpConstantNull %v2uint
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_0baa0d = OpFunction %void None %12
+         %15 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %22
+         %19 = OpLoad %11 %arg_0
+         %16 = OpImageQuerySize %v2uint %19
+               OpStore %res %16
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %textureDimensions_0baa0d
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %28 = OpLabel
+         %29 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %29
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_0baa0d
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureDimensions_0baa0d
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/0baa0d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/0baa0d.wgsl.expected.wgsl
new file mode 100644
index 0000000..8099e09
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0baa0d.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<r32float, write>;
+
+fn textureDimensions_0baa0d() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_0baa0d();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_0baa0d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_0baa0d();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0c0b0c.wgsl b/test/tint/builtins/gen/var/textureDimensions/0c0b0c.wgsl
new file mode 100644
index 0000000..79bc102
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0c0b0c.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba16float, write>;
+
+// fn textureDimensions(texture: texture_storage_1d<rgba16float, write>) -> u32
+fn textureDimensions_0c0b0c() {
+  var res: u32 = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_0c0b0c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_0c0b0c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_0c0b0c();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0c0b0c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/0c0b0c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5fb29dc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0c0b0c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<float4> arg_0 : register(u0, space1);
+
+void textureDimensions_0c0b0c() {
+  int tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_0c0b0c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_0c0b0c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_0c0b0c();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0c0b0c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/0c0b0c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5fb29dc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0c0b0c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<float4> arg_0 : register(u0, space1);
+
+void textureDimensions_0c0b0c() {
+  int tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_0c0b0c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_0c0b0c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_0c0b0c();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0c0b0c.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/0c0b0c.wgsl.expected.glsl
new file mode 100644
index 0000000..a3815af
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0c0b0c.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16f) uniform highp writeonly image1D arg_0;
+void textureDimensions_0c0b0c() {
+  uint res = uint(imageSize(arg_0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_0c0b0c();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rgba16f) uniform highp writeonly image1D arg_0;
+void textureDimensions_0c0b0c() {
+  uint res = uint(imageSize(arg_0));
+}
+
+void fragment_main() {
+  textureDimensions_0c0b0c();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image1D' : Reserved word. 
+WARNING: 0:4: 'layout' : useless application of layout qualifier 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16f) uniform highp writeonly image1D arg_0;
+void textureDimensions_0c0b0c() {
+  uint res = uint(imageSize(arg_0));
+}
+
+void compute_main() {
+  textureDimensions_0c0b0c();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/0c0b0c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/0c0b0c.wgsl.expected.msl
new file mode 100644
index 0000000..c100b1a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0c0b0c.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_0c0b0c(texture1d<float, access::write> tint_symbol_1) {
+  uint res = tint_symbol_1.get_width(0);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::write> tint_symbol_2) {
+  textureDimensions_0c0b0c(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_0c0b0c(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_0c0b0c(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/0c0b0c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/0c0b0c.wgsl.expected.spvasm
new file mode 100644
index 0000000..8ae986f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0c0b0c.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_0c0b0c "textureDimensions_0c0b0c"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 1D 0 0 0 2 Rgba16f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %21 = OpConstantNull %uint
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_0c0b0c = OpFunction %void None %12
+         %15 = OpLabel
+        %res = OpVariable %_ptr_Function_uint Function %21
+         %18 = OpLoad %11 %arg_0
+         %16 = OpImageQuerySize %uint %18
+               OpStore %res %16
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %textureDimensions_0c0b0c
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %27 = OpLabel
+         %28 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %28
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureDimensions_0c0b0c
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureDimensions_0c0b0c
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/0c0b0c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/0c0b0c.wgsl.expected.wgsl
new file mode 100644
index 0000000..c7aab96
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0c0b0c.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba16float, write>;
+
+fn textureDimensions_0c0b0c() {
+  var res : u32 = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_0c0b0c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_0c0b0c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_0c0b0c();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0c4772.wgsl b/test/tint/builtins/gen/var/textureDimensions/0c4772.wgsl
deleted file mode 100644
index 6341954..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0c4772.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_3d<rgba16float, write>;
-
-// fn textureDimensions(texture: texture_storage_3d<rgba16float, write>) -> vec3<i32>
-fn textureDimensions_0c4772() {
-  var res: vec3<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_0c4772();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_0c4772();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_0c4772();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0c4772.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/0c4772.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 3de620c..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0c4772.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture3D<float4> arg_0 : register(u0, space1);
-
-void textureDimensions_0c4772() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int3 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_0c4772();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_0c4772();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_0c4772();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0c4772.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/0c4772.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 3de620c..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0c4772.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture3D<float4> arg_0 : register(u0, space1);
-
-void textureDimensions_0c4772() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int3 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_0c4772();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_0c4772();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_0c4772();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0c4772.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/0c4772.wgsl.expected.glsl
deleted file mode 100644
index f58182c..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0c4772.wgsl.expected.glsl
+++ /dev/null
@@ -1,52 +0,0 @@
-#version 310 es
-
-layout(rgba16f) uniform highp writeonly image3D arg_0;
-void textureDimensions_0c4772() {
-  ivec3 res = imageSize(arg_0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_0c4772();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-layout(rgba16f) uniform highp writeonly image3D arg_0;
-void textureDimensions_0c4772() {
-  ivec3 res = imageSize(arg_0);
-}
-
-void fragment_main() {
-  textureDimensions_0c4772();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-layout(rgba16f) uniform highp writeonly image3D arg_0;
-void textureDimensions_0c4772() {
-  ivec3 res = imageSize(arg_0);
-}
-
-void compute_main() {
-  textureDimensions_0c4772();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0c4772.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/0c4772.wgsl.expected.msl
deleted file mode 100644
index cc675e6..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0c4772.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_0c4772(texture3d<float, access::write> tint_symbol_1) {
-  int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture3d<float, access::write> tint_symbol_2) {
-  textureDimensions_0c4772(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture3d<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture3d<float, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_0c4772(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture3d<float, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_0c4772(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/0c4772.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/0c4772.wgsl.expected.spvasm
deleted file mode 100644
index 77d91d5..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0c4772.wgsl.expected.spvasm
+++ /dev/null
@@ -1,76 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 37
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_0c4772 "textureDimensions_0c4772"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-         %11 = OpTypeImage %float 3D 0 0 0 2 Rgba16f
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %12 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %v3int = OpTypeVector %int 3
-%_ptr_Function_v3int = OpTypePointer Function %v3int
-         %22 = OpConstantNull %v3int
-         %23 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_0c4772 = OpFunction %void None %12
-         %15 = OpLabel
-        %res = OpVariable %_ptr_Function_v3int Function %22
-         %19 = OpLoad %11 %arg_0
-         %16 = OpImageQuerySize %v3int %19
-               OpStore %res %16
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %23
-         %25 = OpLabel
-         %26 = OpFunctionCall %void %textureDimensions_0c4772
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %12
-         %28 = OpLabel
-         %29 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %29
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %12
-         %32 = OpLabel
-         %33 = OpFunctionCall %void %textureDimensions_0c4772
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %12
-         %35 = OpLabel
-         %36 = OpFunctionCall %void %textureDimensions_0c4772
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/0c4772.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/0c4772.wgsl.expected.wgsl
deleted file mode 100644
index fc2907d..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0c4772.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba16float, write>;
-
-fn textureDimensions_0c4772() {
-  var res : vec3<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_0c4772();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_0c4772();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_0c4772();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0cce40.wgsl b/test/tint/builtins/gen/var/textureDimensions/0cce40.wgsl
deleted file mode 100644
index 9b72fc3..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0cce40.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_1d<r32sint, write>;
-
-// fn textureDimensions(texture: texture_storage_1d<r32sint, write>) -> i32
-fn textureDimensions_0cce40() {
-  var res: i32 = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_0cce40();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_0cce40();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_0cce40();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0cce40.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/0cce40.wgsl.expected.dxc.hlsl
deleted file mode 100644
index e10fdf6f..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0cce40.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture1D<int4> arg_0 : register(u0, space1);
-
-void textureDimensions_0cce40() {
-  int tint_tmp;
-  arg_0.GetDimensions(tint_tmp);
-  int res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_0cce40();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_0cce40();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_0cce40();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0cce40.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/0cce40.wgsl.expected.fxc.hlsl
deleted file mode 100644
index e10fdf6f..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0cce40.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture1D<int4> arg_0 : register(u0, space1);
-
-void textureDimensions_0cce40() {
-  int tint_tmp;
-  arg_0.GetDimensions(tint_tmp);
-  int res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_0cce40();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_0cce40();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_0cce40();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0cce40.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/0cce40.wgsl.expected.glsl
deleted file mode 100644
index a0df901..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0cce40.wgsl.expected.glsl
+++ /dev/null
@@ -1,78 +0,0 @@
-SKIP: FAILED
-
-#version 310 es
-
-layout(r32i) uniform highp writeonly iimage1D arg_0;
-void textureDimensions_0cce40() {
-  int res = imageSize(arg_0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_0cce40();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'iimage1D' : Reserved word. 
-WARNING: 0:3: 'layout' : useless application of layout qualifier 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision mediump float;
-
-layout(r32i) uniform highp writeonly iimage1D arg_0;
-void textureDimensions_0cce40() {
-  int res = imageSize(arg_0);
-}
-
-void fragment_main() {
-  textureDimensions_0cce40();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:4: 'iimage1D' : Reserved word. 
-WARNING: 0:4: 'layout' : useless application of layout qualifier 
-ERROR: 0:4: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-
-layout(r32i) uniform highp writeonly iimage1D arg_0;
-void textureDimensions_0cce40() {
-  int res = imageSize(arg_0);
-}
-
-void compute_main() {
-  textureDimensions_0cce40();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'iimage1D' : Reserved word. 
-WARNING: 0:3: 'layout' : useless application of layout qualifier 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/0cce40.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/0cce40.wgsl.expected.msl
deleted file mode 100644
index e955048..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0cce40.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_0cce40(texture1d<int, access::write> tint_symbol_1) {
-  int res = int(tint_symbol_1.get_width(0));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture1d<int, access::write> tint_symbol_2) {
-  textureDimensions_0cce40(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture1d<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture1d<int, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_0cce40(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture1d<int, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_0cce40(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/0cce40.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/0cce40.wgsl.expected.spvasm
deleted file mode 100644
index 51c3c14..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0cce40.wgsl.expected.spvasm
+++ /dev/null
@@ -1,76 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 36
-; Schema: 0
-               OpCapability Shader
-               OpCapability Image1D
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_0cce40 "textureDimensions_0cce40"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-        %int = OpTypeInt 32 1
-         %11 = OpTypeImage %int 1D 0 0 0 2 R32i
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-%_ptr_Function_int = OpTypePointer Function %int
-         %21 = OpConstantNull %int
-         %22 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_0cce40 = OpFunction %void None %13
-         %16 = OpLabel
-        %res = OpVariable %_ptr_Function_int Function %21
-         %18 = OpLoad %11 %arg_0
-         %17 = OpImageQuerySize %int %18
-               OpStore %res %17
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %22
-         %24 = OpLabel
-         %25 = OpFunctionCall %void %textureDimensions_0cce40
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %27 = OpLabel
-         %28 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %28
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %31 = OpLabel
-         %32 = OpFunctionCall %void %textureDimensions_0cce40
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %34 = OpLabel
-         %35 = OpFunctionCall %void %textureDimensions_0cce40
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/0cce40.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/0cce40.wgsl.expected.wgsl
deleted file mode 100644
index 5193665..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0cce40.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_1d<r32sint, write>;
-
-fn textureDimensions_0cce40() {
-  var res : i32 = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_0cce40();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_0cce40();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_0cce40();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0cf2ff.wgsl b/test/tint/builtins/gen/var/textureDimensions/0cf2ff.wgsl
deleted file mode 100644
index 82980ef..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0cf2ff.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d<rgba16uint, write>;
-
-// fn textureDimensions(texture: texture_storage_2d<rgba16uint, write>) -> vec2<i32>
-fn textureDimensions_0cf2ff() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_0cf2ff();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_0cf2ff();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_0cf2ff();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0cf2ff.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/0cf2ff.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 3b9fd52..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0cf2ff.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2D<uint4> arg_0 : register(u0, space1);
-
-void textureDimensions_0cf2ff() {
-  int2 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
-  int2 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_0cf2ff();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_0cf2ff();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_0cf2ff();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0cf2ff.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/0cf2ff.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 3b9fd52..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0cf2ff.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2D<uint4> arg_0 : register(u0, space1);
-
-void textureDimensions_0cf2ff() {
-  int2 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
-  int2 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_0cf2ff();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_0cf2ff();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_0cf2ff();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0cf2ff.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/0cf2ff.wgsl.expected.glsl
deleted file mode 100644
index d91c9db..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0cf2ff.wgsl.expected.glsl
+++ /dev/null
@@ -1,52 +0,0 @@
-#version 310 es
-
-layout(rgba16ui) uniform highp writeonly uimage2D arg_0;
-void textureDimensions_0cf2ff() {
-  ivec2 res = imageSize(arg_0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_0cf2ff();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-layout(rgba16ui) uniform highp writeonly uimage2D arg_0;
-void textureDimensions_0cf2ff() {
-  ivec2 res = imageSize(arg_0);
-}
-
-void fragment_main() {
-  textureDimensions_0cf2ff();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-layout(rgba16ui) uniform highp writeonly uimage2D arg_0;
-void textureDimensions_0cf2ff() {
-  ivec2 res = imageSize(arg_0);
-}
-
-void compute_main() {
-  textureDimensions_0cf2ff();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0cf2ff.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/0cf2ff.wgsl.expected.msl
deleted file mode 100644
index 875a388..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0cf2ff.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_0cf2ff(texture2d<uint, access::write> tint_symbol_1) {
-  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture2d<uint, access::write> tint_symbol_2) {
-  textureDimensions_0cf2ff(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture2d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture2d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_0cf2ff(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture2d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_0cf2ff(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/0cf2ff.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/0cf2ff.wgsl.expected.spvasm
deleted file mode 100644
index aece9956..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0cf2ff.wgsl.expected.spvasm
+++ /dev/null
@@ -1,77 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 38
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_0cf2ff "textureDimensions_0cf2ff"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-       %uint = OpTypeInt 32 0
-         %11 = OpTypeImage %uint 2D 0 0 0 2 Rgba16ui
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %v2int = OpTypeVector %int 2
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %23 = OpConstantNull %v2int
-         %24 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_0cf2ff = OpFunction %void None %13
-         %16 = OpLabel
-        %res = OpVariable %_ptr_Function_v2int Function %23
-         %20 = OpLoad %11 %arg_0
-         %17 = OpImageQuerySize %v2int %20
-               OpStore %res %17
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %24
-         %26 = OpLabel
-         %27 = OpFunctionCall %void %textureDimensions_0cf2ff
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %29 = OpLabel
-         %30 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %30
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %33 = OpLabel
-         %34 = OpFunctionCall %void %textureDimensions_0cf2ff
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %36 = OpLabel
-         %37 = OpFunctionCall %void %textureDimensions_0cf2ff
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/0cf2ff.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/0cf2ff.wgsl.expected.wgsl
deleted file mode 100644
index a13b916..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0cf2ff.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba16uint, write>;
-
-fn textureDimensions_0cf2ff() {
-  var res : vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_0cf2ff();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_0cf2ff();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_0cf2ff();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl b/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl
deleted file mode 100644
index dbc0ee9..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2022 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_1d<i32>;
-
-// fn textureDimensions(texture: texture_1d<i32>, level: u32) -> i32
-fn textureDimensions_0d7633() {
-  var arg_1 = 1u;
-  var res: i32 = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_0d7633();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_0d7633();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_0d7633();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 5653b0e..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-Texture1D<int4> arg_0 : register(t0, space1);
-
-void textureDimensions_0d7633() {
-  uint arg_1 = 1u;
-  int2 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y);
-  int res = tint_tmp.x;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_0d7633();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_0d7633();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_0d7633();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 5653b0e..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-Texture1D<int4> arg_0 : register(t0, space1);
-
-void textureDimensions_0d7633() {
-  uint arg_1 = 1u;
-  int2 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y);
-  int res = tint_tmp.x;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_0d7633();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_0d7633();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_0d7633();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl.expected.glsl
deleted file mode 100644
index 91d58d3..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl.expected.glsl
+++ /dev/null
@@ -1,78 +0,0 @@
-SKIP: FAILED
-
-#version 310 es
-
-uniform highp isampler1D arg_0_1;
-void textureDimensions_0d7633() {
-  uint arg_1 = 1u;
-  int res = textureSize(arg_0_1, int(arg_1));
-}
-
-vec4 vertex_main() {
-  textureDimensions_0d7633();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'isampler1D' : Reserved word. 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision mediump float;
-
-uniform highp isampler1D arg_0_1;
-void textureDimensions_0d7633() {
-  uint arg_1 = 1u;
-  int res = textureSize(arg_0_1, int(arg_1));
-}
-
-void fragment_main() {
-  textureDimensions_0d7633();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:4: 'isampler1D' : Reserved word. 
-ERROR: 0:4: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-
-uniform highp isampler1D arg_0_1;
-void textureDimensions_0d7633() {
-  uint arg_1 = 1u;
-  int res = textureSize(arg_0_1, int(arg_1));
-}
-
-void compute_main() {
-  textureDimensions_0d7633();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'isampler1D' : Reserved word. 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl.expected.msl
deleted file mode 100644
index 5e838d2..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl.expected.msl
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_0d7633(texture1d<int, access::sample> tint_symbol_1) {
-  uint arg_1 = 1u;
-  int res = int(tint_symbol_1.get_width(0));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture1d<int, access::sample> tint_symbol_2) {
-  textureDimensions_0d7633(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture1d<int, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture1d<int, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_0d7633(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture1d<int, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_0d7633(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl.expected.spvasm
deleted file mode 100644
index 4991015..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl.expected.spvasm
+++ /dev/null
@@ -1,83 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 42
-; Schema: 0
-               OpCapability Shader
-               OpCapability Sampled1D
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_0d7633 "textureDimensions_0d7633"
-               OpName %arg_1 "arg_1"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-        %int = OpTypeInt 32 1
-         %11 = OpTypeImage %int 1D 0 0 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-       %uint = OpTypeInt 32 0
-     %uint_1 = OpConstant %uint 1
-%_ptr_Function_uint = OpTypePointer Function %uint
-         %21 = OpConstantNull %uint
-%_ptr_Function_int = OpTypePointer Function %int
-         %27 = OpConstantNull %int
-         %28 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_0d7633 = OpFunction %void None %13
-         %16 = OpLabel
-      %arg_1 = OpVariable %_ptr_Function_uint Function %21
-        %res = OpVariable %_ptr_Function_int Function %27
-               OpStore %arg_1 %uint_1
-         %23 = OpLoad %11 %arg_0
-         %24 = OpLoad %uint %arg_1
-         %22 = OpImageQuerySizeLod %int %23 %24
-               OpStore %res %22
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %28
-         %30 = OpLabel
-         %31 = OpFunctionCall %void %textureDimensions_0d7633
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %33 = OpLabel
-         %34 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %34
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %37 = OpLabel
-         %38 = OpFunctionCall %void %textureDimensions_0d7633
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %40 = OpLabel
-         %41 = OpFunctionCall %void %textureDimensions_0d7633
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl.expected.wgsl
deleted file mode 100644
index 0c00e85..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0d7633.wgsl.expected.wgsl
+++ /dev/null
@@ -1,22 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_1d<i32>;
-
-fn textureDimensions_0d7633() {
-  var arg_1 = 1u;
-  var res : i32 = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_0d7633();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_0d7633();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_0d7633();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0d8b7e.wgsl b/test/tint/builtins/gen/var/textureDimensions/0d8b7e.wgsl
deleted file mode 100644
index 1a88f86..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0d8b7e.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32uint, write>;
-
-// fn textureDimensions(texture: texture_storage_2d_array<r32uint, write>) -> vec2<i32>
-fn textureDimensions_0d8b7e() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_0d8b7e();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_0d8b7e();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_0d8b7e();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0d8b7e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/0d8b7e.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 848d8b7..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0d8b7e.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2DArray<uint4> arg_0 : register(u0, space1);
-
-void textureDimensions_0d8b7e() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_0d8b7e();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_0d8b7e();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_0d8b7e();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0d8b7e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/0d8b7e.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 848d8b7..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0d8b7e.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2DArray<uint4> arg_0 : register(u0, space1);
-
-void textureDimensions_0d8b7e() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_0d8b7e();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_0d8b7e();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_0d8b7e();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0d8b7e.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/0d8b7e.wgsl.expected.glsl
deleted file mode 100644
index 19bb91a..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0d8b7e.wgsl.expected.glsl
+++ /dev/null
@@ -1,52 +0,0 @@
-#version 310 es
-
-layout(r32ui) uniform highp writeonly uimage2DArray arg_0;
-void textureDimensions_0d8b7e() {
-  ivec2 res = imageSize(arg_0).xy;
-}
-
-vec4 vertex_main() {
-  textureDimensions_0d8b7e();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-layout(r32ui) uniform highp writeonly uimage2DArray arg_0;
-void textureDimensions_0d8b7e() {
-  ivec2 res = imageSize(arg_0).xy;
-}
-
-void fragment_main() {
-  textureDimensions_0d8b7e();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-layout(r32ui) uniform highp writeonly uimage2DArray arg_0;
-void textureDimensions_0d8b7e() {
-  ivec2 res = imageSize(arg_0).xy;
-}
-
-void compute_main() {
-  textureDimensions_0d8b7e();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0d8b7e.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/0d8b7e.wgsl.expected.msl
deleted file mode 100644
index d07d72a..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0d8b7e.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_0d8b7e(texture2d_array<uint, access::write> tint_symbol_1) {
-  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture2d_array<uint, access::write> tint_symbol_2) {
-  textureDimensions_0d8b7e(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture2d_array<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture2d_array<uint, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_0d8b7e(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture2d_array<uint, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_0d8b7e(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/0d8b7e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/0d8b7e.wgsl.expected.spvasm
deleted file mode 100644
index c5406d7..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0d8b7e.wgsl.expected.spvasm
+++ /dev/null
@@ -1,79 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 40
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_0d8b7e "textureDimensions_0d8b7e"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-       %uint = OpTypeInt 32 0
-         %11 = OpTypeImage %uint 2D 0 1 0 2 R32ui
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %v2int = OpTypeVector %int 2
-      %v3int = OpTypeVector %int 3
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %25 = OpConstantNull %v2int
-         %26 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_0d8b7e = OpFunction %void None %13
-         %16 = OpLabel
-        %res = OpVariable %_ptr_Function_v2int Function %25
-         %22 = OpLoad %11 %arg_0
-         %20 = OpImageQuerySize %v3int %22
-         %17 = OpVectorShuffle %v2int %20 %20 0 1
-               OpStore %res %17
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %26
-         %28 = OpLabel
-         %29 = OpFunctionCall %void %textureDimensions_0d8b7e
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %31 = OpLabel
-         %32 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %32
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %35 = OpLabel
-         %36 = OpFunctionCall %void %textureDimensions_0d8b7e
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %38 = OpLabel
-         %39 = OpFunctionCall %void %textureDimensions_0d8b7e
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/0d8b7e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/0d8b7e.wgsl.expected.wgsl
deleted file mode 100644
index 2ce14ea..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0d8b7e.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32uint, write>;
-
-fn textureDimensions_0d8b7e() {
-  var res : vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_0d8b7e();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_0d8b7e();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_0d8b7e();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl b/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl
deleted file mode 100644
index b9abbbf..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2022 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_cube_array<f32>;
-
-// fn textureDimensions(texture: texture_cube_array<f32>, level: u32) -> vec2<i32>
-fn textureDimensions_0e28d3() {
-  var arg_1 = 1u;
-  var res: vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_0e28d3();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_0e28d3();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_0e28d3();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 9b2431e..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-TextureCubeArray<float4> arg_0 : register(t0, space1);
-
-void textureDimensions_0e28d3() {
-  uint arg_1 = 1u;
-  int4 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_0e28d3();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_0e28d3();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_0e28d3();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 9b2431e..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-TextureCubeArray<float4> arg_0 : register(t0, space1);
-
-void textureDimensions_0e28d3() {
-  uint arg_1 = 1u;
-  int4 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_0e28d3();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_0e28d3();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_0e28d3();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl.expected.glsl
deleted file mode 100644
index fb1cefc..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl.expected.glsl
+++ /dev/null
@@ -1,78 +0,0 @@
-SKIP: FAILED
-
-#version 310 es
-
-uniform highp samplerCubeArray arg_0_1;
-void textureDimensions_0e28d3() {
-  uint arg_1 = 1u;
-  ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
-}
-
-vec4 vertex_main() {
-  textureDimensions_0e28d3();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'samplerCubeArray' : Reserved word. 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision mediump float;
-
-uniform highp samplerCubeArray arg_0_1;
-void textureDimensions_0e28d3() {
-  uint arg_1 = 1u;
-  ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
-}
-
-void fragment_main() {
-  textureDimensions_0e28d3();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:4: 'samplerCubeArray' : Reserved word. 
-ERROR: 0:4: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-
-uniform highp samplerCubeArray arg_0_1;
-void textureDimensions_0e28d3() {
-  uint arg_1 = 1u;
-  ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
-}
-
-void compute_main() {
-  textureDimensions_0e28d3();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'samplerCubeArray' : Reserved word. 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl.expected.msl
deleted file mode 100644
index c37cac9..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl.expected.msl
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_0e28d3(texturecube_array<float, access::sample> tint_symbol_1) {
-  uint arg_1 = 1u;
-  int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texturecube_array<float, access::sample> tint_symbol_2) {
-  textureDimensions_0e28d3(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texturecube_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texturecube_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_0e28d3(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texturecube_array<float, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_0e28d3(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl.expected.spvasm
deleted file mode 100644
index de08fb3..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl.expected.spvasm
+++ /dev/null
@@ -1,86 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 45
-; Schema: 0
-               OpCapability Shader
-               OpCapability SampledCubeArray
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_0e28d3 "textureDimensions_0e28d3"
-               OpName %arg_1 "arg_1"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-         %11 = OpTypeImage %float Cube 0 1 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %12 = OpTypeFunction %void
-       %uint = OpTypeInt 32 0
-     %uint_1 = OpConstant %uint 1
-%_ptr_Function_uint = OpTypePointer Function %uint
-         %20 = OpConstantNull %uint
-        %int = OpTypeInt 32 1
-      %v2int = OpTypeVector %int 2
-      %v3int = OpTypeVector %int 3
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %30 = OpConstantNull %v2int
-         %31 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_0e28d3 = OpFunction %void None %12
-         %15 = OpLabel
-      %arg_1 = OpVariable %_ptr_Function_uint Function %20
-        %res = OpVariable %_ptr_Function_v2int Function %30
-               OpStore %arg_1 %uint_1
-         %26 = OpLoad %11 %arg_0
-         %27 = OpLoad %uint %arg_1
-         %24 = OpImageQuerySizeLod %v3int %26 %27
-         %21 = OpVectorShuffle %v2int %24 %24 0 1
-               OpStore %res %21
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %31
-         %33 = OpLabel
-         %34 = OpFunctionCall %void %textureDimensions_0e28d3
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %12
-         %36 = OpLabel
-         %37 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %37
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %12
-         %40 = OpLabel
-         %41 = OpFunctionCall %void %textureDimensions_0e28d3
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %12
-         %43 = OpLabel
-         %44 = OpFunctionCall %void %textureDimensions_0e28d3
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl.expected.wgsl
deleted file mode 100644
index 32b59d9..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0e28d3.wgsl.expected.wgsl
+++ /dev/null
@@ -1,22 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_cube_array<f32>;
-
-fn textureDimensions_0e28d3() {
-  var arg_1 = 1u;
-  var res : vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_0e28d3();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_0e28d3();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_0e28d3();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0e32ee.wgsl b/test/tint/builtins/gen/var/textureDimensions/0e32ee.wgsl
deleted file mode 100644
index cad4dae..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0e32ee.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_3d<rgba16uint, write>;
-
-// fn textureDimensions(texture: texture_storage_3d<rgba16uint, write>) -> vec3<i32>
-fn textureDimensions_0e32ee() {
-  var res: vec3<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_0e32ee();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_0e32ee();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_0e32ee();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0e32ee.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/0e32ee.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 0f338cc..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0e32ee.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture3D<uint4> arg_0 : register(u0, space1);
-
-void textureDimensions_0e32ee() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int3 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_0e32ee();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_0e32ee();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_0e32ee();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0e32ee.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/0e32ee.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 0f338cc..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0e32ee.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture3D<uint4> arg_0 : register(u0, space1);
-
-void textureDimensions_0e32ee() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int3 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_0e32ee();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_0e32ee();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_0e32ee();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0e32ee.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/0e32ee.wgsl.expected.glsl
deleted file mode 100644
index 3b00486..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0e32ee.wgsl.expected.glsl
+++ /dev/null
@@ -1,52 +0,0 @@
-#version 310 es
-
-layout(rgba16ui) uniform highp writeonly uimage3D arg_0;
-void textureDimensions_0e32ee() {
-  ivec3 res = imageSize(arg_0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_0e32ee();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-layout(rgba16ui) uniform highp writeonly uimage3D arg_0;
-void textureDimensions_0e32ee() {
-  ivec3 res = imageSize(arg_0);
-}
-
-void fragment_main() {
-  textureDimensions_0e32ee();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-layout(rgba16ui) uniform highp writeonly uimage3D arg_0;
-void textureDimensions_0e32ee() {
-  ivec3 res = imageSize(arg_0);
-}
-
-void compute_main() {
-  textureDimensions_0e32ee();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0e32ee.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/0e32ee.wgsl.expected.msl
deleted file mode 100644
index 376e7b1..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0e32ee.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_0e32ee(texture3d<uint, access::write> tint_symbol_1) {
-  int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture3d<uint, access::write> tint_symbol_2) {
-  textureDimensions_0e32ee(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture3d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture3d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_0e32ee(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture3d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_0e32ee(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/0e32ee.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/0e32ee.wgsl.expected.spvasm
deleted file mode 100644
index c045a1a..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0e32ee.wgsl.expected.spvasm
+++ /dev/null
@@ -1,77 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 38
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_0e32ee "textureDimensions_0e32ee"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-       %uint = OpTypeInt 32 0
-         %11 = OpTypeImage %uint 3D 0 0 0 2 Rgba16ui
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %v3int = OpTypeVector %int 3
-%_ptr_Function_v3int = OpTypePointer Function %v3int
-         %23 = OpConstantNull %v3int
-         %24 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_0e32ee = OpFunction %void None %13
-         %16 = OpLabel
-        %res = OpVariable %_ptr_Function_v3int Function %23
-         %20 = OpLoad %11 %arg_0
-         %17 = OpImageQuerySize %v3int %20
-               OpStore %res %17
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %24
-         %26 = OpLabel
-         %27 = OpFunctionCall %void %textureDimensions_0e32ee
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %29 = OpLabel
-         %30 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %30
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %33 = OpLabel
-         %34 = OpFunctionCall %void %textureDimensions_0e32ee
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %36 = OpLabel
-         %37 = OpFunctionCall %void %textureDimensions_0e32ee
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/0e32ee.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/0e32ee.wgsl.expected.wgsl
deleted file mode 100644
index c037616..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0e32ee.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba16uint, write>;
-
-fn textureDimensions_0e32ee() {
-  var res : vec3<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_0e32ee();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_0e32ee();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_0e32ee();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0f3c50.wgsl b/test/tint/builtins/gen/var/textureDimensions/0f3c50.wgsl
deleted file mode 100644
index ed32924..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0f3c50.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_2d_array<i32>;
-
-// fn textureDimensions(texture: texture_2d_array<i32>) -> vec2<i32>
-fn textureDimensions_0f3c50() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_0f3c50();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_0f3c50();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_0f3c50();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0f3c50.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/0f3c50.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 5bef298..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0f3c50.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-Texture2DArray<int4> arg_0 : register(t0, space1);
-
-void textureDimensions_0f3c50() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_0f3c50();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_0f3c50();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_0f3c50();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0f3c50.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/0f3c50.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 5bef298..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0f3c50.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-Texture2DArray<int4> arg_0 : register(t0, space1);
-
-void textureDimensions_0f3c50() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_0f3c50();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_0f3c50();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_0f3c50();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0f3c50.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/0f3c50.wgsl.expected.glsl
deleted file mode 100644
index da53ee8..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0f3c50.wgsl.expected.glsl
+++ /dev/null
@@ -1,52 +0,0 @@
-#version 310 es
-
-uniform highp isampler2DArray arg_0_1;
-void textureDimensions_0f3c50() {
-  ivec2 res = textureSize(arg_0_1, 0).xy;
-}
-
-vec4 vertex_main() {
-  textureDimensions_0f3c50();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-uniform highp isampler2DArray arg_0_1;
-void textureDimensions_0f3c50() {
-  ivec2 res = textureSize(arg_0_1, 0).xy;
-}
-
-void fragment_main() {
-  textureDimensions_0f3c50();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-uniform highp isampler2DArray arg_0_1;
-void textureDimensions_0f3c50() {
-  ivec2 res = textureSize(arg_0_1, 0).xy;
-}
-
-void compute_main() {
-  textureDimensions_0f3c50();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0f3c50.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/0f3c50.wgsl.expected.msl
deleted file mode 100644
index 9e6f6ab..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0f3c50.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_0f3c50(texture2d_array<int, access::sample> tint_symbol_1) {
-  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture2d_array<int, access::sample> tint_symbol_2) {
-  textureDimensions_0f3c50(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture2d_array<int, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture2d_array<int, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_0f3c50(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture2d_array<int, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_0f3c50(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/0f3c50.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/0f3c50.wgsl.expected.spvasm
deleted file mode 100644
index 53a9a61..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0f3c50.wgsl.expected.spvasm
+++ /dev/null
@@ -1,78 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 40
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_0f3c50 "textureDimensions_0f3c50"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-        %int = OpTypeInt 32 1
-         %11 = OpTypeImage %int 2D 0 1 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-      %v2int = OpTypeVector %int 2
-      %v3int = OpTypeVector %int 3
-      %int_0 = OpConstant %int 0
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %25 = OpConstantNull %v2int
-         %26 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_0f3c50 = OpFunction %void None %13
-         %16 = OpLabel
-        %res = OpVariable %_ptr_Function_v2int Function %25
-         %21 = OpLoad %11 %arg_0
-         %19 = OpImageQuerySizeLod %v3int %21 %int_0
-         %17 = OpVectorShuffle %v2int %19 %19 0 1
-               OpStore %res %17
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %26
-         %28 = OpLabel
-         %29 = OpFunctionCall %void %textureDimensions_0f3c50
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %31 = OpLabel
-         %32 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %32
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %35 = OpLabel
-         %36 = OpFunctionCall %void %textureDimensions_0f3c50
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %38 = OpLabel
-         %39 = OpFunctionCall %void %textureDimensions_0f3c50
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/0f3c50.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/0f3c50.wgsl.expected.wgsl
deleted file mode 100644
index 45eee36..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/0f3c50.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_2d_array<i32>;
-
-fn textureDimensions_0f3c50() {
-  var res : vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_0f3c50();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_0f3c50();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_0f3c50();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0ff9a4.wgsl b/test/tint/builtins/gen/var/textureDimensions/0ff9a4.wgsl
new file mode 100644
index 0000000..f71346b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0ff9a4.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_cube_array;
+
+// fn textureDimensions(texture: texture_depth_cube_array, level: i32) -> vec2<u32>
+fn textureDimensions_0ff9a4() {
+  var arg_1 = 1i;
+  var res: vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_0ff9a4();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_0ff9a4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_0ff9a4();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0ff9a4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/0ff9a4.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..881ba99
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0ff9a4.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+TextureCubeArray arg_0 : register(t0, space1);
+
+void textureDimensions_0ff9a4() {
+  int arg_1 = 1;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_0ff9a4();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_0ff9a4();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_0ff9a4();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0ff9a4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/0ff9a4.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..881ba99
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0ff9a4.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+TextureCubeArray arg_0 : register(t0, space1);
+
+void textureDimensions_0ff9a4() {
+  int arg_1 = 1;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_0ff9a4();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_0ff9a4();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_0ff9a4();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/0ff9a4.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/0ff9a4.wgsl.expected.glsl
new file mode 100644
index 0000000..3f62797
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0ff9a4.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp samplerCubeArray arg_0_1;
+void textureDimensions_0ff9a4() {
+  int arg_1 = 1;
+  uvec2 res = uvec2(textureSize(arg_0_1, arg_1).xy);
+}
+
+vec4 vertex_main() {
+  textureDimensions_0ff9a4();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeArray arg_0_1;
+void textureDimensions_0ff9a4() {
+  int arg_1 = 1;
+  uvec2 res = uvec2(textureSize(arg_0_1, arg_1).xy);
+}
+
+void fragment_main() {
+  textureDimensions_0ff9a4();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'samplerCubeArray' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp samplerCubeArray arg_0_1;
+void textureDimensions_0ff9a4() {
+  int arg_1 = 1;
+  uvec2 res = uvec2(textureSize(arg_0_1, arg_1).xy);
+}
+
+void compute_main() {
+  textureDimensions_0ff9a4();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/0ff9a4.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/0ff9a4.wgsl.expected.msl
new file mode 100644
index 0000000..6243b2c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0ff9a4.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_0ff9a4(depthcube_array<float, access::sample> tint_symbol_1) {
+  int arg_1 = 1;
+  uint2 res = uint2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(depthcube_array<float, access::sample> tint_symbol_2) {
+  textureDimensions_0ff9a4(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depthcube_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depthcube_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_0ff9a4(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(depthcube_array<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_0ff9a4(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/0ff9a4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/0ff9a4.wgsl.expected.spvasm
new file mode 100644
index 0000000..4a1c262
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0ff9a4.wgsl.expected.spvasm
@@ -0,0 +1,86 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpCapability SampledCubeArray
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_0ff9a4 "textureDimensions_0ff9a4"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_int = OpTypePointer Function %int
+         %20 = OpConstantNull %int
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %30 = OpConstantNull %v2uint
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_0ff9a4 = OpFunction %void None %12
+         %15 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_int Function %20
+        %res = OpVariable %_ptr_Function_v2uint Function %30
+               OpStore %arg_1 %int_1
+         %26 = OpLoad %11 %arg_0
+         %27 = OpLoad %int %arg_1
+         %24 = OpImageQuerySizeLod %v3uint %26 %27
+         %21 = OpVectorShuffle %v2uint %24 %24 0 1
+               OpStore %res %21
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureDimensions_0ff9a4
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureDimensions_0ff9a4
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureDimensions_0ff9a4
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/0ff9a4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/0ff9a4.wgsl.expected.wgsl
new file mode 100644
index 0000000..c498d6f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/0ff9a4.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_depth_cube_array;
+
+fn textureDimensions_0ff9a4() {
+  var arg_1 = 1i;
+  var res : vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_0ff9a4();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_0ff9a4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_0ff9a4();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1191a5.wgsl b/test/tint/builtins/gen/var/textureDimensions/1191a5.wgsl
deleted file mode 100644
index d035ecd..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/1191a5.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_2d<u32>;
-
-// fn textureDimensions(texture: texture_2d<u32>) -> vec2<i32>
-fn textureDimensions_1191a5() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_1191a5();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_1191a5();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_1191a5();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1191a5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/1191a5.wgsl.expected.dxc.hlsl
deleted file mode 100644
index cedbfad..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/1191a5.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-Texture2D<uint4> arg_0 : register(t0, space1);
-
-void textureDimensions_1191a5() {
-  int2 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
-  int2 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_1191a5();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_1191a5();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_1191a5();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1191a5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/1191a5.wgsl.expected.fxc.hlsl
deleted file mode 100644
index cedbfad..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/1191a5.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-Texture2D<uint4> arg_0 : register(t0, space1);
-
-void textureDimensions_1191a5() {
-  int2 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
-  int2 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_1191a5();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_1191a5();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_1191a5();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1191a5.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/1191a5.wgsl.expected.glsl
deleted file mode 100644
index 0514b2e..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/1191a5.wgsl.expected.glsl
+++ /dev/null
@@ -1,52 +0,0 @@
-#version 310 es
-
-uniform highp usampler2D arg_0_1;
-void textureDimensions_1191a5() {
-  ivec2 res = textureSize(arg_0_1, 0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_1191a5();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-uniform highp usampler2D arg_0_1;
-void textureDimensions_1191a5() {
-  ivec2 res = textureSize(arg_0_1, 0);
-}
-
-void fragment_main() {
-  textureDimensions_1191a5();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-uniform highp usampler2D arg_0_1;
-void textureDimensions_1191a5() {
-  ivec2 res = textureSize(arg_0_1, 0);
-}
-
-void compute_main() {
-  textureDimensions_1191a5();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1191a5.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/1191a5.wgsl.expected.msl
deleted file mode 100644
index c08c723d..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/1191a5.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_1191a5(texture2d<uint, access::sample> tint_symbol_1) {
-  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture2d<uint, access::sample> tint_symbol_2) {
-  textureDimensions_1191a5(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture2d<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture2d<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_1191a5(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture2d<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_1191a5(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/1191a5.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/1191a5.wgsl.expected.spvasm
deleted file mode 100644
index 1cc88e1..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/1191a5.wgsl.expected.spvasm
+++ /dev/null
@@ -1,77 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 39
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_1191a5 "textureDimensions_1191a5"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-       %uint = OpTypeInt 32 0
-         %11 = OpTypeImage %uint 2D 0 0 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %v2int = OpTypeVector %int 2
-      %int_0 = OpConstant %int 0
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %24 = OpConstantNull %v2int
-         %25 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_1191a5 = OpFunction %void None %13
-         %16 = OpLabel
-        %res = OpVariable %_ptr_Function_v2int Function %24
-         %20 = OpLoad %11 %arg_0
-         %17 = OpImageQuerySizeLod %v2int %20 %int_0
-               OpStore %res %17
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %25
-         %27 = OpLabel
-         %28 = OpFunctionCall %void %textureDimensions_1191a5
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %30 = OpLabel
-         %31 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %31
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %34 = OpLabel
-         %35 = OpFunctionCall %void %textureDimensions_1191a5
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %37 = OpLabel
-         %38 = OpFunctionCall %void %textureDimensions_1191a5
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/1191a5.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/1191a5.wgsl.expected.wgsl
deleted file mode 100644
index c0e1745..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/1191a5.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_2d<u32>;
-
-fn textureDimensions_1191a5() {
-  var res : vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_1191a5();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_1191a5();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_1191a5();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/12c9bb.wgsl b/test/tint/builtins/gen/var/textureDimensions/12c9bb.wgsl
deleted file mode 100644
index 9eaa172..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/12c9bb.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_depth_2d;
-
-// fn textureDimensions(texture: texture_depth_2d, level: i32) -> vec2<i32>
-fn textureDimensions_12c9bb() {
-  var arg_1 = 1i;
-  var res: vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_12c9bb();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_12c9bb();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_12c9bb();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/12c9bb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/12c9bb.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 7a253eb..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/12c9bb.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-Texture2D arg_0 : register(t0, space1);
-
-void textureDimensions_12c9bb() {
-  int arg_1 = 1;
-  int3 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_12c9bb();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_12c9bb();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_12c9bb();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/12c9bb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/12c9bb.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 7a253eb..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/12c9bb.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-Texture2D arg_0 : register(t0, space1);
-
-void textureDimensions_12c9bb() {
-  int arg_1 = 1;
-  int3 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_12c9bb();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_12c9bb();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_12c9bb();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/12c9bb.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/12c9bb.wgsl.expected.glsl
deleted file mode 100644
index cd7f9be..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/12c9bb.wgsl.expected.glsl
+++ /dev/null
@@ -1,55 +0,0 @@
-#version 310 es
-
-uniform highp sampler2D arg_0_1;
-void textureDimensions_12c9bb() {
-  int arg_1 = 1;
-  ivec2 res = textureSize(arg_0_1, arg_1);
-}
-
-vec4 vertex_main() {
-  textureDimensions_12c9bb();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-uniform highp sampler2D arg_0_1;
-void textureDimensions_12c9bb() {
-  int arg_1 = 1;
-  ivec2 res = textureSize(arg_0_1, arg_1);
-}
-
-void fragment_main() {
-  textureDimensions_12c9bb();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-uniform highp sampler2D arg_0_1;
-void textureDimensions_12c9bb() {
-  int arg_1 = 1;
-  ivec2 res = textureSize(arg_0_1, arg_1);
-}
-
-void compute_main() {
-  textureDimensions_12c9bb();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/12c9bb.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/12c9bb.wgsl.expected.msl
deleted file mode 100644
index 490a9eb..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/12c9bb.wgsl.expected.msl
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_12c9bb(depth2d<float, access::sample> tint_symbol_1) {
-  int arg_1 = 1;
-  int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(depth2d<float, access::sample> tint_symbol_2) {
-  textureDimensions_12c9bb(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(depth2d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(depth2d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_12c9bb(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(depth2d<float, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_12c9bb(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/12c9bb.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/12c9bb.wgsl.expected.spvasm
deleted file mode 100644
index 3a10b31..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/12c9bb.wgsl.expected.spvasm
+++ /dev/null
@@ -1,82 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 42
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_12c9bb "textureDimensions_12c9bb"
-               OpName %arg_1 "arg_1"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-         %11 = OpTypeImage %float 2D 0 0 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %12 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %int_1 = OpConstant %int 1
-%_ptr_Function_int = OpTypePointer Function %int
-         %20 = OpConstantNull %int
-      %v2int = OpTypeVector %int 2
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %27 = OpConstantNull %v2int
-         %28 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_12c9bb = OpFunction %void None %12
-         %15 = OpLabel
-      %arg_1 = OpVariable %_ptr_Function_int Function %20
-        %res = OpVariable %_ptr_Function_v2int Function %27
-               OpStore %arg_1 %int_1
-         %23 = OpLoad %11 %arg_0
-         %24 = OpLoad %int %arg_1
-         %21 = OpImageQuerySizeLod %v2int %23 %24
-               OpStore %res %21
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %28
-         %30 = OpLabel
-         %31 = OpFunctionCall %void %textureDimensions_12c9bb
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %12
-         %33 = OpLabel
-         %34 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %34
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %12
-         %37 = OpLabel
-         %38 = OpFunctionCall %void %textureDimensions_12c9bb
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %12
-         %40 = OpLabel
-         %41 = OpFunctionCall %void %textureDimensions_12c9bb
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/12c9bb.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/12c9bb.wgsl.expected.wgsl
deleted file mode 100644
index 5b68964..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/12c9bb.wgsl.expected.wgsl
+++ /dev/null
@@ -1,22 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_depth_2d;
-
-fn textureDimensions_12c9bb() {
-  var arg_1 = 1i;
-  var res : vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_12c9bb();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_12c9bb();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_12c9bb();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/13f8db.wgsl b/test/tint/builtins/gen/var/textureDimensions/13f8db.wgsl
new file mode 100644
index 0000000..50628d4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/13f8db.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d<f32>;
+
+// fn textureDimensions(texture: texture_2d<f32>, level: u32) -> vec2<u32>
+fn textureDimensions_13f8db() {
+  var arg_1 = 1u;
+  var res: vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_13f8db();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_13f8db();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_13f8db();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/13f8db.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/13f8db.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..78cf28b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/13f8db.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_13f8db() {
+  uint arg_1 = 1u;
+  int3 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_13f8db();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_13f8db();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_13f8db();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/13f8db.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/13f8db.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..78cf28b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/13f8db.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_13f8db() {
+  uint arg_1 = 1u;
+  int3 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_13f8db();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_13f8db();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_13f8db();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/13f8db.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/13f8db.wgsl.expected.glsl
new file mode 100644
index 0000000..3bb1ca9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/13f8db.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp sampler2D arg_0_1;
+void textureDimensions_13f8db() {
+  uint arg_1 = 1u;
+  uvec2 res = uvec2(textureSize(arg_0_1, int(arg_1)));
+}
+
+vec4 vertex_main() {
+  textureDimensions_13f8db();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2D arg_0_1;
+void textureDimensions_13f8db() {
+  uint arg_1 = 1u;
+  uvec2 res = uvec2(textureSize(arg_0_1, int(arg_1)));
+}
+
+void fragment_main() {
+  textureDimensions_13f8db();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2D arg_0_1;
+void textureDimensions_13f8db() {
+  uint arg_1 = 1u;
+  uvec2 res = uvec2(textureSize(arg_0_1, int(arg_1)));
+}
+
+void compute_main() {
+  textureDimensions_13f8db();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/13f8db.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/13f8db.wgsl.expected.msl
new file mode 100644
index 0000000..7461b5d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/13f8db.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_13f8db(texture2d<float, access::sample> tint_symbol_1) {
+  uint arg_1 = 1u;
+  uint2 res = uint2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::sample> tint_symbol_2) {
+  textureDimensions_13f8db(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_13f8db(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_13f8db(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/13f8db.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/13f8db.wgsl.expected.spvasm
new file mode 100644
index 0000000..6fae136
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/13f8db.wgsl.expected.spvasm
@@ -0,0 +1,82 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 42
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_13f8db "textureDimensions_13f8db"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %20 = OpConstantNull %uint
+     %v2uint = OpTypeVector %uint 2
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %27 = OpConstantNull %v2uint
+         %28 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_13f8db = OpFunction %void None %12
+         %15 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %20
+        %res = OpVariable %_ptr_Function_v2uint Function %27
+               OpStore %arg_1 %uint_1
+         %23 = OpLoad %11 %arg_0
+         %24 = OpLoad %uint %arg_1
+         %21 = OpImageQuerySizeLod %v2uint %23 %24
+               OpStore %res %21
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %28
+         %30 = OpLabel
+         %31 = OpFunctionCall %void %textureDimensions_13f8db
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %33 = OpLabel
+         %34 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %34
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureDimensions_13f8db
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureDimensions_13f8db
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/13f8db.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/13f8db.wgsl.expected.wgsl
new file mode 100644
index 0000000..ef17fed
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/13f8db.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_2d<f32>;
+
+fn textureDimensions_13f8db() {
+  var arg_1 = 1u;
+  var res : vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_13f8db();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_13f8db();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_13f8db();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1417dd.wgsl b/test/tint/builtins/gen/var/textureDimensions/1417dd.wgsl
new file mode 100644
index 0000000..baeaac6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/1417dd.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba16sint, write>;
+
+// fn textureDimensions(texture: texture_storage_2d<rgba16sint, write>) -> vec2<u32>
+fn textureDimensions_1417dd() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_1417dd();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_1417dd();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_1417dd();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1417dd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/1417dd.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9b7349f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/1417dd.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<int4> arg_0 : register(u0, space1);
+
+void textureDimensions_1417dd() {
+  int2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_1417dd();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_1417dd();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_1417dd();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1417dd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/1417dd.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9b7349f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/1417dd.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<int4> arg_0 : register(u0, space1);
+
+void textureDimensions_1417dd() {
+  int2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_1417dd();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_1417dd();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_1417dd();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1417dd.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/1417dd.wgsl.expected.glsl
new file mode 100644
index 0000000..6b2d3bb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/1417dd.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba16i) uniform highp writeonly iimage2D arg_0;
+void textureDimensions_1417dd() {
+  uvec2 res = uvec2(imageSize(arg_0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_1417dd();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba16i) uniform highp writeonly iimage2D arg_0;
+void textureDimensions_1417dd() {
+  uvec2 res = uvec2(imageSize(arg_0));
+}
+
+void fragment_main() {
+  textureDimensions_1417dd();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba16i) uniform highp writeonly iimage2D arg_0;
+void textureDimensions_1417dd() {
+  uvec2 res = uvec2(imageSize(arg_0));
+}
+
+void compute_main() {
+  textureDimensions_1417dd();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1417dd.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/1417dd.wgsl.expected.msl
new file mode 100644
index 0000000..297b49a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/1417dd.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_1417dd(texture2d<int, access::write> tint_symbol_1) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::write> tint_symbol_2) {
+  textureDimensions_1417dd(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_1417dd(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_1417dd(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/1417dd.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/1417dd.wgsl.expected.spvasm
new file mode 100644
index 0000000..c7a3eae
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/1417dd.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_1417dd "textureDimensions_1417dd"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 0 0 2 Rgba16i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %23 = OpConstantNull %v2uint
+         %24 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_1417dd = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %23
+         %20 = OpLoad %11 %arg_0
+         %17 = OpImageQuerySize %v2uint %20
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %textureDimensions_1417dd
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %29 = OpLabel
+         %30 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %30
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureDimensions_1417dd
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureDimensions_1417dd
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/1417dd.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/1417dd.wgsl.expected.wgsl
new file mode 100644
index 0000000..430451d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/1417dd.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba16sint, write>;
+
+fn textureDimensions_1417dd() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_1417dd();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_1417dd();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_1417dd();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/147998.wgsl b/test/tint/builtins/gen/var/textureDimensions/147998.wgsl
deleted file mode 100644
index 8a88425..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/147998.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d<rg32float, write>;
-
-// fn textureDimensions(texture: texture_storage_2d<rg32float, write>) -> vec2<i32>
-fn textureDimensions_147998() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_147998();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_147998();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_147998();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/147998.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/147998.wgsl.expected.dxc.hlsl
deleted file mode 100644
index af1e9bd..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/147998.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2D<float4> arg_0 : register(u0, space1);
-
-void textureDimensions_147998() {
-  int2 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
-  int2 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_147998();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_147998();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_147998();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/147998.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/147998.wgsl.expected.fxc.hlsl
deleted file mode 100644
index af1e9bd..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/147998.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2D<float4> arg_0 : register(u0, space1);
-
-void textureDimensions_147998() {
-  int2 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
-  int2 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_147998();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_147998();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_147998();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/147998.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/147998.wgsl.expected.glsl
deleted file mode 100644
index 90d19e8..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/147998.wgsl.expected.glsl
+++ /dev/null
@@ -1,75 +0,0 @@
-SKIP: FAILED
-
-#version 310 es
-
-layout(rg32f) uniform highp writeonly image2D arg_0;
-void textureDimensions_147998() {
-  ivec2 res = imageSize(arg_0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_147998();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'image load-store format' : not supported with this profile: es
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision mediump float;
-
-layout(rg32f) uniform highp writeonly image2D arg_0;
-void textureDimensions_147998() {
-  ivec2 res = imageSize(arg_0);
-}
-
-void fragment_main() {
-  textureDimensions_147998();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:4: 'image load-store format' : not supported with this profile: es
-ERROR: 0:4: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-
-layout(rg32f) uniform highp writeonly image2D arg_0;
-void textureDimensions_147998() {
-  ivec2 res = imageSize(arg_0);
-}
-
-void compute_main() {
-  textureDimensions_147998();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'image load-store format' : not supported with this profile: es
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/147998.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/147998.wgsl.expected.msl
deleted file mode 100644
index 2543103..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/147998.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_147998(texture2d<float, access::write> tint_symbol_1) {
-  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture2d<float, access::write> tint_symbol_2) {
-  textureDimensions_147998(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture2d<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture2d<float, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_147998(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture2d<float, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_147998(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/147998.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/147998.wgsl.expected.spvasm
deleted file mode 100644
index 9e80b7d..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/147998.wgsl.expected.spvasm
+++ /dev/null
@@ -1,77 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 37
-; Schema: 0
-               OpCapability Shader
-               OpCapability StorageImageExtendedFormats
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_147998 "textureDimensions_147998"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-         %11 = OpTypeImage %float 2D 0 0 0 2 Rg32f
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %12 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %v2int = OpTypeVector %int 2
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %22 = OpConstantNull %v2int
-         %23 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_147998 = OpFunction %void None %12
-         %15 = OpLabel
-        %res = OpVariable %_ptr_Function_v2int Function %22
-         %19 = OpLoad %11 %arg_0
-         %16 = OpImageQuerySize %v2int %19
-               OpStore %res %16
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %23
-         %25 = OpLabel
-         %26 = OpFunctionCall %void %textureDimensions_147998
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %12
-         %28 = OpLabel
-         %29 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %29
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %12
-         %32 = OpLabel
-         %33 = OpFunctionCall %void %textureDimensions_147998
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %12
-         %35 = OpLabel
-         %36 = OpFunctionCall %void %textureDimensions_147998
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/147998.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/147998.wgsl.expected.wgsl
deleted file mode 100644
index 8379507..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/147998.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_2d<rg32float, write>;
-
-fn textureDimensions_147998() {
-  var res : vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_147998();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_147998();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_147998();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/15aa17.wgsl b/test/tint/builtins/gen/var/textureDimensions/15aa17.wgsl
new file mode 100644
index 0000000..953249a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/15aa17.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba32sint, write>;
+
+// fn textureDimensions(texture: texture_storage_3d<rgba32sint, write>) -> vec3<u32>
+fn textureDimensions_15aa17() {
+  var res: vec3<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_15aa17();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_15aa17();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_15aa17();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/15aa17.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/15aa17.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..06e4e9c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/15aa17.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<int4> arg_0 : register(u0, space1);
+
+void textureDimensions_15aa17() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_15aa17();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_15aa17();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_15aa17();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/15aa17.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/15aa17.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..06e4e9c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/15aa17.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<int4> arg_0 : register(u0, space1);
+
+void textureDimensions_15aa17() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_15aa17();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_15aa17();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_15aa17();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/15aa17.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/15aa17.wgsl.expected.glsl
new file mode 100644
index 0000000..da990e4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/15aa17.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba32i) uniform highp writeonly iimage3D arg_0;
+void textureDimensions_15aa17() {
+  uvec3 res = uvec3(imageSize(arg_0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_15aa17();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba32i) uniform highp writeonly iimage3D arg_0;
+void textureDimensions_15aa17() {
+  uvec3 res = uvec3(imageSize(arg_0));
+}
+
+void fragment_main() {
+  textureDimensions_15aa17();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba32i) uniform highp writeonly iimage3D arg_0;
+void textureDimensions_15aa17() {
+  uvec3 res = uvec3(imageSize(arg_0));
+}
+
+void compute_main() {
+  textureDimensions_15aa17();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/15aa17.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/15aa17.wgsl.expected.msl
new file mode 100644
index 0000000..147cf4e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/15aa17.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_15aa17(texture3d<int, access::write> tint_symbol_1) {
+  uint3 res = uint3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<int, access::write> tint_symbol_2) {
+  textureDimensions_15aa17(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_15aa17(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture3d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_15aa17(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/15aa17.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/15aa17.wgsl.expected.spvasm
new file mode 100644
index 0000000..4201163
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/15aa17.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_15aa17 "textureDimensions_15aa17"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 3D 0 0 0 2 Rgba32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+         %23 = OpConstantNull %v3uint
+         %24 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_15aa17 = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_v3uint Function %23
+         %20 = OpLoad %11 %arg_0
+         %17 = OpImageQuerySize %v3uint %20
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %textureDimensions_15aa17
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %29 = OpLabel
+         %30 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %30
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureDimensions_15aa17
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureDimensions_15aa17
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/15aa17.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/15aa17.wgsl.expected.wgsl
new file mode 100644
index 0000000..2f28d1f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/15aa17.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba32sint, write>;
+
+fn textureDimensions_15aa17() {
+  var res : vec3<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_15aa17();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_15aa17();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_15aa17();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/15b577.wgsl b/test/tint/builtins/gen/var/textureDimensions/15b577.wgsl
new file mode 100644
index 0000000..ff23987
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/15b577.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d<u32>;
+
+// fn textureDimensions(texture: texture_2d<u32>, level: i32) -> vec2<u32>
+fn textureDimensions_15b577() {
+  var arg_1 = 1i;
+  var res: vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_15b577();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_15b577();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_15b577();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/15b577.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/15b577.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5e54511
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/15b577.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_15b577() {
+  int arg_1 = 1;
+  int3 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_15b577();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_15b577();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_15b577();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/15b577.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/15b577.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5e54511
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/15b577.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_15b577() {
+  int arg_1 = 1;
+  int3 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_15b577();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_15b577();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_15b577();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/15b577.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/15b577.wgsl.expected.glsl
new file mode 100644
index 0000000..722528e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/15b577.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp usampler2D arg_0_1;
+void textureDimensions_15b577() {
+  int arg_1 = 1;
+  uvec2 res = uvec2(textureSize(arg_0_1, arg_1));
+}
+
+vec4 vertex_main() {
+  textureDimensions_15b577();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usampler2D arg_0_1;
+void textureDimensions_15b577() {
+  int arg_1 = 1;
+  uvec2 res = uvec2(textureSize(arg_0_1, arg_1));
+}
+
+void fragment_main() {
+  textureDimensions_15b577();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp usampler2D arg_0_1;
+void textureDimensions_15b577() {
+  int arg_1 = 1;
+  uvec2 res = uvec2(textureSize(arg_0_1, arg_1));
+}
+
+void compute_main() {
+  textureDimensions_15b577();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/15b577.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/15b577.wgsl.expected.msl
new file mode 100644
index 0000000..5c6a682
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/15b577.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_15b577(texture2d<uint, access::sample> tint_symbol_1) {
+  int arg_1 = 1;
+  uint2 res = uint2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::sample> tint_symbol_2) {
+  textureDimensions_15b577(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_15b577(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_15b577(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/15b577.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/15b577.wgsl.expected.spvasm
new file mode 100644
index 0000000..cd48eb4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/15b577.wgsl.expected.spvasm
@@ -0,0 +1,83 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_15b577 "textureDimensions_15b577"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_int = OpTypePointer Function %int
+         %21 = OpConstantNull %int
+     %v2uint = OpTypeVector %uint 2
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %28 = OpConstantNull %v2uint
+         %29 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_15b577 = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_int Function %21
+        %res = OpVariable %_ptr_Function_v2uint Function %28
+               OpStore %arg_1 %int_1
+         %24 = OpLoad %11 %arg_0
+         %25 = OpLoad %int %arg_1
+         %22 = OpImageQuerySizeLod %v2uint %24 %25
+               OpStore %res %22
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureDimensions_15b577
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %34 = OpLabel
+         %35 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %35
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureDimensions_15b577
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureDimensions_15b577
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/15b577.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/15b577.wgsl.expected.wgsl
new file mode 100644
index 0000000..3e9cf65
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/15b577.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_2d<u32>;
+
+fn textureDimensions_15b577() {
+  var arg_1 = 1i;
+  var res : vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_15b577();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_15b577();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_15b577();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/16036c.wgsl b/test/tint/builtins/gen/var/textureDimensions/16036c.wgsl
deleted file mode 100644
index a1baa96..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/16036c.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8sint, write>;
-
-// fn textureDimensions(texture: texture_storage_2d_array<rgba8sint, write>) -> vec2<i32>
-fn textureDimensions_16036c() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_16036c();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_16036c();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_16036c();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/16036c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/16036c.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 02565baa..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/16036c.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2DArray<int4> arg_0 : register(u0, space1);
-
-void textureDimensions_16036c() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_16036c();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_16036c();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_16036c();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/16036c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/16036c.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 02565baa..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/16036c.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2DArray<int4> arg_0 : register(u0, space1);
-
-void textureDimensions_16036c() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_16036c();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_16036c();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_16036c();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/16036c.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/16036c.wgsl.expected.glsl
deleted file mode 100644
index 5e4d692..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/16036c.wgsl.expected.glsl
+++ /dev/null
@@ -1,52 +0,0 @@
-#version 310 es
-
-layout(rgba8i) uniform highp writeonly iimage2DArray arg_0;
-void textureDimensions_16036c() {
-  ivec2 res = imageSize(arg_0).xy;
-}
-
-vec4 vertex_main() {
-  textureDimensions_16036c();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-layout(rgba8i) uniform highp writeonly iimage2DArray arg_0;
-void textureDimensions_16036c() {
-  ivec2 res = imageSize(arg_0).xy;
-}
-
-void fragment_main() {
-  textureDimensions_16036c();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-layout(rgba8i) uniform highp writeonly iimage2DArray arg_0;
-void textureDimensions_16036c() {
-  ivec2 res = imageSize(arg_0).xy;
-}
-
-void compute_main() {
-  textureDimensions_16036c();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/16036c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/16036c.wgsl.expected.msl
deleted file mode 100644
index 4872c89..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/16036c.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_16036c(texture2d_array<int, access::write> tint_symbol_1) {
-  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture2d_array<int, access::write> tint_symbol_2) {
-  textureDimensions_16036c(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture2d_array<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture2d_array<int, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_16036c(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture2d_array<int, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_16036c(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/16036c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/16036c.wgsl.expected.spvasm
deleted file mode 100644
index af24793..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/16036c.wgsl.expected.spvasm
+++ /dev/null
@@ -1,78 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 39
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_16036c "textureDimensions_16036c"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-        %int = OpTypeInt 32 1
-         %11 = OpTypeImage %int 2D 0 1 0 2 Rgba8i
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-      %v2int = OpTypeVector %int 2
-      %v3int = OpTypeVector %int 3
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %24 = OpConstantNull %v2int
-         %25 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_16036c = OpFunction %void None %13
-         %16 = OpLabel
-        %res = OpVariable %_ptr_Function_v2int Function %24
-         %21 = OpLoad %11 %arg_0
-         %19 = OpImageQuerySize %v3int %21
-         %17 = OpVectorShuffle %v2int %19 %19 0 1
-               OpStore %res %17
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %25
-         %27 = OpLabel
-         %28 = OpFunctionCall %void %textureDimensions_16036c
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %30 = OpLabel
-         %31 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %31
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %34 = OpLabel
-         %35 = OpFunctionCall %void %textureDimensions_16036c
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %37 = OpLabel
-         %38 = OpFunctionCall %void %textureDimensions_16036c
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/16036c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/16036c.wgsl.expected.wgsl
deleted file mode 100644
index 5a9c5f3..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/16036c.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8sint, write>;
-
-fn textureDimensions_16036c() {
-  var res : vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_16036c();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_16036c();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_16036c();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl b/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl
deleted file mode 100644
index 39dfc95..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2022 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_1d<f32>;
-
-// fn textureDimensions(texture: texture_1d<f32>, level: u32) -> i32
-fn textureDimensions_16f7cb() {
-  var arg_1 = 1u;
-  var res: i32 = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_16f7cb();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_16f7cb();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_16f7cb();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 93f39f8..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-Texture1D<float4> arg_0 : register(t0, space1);
-
-void textureDimensions_16f7cb() {
-  uint arg_1 = 1u;
-  int2 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y);
-  int res = tint_tmp.x;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_16f7cb();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_16f7cb();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_16f7cb();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 93f39f8..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-Texture1D<float4> arg_0 : register(t0, space1);
-
-void textureDimensions_16f7cb() {
-  uint arg_1 = 1u;
-  int2 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y);
-  int res = tint_tmp.x;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_16f7cb();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_16f7cb();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_16f7cb();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl.expected.glsl
deleted file mode 100644
index 4997a45..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl.expected.glsl
+++ /dev/null
@@ -1,78 +0,0 @@
-SKIP: FAILED
-
-#version 310 es
-
-uniform highp sampler1D arg_0_1;
-void textureDimensions_16f7cb() {
-  uint arg_1 = 1u;
-  int res = textureSize(arg_0_1, int(arg_1));
-}
-
-vec4 vertex_main() {
-  textureDimensions_16f7cb();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'sampler1D' : Reserved word. 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision mediump float;
-
-uniform highp sampler1D arg_0_1;
-void textureDimensions_16f7cb() {
-  uint arg_1 = 1u;
-  int res = textureSize(arg_0_1, int(arg_1));
-}
-
-void fragment_main() {
-  textureDimensions_16f7cb();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:4: 'sampler1D' : Reserved word. 
-ERROR: 0:4: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-
-uniform highp sampler1D arg_0_1;
-void textureDimensions_16f7cb() {
-  uint arg_1 = 1u;
-  int res = textureSize(arg_0_1, int(arg_1));
-}
-
-void compute_main() {
-  textureDimensions_16f7cb();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'sampler1D' : Reserved word. 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl.expected.msl
deleted file mode 100644
index 153a6f3..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl.expected.msl
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_16f7cb(texture1d<float, access::sample> tint_symbol_1) {
-  uint arg_1 = 1u;
-  int res = int(tint_symbol_1.get_width(0));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture1d<float, access::sample> tint_symbol_2) {
-  textureDimensions_16f7cb(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture1d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture1d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_16f7cb(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture1d<float, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_16f7cb(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl.expected.spvasm
deleted file mode 100644
index 3664be0..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl.expected.spvasm
+++ /dev/null
@@ -1,83 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 42
-; Schema: 0
-               OpCapability Shader
-               OpCapability Sampled1D
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_16f7cb "textureDimensions_16f7cb"
-               OpName %arg_1 "arg_1"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-         %11 = OpTypeImage %float 1D 0 0 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %12 = OpTypeFunction %void
-       %uint = OpTypeInt 32 0
-     %uint_1 = OpConstant %uint 1
-%_ptr_Function_uint = OpTypePointer Function %uint
-         %20 = OpConstantNull %uint
-        %int = OpTypeInt 32 1
-%_ptr_Function_int = OpTypePointer Function %int
-         %27 = OpConstantNull %int
-         %28 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_16f7cb = OpFunction %void None %12
-         %15 = OpLabel
-      %arg_1 = OpVariable %_ptr_Function_uint Function %20
-        %res = OpVariable %_ptr_Function_int Function %27
-               OpStore %arg_1 %uint_1
-         %23 = OpLoad %11 %arg_0
-         %24 = OpLoad %uint %arg_1
-         %21 = OpImageQuerySizeLod %int %23 %24
-               OpStore %res %21
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %28
-         %30 = OpLabel
-         %31 = OpFunctionCall %void %textureDimensions_16f7cb
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %12
-         %33 = OpLabel
-         %34 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %34
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %12
-         %37 = OpLabel
-         %38 = OpFunctionCall %void %textureDimensions_16f7cb
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %12
-         %40 = OpLabel
-         %41 = OpFunctionCall %void %textureDimensions_16f7cb
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl.expected.wgsl
deleted file mode 100644
index b15d59f..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/16f7cb.wgsl.expected.wgsl
+++ /dev/null
@@ -1,22 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_1d<f32>;
-
-fn textureDimensions_16f7cb() {
-  var arg_1 = 1u;
-  var res : i32 = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_16f7cb();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_16f7cb();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_16f7cb();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1a2be7.wgsl b/test/tint/builtins/gen/var/textureDimensions/1a2be7.wgsl
new file mode 100644
index 0000000..88a2b21
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/1a2be7.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_3d<i32>;
+
+// fn textureDimensions(texture: texture_3d<i32>) -> vec3<u32>
+fn textureDimensions_1a2be7() {
+  var res: vec3<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_1a2be7();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_1a2be7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_1a2be7();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1a2be7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/1a2be7.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..091179b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/1a2be7.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_1a2be7() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_1a2be7();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_1a2be7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_1a2be7();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1a2be7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/1a2be7.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..091179b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/1a2be7.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_1a2be7() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_1a2be7();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_1a2be7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_1a2be7();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1a2be7.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/1a2be7.wgsl.expected.glsl
new file mode 100644
index 0000000..70c2d4c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/1a2be7.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp isampler3D arg_0_1;
+void textureDimensions_1a2be7() {
+  uvec3 res = uvec3(textureSize(arg_0_1, 0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_1a2be7();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isampler3D arg_0_1;
+void textureDimensions_1a2be7() {
+  uvec3 res = uvec3(textureSize(arg_0_1, 0));
+}
+
+void fragment_main() {
+  textureDimensions_1a2be7();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp isampler3D arg_0_1;
+void textureDimensions_1a2be7() {
+  uvec3 res = uvec3(textureSize(arg_0_1, 0));
+}
+
+void compute_main() {
+  textureDimensions_1a2be7();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1a2be7.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/1a2be7.wgsl.expected.msl
new file mode 100644
index 0000000..94c6aef
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/1a2be7.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_1a2be7(texture3d<int, access::sample> tint_symbol_1) {
+  uint3 res = uint3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<int, access::sample> tint_symbol_2) {
+  textureDimensions_1a2be7(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<int, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<int, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_1a2be7(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture3d<int, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_1a2be7(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/1a2be7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/1a2be7.wgsl.expected.spvasm
new file mode 100644
index 0000000..4c04ebf
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/1a2be7.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_1a2be7 "textureDimensions_1a2be7"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 3D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+      %int_0 = OpConstant %int 0
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+         %24 = OpConstantNull %v3uint
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_1a2be7 = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_v3uint Function %24
+         %20 = OpLoad %11 %arg_0
+         %17 = OpImageQuerySizeLod %v3uint %20 %int_0
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %textureDimensions_1a2be7
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureDimensions_1a2be7
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureDimensions_1a2be7
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/1a2be7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/1a2be7.wgsl.expected.wgsl
new file mode 100644
index 0000000..6a5396a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/1a2be7.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_3d<i32>;
+
+fn textureDimensions_1a2be7() {
+  var res : vec3<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_1a2be7();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_1a2be7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_1a2be7();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1b71f0.wgsl b/test/tint/builtins/gen/var/textureDimensions/1b71f0.wgsl
deleted file mode 100644
index d77491e..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/1b71f0.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_3d<rgba16sint, write>;
-
-// fn textureDimensions(texture: texture_storage_3d<rgba16sint, write>) -> vec3<i32>
-fn textureDimensions_1b71f0() {
-  var res: vec3<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_1b71f0();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_1b71f0();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_1b71f0();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1b71f0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/1b71f0.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 1ffa3d3..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/1b71f0.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture3D<int4> arg_0 : register(u0, space1);
-
-void textureDimensions_1b71f0() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int3 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_1b71f0();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_1b71f0();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_1b71f0();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1b71f0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/1b71f0.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 1ffa3d3..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/1b71f0.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture3D<int4> arg_0 : register(u0, space1);
-
-void textureDimensions_1b71f0() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int3 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_1b71f0();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_1b71f0();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_1b71f0();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1b71f0.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/1b71f0.wgsl.expected.glsl
deleted file mode 100644
index 16bd5b6..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/1b71f0.wgsl.expected.glsl
+++ /dev/null
@@ -1,52 +0,0 @@
-#version 310 es
-
-layout(rgba16i) uniform highp writeonly iimage3D arg_0;
-void textureDimensions_1b71f0() {
-  ivec3 res = imageSize(arg_0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_1b71f0();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-layout(rgba16i) uniform highp writeonly iimage3D arg_0;
-void textureDimensions_1b71f0() {
-  ivec3 res = imageSize(arg_0);
-}
-
-void fragment_main() {
-  textureDimensions_1b71f0();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-layout(rgba16i) uniform highp writeonly iimage3D arg_0;
-void textureDimensions_1b71f0() {
-  ivec3 res = imageSize(arg_0);
-}
-
-void compute_main() {
-  textureDimensions_1b71f0();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1b71f0.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/1b71f0.wgsl.expected.msl
deleted file mode 100644
index 9ef7f55..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/1b71f0.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_1b71f0(texture3d<int, access::write> tint_symbol_1) {
-  int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture3d<int, access::write> tint_symbol_2) {
-  textureDimensions_1b71f0(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture3d<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture3d<int, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_1b71f0(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture3d<int, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_1b71f0(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/1b71f0.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/1b71f0.wgsl.expected.spvasm
deleted file mode 100644
index ba6dd6a..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/1b71f0.wgsl.expected.spvasm
+++ /dev/null
@@ -1,76 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 37
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_1b71f0 "textureDimensions_1b71f0"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-        %int = OpTypeInt 32 1
-         %11 = OpTypeImage %int 3D 0 0 0 2 Rgba16i
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-      %v3int = OpTypeVector %int 3
-%_ptr_Function_v3int = OpTypePointer Function %v3int
-         %22 = OpConstantNull %v3int
-         %23 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_1b71f0 = OpFunction %void None %13
-         %16 = OpLabel
-        %res = OpVariable %_ptr_Function_v3int Function %22
-         %19 = OpLoad %11 %arg_0
-         %17 = OpImageQuerySize %v3int %19
-               OpStore %res %17
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %23
-         %25 = OpLabel
-         %26 = OpFunctionCall %void %textureDimensions_1b71f0
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %28 = OpLabel
-         %29 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %29
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %32 = OpLabel
-         %33 = OpFunctionCall %void %textureDimensions_1b71f0
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %35 = OpLabel
-         %36 = OpFunctionCall %void %textureDimensions_1b71f0
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/1b71f0.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/1b71f0.wgsl.expected.wgsl
deleted file mode 100644
index ee928e2..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/1b71f0.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba16sint, write>;
-
-fn textureDimensions_1b71f0() {
-  var res : vec3<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_1b71f0();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_1b71f0();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_1b71f0();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1bc428.wgsl b/test/tint/builtins/gen/var/textureDimensions/1bc428.wgsl
new file mode 100644
index 0000000..1423248
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/1bc428.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_3d<f32>;
+
+// fn textureDimensions(texture: texture_3d<f32>, level: i32) -> vec3<u32>
+fn textureDimensions_1bc428() {
+  var arg_1 = 1i;
+  var res: vec3<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_1bc428();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_1bc428();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_1bc428();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1bc428.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/1bc428.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..8301d00
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/1bc428.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_1bc428() {
+  int arg_1 = 1;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  uint3 res = tint_tmp.xyz;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_1bc428();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_1bc428();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_1bc428();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1bc428.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/1bc428.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..8301d00
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/1bc428.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_1bc428() {
+  int arg_1 = 1;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  uint3 res = tint_tmp.xyz;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_1bc428();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_1bc428();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_1bc428();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1bc428.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/1bc428.wgsl.expected.glsl
new file mode 100644
index 0000000..3dc4989
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/1bc428.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp sampler3D arg_0_1;
+void textureDimensions_1bc428() {
+  int arg_1 = 1;
+  uvec3 res = uvec3(textureSize(arg_0_1, arg_1));
+}
+
+vec4 vertex_main() {
+  textureDimensions_1bc428();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler3D arg_0_1;
+void textureDimensions_1bc428() {
+  int arg_1 = 1;
+  uvec3 res = uvec3(textureSize(arg_0_1, arg_1));
+}
+
+void fragment_main() {
+  textureDimensions_1bc428();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler3D arg_0_1;
+void textureDimensions_1bc428() {
+  int arg_1 = 1;
+  uvec3 res = uvec3(textureSize(arg_0_1, arg_1));
+}
+
+void compute_main() {
+  textureDimensions_1bc428();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1bc428.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/1bc428.wgsl.expected.msl
new file mode 100644
index 0000000..f9ca8a3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/1bc428.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_1bc428(texture3d<float, access::sample> tint_symbol_1) {
+  int arg_1 = 1;
+  uint3 res = uint3(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1), tint_symbol_1.get_depth(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::sample> tint_symbol_2) {
+  textureDimensions_1bc428(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_1bc428(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture3d<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_1bc428(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/1bc428.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/1bc428.wgsl.expected.spvasm
new file mode 100644
index 0000000..df2e7fa
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/1bc428.wgsl.expected.spvasm
@@ -0,0 +1,83 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_1bc428 "textureDimensions_1bc428"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 3D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_int = OpTypePointer Function %int
+         %20 = OpConstantNull %int
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+         %28 = OpConstantNull %v3uint
+         %29 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_1bc428 = OpFunction %void None %12
+         %15 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_int Function %20
+        %res = OpVariable %_ptr_Function_v3uint Function %28
+               OpStore %arg_1 %int_1
+         %24 = OpLoad %11 %arg_0
+         %25 = OpLoad %int %arg_1
+         %21 = OpImageQuerySizeLod %v3uint %24 %25
+               OpStore %res %21
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureDimensions_1bc428
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %34 = OpLabel
+         %35 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %35
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureDimensions_1bc428
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureDimensions_1bc428
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/1bc428.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/1bc428.wgsl.expected.wgsl
new file mode 100644
index 0000000..2d75990
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/1bc428.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_3d<f32>;
+
+fn textureDimensions_1bc428() {
+  var arg_1 = 1i;
+  var res : vec3<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_1bc428();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_1bc428();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_1bc428();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1bd78c.wgsl b/test/tint/builtins/gen/var/textureDimensions/1bd78c.wgsl
new file mode 100644
index 0000000..270b5ed
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/1bd78c.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d<f32>;
+
+// fn textureDimensions(texture: texture_2d<f32>, level: i32) -> vec2<u32>
+fn textureDimensions_1bd78c() {
+  var arg_1 = 1i;
+  var res: vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_1bd78c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_1bd78c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_1bd78c();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1bd78c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/1bd78c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f2e60a2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/1bd78c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_1bd78c() {
+  int arg_1 = 1;
+  int3 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_1bd78c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_1bd78c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_1bd78c();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1bd78c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/1bd78c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..f2e60a2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/1bd78c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_1bd78c() {
+  int arg_1 = 1;
+  int3 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_1bd78c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_1bd78c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_1bd78c();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1bd78c.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/1bd78c.wgsl.expected.glsl
new file mode 100644
index 0000000..d87d5a6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/1bd78c.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp sampler2D arg_0_1;
+void textureDimensions_1bd78c() {
+  int arg_1 = 1;
+  uvec2 res = uvec2(textureSize(arg_0_1, arg_1));
+}
+
+vec4 vertex_main() {
+  textureDimensions_1bd78c();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2D arg_0_1;
+void textureDimensions_1bd78c() {
+  int arg_1 = 1;
+  uvec2 res = uvec2(textureSize(arg_0_1, arg_1));
+}
+
+void fragment_main() {
+  textureDimensions_1bd78c();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2D arg_0_1;
+void textureDimensions_1bd78c() {
+  int arg_1 = 1;
+  uvec2 res = uvec2(textureSize(arg_0_1, arg_1));
+}
+
+void compute_main() {
+  textureDimensions_1bd78c();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1bd78c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/1bd78c.wgsl.expected.msl
new file mode 100644
index 0000000..e5ac9c2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/1bd78c.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_1bd78c(texture2d<float, access::sample> tint_symbol_1) {
+  int arg_1 = 1;
+  uint2 res = uint2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::sample> tint_symbol_2) {
+  textureDimensions_1bd78c(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_1bd78c(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_1bd78c(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/1bd78c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/1bd78c.wgsl.expected.spvasm
new file mode 100644
index 0000000..ad4808e4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/1bd78c.wgsl.expected.spvasm
@@ -0,0 +1,83 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_1bd78c "textureDimensions_1bd78c"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_int = OpTypePointer Function %int
+         %20 = OpConstantNull %int
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %28 = OpConstantNull %v2uint
+         %29 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_1bd78c = OpFunction %void None %12
+         %15 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_int Function %20
+        %res = OpVariable %_ptr_Function_v2uint Function %28
+               OpStore %arg_1 %int_1
+         %24 = OpLoad %11 %arg_0
+         %25 = OpLoad %int %arg_1
+         %21 = OpImageQuerySizeLod %v2uint %24 %25
+               OpStore %res %21
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureDimensions_1bd78c
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %34 = OpLabel
+         %35 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %35
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureDimensions_1bd78c
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureDimensions_1bd78c
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/1bd78c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/1bd78c.wgsl.expected.wgsl
new file mode 100644
index 0000000..5d9ef3f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/1bd78c.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_2d<f32>;
+
+fn textureDimensions_1bd78c() {
+  var arg_1 = 1i;
+  var res : vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_1bd78c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_1bd78c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_1bd78c();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1d6c26.wgsl b/test/tint/builtins/gen/var/textureDimensions/1d6c26.wgsl
deleted file mode 100644
index b5cb5d9..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/1d6c26.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8unorm, write>;
-
-// fn textureDimensions(texture: texture_storage_2d_array<rgba8unorm, write>) -> vec2<i32>
-fn textureDimensions_1d6c26() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_1d6c26();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_1d6c26();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_1d6c26();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1d6c26.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/1d6c26.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 26140a0..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/1d6c26.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2DArray<float4> arg_0 : register(u0, space1);
-
-void textureDimensions_1d6c26() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_1d6c26();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_1d6c26();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_1d6c26();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1d6c26.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/1d6c26.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 26140a0..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/1d6c26.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2DArray<float4> arg_0 : register(u0, space1);
-
-void textureDimensions_1d6c26() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_1d6c26();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_1d6c26();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_1d6c26();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1d6c26.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/1d6c26.wgsl.expected.glsl
deleted file mode 100644
index bea79ae..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/1d6c26.wgsl.expected.glsl
+++ /dev/null
@@ -1,52 +0,0 @@
-#version 310 es
-
-layout(rgba8) uniform highp writeonly image2DArray arg_0;
-void textureDimensions_1d6c26() {
-  ivec2 res = imageSize(arg_0).xy;
-}
-
-vec4 vertex_main() {
-  textureDimensions_1d6c26();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-layout(rgba8) uniform highp writeonly image2DArray arg_0;
-void textureDimensions_1d6c26() {
-  ivec2 res = imageSize(arg_0).xy;
-}
-
-void fragment_main() {
-  textureDimensions_1d6c26();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-layout(rgba8) uniform highp writeonly image2DArray arg_0;
-void textureDimensions_1d6c26() {
-  ivec2 res = imageSize(arg_0).xy;
-}
-
-void compute_main() {
-  textureDimensions_1d6c26();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1d6c26.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/1d6c26.wgsl.expected.msl
deleted file mode 100644
index 65d506d..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/1d6c26.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_1d6c26(texture2d_array<float, access::write> tint_symbol_1) {
-  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
-  textureDimensions_1d6c26(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture2d_array<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture2d_array<float, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_1d6c26(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture2d_array<float, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_1d6c26(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/1d6c26.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/1d6c26.wgsl.expected.spvasm
deleted file mode 100644
index f0feca5..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/1d6c26.wgsl.expected.spvasm
+++ /dev/null
@@ -1,78 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 39
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_1d6c26 "textureDimensions_1d6c26"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba8
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %12 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %v2int = OpTypeVector %int 2
-      %v3int = OpTypeVector %int 3
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %24 = OpConstantNull %v2int
-         %25 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_1d6c26 = OpFunction %void None %12
-         %15 = OpLabel
-        %res = OpVariable %_ptr_Function_v2int Function %24
-         %21 = OpLoad %11 %arg_0
-         %19 = OpImageQuerySize %v3int %21
-         %16 = OpVectorShuffle %v2int %19 %19 0 1
-               OpStore %res %16
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %25
-         %27 = OpLabel
-         %28 = OpFunctionCall %void %textureDimensions_1d6c26
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %12
-         %30 = OpLabel
-         %31 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %31
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %12
-         %34 = OpLabel
-         %35 = OpFunctionCall %void %textureDimensions_1d6c26
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %12
-         %37 = OpLabel
-         %38 = OpFunctionCall %void %textureDimensions_1d6c26
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/1d6c26.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/1d6c26.wgsl.expected.wgsl
deleted file mode 100644
index 8bb5c22..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/1d6c26.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8unorm, write>;
-
-fn textureDimensions_1d6c26() {
-  var res : vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_1d6c26();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_1d6c26();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_1d6c26();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl b/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl
deleted file mode 100644
index 006bfd8..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2022 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_1d<u32>;
-
-// fn textureDimensions(texture: texture_1d<u32>, level: u32) -> i32
-fn textureDimensions_1e3981() {
-  var arg_1 = 1u;
-  var res: i32 = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_1e3981();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_1e3981();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_1e3981();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 31d4651..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-Texture1D<uint4> arg_0 : register(t0, space1);
-
-void textureDimensions_1e3981() {
-  uint arg_1 = 1u;
-  int2 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y);
-  int res = tint_tmp.x;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_1e3981();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_1e3981();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_1e3981();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 31d4651..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-Texture1D<uint4> arg_0 : register(t0, space1);
-
-void textureDimensions_1e3981() {
-  uint arg_1 = 1u;
-  int2 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y);
-  int res = tint_tmp.x;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_1e3981();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_1e3981();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_1e3981();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl.expected.glsl
deleted file mode 100644
index c87c594..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl.expected.glsl
+++ /dev/null
@@ -1,78 +0,0 @@
-SKIP: FAILED
-
-#version 310 es
-
-uniform highp usampler1D arg_0_1;
-void textureDimensions_1e3981() {
-  uint arg_1 = 1u;
-  int res = textureSize(arg_0_1, int(arg_1));
-}
-
-vec4 vertex_main() {
-  textureDimensions_1e3981();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'usampler1D' : Reserved word. 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision mediump float;
-
-uniform highp usampler1D arg_0_1;
-void textureDimensions_1e3981() {
-  uint arg_1 = 1u;
-  int res = textureSize(arg_0_1, int(arg_1));
-}
-
-void fragment_main() {
-  textureDimensions_1e3981();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:4: 'usampler1D' : Reserved word. 
-ERROR: 0:4: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-
-uniform highp usampler1D arg_0_1;
-void textureDimensions_1e3981() {
-  uint arg_1 = 1u;
-  int res = textureSize(arg_0_1, int(arg_1));
-}
-
-void compute_main() {
-  textureDimensions_1e3981();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'usampler1D' : Reserved word. 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl.expected.msl
deleted file mode 100644
index ff14fe6..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl.expected.msl
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_1e3981(texture1d<uint, access::sample> tint_symbol_1) {
-  uint arg_1 = 1u;
-  int res = int(tint_symbol_1.get_width(0));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture1d<uint, access::sample> tint_symbol_2) {
-  textureDimensions_1e3981(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture1d<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture1d<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_1e3981(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture1d<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_1e3981(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl.expected.spvasm
deleted file mode 100644
index 14764a5..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl.expected.spvasm
+++ /dev/null
@@ -1,83 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 42
-; Schema: 0
-               OpCapability Shader
-               OpCapability Sampled1D
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_1e3981 "textureDimensions_1e3981"
-               OpName %arg_1 "arg_1"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-       %uint = OpTypeInt 32 0
-         %11 = OpTypeImage %uint 1D 0 0 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-     %uint_1 = OpConstant %uint 1
-%_ptr_Function_uint = OpTypePointer Function %uint
-         %20 = OpConstantNull %uint
-        %int = OpTypeInt 32 1
-%_ptr_Function_int = OpTypePointer Function %int
-         %27 = OpConstantNull %int
-         %28 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_1e3981 = OpFunction %void None %13
-         %16 = OpLabel
-      %arg_1 = OpVariable %_ptr_Function_uint Function %20
-        %res = OpVariable %_ptr_Function_int Function %27
-               OpStore %arg_1 %uint_1
-         %23 = OpLoad %11 %arg_0
-         %24 = OpLoad %uint %arg_1
-         %21 = OpImageQuerySizeLod %int %23 %24
-               OpStore %res %21
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %28
-         %30 = OpLabel
-         %31 = OpFunctionCall %void %textureDimensions_1e3981
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %33 = OpLabel
-         %34 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %34
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %37 = OpLabel
-         %38 = OpFunctionCall %void %textureDimensions_1e3981
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %40 = OpLabel
-         %41 = OpFunctionCall %void %textureDimensions_1e3981
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl.expected.wgsl
deleted file mode 100644
index 2c5e4ac..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/1e3981.wgsl.expected.wgsl
+++ /dev/null
@@ -1,22 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_1d<u32>;
-
-fn textureDimensions_1e3981() {
-  var arg_1 = 1u;
-  var res : i32 = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_1e3981();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_1e3981();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_1e3981();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1e9e39.wgsl b/test/tint/builtins/gen/var/textureDimensions/1e9e39.wgsl
deleted file mode 100644
index 8e3eb59..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/1e9e39.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_1d<rgba16float, write>;
-
-// fn textureDimensions(texture: texture_storage_1d<rgba16float, write>) -> i32
-fn textureDimensions_1e9e39() {
-  var res: i32 = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_1e9e39();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_1e9e39();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_1e9e39();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1e9e39.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/1e9e39.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 16444c0..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/1e9e39.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture1D<float4> arg_0 : register(u0, space1);
-
-void textureDimensions_1e9e39() {
-  int tint_tmp;
-  arg_0.GetDimensions(tint_tmp);
-  int res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_1e9e39();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_1e9e39();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_1e9e39();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1e9e39.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/1e9e39.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 16444c0..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/1e9e39.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture1D<float4> arg_0 : register(u0, space1);
-
-void textureDimensions_1e9e39() {
-  int tint_tmp;
-  arg_0.GetDimensions(tint_tmp);
-  int res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_1e9e39();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_1e9e39();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_1e9e39();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1e9e39.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/1e9e39.wgsl.expected.glsl
deleted file mode 100644
index 067bc8b..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/1e9e39.wgsl.expected.glsl
+++ /dev/null
@@ -1,78 +0,0 @@
-SKIP: FAILED
-
-#version 310 es
-
-layout(rgba16f) uniform highp writeonly image1D arg_0;
-void textureDimensions_1e9e39() {
-  int res = imageSize(arg_0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_1e9e39();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'image1D' : Reserved word. 
-WARNING: 0:3: 'layout' : useless application of layout qualifier 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision mediump float;
-
-layout(rgba16f) uniform highp writeonly image1D arg_0;
-void textureDimensions_1e9e39() {
-  int res = imageSize(arg_0);
-}
-
-void fragment_main() {
-  textureDimensions_1e9e39();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:4: 'image1D' : Reserved word. 
-WARNING: 0:4: 'layout' : useless application of layout qualifier 
-ERROR: 0:4: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-
-layout(rgba16f) uniform highp writeonly image1D arg_0;
-void textureDimensions_1e9e39() {
-  int res = imageSize(arg_0);
-}
-
-void compute_main() {
-  textureDimensions_1e9e39();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'image1D' : Reserved word. 
-WARNING: 0:3: 'layout' : useless application of layout qualifier 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/1e9e39.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/1e9e39.wgsl.expected.msl
deleted file mode 100644
index 352d58d..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/1e9e39.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_1e9e39(texture1d<float, access::write> tint_symbol_1) {
-  int res = int(tint_symbol_1.get_width(0));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture1d<float, access::write> tint_symbol_2) {
-  textureDimensions_1e9e39(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture1d<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture1d<float, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_1e9e39(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture1d<float, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_1e9e39(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/1e9e39.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/1e9e39.wgsl.expected.spvasm
deleted file mode 100644
index c83aa50..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/1e9e39.wgsl.expected.spvasm
+++ /dev/null
@@ -1,76 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 36
-; Schema: 0
-               OpCapability Shader
-               OpCapability Image1D
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_1e9e39 "textureDimensions_1e9e39"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-         %11 = OpTypeImage %float 1D 0 0 0 2 Rgba16f
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %12 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-%_ptr_Function_int = OpTypePointer Function %int
-         %21 = OpConstantNull %int
-         %22 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_1e9e39 = OpFunction %void None %12
-         %15 = OpLabel
-        %res = OpVariable %_ptr_Function_int Function %21
-         %18 = OpLoad %11 %arg_0
-         %16 = OpImageQuerySize %int %18
-               OpStore %res %16
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %22
-         %24 = OpLabel
-         %25 = OpFunctionCall %void %textureDimensions_1e9e39
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %12
-         %27 = OpLabel
-         %28 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %28
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %12
-         %31 = OpLabel
-         %32 = OpFunctionCall %void %textureDimensions_1e9e39
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %12
-         %34 = OpLabel
-         %35 = OpFunctionCall %void %textureDimensions_1e9e39
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/1e9e39.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/1e9e39.wgsl.expected.wgsl
deleted file mode 100644
index efd42ac..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/1e9e39.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba16float, write>;
-
-fn textureDimensions_1e9e39() {
-  var res : i32 = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_1e9e39();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_1e9e39();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_1e9e39();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1f20c5.wgsl b/test/tint/builtins/gen/var/textureDimensions/1f20c5.wgsl
deleted file mode 100644
index 4be52a4..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/1f20c5.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_2d_array<u32>;
-
-// fn textureDimensions(texture: texture_2d_array<u32>) -> vec2<i32>
-fn textureDimensions_1f20c5() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_1f20c5();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_1f20c5();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_1f20c5();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1f20c5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/1f20c5.wgsl.expected.dxc.hlsl
deleted file mode 100644
index e453d42..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/1f20c5.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-Texture2DArray<uint4> arg_0 : register(t0, space1);
-
-void textureDimensions_1f20c5() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_1f20c5();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_1f20c5();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_1f20c5();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1f20c5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/1f20c5.wgsl.expected.fxc.hlsl
deleted file mode 100644
index e453d42..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/1f20c5.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-Texture2DArray<uint4> arg_0 : register(t0, space1);
-
-void textureDimensions_1f20c5() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_1f20c5();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_1f20c5();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_1f20c5();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1f20c5.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/1f20c5.wgsl.expected.glsl
deleted file mode 100644
index ac742c2..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/1f20c5.wgsl.expected.glsl
+++ /dev/null
@@ -1,52 +0,0 @@
-#version 310 es
-
-uniform highp usampler2DArray arg_0_1;
-void textureDimensions_1f20c5() {
-  ivec2 res = textureSize(arg_0_1, 0).xy;
-}
-
-vec4 vertex_main() {
-  textureDimensions_1f20c5();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-uniform highp usampler2DArray arg_0_1;
-void textureDimensions_1f20c5() {
-  ivec2 res = textureSize(arg_0_1, 0).xy;
-}
-
-void fragment_main() {
-  textureDimensions_1f20c5();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-uniform highp usampler2DArray arg_0_1;
-void textureDimensions_1f20c5() {
-  ivec2 res = textureSize(arg_0_1, 0).xy;
-}
-
-void compute_main() {
-  textureDimensions_1f20c5();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/1f20c5.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/1f20c5.wgsl.expected.msl
deleted file mode 100644
index d35a456..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/1f20c5.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_1f20c5(texture2d_array<uint, access::sample> tint_symbol_1) {
-  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture2d_array<uint, access::sample> tint_symbol_2) {
-  textureDimensions_1f20c5(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture2d_array<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture2d_array<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_1f20c5(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture2d_array<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_1f20c5(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/1f20c5.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/1f20c5.wgsl.expected.spvasm
deleted file mode 100644
index 83e1fb4..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/1f20c5.wgsl.expected.spvasm
+++ /dev/null
@@ -1,79 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 41
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_1f20c5 "textureDimensions_1f20c5"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-       %uint = OpTypeInt 32 0
-         %11 = OpTypeImage %uint 2D 0 1 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %v2int = OpTypeVector %int 2
-      %v3int = OpTypeVector %int 3
-      %int_0 = OpConstant %int 0
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %26 = OpConstantNull %v2int
-         %27 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_1f20c5 = OpFunction %void None %13
-         %16 = OpLabel
-        %res = OpVariable %_ptr_Function_v2int Function %26
-         %22 = OpLoad %11 %arg_0
-         %20 = OpImageQuerySizeLod %v3int %22 %int_0
-         %17 = OpVectorShuffle %v2int %20 %20 0 1
-               OpStore %res %17
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %27
-         %29 = OpLabel
-         %30 = OpFunctionCall %void %textureDimensions_1f20c5
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %32 = OpLabel
-         %33 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %33
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %36 = OpLabel
-         %37 = OpFunctionCall %void %textureDimensions_1f20c5
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %39 = OpLabel
-         %40 = OpFunctionCall %void %textureDimensions_1f20c5
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/1f20c5.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/1f20c5.wgsl.expected.wgsl
deleted file mode 100644
index 4800bad..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/1f20c5.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_2d_array<u32>;
-
-fn textureDimensions_1f20c5() {
-  var res : vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_1f20c5();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_1f20c5();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_1f20c5();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/214dd4.wgsl b/test/tint/builtins/gen/var/textureDimensions/214dd4.wgsl
deleted file mode 100644
index 070bb0b..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/214dd4.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_3d<rgba8sint, write>;
-
-// fn textureDimensions(texture: texture_storage_3d<rgba8sint, write>) -> vec3<i32>
-fn textureDimensions_214dd4() {
-  var res: vec3<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_214dd4();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_214dd4();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_214dd4();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/214dd4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/214dd4.wgsl.expected.dxc.hlsl
deleted file mode 100644
index c91423e..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/214dd4.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture3D<int4> arg_0 : register(u0, space1);
-
-void textureDimensions_214dd4() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int3 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_214dd4();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_214dd4();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_214dd4();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/214dd4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/214dd4.wgsl.expected.fxc.hlsl
deleted file mode 100644
index c91423e..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/214dd4.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture3D<int4> arg_0 : register(u0, space1);
-
-void textureDimensions_214dd4() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int3 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_214dd4();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_214dd4();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_214dd4();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/214dd4.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/214dd4.wgsl.expected.glsl
deleted file mode 100644
index d7f534f..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/214dd4.wgsl.expected.glsl
+++ /dev/null
@@ -1,52 +0,0 @@
-#version 310 es
-
-layout(rgba8i) uniform highp writeonly iimage3D arg_0;
-void textureDimensions_214dd4() {
-  ivec3 res = imageSize(arg_0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_214dd4();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-layout(rgba8i) uniform highp writeonly iimage3D arg_0;
-void textureDimensions_214dd4() {
-  ivec3 res = imageSize(arg_0);
-}
-
-void fragment_main() {
-  textureDimensions_214dd4();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-layout(rgba8i) uniform highp writeonly iimage3D arg_0;
-void textureDimensions_214dd4() {
-  ivec3 res = imageSize(arg_0);
-}
-
-void compute_main() {
-  textureDimensions_214dd4();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/214dd4.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/214dd4.wgsl.expected.msl
deleted file mode 100644
index 169ee32..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/214dd4.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_214dd4(texture3d<int, access::write> tint_symbol_1) {
-  int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture3d<int, access::write> tint_symbol_2) {
-  textureDimensions_214dd4(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture3d<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture3d<int, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_214dd4(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture3d<int, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_214dd4(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/214dd4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/214dd4.wgsl.expected.spvasm
deleted file mode 100644
index 8210ce8..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/214dd4.wgsl.expected.spvasm
+++ /dev/null
@@ -1,76 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 37
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_214dd4 "textureDimensions_214dd4"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-        %int = OpTypeInt 32 1
-         %11 = OpTypeImage %int 3D 0 0 0 2 Rgba8i
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-      %v3int = OpTypeVector %int 3
-%_ptr_Function_v3int = OpTypePointer Function %v3int
-         %22 = OpConstantNull %v3int
-         %23 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_214dd4 = OpFunction %void None %13
-         %16 = OpLabel
-        %res = OpVariable %_ptr_Function_v3int Function %22
-         %19 = OpLoad %11 %arg_0
-         %17 = OpImageQuerySize %v3int %19
-               OpStore %res %17
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %23
-         %25 = OpLabel
-         %26 = OpFunctionCall %void %textureDimensions_214dd4
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %28 = OpLabel
-         %29 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %29
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %32 = OpLabel
-         %33 = OpFunctionCall %void %textureDimensions_214dd4
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %35 = OpLabel
-         %36 = OpFunctionCall %void %textureDimensions_214dd4
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/214dd4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/214dd4.wgsl.expected.wgsl
deleted file mode 100644
index 8fdb8a3..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/214dd4.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba8sint, write>;
-
-fn textureDimensions_214dd4() {
-  var res : vec3<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_214dd4();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_214dd4();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_214dd4();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/216688.wgsl b/test/tint/builtins/gen/var/textureDimensions/216688.wgsl
deleted file mode 100644
index 62690e1..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/216688.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2022 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_2d_array<f32>;
-
-// fn textureDimensions(texture: texture_2d_array<f32>, level: u32) -> vec2<i32>
-fn textureDimensions_216688() {
-  var arg_1 = 1u;
-  var res: vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_216688();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_216688();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_216688();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/216688.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/216688.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 878e5dd..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/216688.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-Texture2DArray<float4> arg_0 : register(t0, space1);
-
-void textureDimensions_216688() {
-  uint arg_1 = 1u;
-  int4 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_216688();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_216688();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_216688();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/216688.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/216688.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 878e5dd..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/216688.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-Texture2DArray<float4> arg_0 : register(t0, space1);
-
-void textureDimensions_216688() {
-  uint arg_1 = 1u;
-  int4 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_216688();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_216688();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_216688();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/216688.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/216688.wgsl.expected.glsl
deleted file mode 100644
index 0a8a3e8..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/216688.wgsl.expected.glsl
+++ /dev/null
@@ -1,55 +0,0 @@
-#version 310 es
-
-uniform highp sampler2DArray arg_0_1;
-void textureDimensions_216688() {
-  uint arg_1 = 1u;
-  ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
-}
-
-vec4 vertex_main() {
-  textureDimensions_216688();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-uniform highp sampler2DArray arg_0_1;
-void textureDimensions_216688() {
-  uint arg_1 = 1u;
-  ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
-}
-
-void fragment_main() {
-  textureDimensions_216688();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-uniform highp sampler2DArray arg_0_1;
-void textureDimensions_216688() {
-  uint arg_1 = 1u;
-  ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
-}
-
-void compute_main() {
-  textureDimensions_216688();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/216688.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/216688.wgsl.expected.msl
deleted file mode 100644
index a75efa9..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/216688.wgsl.expected.msl
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_216688(texture2d_array<float, access::sample> tint_symbol_1) {
-  uint arg_1 = 1u;
-  int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture2d_array<float, access::sample> tint_symbol_2) {
-  textureDimensions_216688(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_216688(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture2d_array<float, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_216688(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/216688.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/216688.wgsl.expected.spvasm
deleted file mode 100644
index ca7d09b..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/216688.wgsl.expected.spvasm
+++ /dev/null
@@ -1,85 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 45
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_216688 "textureDimensions_216688"
-               OpName %arg_1 "arg_1"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-         %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %12 = OpTypeFunction %void
-       %uint = OpTypeInt 32 0
-     %uint_1 = OpConstant %uint 1
-%_ptr_Function_uint = OpTypePointer Function %uint
-         %20 = OpConstantNull %uint
-        %int = OpTypeInt 32 1
-      %v2int = OpTypeVector %int 2
-      %v3int = OpTypeVector %int 3
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %30 = OpConstantNull %v2int
-         %31 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_216688 = OpFunction %void None %12
-         %15 = OpLabel
-      %arg_1 = OpVariable %_ptr_Function_uint Function %20
-        %res = OpVariable %_ptr_Function_v2int Function %30
-               OpStore %arg_1 %uint_1
-         %26 = OpLoad %11 %arg_0
-         %27 = OpLoad %uint %arg_1
-         %24 = OpImageQuerySizeLod %v3int %26 %27
-         %21 = OpVectorShuffle %v2int %24 %24 0 1
-               OpStore %res %21
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %31
-         %33 = OpLabel
-         %34 = OpFunctionCall %void %textureDimensions_216688
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %12
-         %36 = OpLabel
-         %37 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %37
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %12
-         %40 = OpLabel
-         %41 = OpFunctionCall %void %textureDimensions_216688
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %12
-         %43 = OpLabel
-         %44 = OpFunctionCall %void %textureDimensions_216688
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/216688.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/216688.wgsl.expected.wgsl
deleted file mode 100644
index 1914b2b..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/216688.wgsl.expected.wgsl
+++ /dev/null
@@ -1,22 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_2d_array<f32>;
-
-fn textureDimensions_216688() {
-  var arg_1 = 1u;
-  var res : vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_216688();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_216688();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_216688();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl b/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl
deleted file mode 100644
index c6ad068..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2022 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_2d<u32>;
-
-// fn textureDimensions(texture: texture_2d<u32>, level: u32) -> vec2<i32>
-fn textureDimensions_220dc3() {
-  var arg_1 = 1u;
-  var res: vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_220dc3();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_220dc3();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_220dc3();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 01303f7..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-Texture2D<uint4> arg_0 : register(t0, space1);
-
-void textureDimensions_220dc3() {
-  uint arg_1 = 1u;
-  int3 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_220dc3();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_220dc3();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_220dc3();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 01303f7..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-Texture2D<uint4> arg_0 : register(t0, space1);
-
-void textureDimensions_220dc3() {
-  uint arg_1 = 1u;
-  int3 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_220dc3();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_220dc3();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_220dc3();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl.expected.glsl
deleted file mode 100644
index 1c957c1..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl.expected.glsl
+++ /dev/null
@@ -1,55 +0,0 @@
-#version 310 es
-
-uniform highp usampler2D arg_0_1;
-void textureDimensions_220dc3() {
-  uint arg_1 = 1u;
-  ivec2 res = textureSize(arg_0_1, int(arg_1));
-}
-
-vec4 vertex_main() {
-  textureDimensions_220dc3();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-uniform highp usampler2D arg_0_1;
-void textureDimensions_220dc3() {
-  uint arg_1 = 1u;
-  ivec2 res = textureSize(arg_0_1, int(arg_1));
-}
-
-void fragment_main() {
-  textureDimensions_220dc3();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-uniform highp usampler2D arg_0_1;
-void textureDimensions_220dc3() {
-  uint arg_1 = 1u;
-  ivec2 res = textureSize(arg_0_1, int(arg_1));
-}
-
-void compute_main() {
-  textureDimensions_220dc3();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl.expected.msl
deleted file mode 100644
index ee8e56e..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl.expected.msl
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_220dc3(texture2d<uint, access::sample> tint_symbol_1) {
-  uint arg_1 = 1u;
-  int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture2d<uint, access::sample> tint_symbol_2) {
-  textureDimensions_220dc3(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture2d<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture2d<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_220dc3(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture2d<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_220dc3(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl.expected.spvasm
deleted file mode 100644
index dd0cfd1..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl.expected.spvasm
+++ /dev/null
@@ -1,83 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 43
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_220dc3 "textureDimensions_220dc3"
-               OpName %arg_1 "arg_1"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-       %uint = OpTypeInt 32 0
-         %11 = OpTypeImage %uint 2D 0 0 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-     %uint_1 = OpConstant %uint 1
-%_ptr_Function_uint = OpTypePointer Function %uint
-         %20 = OpConstantNull %uint
-        %int = OpTypeInt 32 1
-      %v2int = OpTypeVector %int 2
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %28 = OpConstantNull %v2int
-         %29 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_220dc3 = OpFunction %void None %13
-         %16 = OpLabel
-      %arg_1 = OpVariable %_ptr_Function_uint Function %20
-        %res = OpVariable %_ptr_Function_v2int Function %28
-               OpStore %arg_1 %uint_1
-         %24 = OpLoad %11 %arg_0
-         %25 = OpLoad %uint %arg_1
-         %21 = OpImageQuerySizeLod %v2int %24 %25
-               OpStore %res %21
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %29
-         %31 = OpLabel
-         %32 = OpFunctionCall %void %textureDimensions_220dc3
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %34 = OpLabel
-         %35 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %35
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %38 = OpLabel
-         %39 = OpFunctionCall %void %textureDimensions_220dc3
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %41 = OpLabel
-         %42 = OpFunctionCall %void %textureDimensions_220dc3
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl.expected.wgsl
deleted file mode 100644
index e377046..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/220dc3.wgsl.expected.wgsl
+++ /dev/null
@@ -1,22 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_2d<u32>;
-
-fn textureDimensions_220dc3() {
-  var arg_1 = 1u;
-  var res : vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_220dc3();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_220dc3();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_220dc3();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/221f22.wgsl b/test/tint/builtins/gen/var/textureDimensions/221f22.wgsl
deleted file mode 100644
index 346d3d9..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/221f22.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_cube_array<i32>;
-
-// fn textureDimensions(texture: texture_cube_array<i32>, level: i32) -> vec2<i32>
-fn textureDimensions_221f22() {
-  var arg_1 = 1i;
-  var res: vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_221f22();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_221f22();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_221f22();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/221f22.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/221f22.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 3c90f35..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/221f22.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-TextureCubeArray<int4> arg_0 : register(t0, space1);
-
-void textureDimensions_221f22() {
-  int arg_1 = 1;
-  int4 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_221f22();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_221f22();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_221f22();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/221f22.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/221f22.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 3c90f35..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/221f22.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-TextureCubeArray<int4> arg_0 : register(t0, space1);
-
-void textureDimensions_221f22() {
-  int arg_1 = 1;
-  int4 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_221f22();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_221f22();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_221f22();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/221f22.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/221f22.wgsl.expected.glsl
deleted file mode 100644
index ba1d23a..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/221f22.wgsl.expected.glsl
+++ /dev/null
@@ -1,78 +0,0 @@
-SKIP: FAILED
-
-#version 310 es
-
-uniform highp isamplerCubeArray arg_0_1;
-void textureDimensions_221f22() {
-  int arg_1 = 0;
-  ivec2 res = textureSize(arg_0_1, arg_1).xy;
-}
-
-vec4 vertex_main() {
-  textureDimensions_221f22();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'isamplerCubeArray' : Reserved word. 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision mediump float;
-
-uniform highp isamplerCubeArray arg_0_1;
-void textureDimensions_221f22() {
-  int arg_1 = 0;
-  ivec2 res = textureSize(arg_0_1, arg_1).xy;
-}
-
-void fragment_main() {
-  textureDimensions_221f22();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:4: 'isamplerCubeArray' : Reserved word. 
-ERROR: 0:4: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-
-uniform highp isamplerCubeArray arg_0_1;
-void textureDimensions_221f22() {
-  int arg_1 = 0;
-  ivec2 res = textureSize(arg_0_1, arg_1).xy;
-}
-
-void compute_main() {
-  textureDimensions_221f22();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'isamplerCubeArray' : Reserved word. 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/221f22.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/221f22.wgsl.expected.msl
deleted file mode 100644
index 3264332..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/221f22.wgsl.expected.msl
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_221f22(texturecube_array<int, access::sample> tint_symbol_1) {
-  int arg_1 = 1;
-  int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texturecube_array<int, access::sample> tint_symbol_2) {
-  textureDimensions_221f22(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texturecube_array<int, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texturecube_array<int, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_221f22(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texturecube_array<int, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_221f22(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/221f22.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/221f22.wgsl.expected.spvasm
deleted file mode 100644
index 956503e..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/221f22.wgsl.expected.spvasm
+++ /dev/null
@@ -1,85 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 44
-; Schema: 0
-               OpCapability Shader
-               OpCapability SampledCubeArray
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_221f22 "textureDimensions_221f22"
-               OpName %arg_1 "arg_1"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-        %int = OpTypeInt 32 1
-         %11 = OpTypeImage %int Cube 0 1 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-      %int_1 = OpConstant %int 1
-%_ptr_Function_int = OpTypePointer Function %int
-         %20 = OpConstantNull %int
-      %v2int = OpTypeVector %int 2
-      %v3int = OpTypeVector %int 3
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %29 = OpConstantNull %v2int
-         %30 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_221f22 = OpFunction %void None %13
-         %16 = OpLabel
-      %arg_1 = OpVariable %_ptr_Function_int Function %20
-        %res = OpVariable %_ptr_Function_v2int Function %29
-               OpStore %arg_1 %int_1
-         %25 = OpLoad %11 %arg_0
-         %26 = OpLoad %int %arg_1
-         %23 = OpImageQuerySizeLod %v3int %25 %26
-         %21 = OpVectorShuffle %v2int %23 %23 0 1
-               OpStore %res %21
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %30
-         %32 = OpLabel
-         %33 = OpFunctionCall %void %textureDimensions_221f22
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %35 = OpLabel
-         %36 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %36
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %39 = OpLabel
-         %40 = OpFunctionCall %void %textureDimensions_221f22
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %42 = OpLabel
-         %43 = OpFunctionCall %void %textureDimensions_221f22
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/221f22.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/221f22.wgsl.expected.wgsl
deleted file mode 100644
index 781ea30..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/221f22.wgsl.expected.wgsl
+++ /dev/null
@@ -1,22 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_cube_array<i32>;
-
-fn textureDimensions_221f22() {
-  var arg_1 = 1i;
-  var res : vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_221f22();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_221f22();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_221f22();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/224113.wgsl b/test/tint/builtins/gen/var/textureDimensions/224113.wgsl
new file mode 100644
index 0000000..95d6010
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/224113.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba8unorm, write>;
+
+// fn textureDimensions(texture: texture_storage_2d<rgba8unorm, write>) -> vec2<u32>
+fn textureDimensions_224113() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_224113();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_224113();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_224113();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/224113.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/224113.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..2af1026
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/224113.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<float4> arg_0 : register(u0, space1);
+
+void textureDimensions_224113() {
+  int2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_224113();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_224113();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_224113();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/224113.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/224113.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..2af1026
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/224113.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<float4> arg_0 : register(u0, space1);
+
+void textureDimensions_224113() {
+  int2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_224113();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_224113();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_224113();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/224113.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/224113.wgsl.expected.glsl
new file mode 100644
index 0000000..569cec5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/224113.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba8) uniform highp writeonly image2D arg_0;
+void textureDimensions_224113() {
+  uvec2 res = uvec2(imageSize(arg_0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_224113();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba8) uniform highp writeonly image2D arg_0;
+void textureDimensions_224113() {
+  uvec2 res = uvec2(imageSize(arg_0));
+}
+
+void fragment_main() {
+  textureDimensions_224113();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba8) uniform highp writeonly image2D arg_0;
+void textureDimensions_224113() {
+  uvec2 res = uvec2(imageSize(arg_0));
+}
+
+void compute_main() {
+  textureDimensions_224113();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/224113.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/224113.wgsl.expected.msl
new file mode 100644
index 0000000..a0f1191
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/224113.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_224113(texture2d<float, access::write> tint_symbol_1) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::write> tint_symbol_2) {
+  textureDimensions_224113(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_224113(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_224113(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/224113.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/224113.wgsl.expected.spvasm
new file mode 100644
index 0000000..b9d1190
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/224113.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_224113 "textureDimensions_224113"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %22 = OpConstantNull %v2uint
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_224113 = OpFunction %void None %12
+         %15 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %22
+         %19 = OpLoad %11 %arg_0
+         %16 = OpImageQuerySize %v2uint %19
+               OpStore %res %16
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %textureDimensions_224113
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %28 = OpLabel
+         %29 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %29
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_224113
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureDimensions_224113
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/224113.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/224113.wgsl.expected.wgsl
new file mode 100644
index 0000000..c16b613
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/224113.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba8unorm, write>;
+
+fn textureDimensions_224113() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_224113();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_224113();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_224113();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/22b5b6.wgsl b/test/tint/builtins/gen/var/textureDimensions/22b5b6.wgsl
new file mode 100644
index 0000000..3ee8952
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/22b5b6.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube_array<u32>;
+
+// fn textureDimensions(texture: texture_cube_array<u32>, level: i32) -> vec2<u32>
+fn textureDimensions_22b5b6() {
+  var arg_1 = 1i;
+  var res: vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_22b5b6();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_22b5b6();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_22b5b6();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/22b5b6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/22b5b6.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e02e262
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/22b5b6.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+TextureCubeArray<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_22b5b6() {
+  int arg_1 = 1;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_22b5b6();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_22b5b6();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_22b5b6();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/22b5b6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/22b5b6.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..e02e262
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/22b5b6.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+TextureCubeArray<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_22b5b6() {
+  int arg_1 = 1;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_22b5b6();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_22b5b6();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_22b5b6();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/22b5b6.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/22b5b6.wgsl.expected.glsl
new file mode 100644
index 0000000..0368a8f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/22b5b6.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp usamplerCubeArray arg_0_1;
+void textureDimensions_22b5b6() {
+  int arg_1 = 1;
+  uvec2 res = uvec2(textureSize(arg_0_1, arg_1).xy);
+}
+
+vec4 vertex_main() {
+  textureDimensions_22b5b6();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'usamplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp usamplerCubeArray arg_0_1;
+void textureDimensions_22b5b6() {
+  int arg_1 = 1;
+  uvec2 res = uvec2(textureSize(arg_0_1, arg_1).xy);
+}
+
+void fragment_main() {
+  textureDimensions_22b5b6();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'usamplerCubeArray' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp usamplerCubeArray arg_0_1;
+void textureDimensions_22b5b6() {
+  int arg_1 = 1;
+  uvec2 res = uvec2(textureSize(arg_0_1, arg_1).xy);
+}
+
+void compute_main() {
+  textureDimensions_22b5b6();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'usamplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/22b5b6.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/22b5b6.wgsl.expected.msl
new file mode 100644
index 0000000..38bf28d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/22b5b6.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_22b5b6(texturecube_array<uint, access::sample> tint_symbol_1) {
+  int arg_1 = 1;
+  uint2 res = uint2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube_array<uint, access::sample> tint_symbol_2) {
+  textureDimensions_22b5b6(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube_array<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texturecube_array<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_22b5b6(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texturecube_array<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_22b5b6(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/22b5b6.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/22b5b6.wgsl.expected.spvasm
new file mode 100644
index 0000000..dcffbd9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/22b5b6.wgsl.expected.spvasm
@@ -0,0 +1,86 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpCapability SampledCubeArray
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_22b5b6 "textureDimensions_22b5b6"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_int = OpTypePointer Function %int
+         %21 = OpConstantNull %int
+     %v2uint = OpTypeVector %uint 2
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %30 = OpConstantNull %v2uint
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_22b5b6 = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_int Function %21
+        %res = OpVariable %_ptr_Function_v2uint Function %30
+               OpStore %arg_1 %int_1
+         %26 = OpLoad %11 %arg_0
+         %27 = OpLoad %int %arg_1
+         %24 = OpImageQuerySizeLod %v3uint %26 %27
+         %22 = OpVectorShuffle %v2uint %24 %24 0 1
+               OpStore %res %22
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureDimensions_22b5b6
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureDimensions_22b5b6
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureDimensions_22b5b6
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/22b5b6.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/22b5b6.wgsl.expected.wgsl
new file mode 100644
index 0000000..268acda
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/22b5b6.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_cube_array<u32>;
+
+fn textureDimensions_22b5b6() {
+  var arg_1 = 1i;
+  var res : vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_22b5b6();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_22b5b6();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_22b5b6();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/24db07.wgsl b/test/tint/builtins/gen/var/textureDimensions/24db07.wgsl
new file mode 100644
index 0000000..feef6f2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/24db07.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d<f32>;
+
+// fn textureDimensions(texture: texture_2d<f32>) -> vec2<u32>
+fn textureDimensions_24db07() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_24db07();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_24db07();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_24db07();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/24db07.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/24db07.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..d27a502
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/24db07.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_24db07() {
+  int2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_24db07();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_24db07();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_24db07();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/24db07.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/24db07.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..d27a502
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/24db07.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_24db07() {
+  int2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_24db07();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_24db07();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_24db07();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/24db07.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/24db07.wgsl.expected.glsl
new file mode 100644
index 0000000..b48ef53
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/24db07.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp sampler2D arg_0_1;
+void textureDimensions_24db07() {
+  uvec2 res = uvec2(textureSize(arg_0_1, 0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_24db07();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2D arg_0_1;
+void textureDimensions_24db07() {
+  uvec2 res = uvec2(textureSize(arg_0_1, 0));
+}
+
+void fragment_main() {
+  textureDimensions_24db07();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2D arg_0_1;
+void textureDimensions_24db07() {
+  uvec2 res = uvec2(textureSize(arg_0_1, 0));
+}
+
+void compute_main() {
+  textureDimensions_24db07();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/24db07.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/24db07.wgsl.expected.msl
new file mode 100644
index 0000000..1575e42
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/24db07.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_24db07(texture2d<float, access::sample> tint_symbol_1) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::sample> tint_symbol_2) {
+  textureDimensions_24db07(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_24db07(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_24db07(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/24db07.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/24db07.wgsl.expected.spvasm
new file mode 100644
index 0000000..855ef0b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/24db07.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_24db07 "textureDimensions_24db07"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+        %int = OpTypeInt 32 1
+      %int_0 = OpConstant %int 0
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %24 = OpConstantNull %v2uint
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_24db07 = OpFunction %void None %12
+         %15 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %24
+         %19 = OpLoad %11 %arg_0
+         %16 = OpImageQuerySizeLod %v2uint %19 %int_0
+               OpStore %res %16
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %textureDimensions_24db07
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureDimensions_24db07
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureDimensions_24db07
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/24db07.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/24db07.wgsl.expected.wgsl
new file mode 100644
index 0000000..28f4077
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/24db07.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_2d<f32>;
+
+fn textureDimensions_24db07() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_24db07();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_24db07();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_24db07();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/2674d8.wgsl b/test/tint/builtins/gen/var/textureDimensions/2674d8.wgsl
new file mode 100644
index 0000000..95cac6e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/2674d8.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32uint, write>;
+
+// fn textureDimensions(texture: texture_storage_2d_array<rg32uint, write>) -> vec2<u32>
+fn textureDimensions_2674d8() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_2674d8();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_2674d8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_2674d8();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/2674d8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/2674d8.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b619638
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/2674d8.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureDimensions_2674d8() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_2674d8();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_2674d8();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_2674d8();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/2674d8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/2674d8.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b619638
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/2674d8.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureDimensions_2674d8() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_2674d8();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_2674d8();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_2674d8();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/2674d8.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/2674d8.wgsl.expected.glsl
new file mode 100644
index 0000000..6c4d034
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/2674d8.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32ui) uniform highp writeonly uimage2DArray arg_0;
+void textureDimensions_2674d8() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+}
+
+vec4 vertex_main() {
+  textureDimensions_2674d8();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rg32ui) uniform highp writeonly uimage2DArray arg_0;
+void textureDimensions_2674d8() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+}
+
+void fragment_main() {
+  textureDimensions_2674d8();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32ui) uniform highp writeonly uimage2DArray arg_0;
+void textureDimensions_2674d8() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+}
+
+void compute_main() {
+  textureDimensions_2674d8();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/2674d8.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/2674d8.wgsl.expected.msl
new file mode 100644
index 0000000..b367114
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/2674d8.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_2674d8(texture2d_array<uint, access::write> tint_symbol_1) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::write> tint_symbol_2) {
+  textureDimensions_2674d8(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_2674d8(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_2674d8(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/2674d8.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/2674d8.wgsl.expected.spvasm
new file mode 100644
index 0000000..3b8b2fe
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/2674d8.wgsl.expected.spvasm
@@ -0,0 +1,79 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_2674d8 "textureDimensions_2674d8"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 Rg32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %v2uint = OpTypeVector %uint 2
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %24 = OpConstantNull %v2uint
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_2674d8 = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %24
+         %21 = OpLoad %11 %arg_0
+         %19 = OpImageQuerySize %v3uint %21
+         %17 = OpVectorShuffle %v2uint %19 %19 0 1
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %textureDimensions_2674d8
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureDimensions_2674d8
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureDimensions_2674d8
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/2674d8.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/2674d8.wgsl.expected.wgsl
new file mode 100644
index 0000000..2ece5a6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/2674d8.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32uint, write>;
+
+fn textureDimensions_2674d8() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_2674d8();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_2674d8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_2674d8();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/267788.wgsl b/test/tint/builtins/gen/var/textureDimensions/267788.wgsl
deleted file mode 100644
index 7bd5dbe..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/267788.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_2d_array<u32>;
-
-// fn textureDimensions(texture: texture_2d_array<u32>, level: i32) -> vec2<i32>
-fn textureDimensions_267788() {
-  var arg_1 = 1i;
-  var res: vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_267788();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_267788();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_267788();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/267788.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/267788.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 8fbc832..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/267788.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-Texture2DArray<uint4> arg_0 : register(t0, space1);
-
-void textureDimensions_267788() {
-  int arg_1 = 1;
-  int4 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_267788();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_267788();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_267788();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/267788.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/267788.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 8fbc832..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/267788.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-Texture2DArray<uint4> arg_0 : register(t0, space1);
-
-void textureDimensions_267788() {
-  int arg_1 = 1;
-  int4 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_267788();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_267788();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_267788();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/267788.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/267788.wgsl.expected.glsl
deleted file mode 100644
index 70e8cb1..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/267788.wgsl.expected.glsl
+++ /dev/null
@@ -1,55 +0,0 @@
-#version 310 es
-
-uniform highp usampler2DArray arg_0_1;
-void textureDimensions_267788() {
-  int arg_1 = 1;
-  ivec2 res = textureSize(arg_0_1, arg_1).xy;
-}
-
-vec4 vertex_main() {
-  textureDimensions_267788();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-uniform highp usampler2DArray arg_0_1;
-void textureDimensions_267788() {
-  int arg_1 = 1;
-  ivec2 res = textureSize(arg_0_1, arg_1).xy;
-}
-
-void fragment_main() {
-  textureDimensions_267788();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-uniform highp usampler2DArray arg_0_1;
-void textureDimensions_267788() {
-  int arg_1 = 1;
-  ivec2 res = textureSize(arg_0_1, arg_1).xy;
-}
-
-void compute_main() {
-  textureDimensions_267788();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/267788.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/267788.wgsl.expected.msl
deleted file mode 100644
index e129009..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/267788.wgsl.expected.msl
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_267788(texture2d_array<uint, access::sample> tint_symbol_1) {
-  int arg_1 = 1;
-  int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture2d_array<uint, access::sample> tint_symbol_2) {
-  textureDimensions_267788(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture2d_array<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture2d_array<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_267788(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture2d_array<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_267788(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/267788.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/267788.wgsl.expected.spvasm
deleted file mode 100644
index d3e1a3a..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/267788.wgsl.expected.spvasm
+++ /dev/null
@@ -1,85 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 45
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_267788 "textureDimensions_267788"
-               OpName %arg_1 "arg_1"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-       %uint = OpTypeInt 32 0
-         %11 = OpTypeImage %uint 2D 0 1 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %int_1 = OpConstant %int 1
-%_ptr_Function_int = OpTypePointer Function %int
-         %21 = OpConstantNull %int
-      %v2int = OpTypeVector %int 2
-      %v3int = OpTypeVector %int 3
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %30 = OpConstantNull %v2int
-         %31 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_267788 = OpFunction %void None %13
-         %16 = OpLabel
-      %arg_1 = OpVariable %_ptr_Function_int Function %21
-        %res = OpVariable %_ptr_Function_v2int Function %30
-               OpStore %arg_1 %int_1
-         %26 = OpLoad %11 %arg_0
-         %27 = OpLoad %int %arg_1
-         %24 = OpImageQuerySizeLod %v3int %26 %27
-         %22 = OpVectorShuffle %v2int %24 %24 0 1
-               OpStore %res %22
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %31
-         %33 = OpLabel
-         %34 = OpFunctionCall %void %textureDimensions_267788
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %36 = OpLabel
-         %37 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %37
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %40 = OpLabel
-         %41 = OpFunctionCall %void %textureDimensions_267788
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %43 = OpLabel
-         %44 = OpFunctionCall %void %textureDimensions_267788
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/267788.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/267788.wgsl.expected.wgsl
deleted file mode 100644
index 03a5c34..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/267788.wgsl.expected.wgsl
+++ /dev/null
@@ -1,22 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_2d_array<u32>;
-
-fn textureDimensions_267788() {
-  var arg_1 = 1i;
-  var res : vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_267788();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_267788();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_267788();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/26bdfa.wgsl b/test/tint/builtins/gen/var/textureDimensions/26bdfa.wgsl
deleted file mode 100644
index a1829c9..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/26bdfa.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_3d<f32>;
-
-// fn textureDimensions(texture: texture_3d<f32>, level: i32) -> vec3<i32>
-fn textureDimensions_26bdfa() {
-  var arg_1 = 1i;
-  var res: vec3<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_26bdfa();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_26bdfa();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_26bdfa();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/26bdfa.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/26bdfa.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 7344cc3..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/26bdfa.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-Texture3D<float4> arg_0 : register(t0, space1);
-
-void textureDimensions_26bdfa() {
-  int arg_1 = 1;
-  int4 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
-  int3 res = tint_tmp.xyz;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_26bdfa();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_26bdfa();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_26bdfa();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/26bdfa.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/26bdfa.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 7344cc3..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/26bdfa.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-Texture3D<float4> arg_0 : register(t0, space1);
-
-void textureDimensions_26bdfa() {
-  int arg_1 = 1;
-  int4 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
-  int3 res = tint_tmp.xyz;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_26bdfa();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_26bdfa();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_26bdfa();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/26bdfa.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/26bdfa.wgsl.expected.glsl
deleted file mode 100644
index 86cf2d9..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/26bdfa.wgsl.expected.glsl
+++ /dev/null
@@ -1,55 +0,0 @@
-#version 310 es
-
-uniform highp sampler3D arg_0_1;
-void textureDimensions_26bdfa() {
-  int arg_1 = 1;
-  ivec3 res = textureSize(arg_0_1, arg_1);
-}
-
-vec4 vertex_main() {
-  textureDimensions_26bdfa();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-uniform highp sampler3D arg_0_1;
-void textureDimensions_26bdfa() {
-  int arg_1 = 1;
-  ivec3 res = textureSize(arg_0_1, arg_1);
-}
-
-void fragment_main() {
-  textureDimensions_26bdfa();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-uniform highp sampler3D arg_0_1;
-void textureDimensions_26bdfa() {
-  int arg_1 = 1;
-  ivec3 res = textureSize(arg_0_1, arg_1);
-}
-
-void compute_main() {
-  textureDimensions_26bdfa();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/26bdfa.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/26bdfa.wgsl.expected.msl
deleted file mode 100644
index 5e81d10..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/26bdfa.wgsl.expected.msl
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_26bdfa(texture3d<float, access::sample> tint_symbol_1) {
-  int arg_1 = 1;
-  int3 res = int3(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1), tint_symbol_1.get_depth(arg_1));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture3d<float, access::sample> tint_symbol_2) {
-  textureDimensions_26bdfa(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture3d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture3d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_26bdfa(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture3d<float, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_26bdfa(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/26bdfa.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/26bdfa.wgsl.expected.spvasm
deleted file mode 100644
index 0da6ce6..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/26bdfa.wgsl.expected.spvasm
+++ /dev/null
@@ -1,82 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 42
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_26bdfa "textureDimensions_26bdfa"
-               OpName %arg_1 "arg_1"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-         %11 = OpTypeImage %float 3D 0 0 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %12 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %int_1 = OpConstant %int 1
-%_ptr_Function_int = OpTypePointer Function %int
-         %20 = OpConstantNull %int
-      %v3int = OpTypeVector %int 3
-%_ptr_Function_v3int = OpTypePointer Function %v3int
-         %27 = OpConstantNull %v3int
-         %28 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_26bdfa = OpFunction %void None %12
-         %15 = OpLabel
-      %arg_1 = OpVariable %_ptr_Function_int Function %20
-        %res = OpVariable %_ptr_Function_v3int Function %27
-               OpStore %arg_1 %int_1
-         %23 = OpLoad %11 %arg_0
-         %24 = OpLoad %int %arg_1
-         %21 = OpImageQuerySizeLod %v3int %23 %24
-               OpStore %res %21
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %28
-         %30 = OpLabel
-         %31 = OpFunctionCall %void %textureDimensions_26bdfa
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %12
-         %33 = OpLabel
-         %34 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %34
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %12
-         %37 = OpLabel
-         %38 = OpFunctionCall %void %textureDimensions_26bdfa
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %12
-         %40 = OpLabel
-         %41 = OpFunctionCall %void %textureDimensions_26bdfa
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/26bdfa.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/26bdfa.wgsl.expected.wgsl
deleted file mode 100644
index b854f98..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/26bdfa.wgsl.expected.wgsl
+++ /dev/null
@@ -1,22 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_3d<f32>;
-
-fn textureDimensions_26bdfa() {
-  var arg_1 = 1i;
-  var res : vec3<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_26bdfa();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_26bdfa();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_26bdfa();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/26d6bf.wgsl b/test/tint/builtins/gen/var/textureDimensions/26d6bf.wgsl
new file mode 100644
index 0000000..56b19de
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/26d6bf.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_1d<f32>;
+
+// fn textureDimensions(texture: texture_1d<f32>) -> u32
+fn textureDimensions_26d6bf() {
+  var res: u32 = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_26d6bf();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_26d6bf();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_26d6bf();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/26d6bf.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/26d6bf.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..3de8d27
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/26d6bf.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_26d6bf() {
+  int tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_26d6bf();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_26d6bf();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_26d6bf();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/26d6bf.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/26d6bf.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..3de8d27
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/26d6bf.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_26d6bf() {
+  int tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_26d6bf();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_26d6bf();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_26d6bf();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/26d6bf.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/26d6bf.wgsl.expected.glsl
new file mode 100644
index 0000000..d262540
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/26d6bf.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp sampler1D arg_0_1;
+void textureDimensions_26d6bf() {
+  uint res = uint(textureSize(arg_0_1, 0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_26d6bf();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'sampler1D' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp sampler1D arg_0_1;
+void textureDimensions_26d6bf() {
+  uint res = uint(textureSize(arg_0_1, 0));
+}
+
+void fragment_main() {
+  textureDimensions_26d6bf();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'sampler1D' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp sampler1D arg_0_1;
+void textureDimensions_26d6bf() {
+  uint res = uint(textureSize(arg_0_1, 0));
+}
+
+void compute_main() {
+  textureDimensions_26d6bf();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'sampler1D' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/26d6bf.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/26d6bf.wgsl.expected.msl
new file mode 100644
index 0000000..d8130b4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/26d6bf.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_26d6bf(texture1d<float, access::sample> tint_symbol_1) {
+  uint res = tint_symbol_1.get_width(0);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::sample> tint_symbol_2) {
+  textureDimensions_26d6bf(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_26d6bf(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_26d6bf(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/26d6bf.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/26d6bf.wgsl.expected.spvasm
new file mode 100644
index 0000000..47116b8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/26d6bf.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; Schema: 0
+               OpCapability Shader
+               OpCapability Sampled1D
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_26d6bf "textureDimensions_26d6bf"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 1D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+        %int = OpTypeInt 32 1
+      %int_0 = OpConstant %int 0
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %23 = OpConstantNull %uint
+         %24 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_26d6bf = OpFunction %void None %12
+         %15 = OpLabel
+        %res = OpVariable %_ptr_Function_uint Function %23
+         %18 = OpLoad %11 %arg_0
+         %16 = OpImageQuerySizeLod %uint %18 %int_0
+               OpStore %res %16
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %textureDimensions_26d6bf
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %29 = OpLabel
+         %30 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %30
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureDimensions_26d6bf
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureDimensions_26d6bf
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/26d6bf.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/26d6bf.wgsl.expected.wgsl
new file mode 100644
index 0000000..ba2a96a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/26d6bf.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_1d<f32>;
+
+fn textureDimensions_26d6bf() {
+  var res : u32 = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_26d6bf();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_26d6bf();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_26d6bf();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/26ef6c.wgsl b/test/tint/builtins/gen/var/textureDimensions/26ef6c.wgsl
deleted file mode 100644
index 4cde4c9..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/26ef6c.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8uint, write>;
-
-// fn textureDimensions(texture: texture_storage_2d_array<rgba8uint, write>) -> vec2<i32>
-fn textureDimensions_26ef6c() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_26ef6c();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_26ef6c();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_26ef6c();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/26ef6c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/26ef6c.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 7ccf32f..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/26ef6c.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2DArray<uint4> arg_0 : register(u0, space1);
-
-void textureDimensions_26ef6c() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_26ef6c();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_26ef6c();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_26ef6c();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/26ef6c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/26ef6c.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 7ccf32f..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/26ef6c.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2DArray<uint4> arg_0 : register(u0, space1);
-
-void textureDimensions_26ef6c() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_26ef6c();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_26ef6c();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_26ef6c();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/26ef6c.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/26ef6c.wgsl.expected.glsl
deleted file mode 100644
index dbdb178..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/26ef6c.wgsl.expected.glsl
+++ /dev/null
@@ -1,52 +0,0 @@
-#version 310 es
-
-layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0;
-void textureDimensions_26ef6c() {
-  ivec2 res = imageSize(arg_0).xy;
-}
-
-vec4 vertex_main() {
-  textureDimensions_26ef6c();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0;
-void textureDimensions_26ef6c() {
-  ivec2 res = imageSize(arg_0).xy;
-}
-
-void fragment_main() {
-  textureDimensions_26ef6c();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0;
-void textureDimensions_26ef6c() {
-  ivec2 res = imageSize(arg_0).xy;
-}
-
-void compute_main() {
-  textureDimensions_26ef6c();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/26ef6c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/26ef6c.wgsl.expected.msl
deleted file mode 100644
index ba9013a..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/26ef6c.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_26ef6c(texture2d_array<uint, access::write> tint_symbol_1) {
-  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture2d_array<uint, access::write> tint_symbol_2) {
-  textureDimensions_26ef6c(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture2d_array<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture2d_array<uint, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_26ef6c(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture2d_array<uint, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_26ef6c(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/26ef6c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/26ef6c.wgsl.expected.spvasm
deleted file mode 100644
index bd40e12..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/26ef6c.wgsl.expected.spvasm
+++ /dev/null
@@ -1,79 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 40
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_26ef6c "textureDimensions_26ef6c"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-       %uint = OpTypeInt 32 0
-         %11 = OpTypeImage %uint 2D 0 1 0 2 Rgba8ui
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %v2int = OpTypeVector %int 2
-      %v3int = OpTypeVector %int 3
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %25 = OpConstantNull %v2int
-         %26 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_26ef6c = OpFunction %void None %13
-         %16 = OpLabel
-        %res = OpVariable %_ptr_Function_v2int Function %25
-         %22 = OpLoad %11 %arg_0
-         %20 = OpImageQuerySize %v3int %22
-         %17 = OpVectorShuffle %v2int %20 %20 0 1
-               OpStore %res %17
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %26
-         %28 = OpLabel
-         %29 = OpFunctionCall %void %textureDimensions_26ef6c
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %31 = OpLabel
-         %32 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %32
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %35 = OpLabel
-         %36 = OpFunctionCall %void %textureDimensions_26ef6c
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %38 = OpLabel
-         %39 = OpFunctionCall %void %textureDimensions_26ef6c
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/26ef6c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/26ef6c.wgsl.expected.wgsl
deleted file mode 100644
index c0b495c..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/26ef6c.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8uint, write>;
-
-fn textureDimensions_26ef6c() {
-  var res : vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_26ef6c();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_26ef6c();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_26ef6c();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/2ad087.wgsl b/test/tint/builtins/gen/var/textureDimensions/2ad087.wgsl
deleted file mode 100644
index 593565b..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/2ad087.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d<rgba16sint, write>;
-
-// fn textureDimensions(texture: texture_storage_2d<rgba16sint, write>) -> vec2<i32>
-fn textureDimensions_2ad087() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_2ad087();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_2ad087();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_2ad087();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/2ad087.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/2ad087.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 33dee50..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/2ad087.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2D<int4> arg_0 : register(u0, space1);
-
-void textureDimensions_2ad087() {
-  int2 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
-  int2 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_2ad087();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_2ad087();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_2ad087();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/2ad087.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/2ad087.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 33dee50..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/2ad087.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2D<int4> arg_0 : register(u0, space1);
-
-void textureDimensions_2ad087() {
-  int2 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
-  int2 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_2ad087();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_2ad087();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_2ad087();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/2ad087.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/2ad087.wgsl.expected.glsl
deleted file mode 100644
index 90289b3..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/2ad087.wgsl.expected.glsl
+++ /dev/null
@@ -1,52 +0,0 @@
-#version 310 es
-
-layout(rgba16i) uniform highp writeonly iimage2D arg_0;
-void textureDimensions_2ad087() {
-  ivec2 res = imageSize(arg_0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_2ad087();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-layout(rgba16i) uniform highp writeonly iimage2D arg_0;
-void textureDimensions_2ad087() {
-  ivec2 res = imageSize(arg_0);
-}
-
-void fragment_main() {
-  textureDimensions_2ad087();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-layout(rgba16i) uniform highp writeonly iimage2D arg_0;
-void textureDimensions_2ad087() {
-  ivec2 res = imageSize(arg_0);
-}
-
-void compute_main() {
-  textureDimensions_2ad087();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/2ad087.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/2ad087.wgsl.expected.msl
deleted file mode 100644
index 011b3cb..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/2ad087.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_2ad087(texture2d<int, access::write> tint_symbol_1) {
-  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture2d<int, access::write> tint_symbol_2) {
-  textureDimensions_2ad087(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture2d<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture2d<int, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_2ad087(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture2d<int, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_2ad087(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/2ad087.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/2ad087.wgsl.expected.spvasm
deleted file mode 100644
index cb89db5..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/2ad087.wgsl.expected.spvasm
+++ /dev/null
@@ -1,76 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 37
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_2ad087 "textureDimensions_2ad087"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-        %int = OpTypeInt 32 1
-         %11 = OpTypeImage %int 2D 0 0 0 2 Rgba16i
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-      %v2int = OpTypeVector %int 2
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %22 = OpConstantNull %v2int
-         %23 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_2ad087 = OpFunction %void None %13
-         %16 = OpLabel
-        %res = OpVariable %_ptr_Function_v2int Function %22
-         %19 = OpLoad %11 %arg_0
-         %17 = OpImageQuerySize %v2int %19
-               OpStore %res %17
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %23
-         %25 = OpLabel
-         %26 = OpFunctionCall %void %textureDimensions_2ad087
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %28 = OpLabel
-         %29 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %29
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %32 = OpLabel
-         %33 = OpFunctionCall %void %textureDimensions_2ad087
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %35 = OpLabel
-         %36 = OpFunctionCall %void %textureDimensions_2ad087
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/2ad087.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/2ad087.wgsl.expected.wgsl
deleted file mode 100644
index e965a18..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/2ad087.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba16sint, write>;
-
-fn textureDimensions_2ad087() {
-  var res : vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_2ad087();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_2ad087();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_2ad087();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl b/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl
deleted file mode 100644
index 3b083d5..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2022 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_cube_array<i32>;
-
-// fn textureDimensions(texture: texture_cube_array<i32>, level: u32) -> vec2<i32>
-fn textureDimensions_2d4299() {
-  var arg_1 = 1u;
-  var res: vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_2d4299();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_2d4299();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_2d4299();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl.expected.dxc.hlsl
deleted file mode 100644
index c3e5b1a..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-TextureCubeArray<int4> arg_0 : register(t0, space1);
-
-void textureDimensions_2d4299() {
-  uint arg_1 = 1u;
-  int4 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_2d4299();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_2d4299();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_2d4299();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl.expected.fxc.hlsl
deleted file mode 100644
index c3e5b1a..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-TextureCubeArray<int4> arg_0 : register(t0, space1);
-
-void textureDimensions_2d4299() {
-  uint arg_1 = 1u;
-  int4 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_2d4299();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_2d4299();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_2d4299();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl.expected.glsl
deleted file mode 100644
index 3545ee2..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl.expected.glsl
+++ /dev/null
@@ -1,78 +0,0 @@
-SKIP: FAILED
-
-#version 310 es
-
-uniform highp isamplerCubeArray arg_0_1;
-void textureDimensions_2d4299() {
-  uint arg_1 = 1u;
-  ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
-}
-
-vec4 vertex_main() {
-  textureDimensions_2d4299();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'isamplerCubeArray' : Reserved word. 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision mediump float;
-
-uniform highp isamplerCubeArray arg_0_1;
-void textureDimensions_2d4299() {
-  uint arg_1 = 1u;
-  ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
-}
-
-void fragment_main() {
-  textureDimensions_2d4299();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:4: 'isamplerCubeArray' : Reserved word. 
-ERROR: 0:4: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-
-uniform highp isamplerCubeArray arg_0_1;
-void textureDimensions_2d4299() {
-  uint arg_1 = 1u;
-  ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
-}
-
-void compute_main() {
-  textureDimensions_2d4299();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'isamplerCubeArray' : Reserved word. 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl.expected.msl
deleted file mode 100644
index 2db62ef..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl.expected.msl
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_2d4299(texturecube_array<int, access::sample> tint_symbol_1) {
-  uint arg_1 = 1u;
-  int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texturecube_array<int, access::sample> tint_symbol_2) {
-  textureDimensions_2d4299(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texturecube_array<int, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texturecube_array<int, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_2d4299(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texturecube_array<int, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_2d4299(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl.expected.spvasm
deleted file mode 100644
index 2212170..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl.expected.spvasm
+++ /dev/null
@@ -1,86 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 45
-; Schema: 0
-               OpCapability Shader
-               OpCapability SampledCubeArray
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_2d4299 "textureDimensions_2d4299"
-               OpName %arg_1 "arg_1"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-        %int = OpTypeInt 32 1
-         %11 = OpTypeImage %int Cube 0 1 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-       %uint = OpTypeInt 32 0
-     %uint_1 = OpConstant %uint 1
-%_ptr_Function_uint = OpTypePointer Function %uint
-         %21 = OpConstantNull %uint
-      %v2int = OpTypeVector %int 2
-      %v3int = OpTypeVector %int 3
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %30 = OpConstantNull %v2int
-         %31 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_2d4299 = OpFunction %void None %13
-         %16 = OpLabel
-      %arg_1 = OpVariable %_ptr_Function_uint Function %21
-        %res = OpVariable %_ptr_Function_v2int Function %30
-               OpStore %arg_1 %uint_1
-         %26 = OpLoad %11 %arg_0
-         %27 = OpLoad %uint %arg_1
-         %24 = OpImageQuerySizeLod %v3int %26 %27
-         %22 = OpVectorShuffle %v2int %24 %24 0 1
-               OpStore %res %22
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %31
-         %33 = OpLabel
-         %34 = OpFunctionCall %void %textureDimensions_2d4299
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %36 = OpLabel
-         %37 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %37
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %40 = OpLabel
-         %41 = OpFunctionCall %void %textureDimensions_2d4299
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %43 = OpLabel
-         %44 = OpFunctionCall %void %textureDimensions_2d4299
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl.expected.wgsl
deleted file mode 100644
index 8ae3821..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/2d4299.wgsl.expected.wgsl
+++ /dev/null
@@ -1,22 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_cube_array<i32>;
-
-fn textureDimensions_2d4299() {
-  var arg_1 = 1u;
-  var res : vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_2d4299();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_2d4299();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_2d4299();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/2e443d.wgsl b/test/tint/builtins/gen/var/textureDimensions/2e443d.wgsl
new file mode 100644
index 0000000..2cbe988
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/2e443d.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d<i32>;
+
+// fn textureDimensions(texture: texture_2d<i32>, level: i32) -> vec2<u32>
+fn textureDimensions_2e443d() {
+  var arg_1 = 1i;
+  var res: vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_2e443d();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_2e443d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_2e443d();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/2e443d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/2e443d.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..4df28d4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/2e443d.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_2e443d() {
+  int arg_1 = 1;
+  int3 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_2e443d();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_2e443d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_2e443d();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/2e443d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/2e443d.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..4df28d4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/2e443d.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_2e443d() {
+  int arg_1 = 1;
+  int3 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_2e443d();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_2e443d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_2e443d();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/2e443d.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/2e443d.wgsl.expected.glsl
new file mode 100644
index 0000000..aee294a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/2e443d.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp isampler2D arg_0_1;
+void textureDimensions_2e443d() {
+  int arg_1 = 1;
+  uvec2 res = uvec2(textureSize(arg_0_1, arg_1));
+}
+
+vec4 vertex_main() {
+  textureDimensions_2e443d();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isampler2D arg_0_1;
+void textureDimensions_2e443d() {
+  int arg_1 = 1;
+  uvec2 res = uvec2(textureSize(arg_0_1, arg_1));
+}
+
+void fragment_main() {
+  textureDimensions_2e443d();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp isampler2D arg_0_1;
+void textureDimensions_2e443d() {
+  int arg_1 = 1;
+  uvec2 res = uvec2(textureSize(arg_0_1, arg_1));
+}
+
+void compute_main() {
+  textureDimensions_2e443d();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/2e443d.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/2e443d.wgsl.expected.msl
new file mode 100644
index 0000000..9753cf2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/2e443d.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_2e443d(texture2d<int, access::sample> tint_symbol_1) {
+  int arg_1 = 1;
+  uint2 res = uint2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::sample> tint_symbol_2) {
+  textureDimensions_2e443d(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<int, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_2e443d(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<int, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_2e443d(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/2e443d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/2e443d.wgsl.expected.spvasm
new file mode 100644
index 0000000..4e4329f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/2e443d.wgsl.expected.spvasm
@@ -0,0 +1,83 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_2e443d "textureDimensions_2e443d"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+      %int_1 = OpConstant %int 1
+%_ptr_Function_int = OpTypePointer Function %int
+         %20 = OpConstantNull %int
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %28 = OpConstantNull %v2uint
+         %29 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_2e443d = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_int Function %20
+        %res = OpVariable %_ptr_Function_v2uint Function %28
+               OpStore %arg_1 %int_1
+         %24 = OpLoad %11 %arg_0
+         %25 = OpLoad %int %arg_1
+         %21 = OpImageQuerySizeLod %v2uint %24 %25
+               OpStore %res %21
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureDimensions_2e443d
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %34 = OpLabel
+         %35 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %35
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureDimensions_2e443d
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureDimensions_2e443d
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/2e443d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/2e443d.wgsl.expected.wgsl
new file mode 100644
index 0000000..2ed54c0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/2e443d.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_2d<i32>;
+
+fn textureDimensions_2e443d() {
+  var arg_1 = 1i;
+  var res : vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_2e443d();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_2e443d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_2e443d();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/2efa05.wgsl b/test/tint/builtins/gen/var/textureDimensions/2efa05.wgsl
deleted file mode 100644
index f891ad8..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/2efa05.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_3d<u32>;
-
-// fn textureDimensions(texture: texture_3d<u32>, level: i32) -> vec3<i32>
-fn textureDimensions_2efa05() {
-  var arg_1 = 1i;
-  var res: vec3<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_2efa05();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_2efa05();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_2efa05();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/2efa05.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/2efa05.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 384aa47..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/2efa05.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-Texture3D<uint4> arg_0 : register(t0, space1);
-
-void textureDimensions_2efa05() {
-  int arg_1 = 1;
-  int4 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
-  int3 res = tint_tmp.xyz;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_2efa05();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_2efa05();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_2efa05();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/2efa05.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/2efa05.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 384aa47..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/2efa05.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-Texture3D<uint4> arg_0 : register(t0, space1);
-
-void textureDimensions_2efa05() {
-  int arg_1 = 1;
-  int4 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
-  int3 res = tint_tmp.xyz;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_2efa05();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_2efa05();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_2efa05();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/2efa05.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/2efa05.wgsl.expected.glsl
deleted file mode 100644
index 9b700e8..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/2efa05.wgsl.expected.glsl
+++ /dev/null
@@ -1,55 +0,0 @@
-#version 310 es
-
-uniform highp usampler3D arg_0_1;
-void textureDimensions_2efa05() {
-  int arg_1 = 1;
-  ivec3 res = textureSize(arg_0_1, arg_1);
-}
-
-vec4 vertex_main() {
-  textureDimensions_2efa05();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-uniform highp usampler3D arg_0_1;
-void textureDimensions_2efa05() {
-  int arg_1 = 1;
-  ivec3 res = textureSize(arg_0_1, arg_1);
-}
-
-void fragment_main() {
-  textureDimensions_2efa05();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-uniform highp usampler3D arg_0_1;
-void textureDimensions_2efa05() {
-  int arg_1 = 1;
-  ivec3 res = textureSize(arg_0_1, arg_1);
-}
-
-void compute_main() {
-  textureDimensions_2efa05();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/2efa05.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/2efa05.wgsl.expected.msl
deleted file mode 100644
index 5e9ecac..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/2efa05.wgsl.expected.msl
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_2efa05(texture3d<uint, access::sample> tint_symbol_1) {
-  int arg_1 = 1;
-  int3 res = int3(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1), tint_symbol_1.get_depth(arg_1));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture3d<uint, access::sample> tint_symbol_2) {
-  textureDimensions_2efa05(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture3d<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture3d<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_2efa05(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture3d<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_2efa05(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/2efa05.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/2efa05.wgsl.expected.spvasm
deleted file mode 100644
index 8be9992..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/2efa05.wgsl.expected.spvasm
+++ /dev/null
@@ -1,83 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 43
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_2efa05 "textureDimensions_2efa05"
-               OpName %arg_1 "arg_1"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-       %uint = OpTypeInt 32 0
-         %11 = OpTypeImage %uint 3D 0 0 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %int_1 = OpConstant %int 1
-%_ptr_Function_int = OpTypePointer Function %int
-         %21 = OpConstantNull %int
-      %v3int = OpTypeVector %int 3
-%_ptr_Function_v3int = OpTypePointer Function %v3int
-         %28 = OpConstantNull %v3int
-         %29 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_2efa05 = OpFunction %void None %13
-         %16 = OpLabel
-      %arg_1 = OpVariable %_ptr_Function_int Function %21
-        %res = OpVariable %_ptr_Function_v3int Function %28
-               OpStore %arg_1 %int_1
-         %24 = OpLoad %11 %arg_0
-         %25 = OpLoad %int %arg_1
-         %22 = OpImageQuerySizeLod %v3int %24 %25
-               OpStore %res %22
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %29
-         %31 = OpLabel
-         %32 = OpFunctionCall %void %textureDimensions_2efa05
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %34 = OpLabel
-         %35 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %35
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %38 = OpLabel
-         %39 = OpFunctionCall %void %textureDimensions_2efa05
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %41 = OpLabel
-         %42 = OpFunctionCall %void %textureDimensions_2efa05
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/2efa05.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/2efa05.wgsl.expected.wgsl
deleted file mode 100644
index dd955fc..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/2efa05.wgsl.expected.wgsl
+++ /dev/null
@@ -1,22 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_3d<u32>;
-
-fn textureDimensions_2efa05() {
-  var arg_1 = 1i;
-  var res : vec3<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_2efa05();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_2efa05();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_2efa05();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/2f289f.wgsl b/test/tint/builtins/gen/var/textureDimensions/2f289f.wgsl
deleted file mode 100644
index d5bbd86..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/2f289f.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_3d<r32sint, write>;
-
-// fn textureDimensions(texture: texture_storage_3d<r32sint, write>) -> vec3<i32>
-fn textureDimensions_2f289f() {
-  var res: vec3<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_2f289f();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_2f289f();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_2f289f();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/2f289f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/2f289f.wgsl.expected.dxc.hlsl
deleted file mode 100644
index b84004a..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/2f289f.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture3D<int4> arg_0 : register(u0, space1);
-
-void textureDimensions_2f289f() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int3 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_2f289f();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_2f289f();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_2f289f();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/2f289f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/2f289f.wgsl.expected.fxc.hlsl
deleted file mode 100644
index b84004a..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/2f289f.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture3D<int4> arg_0 : register(u0, space1);
-
-void textureDimensions_2f289f() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int3 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_2f289f();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_2f289f();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_2f289f();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/2f289f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/2f289f.wgsl.expected.glsl
deleted file mode 100644
index ecf5ce0..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/2f289f.wgsl.expected.glsl
+++ /dev/null
@@ -1,52 +0,0 @@
-#version 310 es
-
-layout(r32i) uniform highp writeonly iimage3D arg_0;
-void textureDimensions_2f289f() {
-  ivec3 res = imageSize(arg_0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_2f289f();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-layout(r32i) uniform highp writeonly iimage3D arg_0;
-void textureDimensions_2f289f() {
-  ivec3 res = imageSize(arg_0);
-}
-
-void fragment_main() {
-  textureDimensions_2f289f();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-layout(r32i) uniform highp writeonly iimage3D arg_0;
-void textureDimensions_2f289f() {
-  ivec3 res = imageSize(arg_0);
-}
-
-void compute_main() {
-  textureDimensions_2f289f();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/2f289f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/2f289f.wgsl.expected.msl
deleted file mode 100644
index a61bafe..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/2f289f.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_2f289f(texture3d<int, access::write> tint_symbol_1) {
-  int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture3d<int, access::write> tint_symbol_2) {
-  textureDimensions_2f289f(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture3d<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture3d<int, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_2f289f(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture3d<int, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_2f289f(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/2f289f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/2f289f.wgsl.expected.spvasm
deleted file mode 100644
index ae04243..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/2f289f.wgsl.expected.spvasm
+++ /dev/null
@@ -1,76 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 37
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_2f289f "textureDimensions_2f289f"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-        %int = OpTypeInt 32 1
-         %11 = OpTypeImage %int 3D 0 0 0 2 R32i
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-      %v3int = OpTypeVector %int 3
-%_ptr_Function_v3int = OpTypePointer Function %v3int
-         %22 = OpConstantNull %v3int
-         %23 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_2f289f = OpFunction %void None %13
-         %16 = OpLabel
-        %res = OpVariable %_ptr_Function_v3int Function %22
-         %19 = OpLoad %11 %arg_0
-         %17 = OpImageQuerySize %v3int %19
-               OpStore %res %17
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %23
-         %25 = OpLabel
-         %26 = OpFunctionCall %void %textureDimensions_2f289f
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %28 = OpLabel
-         %29 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %29
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %32 = OpLabel
-         %33 = OpFunctionCall %void %textureDimensions_2f289f
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %35 = OpLabel
-         %36 = OpFunctionCall %void %textureDimensions_2f289f
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/2f289f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/2f289f.wgsl.expected.wgsl
deleted file mode 100644
index 6895807..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/2f289f.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_3d<r32sint, write>;
-
-fn textureDimensions_2f289f() {
-  var res : vec3<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_2f289f();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_2f289f();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_2f289f();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/2fd2a4.wgsl b/test/tint/builtins/gen/var/textureDimensions/2fd2a4.wgsl
new file mode 100644
index 0000000..8da5c10
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/2fd2a4.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<f32>;
+
+// fn textureDimensions(texture: texture_2d_array<f32>, level: i32) -> vec2<u32>
+fn textureDimensions_2fd2a4() {
+  var arg_1 = 1i;
+  var res: vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_2fd2a4();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_2fd2a4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_2fd2a4();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/2fd2a4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/2fd2a4.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f5e25dd
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/2fd2a4.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_2fd2a4() {
+  int arg_1 = 1;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_2fd2a4();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_2fd2a4();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_2fd2a4();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/2fd2a4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/2fd2a4.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..f5e25dd
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/2fd2a4.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_2fd2a4() {
+  int arg_1 = 1;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_2fd2a4();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_2fd2a4();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_2fd2a4();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/2fd2a4.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/2fd2a4.wgsl.expected.glsl
new file mode 100644
index 0000000..d87ced8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/2fd2a4.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp sampler2DArray arg_0_1;
+void textureDimensions_2fd2a4() {
+  int arg_1 = 1;
+  uvec2 res = uvec2(textureSize(arg_0_1, arg_1).xy);
+}
+
+vec4 vertex_main() {
+  textureDimensions_2fd2a4();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_0_1;
+void textureDimensions_2fd2a4() {
+  int arg_1 = 1;
+  uvec2 res = uvec2(textureSize(arg_0_1, arg_1).xy);
+}
+
+void fragment_main() {
+  textureDimensions_2fd2a4();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2DArray arg_0_1;
+void textureDimensions_2fd2a4() {
+  int arg_1 = 1;
+  uvec2 res = uvec2(textureSize(arg_0_1, arg_1).xy);
+}
+
+void compute_main() {
+  textureDimensions_2fd2a4();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/2fd2a4.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/2fd2a4.wgsl.expected.msl
new file mode 100644
index 0000000..e088176
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/2fd2a4.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_2fd2a4(texture2d_array<float, access::sample> tint_symbol_1) {
+  int arg_1 = 1;
+  uint2 res = uint2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::sample> tint_symbol_2) {
+  textureDimensions_2fd2a4(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_2fd2a4(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_2fd2a4(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/2fd2a4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/2fd2a4.wgsl.expected.spvasm
new file mode 100644
index 0000000..75d5e5e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/2fd2a4.wgsl.expected.spvasm
@@ -0,0 +1,85 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_2fd2a4 "textureDimensions_2fd2a4"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_int = OpTypePointer Function %int
+         %20 = OpConstantNull %int
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %30 = OpConstantNull %v2uint
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_2fd2a4 = OpFunction %void None %12
+         %15 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_int Function %20
+        %res = OpVariable %_ptr_Function_v2uint Function %30
+               OpStore %arg_1 %int_1
+         %26 = OpLoad %11 %arg_0
+         %27 = OpLoad %int %arg_1
+         %24 = OpImageQuerySizeLod %v3uint %26 %27
+         %21 = OpVectorShuffle %v2uint %24 %24 0 1
+               OpStore %res %21
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureDimensions_2fd2a4
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureDimensions_2fd2a4
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureDimensions_2fd2a4
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/2fd2a4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/2fd2a4.wgsl.expected.wgsl
new file mode 100644
index 0000000..3935303
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/2fd2a4.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<f32>;
+
+fn textureDimensions_2fd2a4() {
+  var arg_1 = 1i;
+  var res : vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_2fd2a4();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_2fd2a4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_2fd2a4();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/2fe1cc.wgsl b/test/tint/builtins/gen/var/textureDimensions/2fe1cc.wgsl
deleted file mode 100644
index 05f2b19..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/2fe1cc.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_2d<f32>;
-
-// fn textureDimensions(texture: texture_2d<f32>, level: i32) -> vec2<i32>
-fn textureDimensions_2fe1cc() {
-  var arg_1 = 1i;
-  var res: vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_2fe1cc();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_2fe1cc();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_2fe1cc();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/2fe1cc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/2fe1cc.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 26475cb..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/2fe1cc.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-Texture2D<float4> arg_0 : register(t0, space1);
-
-void textureDimensions_2fe1cc() {
-  int arg_1 = 1;
-  int3 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_2fe1cc();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_2fe1cc();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_2fe1cc();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/2fe1cc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/2fe1cc.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 26475cb..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/2fe1cc.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-Texture2D<float4> arg_0 : register(t0, space1);
-
-void textureDimensions_2fe1cc() {
-  int arg_1 = 1;
-  int3 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_2fe1cc();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_2fe1cc();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_2fe1cc();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/2fe1cc.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/2fe1cc.wgsl.expected.glsl
deleted file mode 100644
index 8460990..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/2fe1cc.wgsl.expected.glsl
+++ /dev/null
@@ -1,55 +0,0 @@
-#version 310 es
-
-uniform highp sampler2D arg_0_1;
-void textureDimensions_2fe1cc() {
-  int arg_1 = 1;
-  ivec2 res = textureSize(arg_0_1, arg_1);
-}
-
-vec4 vertex_main() {
-  textureDimensions_2fe1cc();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-uniform highp sampler2D arg_0_1;
-void textureDimensions_2fe1cc() {
-  int arg_1 = 1;
-  ivec2 res = textureSize(arg_0_1, arg_1);
-}
-
-void fragment_main() {
-  textureDimensions_2fe1cc();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-uniform highp sampler2D arg_0_1;
-void textureDimensions_2fe1cc() {
-  int arg_1 = 1;
-  ivec2 res = textureSize(arg_0_1, arg_1);
-}
-
-void compute_main() {
-  textureDimensions_2fe1cc();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/2fe1cc.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/2fe1cc.wgsl.expected.msl
deleted file mode 100644
index 539fabc..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/2fe1cc.wgsl.expected.msl
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_2fe1cc(texture2d<float, access::sample> tint_symbol_1) {
-  int arg_1 = 1;
-  int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture2d<float, access::sample> tint_symbol_2) {
-  textureDimensions_2fe1cc(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture2d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture2d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_2fe1cc(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture2d<float, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_2fe1cc(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/2fe1cc.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/2fe1cc.wgsl.expected.spvasm
deleted file mode 100644
index a7be6be..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/2fe1cc.wgsl.expected.spvasm
+++ /dev/null
@@ -1,82 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 42
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_2fe1cc "textureDimensions_2fe1cc"
-               OpName %arg_1 "arg_1"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-         %11 = OpTypeImage %float 2D 0 0 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %12 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %int_1 = OpConstant %int 1
-%_ptr_Function_int = OpTypePointer Function %int
-         %20 = OpConstantNull %int
-      %v2int = OpTypeVector %int 2
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %27 = OpConstantNull %v2int
-         %28 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_2fe1cc = OpFunction %void None %12
-         %15 = OpLabel
-      %arg_1 = OpVariable %_ptr_Function_int Function %20
-        %res = OpVariable %_ptr_Function_v2int Function %27
-               OpStore %arg_1 %int_1
-         %23 = OpLoad %11 %arg_0
-         %24 = OpLoad %int %arg_1
-         %21 = OpImageQuerySizeLod %v2int %23 %24
-               OpStore %res %21
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %28
-         %30 = OpLabel
-         %31 = OpFunctionCall %void %textureDimensions_2fe1cc
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %12
-         %33 = OpLabel
-         %34 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %34
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %12
-         %37 = OpLabel
-         %38 = OpFunctionCall %void %textureDimensions_2fe1cc
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %12
-         %40 = OpLabel
-         %41 = OpFunctionCall %void %textureDimensions_2fe1cc
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/2fe1cc.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/2fe1cc.wgsl.expected.wgsl
deleted file mode 100644
index 3a5bc62..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/2fe1cc.wgsl.expected.wgsl
+++ /dev/null
@@ -1,22 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_2d<f32>;
-
-fn textureDimensions_2fe1cc() {
-  var arg_1 = 1i;
-  var res : vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_2fe1cc();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_2fe1cc();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_2fe1cc();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/31799c.wgsl b/test/tint/builtins/gen/var/textureDimensions/31799c.wgsl
new file mode 100644
index 0000000..ac10c7f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/31799c.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<r32uint, write>;
+
+// fn textureDimensions(texture: texture_storage_3d<r32uint, write>) -> vec3<u32>
+fn textureDimensions_31799c() {
+  var res: vec3<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_31799c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_31799c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_31799c();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/31799c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/31799c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..35f842f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/31799c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<uint4> arg_0 : register(u0, space1);
+
+void textureDimensions_31799c() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_31799c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_31799c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_31799c();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/31799c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/31799c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..35f842f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/31799c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<uint4> arg_0 : register(u0, space1);
+
+void textureDimensions_31799c() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_31799c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_31799c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_31799c();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/31799c.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/31799c.wgsl.expected.glsl
new file mode 100644
index 0000000..f9e44f9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/31799c.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(r32ui) uniform highp writeonly uimage3D arg_0;
+void textureDimensions_31799c() {
+  uvec3 res = uvec3(imageSize(arg_0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_31799c();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(r32ui) uniform highp writeonly uimage3D arg_0;
+void textureDimensions_31799c() {
+  uvec3 res = uvec3(imageSize(arg_0));
+}
+
+void fragment_main() {
+  textureDimensions_31799c();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(r32ui) uniform highp writeonly uimage3D arg_0;
+void textureDimensions_31799c() {
+  uvec3 res = uvec3(imageSize(arg_0));
+}
+
+void compute_main() {
+  textureDimensions_31799c();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/31799c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/31799c.wgsl.expected.msl
new file mode 100644
index 0000000..2636a9f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/31799c.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_31799c(texture3d<uint, access::write> tint_symbol_1) {
+  uint3 res = uint3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<uint, access::write> tint_symbol_2) {
+  textureDimensions_31799c(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_31799c(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture3d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_31799c(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/31799c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/31799c.wgsl.expected.spvasm
new file mode 100644
index 0000000..95189a1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/31799c.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_31799c "textureDimensions_31799c"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 3D 0 0 0 2 R32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+         %22 = OpConstantNull %v3uint
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_31799c = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_v3uint Function %22
+         %19 = OpLoad %11 %arg_0
+         %17 = OpImageQuerySize %v3uint %19
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %textureDimensions_31799c
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %28 = OpLabel
+         %29 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %29
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_31799c
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureDimensions_31799c
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/31799c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/31799c.wgsl.expected.wgsl
new file mode 100644
index 0000000..9fdcfa9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/31799c.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_3d<r32uint, write>;
+
+fn textureDimensions_31799c() {
+  var res : vec3<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_31799c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_31799c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_31799c();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/318ecc.wgsl b/test/tint/builtins/gen/var/textureDimensions/318ecc.wgsl
deleted file mode 100644
index dd4bfd1..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/318ecc.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_1d<rgba16uint, write>;
-
-// fn textureDimensions(texture: texture_storage_1d<rgba16uint, write>) -> i32
-fn textureDimensions_318ecc() {
-  var res: i32 = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_318ecc();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_318ecc();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_318ecc();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/318ecc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/318ecc.wgsl.expected.dxc.hlsl
deleted file mode 100644
index bc9b732..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/318ecc.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture1D<uint4> arg_0 : register(u0, space1);
-
-void textureDimensions_318ecc() {
-  int tint_tmp;
-  arg_0.GetDimensions(tint_tmp);
-  int res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_318ecc();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_318ecc();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_318ecc();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/318ecc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/318ecc.wgsl.expected.fxc.hlsl
deleted file mode 100644
index bc9b732..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/318ecc.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture1D<uint4> arg_0 : register(u0, space1);
-
-void textureDimensions_318ecc() {
-  int tint_tmp;
-  arg_0.GetDimensions(tint_tmp);
-  int res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_318ecc();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_318ecc();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_318ecc();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/318ecc.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/318ecc.wgsl.expected.glsl
deleted file mode 100644
index 078e8b3..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/318ecc.wgsl.expected.glsl
+++ /dev/null
@@ -1,78 +0,0 @@
-SKIP: FAILED
-
-#version 310 es
-
-layout(rgba16ui) uniform highp writeonly uimage1D arg_0;
-void textureDimensions_318ecc() {
-  int res = imageSize(arg_0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_318ecc();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'uimage1D' : Reserved word. 
-WARNING: 0:3: 'layout' : useless application of layout qualifier 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision mediump float;
-
-layout(rgba16ui) uniform highp writeonly uimage1D arg_0;
-void textureDimensions_318ecc() {
-  int res = imageSize(arg_0);
-}
-
-void fragment_main() {
-  textureDimensions_318ecc();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:4: 'uimage1D' : Reserved word. 
-WARNING: 0:4: 'layout' : useless application of layout qualifier 
-ERROR: 0:4: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-
-layout(rgba16ui) uniform highp writeonly uimage1D arg_0;
-void textureDimensions_318ecc() {
-  int res = imageSize(arg_0);
-}
-
-void compute_main() {
-  textureDimensions_318ecc();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'uimage1D' : Reserved word. 
-WARNING: 0:3: 'layout' : useless application of layout qualifier 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/318ecc.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/318ecc.wgsl.expected.msl
deleted file mode 100644
index a9655f5..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/318ecc.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_318ecc(texture1d<uint, access::write> tint_symbol_1) {
-  int res = int(tint_symbol_1.get_width(0));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture1d<uint, access::write> tint_symbol_2) {
-  textureDimensions_318ecc(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture1d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture1d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_318ecc(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture1d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_318ecc(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/318ecc.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/318ecc.wgsl.expected.spvasm
deleted file mode 100644
index c65dba9..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/318ecc.wgsl.expected.spvasm
+++ /dev/null
@@ -1,77 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 37
-; Schema: 0
-               OpCapability Shader
-               OpCapability Image1D
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_318ecc "textureDimensions_318ecc"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-       %uint = OpTypeInt 32 0
-         %11 = OpTypeImage %uint 1D 0 0 0 2 Rgba16ui
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-%_ptr_Function_int = OpTypePointer Function %int
-         %22 = OpConstantNull %int
-         %23 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_318ecc = OpFunction %void None %13
-         %16 = OpLabel
-        %res = OpVariable %_ptr_Function_int Function %22
-         %19 = OpLoad %11 %arg_0
-         %17 = OpImageQuerySize %int %19
-               OpStore %res %17
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %23
-         %25 = OpLabel
-         %26 = OpFunctionCall %void %textureDimensions_318ecc
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %28 = OpLabel
-         %29 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %29
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %32 = OpLabel
-         %33 = OpFunctionCall %void %textureDimensions_318ecc
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %35 = OpLabel
-         %36 = OpFunctionCall %void %textureDimensions_318ecc
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/318ecc.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/318ecc.wgsl.expected.wgsl
deleted file mode 100644
index 9a7028c..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/318ecc.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba16uint, write>;
-
-fn textureDimensions_318ecc() {
-  var res : i32 = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_318ecc();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_318ecc();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_318ecc();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/340d06.wgsl b/test/tint/builtins/gen/var/textureDimensions/340d06.wgsl
deleted file mode 100644
index df9309b..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/340d06.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_3d<r32uint, write>;
-
-// fn textureDimensions(texture: texture_storage_3d<r32uint, write>) -> vec3<i32>
-fn textureDimensions_340d06() {
-  var res: vec3<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_340d06();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_340d06();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_340d06();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/340d06.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/340d06.wgsl.expected.dxc.hlsl
deleted file mode 100644
index db01f68..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/340d06.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture3D<uint4> arg_0 : register(u0, space1);
-
-void textureDimensions_340d06() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int3 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_340d06();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_340d06();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_340d06();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/340d06.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/340d06.wgsl.expected.fxc.hlsl
deleted file mode 100644
index db01f68..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/340d06.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture3D<uint4> arg_0 : register(u0, space1);
-
-void textureDimensions_340d06() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int3 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_340d06();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_340d06();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_340d06();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/340d06.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/340d06.wgsl.expected.glsl
deleted file mode 100644
index 78d4994..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/340d06.wgsl.expected.glsl
+++ /dev/null
@@ -1,52 +0,0 @@
-#version 310 es
-
-layout(r32ui) uniform highp writeonly uimage3D arg_0;
-void textureDimensions_340d06() {
-  ivec3 res = imageSize(arg_0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_340d06();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-layout(r32ui) uniform highp writeonly uimage3D arg_0;
-void textureDimensions_340d06() {
-  ivec3 res = imageSize(arg_0);
-}
-
-void fragment_main() {
-  textureDimensions_340d06();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-layout(r32ui) uniform highp writeonly uimage3D arg_0;
-void textureDimensions_340d06() {
-  ivec3 res = imageSize(arg_0);
-}
-
-void compute_main() {
-  textureDimensions_340d06();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/340d06.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/340d06.wgsl.expected.msl
deleted file mode 100644
index eb04eb8..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/340d06.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_340d06(texture3d<uint, access::write> tint_symbol_1) {
-  int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture3d<uint, access::write> tint_symbol_2) {
-  textureDimensions_340d06(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture3d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture3d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_340d06(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture3d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_340d06(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/340d06.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/340d06.wgsl.expected.spvasm
deleted file mode 100644
index c58da9b..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/340d06.wgsl.expected.spvasm
+++ /dev/null
@@ -1,77 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 38
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_340d06 "textureDimensions_340d06"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-       %uint = OpTypeInt 32 0
-         %11 = OpTypeImage %uint 3D 0 0 0 2 R32ui
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %v3int = OpTypeVector %int 3
-%_ptr_Function_v3int = OpTypePointer Function %v3int
-         %23 = OpConstantNull %v3int
-         %24 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_340d06 = OpFunction %void None %13
-         %16 = OpLabel
-        %res = OpVariable %_ptr_Function_v3int Function %23
-         %20 = OpLoad %11 %arg_0
-         %17 = OpImageQuerySize %v3int %20
-               OpStore %res %17
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %24
-         %26 = OpLabel
-         %27 = OpFunctionCall %void %textureDimensions_340d06
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %29 = OpLabel
-         %30 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %30
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %33 = OpLabel
-         %34 = OpFunctionCall %void %textureDimensions_340d06
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %36 = OpLabel
-         %37 = OpFunctionCall %void %textureDimensions_340d06
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/340d06.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/340d06.wgsl.expected.wgsl
deleted file mode 100644
index 99bca2d..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/340d06.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_3d<r32uint, write>;
-
-fn textureDimensions_340d06() {
-  var res : vec3<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_340d06();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_340d06();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_340d06();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/346fee.wgsl b/test/tint/builtins/gen/var/textureDimensions/346fee.wgsl
new file mode 100644
index 0000000..b13043f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/346fee.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube_array<u32>;
+
+// fn textureDimensions(texture: texture_cube_array<u32>, level: u32) -> vec2<u32>
+fn textureDimensions_346fee() {
+  var arg_1 = 1u;
+  var res: vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_346fee();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_346fee();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_346fee();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/346fee.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/346fee.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..6bf97f1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/346fee.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+TextureCubeArray<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_346fee() {
+  uint arg_1 = 1u;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_346fee();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_346fee();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_346fee();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/346fee.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/346fee.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6bf97f1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/346fee.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+TextureCubeArray<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_346fee() {
+  uint arg_1 = 1u;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_346fee();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_346fee();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_346fee();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/346fee.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/346fee.wgsl.expected.glsl
new file mode 100644
index 0000000..713c960
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/346fee.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp usamplerCubeArray arg_0_1;
+void textureDimensions_346fee() {
+  uint arg_1 = 1u;
+  uvec2 res = uvec2(textureSize(arg_0_1, int(arg_1)).xy);
+}
+
+vec4 vertex_main() {
+  textureDimensions_346fee();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'usamplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp usamplerCubeArray arg_0_1;
+void textureDimensions_346fee() {
+  uint arg_1 = 1u;
+  uvec2 res = uvec2(textureSize(arg_0_1, int(arg_1)).xy);
+}
+
+void fragment_main() {
+  textureDimensions_346fee();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'usamplerCubeArray' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp usamplerCubeArray arg_0_1;
+void textureDimensions_346fee() {
+  uint arg_1 = 1u;
+  uvec2 res = uvec2(textureSize(arg_0_1, int(arg_1)).xy);
+}
+
+void compute_main() {
+  textureDimensions_346fee();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'usamplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/346fee.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/346fee.wgsl.expected.msl
new file mode 100644
index 0000000..52f884c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/346fee.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_346fee(texturecube_array<uint, access::sample> tint_symbol_1) {
+  uint arg_1 = 1u;
+  uint2 res = uint2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube_array<uint, access::sample> tint_symbol_2) {
+  textureDimensions_346fee(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube_array<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texturecube_array<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_346fee(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texturecube_array<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_346fee(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/346fee.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/346fee.wgsl.expected.spvasm
new file mode 100644
index 0000000..76366c5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/346fee.wgsl.expected.spvasm
@@ -0,0 +1,85 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+               OpCapability Shader
+               OpCapability SampledCubeArray
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_346fee "textureDimensions_346fee"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %20 = OpConstantNull %uint
+     %v2uint = OpTypeVector %uint 2
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %29 = OpConstantNull %v2uint
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_346fee = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %20
+        %res = OpVariable %_ptr_Function_v2uint Function %29
+               OpStore %arg_1 %uint_1
+         %25 = OpLoad %11 %arg_0
+         %26 = OpLoad %uint %arg_1
+         %23 = OpImageQuerySizeLod %v3uint %25 %26
+         %21 = OpVectorShuffle %v2uint %23 %23 0 1
+               OpStore %res %21
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_346fee
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureDimensions_346fee
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureDimensions_346fee
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/346fee.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/346fee.wgsl.expected.wgsl
new file mode 100644
index 0000000..49d81d1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/346fee.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_cube_array<u32>;
+
+fn textureDimensions_346fee() {
+  var arg_1 = 1u;
+  var res : vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_346fee();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_346fee();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_346fee();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/35a7e5.wgsl b/test/tint/builtins/gen/var/textureDimensions/35a7e5.wgsl
new file mode 100644
index 0000000..23512e5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/35a7e5.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba16uint, write>;
+
+// fn textureDimensions(texture: texture_storage_3d<rgba16uint, write>) -> vec3<u32>
+fn textureDimensions_35a7e5() {
+  var res: vec3<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_35a7e5();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_35a7e5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_35a7e5();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/35a7e5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/35a7e5.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..89ff223
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/35a7e5.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<uint4> arg_0 : register(u0, space1);
+
+void textureDimensions_35a7e5() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_35a7e5();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_35a7e5();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_35a7e5();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/35a7e5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/35a7e5.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..89ff223
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/35a7e5.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<uint4> arg_0 : register(u0, space1);
+
+void textureDimensions_35a7e5() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_35a7e5();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_35a7e5();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_35a7e5();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/35a7e5.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/35a7e5.wgsl.expected.glsl
new file mode 100644
index 0000000..02d2d30
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/35a7e5.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba16ui) uniform highp writeonly uimage3D arg_0;
+void textureDimensions_35a7e5() {
+  uvec3 res = uvec3(imageSize(arg_0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_35a7e5();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba16ui) uniform highp writeonly uimage3D arg_0;
+void textureDimensions_35a7e5() {
+  uvec3 res = uvec3(imageSize(arg_0));
+}
+
+void fragment_main() {
+  textureDimensions_35a7e5();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba16ui) uniform highp writeonly uimage3D arg_0;
+void textureDimensions_35a7e5() {
+  uvec3 res = uvec3(imageSize(arg_0));
+}
+
+void compute_main() {
+  textureDimensions_35a7e5();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/35a7e5.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/35a7e5.wgsl.expected.msl
new file mode 100644
index 0000000..5e7177a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/35a7e5.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_35a7e5(texture3d<uint, access::write> tint_symbol_1) {
+  uint3 res = uint3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<uint, access::write> tint_symbol_2) {
+  textureDimensions_35a7e5(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_35a7e5(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture3d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_35a7e5(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/35a7e5.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/35a7e5.wgsl.expected.spvasm
new file mode 100644
index 0000000..9c6fd1b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/35a7e5.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_35a7e5 "textureDimensions_35a7e5"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 3D 0 0 0 2 Rgba16ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+         %22 = OpConstantNull %v3uint
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_35a7e5 = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_v3uint Function %22
+         %19 = OpLoad %11 %arg_0
+         %17 = OpImageQuerySize %v3uint %19
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %textureDimensions_35a7e5
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %28 = OpLabel
+         %29 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %29
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_35a7e5
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureDimensions_35a7e5
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/35a7e5.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/35a7e5.wgsl.expected.wgsl
new file mode 100644
index 0000000..bea8f76
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/35a7e5.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba16uint, write>;
+
+fn textureDimensions_35a7e5() {
+  var res : vec3<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_35a7e5();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_35a7e5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_35a7e5();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/35ee69.wgsl b/test/tint/builtins/gen/var/textureDimensions/35ee69.wgsl
new file mode 100644
index 0000000..b63e75f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/35ee69.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rg32uint, write>;
+
+// fn textureDimensions(texture: texture_storage_3d<rg32uint, write>) -> vec3<u32>
+fn textureDimensions_35ee69() {
+  var res: vec3<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_35ee69();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_35ee69();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_35ee69();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/35ee69.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/35ee69.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9880c32
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/35ee69.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<uint4> arg_0 : register(u0, space1);
+
+void textureDimensions_35ee69() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_35ee69();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_35ee69();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_35ee69();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/35ee69.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/35ee69.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9880c32
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/35ee69.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<uint4> arg_0 : register(u0, space1);
+
+void textureDimensions_35ee69() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_35ee69();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_35ee69();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_35ee69();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/35ee69.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/35ee69.wgsl.expected.glsl
new file mode 100644
index 0000000..a338d42
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/35ee69.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32ui) uniform highp writeonly uimage3D arg_0;
+void textureDimensions_35ee69() {
+  uvec3 res = uvec3(imageSize(arg_0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_35ee69();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rg32ui) uniform highp writeonly uimage3D arg_0;
+void textureDimensions_35ee69() {
+  uvec3 res = uvec3(imageSize(arg_0));
+}
+
+void fragment_main() {
+  textureDimensions_35ee69();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32ui) uniform highp writeonly uimage3D arg_0;
+void textureDimensions_35ee69() {
+  uvec3 res = uvec3(imageSize(arg_0));
+}
+
+void compute_main() {
+  textureDimensions_35ee69();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/35ee69.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/35ee69.wgsl.expected.msl
new file mode 100644
index 0000000..de21a7c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/35ee69.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_35ee69(texture3d<uint, access::write> tint_symbol_1) {
+  uint3 res = uint3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<uint, access::write> tint_symbol_2) {
+  textureDimensions_35ee69(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_35ee69(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture3d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_35ee69(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/35ee69.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/35ee69.wgsl.expected.spvasm
new file mode 100644
index 0000000..492a8e3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/35ee69.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_35ee69 "textureDimensions_35ee69"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 3D 0 0 0 2 Rg32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+         %22 = OpConstantNull %v3uint
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_35ee69 = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_v3uint Function %22
+         %19 = OpLoad %11 %arg_0
+         %17 = OpImageQuerySize %v3uint %19
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %textureDimensions_35ee69
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %28 = OpLabel
+         %29 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %29
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_35ee69
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureDimensions_35ee69
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/35ee69.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/35ee69.wgsl.expected.wgsl
new file mode 100644
index 0000000..3a1050d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/35ee69.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rg32uint, write>;
+
+fn textureDimensions_35ee69() {
+  var res : vec3<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_35ee69();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_35ee69();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_35ee69();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/378a65.wgsl b/test/tint/builtins/gen/var/textureDimensions/378a65.wgsl
new file mode 100644
index 0000000..b0ce2cc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/378a65.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba8sint, write>;
+
+// fn textureDimensions(texture: texture_storage_2d<rgba8sint, write>) -> vec2<u32>
+fn textureDimensions_378a65() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_378a65();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_378a65();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_378a65();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/378a65.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/378a65.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1782677
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/378a65.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<int4> arg_0 : register(u0, space1);
+
+void textureDimensions_378a65() {
+  int2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_378a65();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_378a65();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_378a65();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/378a65.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/378a65.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..1782677
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/378a65.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<int4> arg_0 : register(u0, space1);
+
+void textureDimensions_378a65() {
+  int2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_378a65();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_378a65();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_378a65();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/378a65.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/378a65.wgsl.expected.glsl
new file mode 100644
index 0000000..54d2060
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/378a65.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba8i) uniform highp writeonly iimage2D arg_0;
+void textureDimensions_378a65() {
+  uvec2 res = uvec2(imageSize(arg_0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_378a65();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba8i) uniform highp writeonly iimage2D arg_0;
+void textureDimensions_378a65() {
+  uvec2 res = uvec2(imageSize(arg_0));
+}
+
+void fragment_main() {
+  textureDimensions_378a65();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba8i) uniform highp writeonly iimage2D arg_0;
+void textureDimensions_378a65() {
+  uvec2 res = uvec2(imageSize(arg_0));
+}
+
+void compute_main() {
+  textureDimensions_378a65();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/378a65.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/378a65.wgsl.expected.msl
new file mode 100644
index 0000000..8db7c6e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/378a65.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_378a65(texture2d<int, access::write> tint_symbol_1) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::write> tint_symbol_2) {
+  textureDimensions_378a65(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_378a65(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_378a65(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/378a65.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/378a65.wgsl.expected.spvasm
new file mode 100644
index 0000000..e2429ce
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/378a65.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_378a65 "textureDimensions_378a65"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 0 0 2 Rgba8i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %23 = OpConstantNull %v2uint
+         %24 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_378a65 = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %23
+         %20 = OpLoad %11 %arg_0
+         %17 = OpImageQuerySize %v2uint %20
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %textureDimensions_378a65
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %29 = OpLabel
+         %30 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %30
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureDimensions_378a65
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureDimensions_378a65
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/378a65.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/378a65.wgsl.expected.wgsl
new file mode 100644
index 0000000..0400b2f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/378a65.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba8sint, write>;
+
+fn textureDimensions_378a65() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_378a65();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_378a65();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_378a65();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/382b16.wgsl b/test/tint/builtins/gen/var/textureDimensions/382b16.wgsl
new file mode 100644
index 0000000..099c025
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/382b16.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube<f32>;
+
+// fn textureDimensions(texture: texture_cube<f32>, level: u32) -> vec2<u32>
+fn textureDimensions_382b16() {
+  var arg_1 = 1u;
+  var res: vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_382b16();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_382b16();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_382b16();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/382b16.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/382b16.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..08a087b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/382b16.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+TextureCube<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_382b16() {
+  uint arg_1 = 1u;
+  int3 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_382b16();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_382b16();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_382b16();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/382b16.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/382b16.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..08a087b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/382b16.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+TextureCube<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_382b16() {
+  uint arg_1 = 1u;
+  int3 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_382b16();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_382b16();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_382b16();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/382b16.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/382b16.wgsl.expected.glsl
new file mode 100644
index 0000000..9141112
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/382b16.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp samplerCube arg_0_1;
+void textureDimensions_382b16() {
+  uint arg_1 = 1u;
+  uvec2 res = uvec2(textureSize(arg_0_1, int(arg_1)));
+}
+
+vec4 vertex_main() {
+  textureDimensions_382b16();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCube arg_0_1;
+void textureDimensions_382b16() {
+  uint arg_1 = 1u;
+  uvec2 res = uvec2(textureSize(arg_0_1, int(arg_1)));
+}
+
+void fragment_main() {
+  textureDimensions_382b16();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp samplerCube arg_0_1;
+void textureDimensions_382b16() {
+  uint arg_1 = 1u;
+  uvec2 res = uvec2(textureSize(arg_0_1, int(arg_1)));
+}
+
+void compute_main() {
+  textureDimensions_382b16();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/382b16.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/382b16.wgsl.expected.msl
new file mode 100644
index 0000000..117e519
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/382b16.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_382b16(texturecube<float, access::sample> tint_symbol_1) {
+  uint arg_1 = 1u;
+  uint2 res = uint2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube<float, access::sample> tint_symbol_2) {
+  textureDimensions_382b16(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texturecube<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_382b16(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texturecube<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_382b16(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/382b16.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/382b16.wgsl.expected.spvasm
new file mode 100644
index 0000000..7029638
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/382b16.wgsl.expected.spvasm
@@ -0,0 +1,82 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 42
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_382b16 "textureDimensions_382b16"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float Cube 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %20 = OpConstantNull %uint
+     %v2uint = OpTypeVector %uint 2
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %27 = OpConstantNull %v2uint
+         %28 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_382b16 = OpFunction %void None %12
+         %15 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %20
+        %res = OpVariable %_ptr_Function_v2uint Function %27
+               OpStore %arg_1 %uint_1
+         %23 = OpLoad %11 %arg_0
+         %24 = OpLoad %uint %arg_1
+         %21 = OpImageQuerySizeLod %v2uint %23 %24
+               OpStore %res %21
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %28
+         %30 = OpLabel
+         %31 = OpFunctionCall %void %textureDimensions_382b16
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %33 = OpLabel
+         %34 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %34
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureDimensions_382b16
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureDimensions_382b16
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/382b16.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/382b16.wgsl.expected.wgsl
new file mode 100644
index 0000000..85183e0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/382b16.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_cube<f32>;
+
+fn textureDimensions_382b16() {
+  var arg_1 = 1u;
+  var res : vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_382b16();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_382b16();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_382b16();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3963d0.wgsl b/test/tint/builtins/gen/var/textureDimensions/3963d0.wgsl
new file mode 100644
index 0000000..2e817b8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3963d0.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube_array<i32>;
+
+// fn textureDimensions(texture: texture_cube_array<i32>, level: u32) -> vec2<u32>
+fn textureDimensions_3963d0() {
+  var arg_1 = 1u;
+  var res: vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_3963d0();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_3963d0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_3963d0();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3963d0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/3963d0.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..68a795a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3963d0.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+TextureCubeArray<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_3963d0() {
+  uint arg_1 = 1u;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_3963d0();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_3963d0();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_3963d0();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3963d0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/3963d0.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..68a795a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3963d0.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+TextureCubeArray<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_3963d0() {
+  uint arg_1 = 1u;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_3963d0();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_3963d0();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_3963d0();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3963d0.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/3963d0.wgsl.expected.glsl
new file mode 100644
index 0000000..2d0bfef
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3963d0.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp isamplerCubeArray arg_0_1;
+void textureDimensions_3963d0() {
+  uint arg_1 = 1u;
+  uvec2 res = uvec2(textureSize(arg_0_1, int(arg_1)).xy);
+}
+
+vec4 vertex_main() {
+  textureDimensions_3963d0();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'isamplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp isamplerCubeArray arg_0_1;
+void textureDimensions_3963d0() {
+  uint arg_1 = 1u;
+  uvec2 res = uvec2(textureSize(arg_0_1, int(arg_1)).xy);
+}
+
+void fragment_main() {
+  textureDimensions_3963d0();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'isamplerCubeArray' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp isamplerCubeArray arg_0_1;
+void textureDimensions_3963d0() {
+  uint arg_1 = 1u;
+  uvec2 res = uvec2(textureSize(arg_0_1, int(arg_1)).xy);
+}
+
+void compute_main() {
+  textureDimensions_3963d0();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'isamplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/3963d0.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/3963d0.wgsl.expected.msl
new file mode 100644
index 0000000..297bcf7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3963d0.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_3963d0(texturecube_array<int, access::sample> tint_symbol_1) {
+  uint arg_1 = 1u;
+  uint2 res = uint2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube_array<int, access::sample> tint_symbol_2) {
+  textureDimensions_3963d0(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube_array<int, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texturecube_array<int, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_3963d0(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texturecube_array<int, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_3963d0(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/3963d0.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/3963d0.wgsl.expected.spvasm
new file mode 100644
index 0000000..2c7c7e5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3963d0.wgsl.expected.spvasm
@@ -0,0 +1,86 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpCapability SampledCubeArray
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_3963d0 "textureDimensions_3963d0"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %21 = OpConstantNull %uint
+     %v2uint = OpTypeVector %uint 2
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %30 = OpConstantNull %v2uint
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_3963d0 = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %21
+        %res = OpVariable %_ptr_Function_v2uint Function %30
+               OpStore %arg_1 %uint_1
+         %26 = OpLoad %11 %arg_0
+         %27 = OpLoad %uint %arg_1
+         %24 = OpImageQuerySizeLod %v3uint %26 %27
+         %22 = OpVectorShuffle %v2uint %24 %24 0 1
+               OpStore %res %22
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureDimensions_3963d0
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureDimensions_3963d0
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureDimensions_3963d0
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/3963d0.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/3963d0.wgsl.expected.wgsl
new file mode 100644
index 0000000..7fd6e98
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3963d0.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_cube_array<i32>;
+
+fn textureDimensions_3963d0() {
+  var arg_1 = 1u;
+  var res : vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_3963d0();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_3963d0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_3963d0();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/398e30.wgsl b/test/tint/builtins/gen/var/textureDimensions/398e30.wgsl
deleted file mode 100644
index f4c0975..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/398e30.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32uint, write>;
-
-// fn textureDimensions(texture: texture_storage_2d_array<rgba32uint, write>) -> vec2<i32>
-fn textureDimensions_398e30() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_398e30();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_398e30();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_398e30();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/398e30.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/398e30.wgsl.expected.dxc.hlsl
deleted file mode 100644
index ee95c58..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/398e30.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2DArray<uint4> arg_0 : register(u0, space1);
-
-void textureDimensions_398e30() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_398e30();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_398e30();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_398e30();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/398e30.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/398e30.wgsl.expected.fxc.hlsl
deleted file mode 100644
index ee95c58..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/398e30.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2DArray<uint4> arg_0 : register(u0, space1);
-
-void textureDimensions_398e30() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_398e30();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_398e30();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_398e30();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/398e30.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/398e30.wgsl.expected.glsl
deleted file mode 100644
index 6db6351..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/398e30.wgsl.expected.glsl
+++ /dev/null
@@ -1,52 +0,0 @@
-#version 310 es
-
-layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0;
-void textureDimensions_398e30() {
-  ivec2 res = imageSize(arg_0).xy;
-}
-
-vec4 vertex_main() {
-  textureDimensions_398e30();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0;
-void textureDimensions_398e30() {
-  ivec2 res = imageSize(arg_0).xy;
-}
-
-void fragment_main() {
-  textureDimensions_398e30();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0;
-void textureDimensions_398e30() {
-  ivec2 res = imageSize(arg_0).xy;
-}
-
-void compute_main() {
-  textureDimensions_398e30();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/398e30.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/398e30.wgsl.expected.msl
deleted file mode 100644
index 8de5617..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/398e30.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_398e30(texture2d_array<uint, access::write> tint_symbol_1) {
-  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture2d_array<uint, access::write> tint_symbol_2) {
-  textureDimensions_398e30(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture2d_array<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture2d_array<uint, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_398e30(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture2d_array<uint, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_398e30(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/398e30.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/398e30.wgsl.expected.spvasm
deleted file mode 100644
index 9339841..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/398e30.wgsl.expected.spvasm
+++ /dev/null
@@ -1,79 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 40
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_398e30 "textureDimensions_398e30"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-       %uint = OpTypeInt 32 0
-         %11 = OpTypeImage %uint 2D 0 1 0 2 Rgba32ui
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %v2int = OpTypeVector %int 2
-      %v3int = OpTypeVector %int 3
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %25 = OpConstantNull %v2int
-         %26 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_398e30 = OpFunction %void None %13
-         %16 = OpLabel
-        %res = OpVariable %_ptr_Function_v2int Function %25
-         %22 = OpLoad %11 %arg_0
-         %20 = OpImageQuerySize %v3int %22
-         %17 = OpVectorShuffle %v2int %20 %20 0 1
-               OpStore %res %17
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %26
-         %28 = OpLabel
-         %29 = OpFunctionCall %void %textureDimensions_398e30
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %31 = OpLabel
-         %32 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %32
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %35 = OpLabel
-         %36 = OpFunctionCall %void %textureDimensions_398e30
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %38 = OpLabel
-         %39 = OpFunctionCall %void %textureDimensions_398e30
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/398e30.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/398e30.wgsl.expected.wgsl
deleted file mode 100644
index 5deab7d..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/398e30.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32uint, write>;
-
-fn textureDimensions_398e30() {
-  var res : vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_398e30();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_398e30();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_398e30();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3a5bb1.wgsl b/test/tint/builtins/gen/var/textureDimensions/3a5bb1.wgsl
new file mode 100644
index 0000000..941dd1f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3a5bb1.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba32float, write>;
+
+// fn textureDimensions(texture: texture_storage_3d<rgba32float, write>) -> vec3<u32>
+fn textureDimensions_3a5bb1() {
+  var res: vec3<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_3a5bb1();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_3a5bb1();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_3a5bb1();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3a5bb1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/3a5bb1.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..634df9f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3a5bb1.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<float4> arg_0 : register(u0, space1);
+
+void textureDimensions_3a5bb1() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_3a5bb1();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_3a5bb1();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_3a5bb1();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3a5bb1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/3a5bb1.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..634df9f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3a5bb1.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<float4> arg_0 : register(u0, space1);
+
+void textureDimensions_3a5bb1() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_3a5bb1();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_3a5bb1();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_3a5bb1();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3a5bb1.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/3a5bb1.wgsl.expected.glsl
new file mode 100644
index 0000000..ca53343
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3a5bb1.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba32f) uniform highp writeonly image3D arg_0;
+void textureDimensions_3a5bb1() {
+  uvec3 res = uvec3(imageSize(arg_0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_3a5bb1();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba32f) uniform highp writeonly image3D arg_0;
+void textureDimensions_3a5bb1() {
+  uvec3 res = uvec3(imageSize(arg_0));
+}
+
+void fragment_main() {
+  textureDimensions_3a5bb1();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba32f) uniform highp writeonly image3D arg_0;
+void textureDimensions_3a5bb1() {
+  uvec3 res = uvec3(imageSize(arg_0));
+}
+
+void compute_main() {
+  textureDimensions_3a5bb1();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3a5bb1.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/3a5bb1.wgsl.expected.msl
new file mode 100644
index 0000000..0b128b7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3a5bb1.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_3a5bb1(texture3d<float, access::write> tint_symbol_1) {
+  uint3 res = uint3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::write> tint_symbol_2) {
+  textureDimensions_3a5bb1(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_3a5bb1(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture3d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_3a5bb1(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/3a5bb1.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/3a5bb1.wgsl.expected.spvasm
new file mode 100644
index 0000000..c804df1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3a5bb1.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_3a5bb1 "textureDimensions_3a5bb1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 3D 0 0 0 2 Rgba32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+         %22 = OpConstantNull %v3uint
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_3a5bb1 = OpFunction %void None %12
+         %15 = OpLabel
+        %res = OpVariable %_ptr_Function_v3uint Function %22
+         %19 = OpLoad %11 %arg_0
+         %16 = OpImageQuerySize %v3uint %19
+               OpStore %res %16
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %textureDimensions_3a5bb1
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %28 = OpLabel
+         %29 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %29
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_3a5bb1
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureDimensions_3a5bb1
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/3a5bb1.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/3a5bb1.wgsl.expected.wgsl
new file mode 100644
index 0000000..16c8913
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3a5bb1.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba32float, write>;
+
+fn textureDimensions_3a5bb1() {
+  var res : vec3<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_3a5bb1();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_3a5bb1();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_3a5bb1();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3a7b69.wgsl b/test/tint/builtins/gen/var/textureDimensions/3a7b69.wgsl
new file mode 100644
index 0000000..ad105d4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3a7b69.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8unorm, write>;
+
+// fn textureDimensions(texture: texture_storage_2d_array<rgba8unorm, write>) -> vec2<u32>
+fn textureDimensions_3a7b69() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_3a7b69();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_3a7b69();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_3a7b69();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3a7b69.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/3a7b69.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..c967a1f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3a7b69.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureDimensions_3a7b69() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_3a7b69();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_3a7b69();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_3a7b69();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3a7b69.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/3a7b69.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c967a1f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3a7b69.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureDimensions_3a7b69() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_3a7b69();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_3a7b69();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_3a7b69();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3a7b69.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/3a7b69.wgsl.expected.glsl
new file mode 100644
index 0000000..b9b2a19
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3a7b69.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba8) uniform highp writeonly image2DArray arg_0;
+void textureDimensions_3a7b69() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+}
+
+vec4 vertex_main() {
+  textureDimensions_3a7b69();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba8) uniform highp writeonly image2DArray arg_0;
+void textureDimensions_3a7b69() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+}
+
+void fragment_main() {
+  textureDimensions_3a7b69();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba8) uniform highp writeonly image2DArray arg_0;
+void textureDimensions_3a7b69() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+}
+
+void compute_main() {
+  textureDimensions_3a7b69();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3a7b69.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/3a7b69.wgsl.expected.msl
new file mode 100644
index 0000000..113dca5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3a7b69.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_3a7b69(texture2d_array<float, access::write> tint_symbol_1) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
+  textureDimensions_3a7b69(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_3a7b69(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_3a7b69(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/3a7b69.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/3a7b69.wgsl.expected.spvasm
new file mode 100644
index 0000000..8dbeda7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3a7b69.wgsl.expected.spvasm
@@ -0,0 +1,78 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_3a7b69 "textureDimensions_3a7b69"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %24 = OpConstantNull %v2uint
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_3a7b69 = OpFunction %void None %12
+         %15 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %24
+         %21 = OpLoad %11 %arg_0
+         %19 = OpImageQuerySize %v3uint %21
+         %16 = OpVectorShuffle %v2uint %19 %19 0 1
+               OpStore %res %16
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %textureDimensions_3a7b69
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureDimensions_3a7b69
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureDimensions_3a7b69
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/3a7b69.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/3a7b69.wgsl.expected.wgsl
new file mode 100644
index 0000000..7267529
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3a7b69.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8unorm, write>;
+
+fn textureDimensions_3a7b69() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_3a7b69();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_3a7b69();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_3a7b69();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3a94ea.wgsl b/test/tint/builtins/gen/var/textureDimensions/3a94ea.wgsl
deleted file mode 100644
index db77b57..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/3a94ea.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d<rg32uint, write>;
-
-// fn textureDimensions(texture: texture_storage_2d<rg32uint, write>) -> vec2<i32>
-fn textureDimensions_3a94ea() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_3a94ea();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_3a94ea();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_3a94ea();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3a94ea.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/3a94ea.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 347c92e..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/3a94ea.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2D<uint4> arg_0 : register(u0, space1);
-
-void textureDimensions_3a94ea() {
-  int2 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
-  int2 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_3a94ea();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_3a94ea();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_3a94ea();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3a94ea.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/3a94ea.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 347c92e..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/3a94ea.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2D<uint4> arg_0 : register(u0, space1);
-
-void textureDimensions_3a94ea() {
-  int2 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
-  int2 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_3a94ea();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_3a94ea();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_3a94ea();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3a94ea.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/3a94ea.wgsl.expected.glsl
deleted file mode 100644
index 4e7d263..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/3a94ea.wgsl.expected.glsl
+++ /dev/null
@@ -1,75 +0,0 @@
-SKIP: FAILED
-
-#version 310 es
-
-layout(rg32ui) uniform highp writeonly uimage2D arg_0;
-void textureDimensions_3a94ea() {
-  ivec2 res = imageSize(arg_0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_3a94ea();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'image load-store format' : not supported with this profile: es
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision mediump float;
-
-layout(rg32ui) uniform highp writeonly uimage2D arg_0;
-void textureDimensions_3a94ea() {
-  ivec2 res = imageSize(arg_0);
-}
-
-void fragment_main() {
-  textureDimensions_3a94ea();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:4: 'image load-store format' : not supported with this profile: es
-ERROR: 0:4: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-
-layout(rg32ui) uniform highp writeonly uimage2D arg_0;
-void textureDimensions_3a94ea() {
-  ivec2 res = imageSize(arg_0);
-}
-
-void compute_main() {
-  textureDimensions_3a94ea();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'image load-store format' : not supported with this profile: es
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/3a94ea.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/3a94ea.wgsl.expected.msl
deleted file mode 100644
index 7dd2f6b..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/3a94ea.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_3a94ea(texture2d<uint, access::write> tint_symbol_1) {
-  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture2d<uint, access::write> tint_symbol_2) {
-  textureDimensions_3a94ea(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture2d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture2d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_3a94ea(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture2d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_3a94ea(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/3a94ea.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/3a94ea.wgsl.expected.spvasm
deleted file mode 100644
index 1ef266d..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/3a94ea.wgsl.expected.spvasm
+++ /dev/null
@@ -1,78 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 38
-; Schema: 0
-               OpCapability Shader
-               OpCapability StorageImageExtendedFormats
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_3a94ea "textureDimensions_3a94ea"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-       %uint = OpTypeInt 32 0
-         %11 = OpTypeImage %uint 2D 0 0 0 2 Rg32ui
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %v2int = OpTypeVector %int 2
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %23 = OpConstantNull %v2int
-         %24 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_3a94ea = OpFunction %void None %13
-         %16 = OpLabel
-        %res = OpVariable %_ptr_Function_v2int Function %23
-         %20 = OpLoad %11 %arg_0
-         %17 = OpImageQuerySize %v2int %20
-               OpStore %res %17
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %24
-         %26 = OpLabel
-         %27 = OpFunctionCall %void %textureDimensions_3a94ea
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %29 = OpLabel
-         %30 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %30
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %33 = OpLabel
-         %34 = OpFunctionCall %void %textureDimensions_3a94ea
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %36 = OpLabel
-         %37 = OpFunctionCall %void %textureDimensions_3a94ea
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/3a94ea.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/3a94ea.wgsl.expected.wgsl
deleted file mode 100644
index c1cebaf..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/3a94ea.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_2d<rg32uint, write>;
-
-fn textureDimensions_3a94ea() {
-  var res : vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_3a94ea();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_3a94ea();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_3a94ea();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3aca08.wgsl b/test/tint/builtins/gen/var/textureDimensions/3aca08.wgsl
deleted file mode 100644
index 673d8c2..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/3aca08.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_1d<rgba32float, write>;
-
-// fn textureDimensions(texture: texture_storage_1d<rgba32float, write>) -> i32
-fn textureDimensions_3aca08() {
-  var res: i32 = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_3aca08();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_3aca08();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_3aca08();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3aca08.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/3aca08.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 05eedf3..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/3aca08.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture1D<float4> arg_0 : register(u0, space1);
-
-void textureDimensions_3aca08() {
-  int tint_tmp;
-  arg_0.GetDimensions(tint_tmp);
-  int res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_3aca08();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_3aca08();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_3aca08();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3aca08.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/3aca08.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 05eedf3..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/3aca08.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture1D<float4> arg_0 : register(u0, space1);
-
-void textureDimensions_3aca08() {
-  int tint_tmp;
-  arg_0.GetDimensions(tint_tmp);
-  int res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_3aca08();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_3aca08();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_3aca08();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3aca08.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/3aca08.wgsl.expected.glsl
deleted file mode 100644
index e9c1656..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/3aca08.wgsl.expected.glsl
+++ /dev/null
@@ -1,78 +0,0 @@
-SKIP: FAILED
-
-#version 310 es
-
-layout(rgba32f) uniform highp writeonly image1D arg_0;
-void textureDimensions_3aca08() {
-  int res = imageSize(arg_0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_3aca08();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'image1D' : Reserved word. 
-WARNING: 0:3: 'layout' : useless application of layout qualifier 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision mediump float;
-
-layout(rgba32f) uniform highp writeonly image1D arg_0;
-void textureDimensions_3aca08() {
-  int res = imageSize(arg_0);
-}
-
-void fragment_main() {
-  textureDimensions_3aca08();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:4: 'image1D' : Reserved word. 
-WARNING: 0:4: 'layout' : useless application of layout qualifier 
-ERROR: 0:4: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-
-layout(rgba32f) uniform highp writeonly image1D arg_0;
-void textureDimensions_3aca08() {
-  int res = imageSize(arg_0);
-}
-
-void compute_main() {
-  textureDimensions_3aca08();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'image1D' : Reserved word. 
-WARNING: 0:3: 'layout' : useless application of layout qualifier 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/3aca08.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/3aca08.wgsl.expected.msl
deleted file mode 100644
index 765771f..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/3aca08.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_3aca08(texture1d<float, access::write> tint_symbol_1) {
-  int res = int(tint_symbol_1.get_width(0));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture1d<float, access::write> tint_symbol_2) {
-  textureDimensions_3aca08(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture1d<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture1d<float, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_3aca08(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture1d<float, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_3aca08(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/3aca08.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/3aca08.wgsl.expected.spvasm
deleted file mode 100644
index faf0eff..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/3aca08.wgsl.expected.spvasm
+++ /dev/null
@@ -1,76 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 36
-; Schema: 0
-               OpCapability Shader
-               OpCapability Image1D
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_3aca08 "textureDimensions_3aca08"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-         %11 = OpTypeImage %float 1D 0 0 0 2 Rgba32f
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %12 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-%_ptr_Function_int = OpTypePointer Function %int
-         %21 = OpConstantNull %int
-         %22 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_3aca08 = OpFunction %void None %12
-         %15 = OpLabel
-        %res = OpVariable %_ptr_Function_int Function %21
-         %18 = OpLoad %11 %arg_0
-         %16 = OpImageQuerySize %int %18
-               OpStore %res %16
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %22
-         %24 = OpLabel
-         %25 = OpFunctionCall %void %textureDimensions_3aca08
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %12
-         %27 = OpLabel
-         %28 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %28
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %12
-         %31 = OpLabel
-         %32 = OpFunctionCall %void %textureDimensions_3aca08
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %12
-         %34 = OpLabel
-         %35 = OpFunctionCall %void %textureDimensions_3aca08
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/3aca08.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/3aca08.wgsl.expected.wgsl
deleted file mode 100644
index 1a72665..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/3aca08.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba32float, write>;
-
-fn textureDimensions_3aca08() {
-  var res : i32 = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_3aca08();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_3aca08();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_3aca08();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3af3e7.wgsl b/test/tint/builtins/gen/var/textureDimensions/3af3e7.wgsl
new file mode 100644
index 0000000..3b115bd
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3af3e7.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba8unorm, write>;
+
+// fn textureDimensions(texture: texture_storage_1d<rgba8unorm, write>) -> u32
+fn textureDimensions_3af3e7() {
+  var res: u32 = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_3af3e7();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_3af3e7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_3af3e7();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3af3e7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/3af3e7.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..fd65762
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3af3e7.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<float4> arg_0 : register(u0, space1);
+
+void textureDimensions_3af3e7() {
+  int tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_3af3e7();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_3af3e7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_3af3e7();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3af3e7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/3af3e7.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..fd65762
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3af3e7.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<float4> arg_0 : register(u0, space1);
+
+void textureDimensions_3af3e7() {
+  int tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_3af3e7();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_3af3e7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_3af3e7();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3af3e7.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/3af3e7.wgsl.expected.glsl
new file mode 100644
index 0000000..dc7f1b8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3af3e7.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8) uniform highp writeonly image1D arg_0;
+void textureDimensions_3af3e7() {
+  uint res = uint(imageSize(arg_0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_3af3e7();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rgba8) uniform highp writeonly image1D arg_0;
+void textureDimensions_3af3e7() {
+  uint res = uint(imageSize(arg_0));
+}
+
+void fragment_main() {
+  textureDimensions_3af3e7();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image1D' : Reserved word. 
+WARNING: 0:4: 'layout' : useless application of layout qualifier 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8) uniform highp writeonly image1D arg_0;
+void textureDimensions_3af3e7() {
+  uint res = uint(imageSize(arg_0));
+}
+
+void compute_main() {
+  textureDimensions_3af3e7();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/3af3e7.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/3af3e7.wgsl.expected.msl
new file mode 100644
index 0000000..3623ce7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3af3e7.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_3af3e7(texture1d<float, access::write> tint_symbol_1) {
+  uint res = tint_symbol_1.get_width(0);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::write> tint_symbol_2) {
+  textureDimensions_3af3e7(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_3af3e7(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_3af3e7(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/3af3e7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/3af3e7.wgsl.expected.spvasm
new file mode 100644
index 0000000..5ab0115
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3af3e7.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_3af3e7 "textureDimensions_3af3e7"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 1D 0 0 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %21 = OpConstantNull %uint
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_3af3e7 = OpFunction %void None %12
+         %15 = OpLabel
+        %res = OpVariable %_ptr_Function_uint Function %21
+         %18 = OpLoad %11 %arg_0
+         %16 = OpImageQuerySize %uint %18
+               OpStore %res %16
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %textureDimensions_3af3e7
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %27 = OpLabel
+         %28 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %28
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureDimensions_3af3e7
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureDimensions_3af3e7
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/3af3e7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/3af3e7.wgsl.expected.wgsl
new file mode 100644
index 0000000..35da220
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3af3e7.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba8unorm, write>;
+
+fn textureDimensions_3af3e7() {
+  var res : u32 = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_3af3e7();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_3af3e7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_3af3e7();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3b38f6.wgsl b/test/tint/builtins/gen/var/textureDimensions/3b38f6.wgsl
new file mode 100644
index 0000000..bafaabe
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3b38f6.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d;
+
+// fn textureDimensions(texture: texture_depth_2d) -> vec2<u32>
+fn textureDimensions_3b38f6() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_3b38f6();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_3b38f6();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_3b38f6();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3b38f6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/3b38f6.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..4d33804
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3b38f6.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D arg_0 : register(t0, space1);
+
+void textureDimensions_3b38f6() {
+  int2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_3b38f6();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_3b38f6();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_3b38f6();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3b38f6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/3b38f6.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..4d33804
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3b38f6.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D arg_0 : register(t0, space1);
+
+void textureDimensions_3b38f6() {
+  int2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_3b38f6();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_3b38f6();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_3b38f6();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3b38f6.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/3b38f6.wgsl.expected.glsl
new file mode 100644
index 0000000..129932f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3b38f6.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp sampler2D arg_0_1;
+void textureDimensions_3b38f6() {
+  uvec2 res = uvec2(textureSize(arg_0_1, 0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_3b38f6();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2D arg_0_1;
+void textureDimensions_3b38f6() {
+  uvec2 res = uvec2(textureSize(arg_0_1, 0));
+}
+
+void fragment_main() {
+  textureDimensions_3b38f6();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2D arg_0_1;
+void textureDimensions_3b38f6() {
+  uvec2 res = uvec2(textureSize(arg_0_1, 0));
+}
+
+void compute_main() {
+  textureDimensions_3b38f6();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3b38f6.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/3b38f6.wgsl.expected.msl
new file mode 100644
index 0000000..4e768f8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3b38f6.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_3b38f6(depth2d<float, access::sample> tint_symbol_1) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d<float, access::sample> tint_symbol_2) {
+  textureDimensions_3b38f6(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depth2d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_3b38f6(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(depth2d<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_3b38f6(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/3b38f6.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/3b38f6.wgsl.expected.spvasm
new file mode 100644
index 0000000..cc00d06
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3b38f6.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_3b38f6 "textureDimensions_3b38f6"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+        %int = OpTypeInt 32 1
+      %int_0 = OpConstant %int 0
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %24 = OpConstantNull %v2uint
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_3b38f6 = OpFunction %void None %12
+         %15 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %24
+         %19 = OpLoad %11 %arg_0
+         %16 = OpImageQuerySizeLod %v2uint %19 %int_0
+               OpStore %res %16
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %textureDimensions_3b38f6
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureDimensions_3b38f6
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureDimensions_3b38f6
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/3b38f6.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/3b38f6.wgsl.expected.wgsl
new file mode 100644
index 0000000..f217d69
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3b38f6.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d;
+
+fn textureDimensions_3b38f6() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_3b38f6();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_3b38f6();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_3b38f6();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3baab5.wgsl b/test/tint/builtins/gen/var/textureDimensions/3baab5.wgsl
new file mode 100644
index 0000000..a8563c8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3baab5.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8uint, write>;
+
+// fn textureDimensions(texture: texture_storage_2d_array<rgba8uint, write>) -> vec2<u32>
+fn textureDimensions_3baab5() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_3baab5();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_3baab5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_3baab5();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3baab5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/3baab5.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..09829f6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3baab5.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureDimensions_3baab5() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_3baab5();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_3baab5();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_3baab5();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3baab5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/3baab5.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..09829f6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3baab5.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureDimensions_3baab5() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_3baab5();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_3baab5();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_3baab5();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3baab5.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/3baab5.wgsl.expected.glsl
new file mode 100644
index 0000000..e5fd931
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3baab5.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0;
+void textureDimensions_3baab5() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+}
+
+vec4 vertex_main() {
+  textureDimensions_3baab5();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0;
+void textureDimensions_3baab5() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+}
+
+void fragment_main() {
+  textureDimensions_3baab5();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba8ui) uniform highp writeonly uimage2DArray arg_0;
+void textureDimensions_3baab5() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+}
+
+void compute_main() {
+  textureDimensions_3baab5();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3baab5.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/3baab5.wgsl.expected.msl
new file mode 100644
index 0000000..fabb265
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3baab5.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_3baab5(texture2d_array<uint, access::write> tint_symbol_1) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::write> tint_symbol_2) {
+  textureDimensions_3baab5(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_3baab5(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_3baab5(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/3baab5.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/3baab5.wgsl.expected.spvasm
new file mode 100644
index 0000000..f11c499
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3baab5.wgsl.expected.spvasm
@@ -0,0 +1,78 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_3baab5 "textureDimensions_3baab5"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 Rgba8ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %v2uint = OpTypeVector %uint 2
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %24 = OpConstantNull %v2uint
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_3baab5 = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %24
+         %21 = OpLoad %11 %arg_0
+         %19 = OpImageQuerySize %v3uint %21
+         %17 = OpVectorShuffle %v2uint %19 %19 0 1
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %textureDimensions_3baab5
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureDimensions_3baab5
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureDimensions_3baab5
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/3baab5.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/3baab5.wgsl.expected.wgsl
new file mode 100644
index 0000000..35891f4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3baab5.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8uint, write>;
+
+fn textureDimensions_3baab5() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_3baab5();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_3baab5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_3baab5();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3c5ad8.wgsl b/test/tint/builtins/gen/var/textureDimensions/3c5ad8.wgsl
deleted file mode 100644
index 3fe2fb6..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/3c5ad8.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d<rgba8sint, write>;
-
-// fn textureDimensions(texture: texture_storage_2d<rgba8sint, write>) -> vec2<i32>
-fn textureDimensions_3c5ad8() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_3c5ad8();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_3c5ad8();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_3c5ad8();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3c5ad8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/3c5ad8.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 78cd91b..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/3c5ad8.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2D<int4> arg_0 : register(u0, space1);
-
-void textureDimensions_3c5ad8() {
-  int2 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
-  int2 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_3c5ad8();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_3c5ad8();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_3c5ad8();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3c5ad8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/3c5ad8.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 78cd91b..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/3c5ad8.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2D<int4> arg_0 : register(u0, space1);
-
-void textureDimensions_3c5ad8() {
-  int2 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
-  int2 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_3c5ad8();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_3c5ad8();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_3c5ad8();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3c5ad8.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/3c5ad8.wgsl.expected.glsl
deleted file mode 100644
index b27ab3b..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/3c5ad8.wgsl.expected.glsl
+++ /dev/null
@@ -1,52 +0,0 @@
-#version 310 es
-
-layout(rgba8i) uniform highp writeonly iimage2D arg_0;
-void textureDimensions_3c5ad8() {
-  ivec2 res = imageSize(arg_0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_3c5ad8();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-layout(rgba8i) uniform highp writeonly iimage2D arg_0;
-void textureDimensions_3c5ad8() {
-  ivec2 res = imageSize(arg_0);
-}
-
-void fragment_main() {
-  textureDimensions_3c5ad8();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-layout(rgba8i) uniform highp writeonly iimage2D arg_0;
-void textureDimensions_3c5ad8() {
-  ivec2 res = imageSize(arg_0);
-}
-
-void compute_main() {
-  textureDimensions_3c5ad8();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3c5ad8.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/3c5ad8.wgsl.expected.msl
deleted file mode 100644
index ba7e47a..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/3c5ad8.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_3c5ad8(texture2d<int, access::write> tint_symbol_1) {
-  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture2d<int, access::write> tint_symbol_2) {
-  textureDimensions_3c5ad8(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture2d<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture2d<int, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_3c5ad8(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture2d<int, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_3c5ad8(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/3c5ad8.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/3c5ad8.wgsl.expected.spvasm
deleted file mode 100644
index f91c033..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/3c5ad8.wgsl.expected.spvasm
+++ /dev/null
@@ -1,76 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 37
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_3c5ad8 "textureDimensions_3c5ad8"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-        %int = OpTypeInt 32 1
-         %11 = OpTypeImage %int 2D 0 0 0 2 Rgba8i
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-      %v2int = OpTypeVector %int 2
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %22 = OpConstantNull %v2int
-         %23 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_3c5ad8 = OpFunction %void None %13
-         %16 = OpLabel
-        %res = OpVariable %_ptr_Function_v2int Function %22
-         %19 = OpLoad %11 %arg_0
-         %17 = OpImageQuerySize %v2int %19
-               OpStore %res %17
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %23
-         %25 = OpLabel
-         %26 = OpFunctionCall %void %textureDimensions_3c5ad8
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %28 = OpLabel
-         %29 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %29
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %32 = OpLabel
-         %33 = OpFunctionCall %void %textureDimensions_3c5ad8
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %35 = OpLabel
-         %36 = OpFunctionCall %void %textureDimensions_3c5ad8
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/3c5ad8.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/3c5ad8.wgsl.expected.wgsl
deleted file mode 100644
index a73139d..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/3c5ad8.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba8sint, write>;
-
-fn textureDimensions_3c5ad8() {
-  var res : vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_3c5ad8();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_3c5ad8();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_3c5ad8();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3c66f0.wgsl b/test/tint/builtins/gen/var/textureDimensions/3c66f0.wgsl
new file mode 100644
index 0000000..0d184bc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3c66f0.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube_array<i32>;
+
+// fn textureDimensions(texture: texture_cube_array<i32>, level: i32) -> vec2<u32>
+fn textureDimensions_3c66f0() {
+  var arg_1 = 1i;
+  var res: vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_3c66f0();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_3c66f0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_3c66f0();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3c66f0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/3c66f0.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..317cb94
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3c66f0.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+TextureCubeArray<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_3c66f0() {
+  int arg_1 = 1;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_3c66f0();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_3c66f0();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_3c66f0();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3c66f0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/3c66f0.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..317cb94
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3c66f0.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+TextureCubeArray<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_3c66f0() {
+  int arg_1 = 1;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_3c66f0();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_3c66f0();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_3c66f0();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3c66f0.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/3c66f0.wgsl.expected.glsl
new file mode 100644
index 0000000..7210170
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3c66f0.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp isamplerCubeArray arg_0_1;
+void textureDimensions_3c66f0() {
+  int arg_1 = 1;
+  uvec2 res = uvec2(textureSize(arg_0_1, arg_1).xy);
+}
+
+vec4 vertex_main() {
+  textureDimensions_3c66f0();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'isamplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp isamplerCubeArray arg_0_1;
+void textureDimensions_3c66f0() {
+  int arg_1 = 1;
+  uvec2 res = uvec2(textureSize(arg_0_1, arg_1).xy);
+}
+
+void fragment_main() {
+  textureDimensions_3c66f0();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'isamplerCubeArray' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp isamplerCubeArray arg_0_1;
+void textureDimensions_3c66f0() {
+  int arg_1 = 1;
+  uvec2 res = uvec2(textureSize(arg_0_1, arg_1).xy);
+}
+
+void compute_main() {
+  textureDimensions_3c66f0();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'isamplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/3c66f0.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/3c66f0.wgsl.expected.msl
new file mode 100644
index 0000000..8a8d417
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3c66f0.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_3c66f0(texturecube_array<int, access::sample> tint_symbol_1) {
+  int arg_1 = 1;
+  uint2 res = uint2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube_array<int, access::sample> tint_symbol_2) {
+  textureDimensions_3c66f0(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube_array<int, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texturecube_array<int, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_3c66f0(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texturecube_array<int, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_3c66f0(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/3c66f0.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/3c66f0.wgsl.expected.spvasm
new file mode 100644
index 0000000..30391be
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3c66f0.wgsl.expected.spvasm
@@ -0,0 +1,86 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpCapability SampledCubeArray
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_3c66f0 "textureDimensions_3c66f0"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+      %int_1 = OpConstant %int 1
+%_ptr_Function_int = OpTypePointer Function %int
+         %20 = OpConstantNull %int
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %30 = OpConstantNull %v2uint
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_3c66f0 = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_int Function %20
+        %res = OpVariable %_ptr_Function_v2uint Function %30
+               OpStore %arg_1 %int_1
+         %26 = OpLoad %11 %arg_0
+         %27 = OpLoad %int %arg_1
+         %24 = OpImageQuerySizeLod %v3uint %26 %27
+         %21 = OpVectorShuffle %v2uint %24 %24 0 1
+               OpStore %res %21
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureDimensions_3c66f0
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureDimensions_3c66f0
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureDimensions_3c66f0
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/3c66f0.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/3c66f0.wgsl.expected.wgsl
new file mode 100644
index 0000000..333b92f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3c66f0.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_cube_array<i32>;
+
+fn textureDimensions_3c66f0() {
+  var arg_1 = 1i;
+  var res : vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_3c66f0();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_3c66f0();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_3c66f0();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3f3474.wgsl b/test/tint/builtins/gen/var/textureDimensions/3f3474.wgsl
new file mode 100644
index 0000000..4762ddd
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3f3474.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_multisampled_2d<f32>;
+
+// fn textureDimensions(texture: texture_multisampled_2d<f32>) -> vec2<u32>
+fn textureDimensions_3f3474() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_3f3474();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_3f3474();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_3f3474();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3f3474.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/3f3474.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..588227e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3f3474.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DMS<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_3f3474() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_3f3474();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_3f3474();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_3f3474();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3f3474.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/3f3474.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..588227e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3f3474.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DMS<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_3f3474() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_3f3474();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_3f3474();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_3f3474();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3f3474.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/3f3474.wgsl.expected.glsl
new file mode 100644
index 0000000..91d50d3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3f3474.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp sampler2DMS arg_0_1;
+void textureDimensions_3f3474() {
+  uvec2 res = uvec2(textureSize(arg_0_1));
+}
+
+vec4 vertex_main() {
+  textureDimensions_3f3474();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DMS arg_0_1;
+void textureDimensions_3f3474() {
+  uvec2 res = uvec2(textureSize(arg_0_1));
+}
+
+void fragment_main() {
+  textureDimensions_3f3474();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2DMS arg_0_1;
+void textureDimensions_3f3474() {
+  uvec2 res = uvec2(textureSize(arg_0_1));
+}
+
+void compute_main() {
+  textureDimensions_3f3474();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3f3474.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/3f3474.wgsl.expected.msl
new file mode 100644
index 0000000..1ab3e70
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3f3474.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_3f3474(texture2d_ms<float, access::read> tint_symbol_1) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_ms<float, access::read> tint_symbol_2) {
+  textureDimensions_3f3474(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_ms<float, access::read> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_ms<float, access::read> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_3f3474(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_ms<float, access::read> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_3f3474(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/3f3474.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/3f3474.wgsl.expected.spvasm
new file mode 100644
index 0000000..b9f1b47
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3f3474.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_3f3474 "textureDimensions_3f3474"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 1 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %22 = OpConstantNull %v2uint
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_3f3474 = OpFunction %void None %12
+         %15 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %22
+         %19 = OpLoad %11 %arg_0
+         %16 = OpImageQuerySize %v2uint %19
+               OpStore %res %16
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %textureDimensions_3f3474
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %28 = OpLabel
+         %29 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %29
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_3f3474
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureDimensions_3f3474
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/3f3474.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/3f3474.wgsl.expected.wgsl
new file mode 100644
index 0000000..d1db5f0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3f3474.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_multisampled_2d<f32>;
+
+fn textureDimensions_3f3474() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_3f3474();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_3f3474();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_3f3474();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3fc3dc.wgsl b/test/tint/builtins/gen/var/textureDimensions/3fc3dc.wgsl
new file mode 100644
index 0000000..f62bd78
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3fc3dc.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<f32>;
+
+// fn textureDimensions(texture: texture_2d_array<f32>, level: u32) -> vec2<u32>
+fn textureDimensions_3fc3dc() {
+  var arg_1 = 1u;
+  var res: vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_3fc3dc();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_3fc3dc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_3fc3dc();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3fc3dc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/3fc3dc.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e41a8c2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3fc3dc.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_3fc3dc() {
+  uint arg_1 = 1u;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_3fc3dc();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_3fc3dc();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_3fc3dc();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3fc3dc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/3fc3dc.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..e41a8c2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3fc3dc.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_3fc3dc() {
+  uint arg_1 = 1u;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_3fc3dc();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_3fc3dc();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_3fc3dc();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3fc3dc.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/3fc3dc.wgsl.expected.glsl
new file mode 100644
index 0000000..37caf64
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3fc3dc.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp sampler2DArray arg_0_1;
+void textureDimensions_3fc3dc() {
+  uint arg_1 = 1u;
+  uvec2 res = uvec2(textureSize(arg_0_1, int(arg_1)).xy);
+}
+
+vec4 vertex_main() {
+  textureDimensions_3fc3dc();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_0_1;
+void textureDimensions_3fc3dc() {
+  uint arg_1 = 1u;
+  uvec2 res = uvec2(textureSize(arg_0_1, int(arg_1)).xy);
+}
+
+void fragment_main() {
+  textureDimensions_3fc3dc();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2DArray arg_0_1;
+void textureDimensions_3fc3dc() {
+  uint arg_1 = 1u;
+  uvec2 res = uvec2(textureSize(arg_0_1, int(arg_1)).xy);
+}
+
+void compute_main() {
+  textureDimensions_3fc3dc();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/3fc3dc.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/3fc3dc.wgsl.expected.msl
new file mode 100644
index 0000000..e924aaf
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3fc3dc.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_3fc3dc(texture2d_array<float, access::sample> tint_symbol_1) {
+  uint arg_1 = 1u;
+  uint2 res = uint2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::sample> tint_symbol_2) {
+  textureDimensions_3fc3dc(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_3fc3dc(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_3fc3dc(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/3fc3dc.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/3fc3dc.wgsl.expected.spvasm
new file mode 100644
index 0000000..e412ae9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3fc3dc.wgsl.expected.spvasm
@@ -0,0 +1,84 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_3fc3dc "textureDimensions_3fc3dc"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %20 = OpConstantNull %uint
+     %v2uint = OpTypeVector %uint 2
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %29 = OpConstantNull %v2uint
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_3fc3dc = OpFunction %void None %12
+         %15 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %20
+        %res = OpVariable %_ptr_Function_v2uint Function %29
+               OpStore %arg_1 %uint_1
+         %25 = OpLoad %11 %arg_0
+         %26 = OpLoad %uint %arg_1
+         %23 = OpImageQuerySizeLod %v3uint %25 %26
+         %21 = OpVectorShuffle %v2uint %23 %23 0 1
+               OpStore %res %21
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_3fc3dc
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureDimensions_3fc3dc
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureDimensions_3fc3dc
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/3fc3dc.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/3fc3dc.wgsl.expected.wgsl
new file mode 100644
index 0000000..42e3074
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/3fc3dc.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<f32>;
+
+fn textureDimensions_3fc3dc() {
+  var arg_1 = 1u;
+  var res : vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_3fc3dc();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_3fc3dc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_3fc3dc();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/40c671.wgsl b/test/tint/builtins/gen/var/textureDimensions/40c671.wgsl
new file mode 100644
index 0000000..8611ca5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/40c671.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba8sint, write>;
+
+// fn textureDimensions(texture: texture_storage_3d<rgba8sint, write>) -> vec3<u32>
+fn textureDimensions_40c671() {
+  var res: vec3<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_40c671();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_40c671();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_40c671();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/40c671.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/40c671.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..74aa4ef
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/40c671.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<int4> arg_0 : register(u0, space1);
+
+void textureDimensions_40c671() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_40c671();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_40c671();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_40c671();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/40c671.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/40c671.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..74aa4ef
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/40c671.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<int4> arg_0 : register(u0, space1);
+
+void textureDimensions_40c671() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_40c671();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_40c671();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_40c671();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/40c671.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/40c671.wgsl.expected.glsl
new file mode 100644
index 0000000..6494fd0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/40c671.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba8i) uniform highp writeonly iimage3D arg_0;
+void textureDimensions_40c671() {
+  uvec3 res = uvec3(imageSize(arg_0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_40c671();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba8i) uniform highp writeonly iimage3D arg_0;
+void textureDimensions_40c671() {
+  uvec3 res = uvec3(imageSize(arg_0));
+}
+
+void fragment_main() {
+  textureDimensions_40c671();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba8i) uniform highp writeonly iimage3D arg_0;
+void textureDimensions_40c671() {
+  uvec3 res = uvec3(imageSize(arg_0));
+}
+
+void compute_main() {
+  textureDimensions_40c671();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/40c671.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/40c671.wgsl.expected.msl
new file mode 100644
index 0000000..d737668
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/40c671.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_40c671(texture3d<int, access::write> tint_symbol_1) {
+  uint3 res = uint3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<int, access::write> tint_symbol_2) {
+  textureDimensions_40c671(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_40c671(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture3d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_40c671(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/40c671.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/40c671.wgsl.expected.spvasm
new file mode 100644
index 0000000..c1c8494
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/40c671.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_40c671 "textureDimensions_40c671"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 3D 0 0 0 2 Rgba8i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+         %23 = OpConstantNull %v3uint
+         %24 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_40c671 = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_v3uint Function %23
+         %20 = OpLoad %11 %arg_0
+         %17 = OpImageQuerySize %v3uint %20
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %textureDimensions_40c671
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %29 = OpLabel
+         %30 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %30
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureDimensions_40c671
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureDimensions_40c671
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/40c671.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/40c671.wgsl.expected.wgsl
new file mode 100644
index 0000000..3e38a8b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/40c671.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba8sint, write>;
+
+fn textureDimensions_40c671() {
+  var res : vec3<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_40c671();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_40c671();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_40c671();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/40ecf4.wgsl b/test/tint/builtins/gen/var/textureDimensions/40ecf4.wgsl
new file mode 100644
index 0000000..4b387f5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/40ecf4.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16uint, write>;
+
+// fn textureDimensions(texture: texture_storage_2d_array<rgba16uint, write>) -> vec2<u32>
+fn textureDimensions_40ecf4() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_40ecf4();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_40ecf4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_40ecf4();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/40ecf4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/40ecf4.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..76e4032
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/40ecf4.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureDimensions_40ecf4() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_40ecf4();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_40ecf4();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_40ecf4();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/40ecf4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/40ecf4.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..76e4032
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/40ecf4.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureDimensions_40ecf4() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_40ecf4();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_40ecf4();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_40ecf4();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/40ecf4.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/40ecf4.wgsl.expected.glsl
new file mode 100644
index 0000000..8eab55c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/40ecf4.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0;
+void textureDimensions_40ecf4() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+}
+
+vec4 vertex_main() {
+  textureDimensions_40ecf4();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0;
+void textureDimensions_40ecf4() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+}
+
+void fragment_main() {
+  textureDimensions_40ecf4();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0;
+void textureDimensions_40ecf4() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+}
+
+void compute_main() {
+  textureDimensions_40ecf4();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/40ecf4.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/40ecf4.wgsl.expected.msl
new file mode 100644
index 0000000..1ee450a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/40ecf4.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_40ecf4(texture2d_array<uint, access::write> tint_symbol_1) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::write> tint_symbol_2) {
+  textureDimensions_40ecf4(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_40ecf4(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_40ecf4(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/40ecf4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/40ecf4.wgsl.expected.spvasm
new file mode 100644
index 0000000..ea8ee52
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/40ecf4.wgsl.expected.spvasm
@@ -0,0 +1,78 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_40ecf4 "textureDimensions_40ecf4"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 Rgba16ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %v2uint = OpTypeVector %uint 2
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %24 = OpConstantNull %v2uint
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_40ecf4 = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %24
+         %21 = OpLoad %11 %arg_0
+         %19 = OpImageQuerySize %v3uint %21
+         %17 = OpVectorShuffle %v2uint %19 %19 0 1
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %textureDimensions_40ecf4
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureDimensions_40ecf4
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureDimensions_40ecf4
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/40ecf4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/40ecf4.wgsl.expected.wgsl
new file mode 100644
index 0000000..5732ee2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/40ecf4.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16uint, write>;
+
+fn textureDimensions_40ecf4() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_40ecf4();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_40ecf4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_40ecf4();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/4152a6.wgsl b/test/tint/builtins/gen/var/textureDimensions/4152a6.wgsl
deleted file mode 100644
index 2e88d1b..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/4152a6.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_cube_array<u32>;
-
-// fn textureDimensions(texture: texture_cube_array<u32>) -> vec2<i32>
-fn textureDimensions_4152a6() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_4152a6();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_4152a6();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_4152a6();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/4152a6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/4152a6.wgsl.expected.dxc.hlsl
deleted file mode 100644
index ae5eb35..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/4152a6.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-TextureCubeArray<uint4> arg_0 : register(t0, space1);
-
-void textureDimensions_4152a6() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_4152a6();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_4152a6();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_4152a6();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/4152a6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/4152a6.wgsl.expected.fxc.hlsl
deleted file mode 100644
index ae5eb35..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/4152a6.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-TextureCubeArray<uint4> arg_0 : register(t0, space1);
-
-void textureDimensions_4152a6() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_4152a6();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_4152a6();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_4152a6();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/4152a6.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/4152a6.wgsl.expected.glsl
deleted file mode 100644
index d3120a3..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/4152a6.wgsl.expected.glsl
+++ /dev/null
@@ -1,75 +0,0 @@
-SKIP: FAILED
-
-#version 310 es
-
-uniform highp usamplerCubeArray arg_0_1;
-void textureDimensions_4152a6() {
-  ivec2 res = textureSize(arg_0_1, 0).xy;
-}
-
-vec4 vertex_main() {
-  textureDimensions_4152a6();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'usamplerCubeArray' : Reserved word. 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision mediump float;
-
-uniform highp usamplerCubeArray arg_0_1;
-void textureDimensions_4152a6() {
-  ivec2 res = textureSize(arg_0_1, 0).xy;
-}
-
-void fragment_main() {
-  textureDimensions_4152a6();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:4: 'usamplerCubeArray' : Reserved word. 
-ERROR: 0:4: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-
-uniform highp usamplerCubeArray arg_0_1;
-void textureDimensions_4152a6() {
-  ivec2 res = textureSize(arg_0_1, 0).xy;
-}
-
-void compute_main() {
-  textureDimensions_4152a6();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'usamplerCubeArray' : Reserved word. 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/4152a6.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/4152a6.wgsl.expected.msl
deleted file mode 100644
index ac8d43d..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/4152a6.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_4152a6(texturecube_array<uint, access::sample> tint_symbol_1) {
-  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texturecube_array<uint, access::sample> tint_symbol_2) {
-  textureDimensions_4152a6(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texturecube_array<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texturecube_array<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_4152a6(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texturecube_array<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_4152a6(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/4152a6.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/4152a6.wgsl.expected.spvasm
deleted file mode 100644
index e092546..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/4152a6.wgsl.expected.spvasm
+++ /dev/null
@@ -1,80 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 41
-; Schema: 0
-               OpCapability Shader
-               OpCapability SampledCubeArray
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_4152a6 "textureDimensions_4152a6"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-       %uint = OpTypeInt 32 0
-         %11 = OpTypeImage %uint Cube 0 1 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %v2int = OpTypeVector %int 2
-      %v3int = OpTypeVector %int 3
-      %int_0 = OpConstant %int 0
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %26 = OpConstantNull %v2int
-         %27 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_4152a6 = OpFunction %void None %13
-         %16 = OpLabel
-        %res = OpVariable %_ptr_Function_v2int Function %26
-         %22 = OpLoad %11 %arg_0
-         %20 = OpImageQuerySizeLod %v3int %22 %int_0
-         %17 = OpVectorShuffle %v2int %20 %20 0 1
-               OpStore %res %17
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %27
-         %29 = OpLabel
-         %30 = OpFunctionCall %void %textureDimensions_4152a6
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %32 = OpLabel
-         %33 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %33
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %36 = OpLabel
-         %37 = OpFunctionCall %void %textureDimensions_4152a6
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %39 = OpLabel
-         %40 = OpFunctionCall %void %textureDimensions_4152a6
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/4152a6.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/4152a6.wgsl.expected.wgsl
deleted file mode 100644
index 67521ab..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/4152a6.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_cube_array<u32>;
-
-fn textureDimensions_4152a6() {
-  var res : vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_4152a6();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_4152a6();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_4152a6();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/41545f.wgsl b/test/tint/builtins/gen/var/textureDimensions/41545f.wgsl
new file mode 100644
index 0000000..cc79e7c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/41545f.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32uint, write>;
+
+// fn textureDimensions(texture: texture_storage_2d_array<r32uint, write>) -> vec2<u32>
+fn textureDimensions_41545f() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_41545f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_41545f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_41545f();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/41545f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/41545f.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..6352cad
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/41545f.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureDimensions_41545f() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_41545f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_41545f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_41545f();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/41545f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/41545f.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6352cad
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/41545f.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureDimensions_41545f() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_41545f();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_41545f();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_41545f();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/41545f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/41545f.wgsl.expected.glsl
new file mode 100644
index 0000000..542e625
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/41545f.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(r32ui) uniform highp writeonly uimage2DArray arg_0;
+void textureDimensions_41545f() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+}
+
+vec4 vertex_main() {
+  textureDimensions_41545f();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(r32ui) uniform highp writeonly uimage2DArray arg_0;
+void textureDimensions_41545f() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+}
+
+void fragment_main() {
+  textureDimensions_41545f();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(r32ui) uniform highp writeonly uimage2DArray arg_0;
+void textureDimensions_41545f() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+}
+
+void compute_main() {
+  textureDimensions_41545f();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/41545f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/41545f.wgsl.expected.msl
new file mode 100644
index 0000000..6d66d30
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/41545f.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_41545f(texture2d_array<uint, access::write> tint_symbol_1) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::write> tint_symbol_2) {
+  textureDimensions_41545f(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_41545f(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_41545f(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/41545f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/41545f.wgsl.expected.spvasm
new file mode 100644
index 0000000..e5a2d6d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/41545f.wgsl.expected.spvasm
@@ -0,0 +1,78 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_41545f "textureDimensions_41545f"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 R32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %v2uint = OpTypeVector %uint 2
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %24 = OpConstantNull %v2uint
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_41545f = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %24
+         %21 = OpLoad %11 %arg_0
+         %19 = OpImageQuerySize %v3uint %21
+         %17 = OpVectorShuffle %v2uint %19 %19 0 1
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %textureDimensions_41545f
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureDimensions_41545f
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureDimensions_41545f
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/41545f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/41545f.wgsl.expected.wgsl
new file mode 100644
index 0000000..119c226
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/41545f.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32uint, write>;
+
+fn textureDimensions_41545f() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_41545f();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_41545f();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_41545f();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/423f99.wgsl b/test/tint/builtins/gen/var/textureDimensions/423f99.wgsl
deleted file mode 100644
index f358b83..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/423f99.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_1d<i32>;
-
-// fn textureDimensions(texture: texture_1d<i32>) -> i32
-fn textureDimensions_423f99() {
-  var res: i32 = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_423f99();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_423f99();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_423f99();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/423f99.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/423f99.wgsl.expected.dxc.hlsl
deleted file mode 100644
index d6a4e4b..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/423f99.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-Texture1D<int4> arg_0 : register(t0, space1);
-
-void textureDimensions_423f99() {
-  int tint_tmp;
-  arg_0.GetDimensions(tint_tmp);
-  int res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_423f99();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_423f99();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_423f99();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/423f99.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/423f99.wgsl.expected.fxc.hlsl
deleted file mode 100644
index d6a4e4b..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/423f99.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-Texture1D<int4> arg_0 : register(t0, space1);
-
-void textureDimensions_423f99() {
-  int tint_tmp;
-  arg_0.GetDimensions(tint_tmp);
-  int res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_423f99();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_423f99();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_423f99();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/423f99.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/423f99.wgsl.expected.glsl
deleted file mode 100644
index 08f2e24..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/423f99.wgsl.expected.glsl
+++ /dev/null
@@ -1,75 +0,0 @@
-SKIP: FAILED
-
-#version 310 es
-
-uniform highp isampler1D arg_0_1;
-void textureDimensions_423f99() {
-  int res = textureSize(arg_0_1, 0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_423f99();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'isampler1D' : Reserved word. 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision mediump float;
-
-uniform highp isampler1D arg_0_1;
-void textureDimensions_423f99() {
-  int res = textureSize(arg_0_1, 0);
-}
-
-void fragment_main() {
-  textureDimensions_423f99();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:4: 'isampler1D' : Reserved word. 
-ERROR: 0:4: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-
-uniform highp isampler1D arg_0_1;
-void textureDimensions_423f99() {
-  int res = textureSize(arg_0_1, 0);
-}
-
-void compute_main() {
-  textureDimensions_423f99();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'isampler1D' : Reserved word. 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/423f99.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/423f99.wgsl.expected.msl
deleted file mode 100644
index 77b610f..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/423f99.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_423f99(texture1d<int, access::sample> tint_symbol_1) {
-  int res = int(tint_symbol_1.get_width(0));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture1d<int, access::sample> tint_symbol_2) {
-  textureDimensions_423f99(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture1d<int, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture1d<int, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_423f99(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture1d<int, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_423f99(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/423f99.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/423f99.wgsl.expected.spvasm
deleted file mode 100644
index 807bc78..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/423f99.wgsl.expected.spvasm
+++ /dev/null
@@ -1,76 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 37
-; Schema: 0
-               OpCapability Shader
-               OpCapability Sampled1D
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_423f99 "textureDimensions_423f99"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-        %int = OpTypeInt 32 1
-         %11 = OpTypeImage %int 1D 0 0 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-      %int_0 = OpConstant %int 0
-%_ptr_Function_int = OpTypePointer Function %int
-         %22 = OpConstantNull %int
-         %23 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_423f99 = OpFunction %void None %13
-         %16 = OpLabel
-        %res = OpVariable %_ptr_Function_int Function %22
-         %18 = OpLoad %11 %arg_0
-         %17 = OpImageQuerySizeLod %int %18 %int_0
-               OpStore %res %17
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %23
-         %25 = OpLabel
-         %26 = OpFunctionCall %void %textureDimensions_423f99
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %28 = OpLabel
-         %29 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %29
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %32 = OpLabel
-         %33 = OpFunctionCall %void %textureDimensions_423f99
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %35 = OpLabel
-         %36 = OpFunctionCall %void %textureDimensions_423f99
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/423f99.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/423f99.wgsl.expected.wgsl
deleted file mode 100644
index 0ef4f77..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/423f99.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_1d<i32>;
-
-fn textureDimensions_423f99() {
-  var res : i32 = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_423f99();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_423f99();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_423f99();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/4267ee.wgsl b/test/tint/builtins/gen/var/textureDimensions/4267ee.wgsl
deleted file mode 100644
index cbe8ae3..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/4267ee.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d<rgba32float, write>;
-
-// fn textureDimensions(texture: texture_storage_2d<rgba32float, write>) -> vec2<i32>
-fn textureDimensions_4267ee() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_4267ee();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_4267ee();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_4267ee();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/4267ee.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/4267ee.wgsl.expected.dxc.hlsl
deleted file mode 100644
index aab581e..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/4267ee.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2D<float4> arg_0 : register(u0, space1);
-
-void textureDimensions_4267ee() {
-  int2 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
-  int2 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_4267ee();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_4267ee();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_4267ee();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/4267ee.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/4267ee.wgsl.expected.fxc.hlsl
deleted file mode 100644
index aab581e..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/4267ee.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2D<float4> arg_0 : register(u0, space1);
-
-void textureDimensions_4267ee() {
-  int2 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
-  int2 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_4267ee();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_4267ee();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_4267ee();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/4267ee.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/4267ee.wgsl.expected.glsl
deleted file mode 100644
index c1f09fa..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/4267ee.wgsl.expected.glsl
+++ /dev/null
@@ -1,52 +0,0 @@
-#version 310 es
-
-layout(rgba32f) uniform highp writeonly image2D arg_0;
-void textureDimensions_4267ee() {
-  ivec2 res = imageSize(arg_0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_4267ee();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-layout(rgba32f) uniform highp writeonly image2D arg_0;
-void textureDimensions_4267ee() {
-  ivec2 res = imageSize(arg_0);
-}
-
-void fragment_main() {
-  textureDimensions_4267ee();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-layout(rgba32f) uniform highp writeonly image2D arg_0;
-void textureDimensions_4267ee() {
-  ivec2 res = imageSize(arg_0);
-}
-
-void compute_main() {
-  textureDimensions_4267ee();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/4267ee.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/4267ee.wgsl.expected.msl
deleted file mode 100644
index 177015d..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/4267ee.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_4267ee(texture2d<float, access::write> tint_symbol_1) {
-  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture2d<float, access::write> tint_symbol_2) {
-  textureDimensions_4267ee(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture2d<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture2d<float, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_4267ee(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture2d<float, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_4267ee(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/4267ee.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/4267ee.wgsl.expected.spvasm
deleted file mode 100644
index a93a79d..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/4267ee.wgsl.expected.spvasm
+++ /dev/null
@@ -1,76 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 37
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_4267ee "textureDimensions_4267ee"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-         %11 = OpTypeImage %float 2D 0 0 0 2 Rgba32f
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %12 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %v2int = OpTypeVector %int 2
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %22 = OpConstantNull %v2int
-         %23 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_4267ee = OpFunction %void None %12
-         %15 = OpLabel
-        %res = OpVariable %_ptr_Function_v2int Function %22
-         %19 = OpLoad %11 %arg_0
-         %16 = OpImageQuerySize %v2int %19
-               OpStore %res %16
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %23
-         %25 = OpLabel
-         %26 = OpFunctionCall %void %textureDimensions_4267ee
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %12
-         %28 = OpLabel
-         %29 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %29
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %12
-         %32 = OpLabel
-         %33 = OpFunctionCall %void %textureDimensions_4267ee
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %12
-         %35 = OpLabel
-         %36 = OpFunctionCall %void %textureDimensions_4267ee
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/4267ee.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/4267ee.wgsl.expected.wgsl
deleted file mode 100644
index a634268..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/4267ee.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba32float, write>;
-
-fn textureDimensions_4267ee() {
-  var res : vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_4267ee();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_4267ee();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_4267ee();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/42d4e6.wgsl b/test/tint/builtins/gen/var/textureDimensions/42d4e6.wgsl
deleted file mode 100644
index 1cb8613..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/42d4e6.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_1d<rgba8unorm, write>;
-
-// fn textureDimensions(texture: texture_storage_1d<rgba8unorm, write>) -> i32
-fn textureDimensions_42d4e6() {
-  var res: i32 = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_42d4e6();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_42d4e6();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_42d4e6();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/42d4e6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/42d4e6.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 7c81817..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/42d4e6.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture1D<float4> arg_0 : register(u0, space1);
-
-void textureDimensions_42d4e6() {
-  int tint_tmp;
-  arg_0.GetDimensions(tint_tmp);
-  int res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_42d4e6();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_42d4e6();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_42d4e6();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/42d4e6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/42d4e6.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 7c81817..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/42d4e6.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture1D<float4> arg_0 : register(u0, space1);
-
-void textureDimensions_42d4e6() {
-  int tint_tmp;
-  arg_0.GetDimensions(tint_tmp);
-  int res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_42d4e6();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_42d4e6();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_42d4e6();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/42d4e6.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/42d4e6.wgsl.expected.glsl
deleted file mode 100644
index f59d175..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/42d4e6.wgsl.expected.glsl
+++ /dev/null
@@ -1,78 +0,0 @@
-SKIP: FAILED
-
-#version 310 es
-
-layout(rgba8) uniform highp writeonly image1D arg_0;
-void textureDimensions_42d4e6() {
-  int res = imageSize(arg_0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_42d4e6();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'image1D' : Reserved word. 
-WARNING: 0:3: 'layout' : useless application of layout qualifier 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision mediump float;
-
-layout(rgba8) uniform highp writeonly image1D arg_0;
-void textureDimensions_42d4e6() {
-  int res = imageSize(arg_0);
-}
-
-void fragment_main() {
-  textureDimensions_42d4e6();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:4: 'image1D' : Reserved word. 
-WARNING: 0:4: 'layout' : useless application of layout qualifier 
-ERROR: 0:4: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-
-layout(rgba8) uniform highp writeonly image1D arg_0;
-void textureDimensions_42d4e6() {
-  int res = imageSize(arg_0);
-}
-
-void compute_main() {
-  textureDimensions_42d4e6();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'image1D' : Reserved word. 
-WARNING: 0:3: 'layout' : useless application of layout qualifier 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/42d4e6.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/42d4e6.wgsl.expected.msl
deleted file mode 100644
index cc3fa54..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/42d4e6.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_42d4e6(texture1d<float, access::write> tint_symbol_1) {
-  int res = int(tint_symbol_1.get_width(0));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture1d<float, access::write> tint_symbol_2) {
-  textureDimensions_42d4e6(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture1d<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture1d<float, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_42d4e6(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture1d<float, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_42d4e6(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/42d4e6.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/42d4e6.wgsl.expected.spvasm
deleted file mode 100644
index 4127ab0..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/42d4e6.wgsl.expected.spvasm
+++ /dev/null
@@ -1,76 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 36
-; Schema: 0
-               OpCapability Shader
-               OpCapability Image1D
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_42d4e6 "textureDimensions_42d4e6"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-         %11 = OpTypeImage %float 1D 0 0 0 2 Rgba8
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %12 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-%_ptr_Function_int = OpTypePointer Function %int
-         %21 = OpConstantNull %int
-         %22 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_42d4e6 = OpFunction %void None %12
-         %15 = OpLabel
-        %res = OpVariable %_ptr_Function_int Function %21
-         %18 = OpLoad %11 %arg_0
-         %16 = OpImageQuerySize %int %18
-               OpStore %res %16
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %22
-         %24 = OpLabel
-         %25 = OpFunctionCall %void %textureDimensions_42d4e6
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %12
-         %27 = OpLabel
-         %28 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %28
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %12
-         %31 = OpLabel
-         %32 = OpFunctionCall %void %textureDimensions_42d4e6
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %12
-         %34 = OpLabel
-         %35 = OpFunctionCall %void %textureDimensions_42d4e6
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/42d4e6.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/42d4e6.wgsl.expected.wgsl
deleted file mode 100644
index ab0376b..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/42d4e6.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba8unorm, write>;
-
-fn textureDimensions_42d4e6() {
-  var res : i32 = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_42d4e6();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_42d4e6();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_42d4e6();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/439651.wgsl b/test/tint/builtins/gen/var/textureDimensions/439651.wgsl
new file mode 100644
index 0000000..42b6803
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/439651.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rg32sint, write>;
+
+// fn textureDimensions(texture: texture_storage_2d<rg32sint, write>) -> vec2<u32>
+fn textureDimensions_439651() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_439651();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_439651();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_439651();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/439651.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/439651.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5a450e7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/439651.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<int4> arg_0 : register(u0, space1);
+
+void textureDimensions_439651() {
+  int2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_439651();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_439651();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_439651();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/439651.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/439651.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5a450e7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/439651.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<int4> arg_0 : register(u0, space1);
+
+void textureDimensions_439651() {
+  int2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_439651();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_439651();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_439651();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/439651.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/439651.wgsl.expected.glsl
new file mode 100644
index 0000000..d997ea7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/439651.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32i) uniform highp writeonly iimage2D arg_0;
+void textureDimensions_439651() {
+  uvec2 res = uvec2(imageSize(arg_0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_439651();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rg32i) uniform highp writeonly iimage2D arg_0;
+void textureDimensions_439651() {
+  uvec2 res = uvec2(imageSize(arg_0));
+}
+
+void fragment_main() {
+  textureDimensions_439651();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32i) uniform highp writeonly iimage2D arg_0;
+void textureDimensions_439651() {
+  uvec2 res = uvec2(imageSize(arg_0));
+}
+
+void compute_main() {
+  textureDimensions_439651();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/439651.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/439651.wgsl.expected.msl
new file mode 100644
index 0000000..6c456ef
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/439651.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_439651(texture2d<int, access::write> tint_symbol_1) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::write> tint_symbol_2) {
+  textureDimensions_439651(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_439651(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_439651(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/439651.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/439651.wgsl.expected.spvasm
new file mode 100644
index 0000000..d5f13da
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/439651.wgsl.expected.spvasm
@@ -0,0 +1,78 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_439651 "textureDimensions_439651"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 0 0 2 Rg32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %23 = OpConstantNull %v2uint
+         %24 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_439651 = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %23
+         %20 = OpLoad %11 %arg_0
+         %17 = OpImageQuerySize %v2uint %20
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %textureDimensions_439651
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %29 = OpLabel
+         %30 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %30
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureDimensions_439651
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureDimensions_439651
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/439651.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/439651.wgsl.expected.wgsl
new file mode 100644
index 0000000..d99bc45
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/439651.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rg32sint, write>;
+
+fn textureDimensions_439651() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_439651();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_439651();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_439651();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/445376.wgsl b/test/tint/builtins/gen/var/textureDimensions/445376.wgsl
new file mode 100644
index 0000000..ed4441c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/445376.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<u32>;
+
+// fn textureDimensions(texture: texture_2d_array<u32>) -> vec2<u32>
+fn textureDimensions_445376() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_445376();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_445376();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_445376();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/445376.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/445376.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1c60935
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/445376.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_445376() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_445376();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_445376();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_445376();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/445376.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/445376.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..1c60935
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/445376.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_445376() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_445376();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_445376();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_445376();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/445376.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/445376.wgsl.expected.glsl
new file mode 100644
index 0000000..9854fcf
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/445376.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp usampler2DArray arg_0_1;
+void textureDimensions_445376() {
+  uvec2 res = uvec2(textureSize(arg_0_1, 0).xy);
+}
+
+vec4 vertex_main() {
+  textureDimensions_445376();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usampler2DArray arg_0_1;
+void textureDimensions_445376() {
+  uvec2 res = uvec2(textureSize(arg_0_1, 0).xy);
+}
+
+void fragment_main() {
+  textureDimensions_445376();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp usampler2DArray arg_0_1;
+void textureDimensions_445376() {
+  uvec2 res = uvec2(textureSize(arg_0_1, 0).xy);
+}
+
+void compute_main() {
+  textureDimensions_445376();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/445376.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/445376.wgsl.expected.msl
new file mode 100644
index 0000000..de6d82a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/445376.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_445376(texture2d_array<uint, access::sample> tint_symbol_1) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::sample> tint_symbol_2) {
+  textureDimensions_445376(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_445376(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_445376(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/445376.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/445376.wgsl.expected.spvasm
new file mode 100644
index 0000000..f9cf186
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/445376.wgsl.expected.spvasm
@@ -0,0 +1,79 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_445376 "textureDimensions_445376"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %v2uint = OpTypeVector %uint 2
+     %v3uint = OpTypeVector %uint 3
+        %int = OpTypeInt 32 1
+      %int_0 = OpConstant %int 0
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %26 = OpConstantNull %v2uint
+         %27 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_445376 = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %26
+         %21 = OpLoad %11 %arg_0
+         %19 = OpImageQuerySizeLod %v3uint %21 %int_0
+         %17 = OpVectorShuffle %v2uint %19 %19 0 1
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureDimensions_445376
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %32 = OpLabel
+         %33 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %33
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureDimensions_445376
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureDimensions_445376
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/445376.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/445376.wgsl.expected.wgsl
new file mode 100644
index 0000000..9b3d28b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/445376.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<u32>;
+
+fn textureDimensions_445376() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_445376();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_445376();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_445376();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/44b358.wgsl b/test/tint/builtins/gen/var/textureDimensions/44b358.wgsl
new file mode 100644
index 0000000..505488f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/44b358.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba32uint, write>;
+
+// fn textureDimensions(texture: texture_storage_3d<rgba32uint, write>) -> vec3<u32>
+fn textureDimensions_44b358() {
+  var res: vec3<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_44b358();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_44b358();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_44b358();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/44b358.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/44b358.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..28733d4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/44b358.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<uint4> arg_0 : register(u0, space1);
+
+void textureDimensions_44b358() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_44b358();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_44b358();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_44b358();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/44b358.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/44b358.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..28733d4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/44b358.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<uint4> arg_0 : register(u0, space1);
+
+void textureDimensions_44b358() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_44b358();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_44b358();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_44b358();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/44b358.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/44b358.wgsl.expected.glsl
new file mode 100644
index 0000000..b8140ec
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/44b358.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba32ui) uniform highp writeonly uimage3D arg_0;
+void textureDimensions_44b358() {
+  uvec3 res = uvec3(imageSize(arg_0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_44b358();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba32ui) uniform highp writeonly uimage3D arg_0;
+void textureDimensions_44b358() {
+  uvec3 res = uvec3(imageSize(arg_0));
+}
+
+void fragment_main() {
+  textureDimensions_44b358();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba32ui) uniform highp writeonly uimage3D arg_0;
+void textureDimensions_44b358() {
+  uvec3 res = uvec3(imageSize(arg_0));
+}
+
+void compute_main() {
+  textureDimensions_44b358();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/44b358.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/44b358.wgsl.expected.msl
new file mode 100644
index 0000000..3fdd338
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/44b358.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_44b358(texture3d<uint, access::write> tint_symbol_1) {
+  uint3 res = uint3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<uint, access::write> tint_symbol_2) {
+  textureDimensions_44b358(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_44b358(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture3d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_44b358(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/44b358.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/44b358.wgsl.expected.spvasm
new file mode 100644
index 0000000..d3cbbcd
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/44b358.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_44b358 "textureDimensions_44b358"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 3D 0 0 0 2 Rgba32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+         %22 = OpConstantNull %v3uint
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_44b358 = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_v3uint Function %22
+         %19 = OpLoad %11 %arg_0
+         %17 = OpImageQuerySize %v3uint %19
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %textureDimensions_44b358
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %28 = OpLabel
+         %29 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %29
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_44b358
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureDimensions_44b358
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/44b358.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/44b358.wgsl.expected.wgsl
new file mode 100644
index 0000000..de45407
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/44b358.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba32uint, write>;
+
+fn textureDimensions_44b358() {
+  var res : vec3<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_44b358();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_44b358();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_44b358();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/452fc1.wgsl b/test/tint/builtins/gen/var/textureDimensions/452fc1.wgsl
new file mode 100644
index 0000000..a156207
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/452fc1.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32uint, write>;
+
+// fn textureDimensions(texture: texture_storage_2d_array<rgba32uint, write>) -> vec2<u32>
+fn textureDimensions_452fc1() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_452fc1();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_452fc1();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_452fc1();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/452fc1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/452fc1.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1a21c49
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/452fc1.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureDimensions_452fc1() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_452fc1();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_452fc1();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_452fc1();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/452fc1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/452fc1.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..1a21c49
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/452fc1.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2DArray<uint4> arg_0 : register(u0, space1);
+
+void textureDimensions_452fc1() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_452fc1();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_452fc1();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_452fc1();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/452fc1.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/452fc1.wgsl.expected.glsl
new file mode 100644
index 0000000..7588f6a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/452fc1.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0;
+void textureDimensions_452fc1() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+}
+
+vec4 vertex_main() {
+  textureDimensions_452fc1();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0;
+void textureDimensions_452fc1() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+}
+
+void fragment_main() {
+  textureDimensions_452fc1();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba32ui) uniform highp writeonly uimage2DArray arg_0;
+void textureDimensions_452fc1() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+}
+
+void compute_main() {
+  textureDimensions_452fc1();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/452fc1.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/452fc1.wgsl.expected.msl
new file mode 100644
index 0000000..291394f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/452fc1.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_452fc1(texture2d_array<uint, access::write> tint_symbol_1) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::write> tint_symbol_2) {
+  textureDimensions_452fc1(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_452fc1(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_452fc1(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/452fc1.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/452fc1.wgsl.expected.spvasm
new file mode 100644
index 0000000..4fd3aa9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/452fc1.wgsl.expected.spvasm
@@ -0,0 +1,78 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_452fc1 "textureDimensions_452fc1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 2 Rgba32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %v2uint = OpTypeVector %uint 2
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %24 = OpConstantNull %v2uint
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_452fc1 = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %24
+         %21 = OpLoad %11 %arg_0
+         %19 = OpImageQuerySize %v3uint %21
+         %17 = OpVectorShuffle %v2uint %19 %19 0 1
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %textureDimensions_452fc1
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureDimensions_452fc1
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureDimensions_452fc1
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/452fc1.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/452fc1.wgsl.expected.wgsl
new file mode 100644
index 0000000..5f78af1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/452fc1.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32uint, write>;
+
+fn textureDimensions_452fc1() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_452fc1();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_452fc1();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_452fc1();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/46f0fc.wgsl b/test/tint/builtins/gen/var/textureDimensions/46f0fc.wgsl
new file mode 100644
index 0000000..4fe62b8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/46f0fc.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<f32>;
+
+// fn textureDimensions(texture: texture_2d_array<f32>) -> vec2<u32>
+fn textureDimensions_46f0fc() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_46f0fc();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_46f0fc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_46f0fc();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/46f0fc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/46f0fc.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f82b087
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/46f0fc.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_46f0fc() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_46f0fc();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_46f0fc();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_46f0fc();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/46f0fc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/46f0fc.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..f82b087
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/46f0fc.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_46f0fc() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_46f0fc();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_46f0fc();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_46f0fc();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/46f0fc.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/46f0fc.wgsl.expected.glsl
new file mode 100644
index 0000000..8ca5717
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/46f0fc.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp sampler2DArray arg_0_1;
+void textureDimensions_46f0fc() {
+  uvec2 res = uvec2(textureSize(arg_0_1, 0).xy);
+}
+
+vec4 vertex_main() {
+  textureDimensions_46f0fc();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_0_1;
+void textureDimensions_46f0fc() {
+  uvec2 res = uvec2(textureSize(arg_0_1, 0).xy);
+}
+
+void fragment_main() {
+  textureDimensions_46f0fc();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2DArray arg_0_1;
+void textureDimensions_46f0fc() {
+  uvec2 res = uvec2(textureSize(arg_0_1, 0).xy);
+}
+
+void compute_main() {
+  textureDimensions_46f0fc();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/46f0fc.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/46f0fc.wgsl.expected.msl
new file mode 100644
index 0000000..d085a9b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/46f0fc.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_46f0fc(texture2d_array<float, access::sample> tint_symbol_1) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::sample> tint_symbol_2) {
+  textureDimensions_46f0fc(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_46f0fc(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_46f0fc(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/46f0fc.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/46f0fc.wgsl.expected.spvasm
new file mode 100644
index 0000000..5847f93
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/46f0fc.wgsl.expected.spvasm
@@ -0,0 +1,79 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_46f0fc "textureDimensions_46f0fc"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %v3uint = OpTypeVector %uint 3
+        %int = OpTypeInt 32 1
+      %int_0 = OpConstant %int 0
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %26 = OpConstantNull %v2uint
+         %27 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_46f0fc = OpFunction %void None %12
+         %15 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %26
+         %21 = OpLoad %11 %arg_0
+         %19 = OpImageQuerySizeLod %v3uint %21 %int_0
+         %16 = OpVectorShuffle %v2uint %19 %19 0 1
+               OpStore %res %16
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureDimensions_46f0fc
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %32 = OpLabel
+         %33 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %33
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureDimensions_46f0fc
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureDimensions_46f0fc
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/46f0fc.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/46f0fc.wgsl.expected.wgsl
new file mode 100644
index 0000000..f968df1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/46f0fc.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<f32>;
+
+fn textureDimensions_46f0fc() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_46f0fc();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_46f0fc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_46f0fc();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/48cb89.wgsl b/test/tint/builtins/gen/var/textureDimensions/48cb89.wgsl
deleted file mode 100644
index 95910e9..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/48cb89.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d<rgba16float, write>;
-
-// fn textureDimensions(texture: texture_storage_2d<rgba16float, write>) -> vec2<i32>
-fn textureDimensions_48cb89() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_48cb89();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_48cb89();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_48cb89();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/48cb89.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/48cb89.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 9ec64be..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/48cb89.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2D<float4> arg_0 : register(u0, space1);
-
-void textureDimensions_48cb89() {
-  int2 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
-  int2 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_48cb89();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_48cb89();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_48cb89();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/48cb89.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/48cb89.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 9ec64be..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/48cb89.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2D<float4> arg_0 : register(u0, space1);
-
-void textureDimensions_48cb89() {
-  int2 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
-  int2 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_48cb89();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_48cb89();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_48cb89();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/48cb89.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/48cb89.wgsl.expected.glsl
deleted file mode 100644
index 026fcaef..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/48cb89.wgsl.expected.glsl
+++ /dev/null
@@ -1,52 +0,0 @@
-#version 310 es
-
-layout(rgba16f) uniform highp writeonly image2D arg_0;
-void textureDimensions_48cb89() {
-  ivec2 res = imageSize(arg_0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_48cb89();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-layout(rgba16f) uniform highp writeonly image2D arg_0;
-void textureDimensions_48cb89() {
-  ivec2 res = imageSize(arg_0);
-}
-
-void fragment_main() {
-  textureDimensions_48cb89();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-layout(rgba16f) uniform highp writeonly image2D arg_0;
-void textureDimensions_48cb89() {
-  ivec2 res = imageSize(arg_0);
-}
-
-void compute_main() {
-  textureDimensions_48cb89();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/48cb89.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/48cb89.wgsl.expected.msl
deleted file mode 100644
index 5f475e2..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/48cb89.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_48cb89(texture2d<float, access::write> tint_symbol_1) {
-  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture2d<float, access::write> tint_symbol_2) {
-  textureDimensions_48cb89(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture2d<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture2d<float, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_48cb89(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture2d<float, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_48cb89(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/48cb89.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/48cb89.wgsl.expected.spvasm
deleted file mode 100644
index 9a887dc..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/48cb89.wgsl.expected.spvasm
+++ /dev/null
@@ -1,76 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 37
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_48cb89 "textureDimensions_48cb89"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-         %11 = OpTypeImage %float 2D 0 0 0 2 Rgba16f
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %12 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %v2int = OpTypeVector %int 2
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %22 = OpConstantNull %v2int
-         %23 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_48cb89 = OpFunction %void None %12
-         %15 = OpLabel
-        %res = OpVariable %_ptr_Function_v2int Function %22
-         %19 = OpLoad %11 %arg_0
-         %16 = OpImageQuerySize %v2int %19
-               OpStore %res %16
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %23
-         %25 = OpLabel
-         %26 = OpFunctionCall %void %textureDimensions_48cb89
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %12
-         %28 = OpLabel
-         %29 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %29
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %12
-         %32 = OpLabel
-         %33 = OpFunctionCall %void %textureDimensions_48cb89
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %12
-         %35 = OpLabel
-         %36 = OpFunctionCall %void %textureDimensions_48cb89
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/48cb89.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/48cb89.wgsl.expected.wgsl
deleted file mode 100644
index 2e4ee35..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/48cb89.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba16float, write>;
-
-fn textureDimensions_48cb89() {
-  var res : vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_48cb89();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_48cb89();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_48cb89();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/49a067.wgsl b/test/tint/builtins/gen/var/textureDimensions/49a067.wgsl
new file mode 100644
index 0000000..06d6e02
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/49a067.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube<f32>;
+
+// fn textureDimensions(texture: texture_cube<f32>, level: i32) -> vec2<u32>
+fn textureDimensions_49a067() {
+  var arg_1 = 1i;
+  var res: vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_49a067();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_49a067();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_49a067();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/49a067.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/49a067.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..3e60709
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/49a067.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+TextureCube<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_49a067() {
+  int arg_1 = 1;
+  int3 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_49a067();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_49a067();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_49a067();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/49a067.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/49a067.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..3e60709
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/49a067.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+TextureCube<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_49a067() {
+  int arg_1 = 1;
+  int3 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_49a067();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_49a067();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_49a067();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/49a067.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/49a067.wgsl.expected.glsl
new file mode 100644
index 0000000..e093e1c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/49a067.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp samplerCube arg_0_1;
+void textureDimensions_49a067() {
+  int arg_1 = 1;
+  uvec2 res = uvec2(textureSize(arg_0_1, arg_1));
+}
+
+vec4 vertex_main() {
+  textureDimensions_49a067();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCube arg_0_1;
+void textureDimensions_49a067() {
+  int arg_1 = 1;
+  uvec2 res = uvec2(textureSize(arg_0_1, arg_1));
+}
+
+void fragment_main() {
+  textureDimensions_49a067();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp samplerCube arg_0_1;
+void textureDimensions_49a067() {
+  int arg_1 = 1;
+  uvec2 res = uvec2(textureSize(arg_0_1, arg_1));
+}
+
+void compute_main() {
+  textureDimensions_49a067();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/49a067.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/49a067.wgsl.expected.msl
new file mode 100644
index 0000000..21fd040
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/49a067.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_49a067(texturecube<float, access::sample> tint_symbol_1) {
+  int arg_1 = 1;
+  uint2 res = uint2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube<float, access::sample> tint_symbol_2) {
+  textureDimensions_49a067(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texturecube<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_49a067(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texturecube<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_49a067(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/49a067.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/49a067.wgsl.expected.spvasm
new file mode 100644
index 0000000..40ea0e4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/49a067.wgsl.expected.spvasm
@@ -0,0 +1,83 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_49a067 "textureDimensions_49a067"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float Cube 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_int = OpTypePointer Function %int
+         %20 = OpConstantNull %int
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %28 = OpConstantNull %v2uint
+         %29 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_49a067 = OpFunction %void None %12
+         %15 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_int Function %20
+        %res = OpVariable %_ptr_Function_v2uint Function %28
+               OpStore %arg_1 %int_1
+         %24 = OpLoad %11 %arg_0
+         %25 = OpLoad %int %arg_1
+         %21 = OpImageQuerySizeLod %v2uint %24 %25
+               OpStore %res %21
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureDimensions_49a067
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %34 = OpLabel
+         %35 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %35
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureDimensions_49a067
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureDimensions_49a067
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/49a067.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/49a067.wgsl.expected.wgsl
new file mode 100644
index 0000000..7ea6a80
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/49a067.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_cube<f32>;
+
+fn textureDimensions_49a067() {
+  var arg_1 = 1i;
+  var res : vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_49a067();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_49a067();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_49a067();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/49d274.wgsl b/test/tint/builtins/gen/var/textureDimensions/49d274.wgsl
deleted file mode 100644
index ee9101f..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/49d274.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32sint, write>;
-
-// fn textureDimensions(texture: texture_storage_2d_array<rg32sint, write>) -> vec2<i32>
-fn textureDimensions_49d274() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_49d274();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_49d274();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_49d274();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/49d274.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/49d274.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 9ceff50..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/49d274.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2DArray<int4> arg_0 : register(u0, space1);
-
-void textureDimensions_49d274() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_49d274();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_49d274();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_49d274();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/49d274.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/49d274.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 9ceff50..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/49d274.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2DArray<int4> arg_0 : register(u0, space1);
-
-void textureDimensions_49d274() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_49d274();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_49d274();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_49d274();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/49d274.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/49d274.wgsl.expected.glsl
deleted file mode 100644
index 70347a6..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/49d274.wgsl.expected.glsl
+++ /dev/null
@@ -1,75 +0,0 @@
-SKIP: FAILED
-
-#version 310 es
-
-layout(rg32i) uniform highp writeonly iimage2DArray arg_0;
-void textureDimensions_49d274() {
-  ivec2 res = imageSize(arg_0).xy;
-}
-
-vec4 vertex_main() {
-  textureDimensions_49d274();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'image load-store format' : not supported with this profile: es
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision mediump float;
-
-layout(rg32i) uniform highp writeonly iimage2DArray arg_0;
-void textureDimensions_49d274() {
-  ivec2 res = imageSize(arg_0).xy;
-}
-
-void fragment_main() {
-  textureDimensions_49d274();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:4: 'image load-store format' : not supported with this profile: es
-ERROR: 0:4: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-
-layout(rg32i) uniform highp writeonly iimage2DArray arg_0;
-void textureDimensions_49d274() {
-  ivec2 res = imageSize(arg_0).xy;
-}
-
-void compute_main() {
-  textureDimensions_49d274();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'image load-store format' : not supported with this profile: es
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/49d274.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/49d274.wgsl.expected.msl
deleted file mode 100644
index 4ca4453..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/49d274.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_49d274(texture2d_array<int, access::write> tint_symbol_1) {
-  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture2d_array<int, access::write> tint_symbol_2) {
-  textureDimensions_49d274(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture2d_array<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture2d_array<int, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_49d274(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture2d_array<int, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_49d274(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/49d274.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/49d274.wgsl.expected.spvasm
deleted file mode 100644
index 9a63680..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/49d274.wgsl.expected.spvasm
+++ /dev/null
@@ -1,79 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 39
-; Schema: 0
-               OpCapability Shader
-               OpCapability StorageImageExtendedFormats
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_49d274 "textureDimensions_49d274"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-        %int = OpTypeInt 32 1
-         %11 = OpTypeImage %int 2D 0 1 0 2 Rg32i
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-      %v2int = OpTypeVector %int 2
-      %v3int = OpTypeVector %int 3
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %24 = OpConstantNull %v2int
-         %25 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_49d274 = OpFunction %void None %13
-         %16 = OpLabel
-        %res = OpVariable %_ptr_Function_v2int Function %24
-         %21 = OpLoad %11 %arg_0
-         %19 = OpImageQuerySize %v3int %21
-         %17 = OpVectorShuffle %v2int %19 %19 0 1
-               OpStore %res %17
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %25
-         %27 = OpLabel
-         %28 = OpFunctionCall %void %textureDimensions_49d274
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %30 = OpLabel
-         %31 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %31
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %34 = OpLabel
-         %35 = OpFunctionCall %void %textureDimensions_49d274
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %37 = OpLabel
-         %38 = OpFunctionCall %void %textureDimensions_49d274
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/49d274.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/49d274.wgsl.expected.wgsl
deleted file mode 100644
index 060af23..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/49d274.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32sint, write>;
-
-fn textureDimensions_49d274() {
-  var res : vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_49d274();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_49d274();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_49d274();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/4acec7.wgsl b/test/tint/builtins/gen/var/textureDimensions/4acec7.wgsl
new file mode 100644
index 0000000..a11f1c8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/4acec7.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32float, write>;
+
+// fn textureDimensions(texture: texture_storage_2d_array<rg32float, write>) -> vec2<u32>
+fn textureDimensions_4acec7() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_4acec7();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_4acec7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_4acec7();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/4acec7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/4acec7.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..fcad56d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/4acec7.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureDimensions_4acec7() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_4acec7();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_4acec7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_4acec7();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/4acec7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/4acec7.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..fcad56d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/4acec7.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureDimensions_4acec7() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_4acec7();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_4acec7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_4acec7();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/4acec7.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/4acec7.wgsl.expected.glsl
new file mode 100644
index 0000000..b94e7fa
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/4acec7.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32f) uniform highp writeonly image2DArray arg_0;
+void textureDimensions_4acec7() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+}
+
+vec4 vertex_main() {
+  textureDimensions_4acec7();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rg32f) uniform highp writeonly image2DArray arg_0;
+void textureDimensions_4acec7() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+}
+
+void fragment_main() {
+  textureDimensions_4acec7();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32f) uniform highp writeonly image2DArray arg_0;
+void textureDimensions_4acec7() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+}
+
+void compute_main() {
+  textureDimensions_4acec7();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/4acec7.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/4acec7.wgsl.expected.msl
new file mode 100644
index 0000000..1647a14
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/4acec7.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_4acec7(texture2d_array<float, access::write> tint_symbol_1) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
+  textureDimensions_4acec7(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_4acec7(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_4acec7(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/4acec7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/4acec7.wgsl.expected.spvasm
new file mode 100644
index 0000000..de0e0ab
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/4acec7.wgsl.expected.spvasm
@@ -0,0 +1,79 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_4acec7 "textureDimensions_4acec7"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rg32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %24 = OpConstantNull %v2uint
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_4acec7 = OpFunction %void None %12
+         %15 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %24
+         %21 = OpLoad %11 %arg_0
+         %19 = OpImageQuerySize %v3uint %21
+         %16 = OpVectorShuffle %v2uint %19 %19 0 1
+               OpStore %res %16
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %textureDimensions_4acec7
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureDimensions_4acec7
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureDimensions_4acec7
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/4acec7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/4acec7.wgsl.expected.wgsl
new file mode 100644
index 0000000..38343eb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/4acec7.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32float, write>;
+
+fn textureDimensions_4acec7() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_4acec7();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_4acec7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_4acec7();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/4b26ef.wgsl b/test/tint/builtins/gen/var/textureDimensions/4b26ef.wgsl
new file mode 100644
index 0000000..5dcc74b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/4b26ef.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba8unorm, write>;
+
+// fn textureDimensions(texture: texture_storage_3d<rgba8unorm, write>) -> vec3<u32>
+fn textureDimensions_4b26ef() {
+  var res: vec3<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_4b26ef();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_4b26ef();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_4b26ef();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/4b26ef.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/4b26ef.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5e783ce
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/4b26ef.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<float4> arg_0 : register(u0, space1);
+
+void textureDimensions_4b26ef() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_4b26ef();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_4b26ef();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_4b26ef();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/4b26ef.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/4b26ef.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5e783ce
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/4b26ef.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<float4> arg_0 : register(u0, space1);
+
+void textureDimensions_4b26ef() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_4b26ef();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_4b26ef();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_4b26ef();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/4b26ef.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/4b26ef.wgsl.expected.glsl
new file mode 100644
index 0000000..e7491ce
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/4b26ef.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba8) uniform highp writeonly image3D arg_0;
+void textureDimensions_4b26ef() {
+  uvec3 res = uvec3(imageSize(arg_0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_4b26ef();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba8) uniform highp writeonly image3D arg_0;
+void textureDimensions_4b26ef() {
+  uvec3 res = uvec3(imageSize(arg_0));
+}
+
+void fragment_main() {
+  textureDimensions_4b26ef();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba8) uniform highp writeonly image3D arg_0;
+void textureDimensions_4b26ef() {
+  uvec3 res = uvec3(imageSize(arg_0));
+}
+
+void compute_main() {
+  textureDimensions_4b26ef();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/4b26ef.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/4b26ef.wgsl.expected.msl
new file mode 100644
index 0000000..5efcbfa
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/4b26ef.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_4b26ef(texture3d<float, access::write> tint_symbol_1) {
+  uint3 res = uint3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::write> tint_symbol_2) {
+  textureDimensions_4b26ef(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_4b26ef(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture3d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_4b26ef(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/4b26ef.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/4b26ef.wgsl.expected.spvasm
new file mode 100644
index 0000000..ab7781f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/4b26ef.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_4b26ef "textureDimensions_4b26ef"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 3D 0 0 0 2 Rgba8
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+         %22 = OpConstantNull %v3uint
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_4b26ef = OpFunction %void None %12
+         %15 = OpLabel
+        %res = OpVariable %_ptr_Function_v3uint Function %22
+         %19 = OpLoad %11 %arg_0
+         %16 = OpImageQuerySize %v3uint %19
+               OpStore %res %16
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %textureDimensions_4b26ef
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %28 = OpLabel
+         %29 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %29
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_4b26ef
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureDimensions_4b26ef
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/4b26ef.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/4b26ef.wgsl.expected.wgsl
new file mode 100644
index 0000000..c12b60c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/4b26ef.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba8unorm, write>;
+
+fn textureDimensions_4b26ef() {
+  var res : vec3<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_4b26ef();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_4b26ef();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_4b26ef();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/4be71b.wgsl b/test/tint/builtins/gen/var/textureDimensions/4be71b.wgsl
new file mode 100644
index 0000000..49432db
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/4be71b.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d<u32>;
+
+// fn textureDimensions(texture: texture_2d<u32>) -> vec2<u32>
+fn textureDimensions_4be71b() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_4be71b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_4be71b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_4be71b();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/4be71b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/4be71b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..bf593db
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/4be71b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_4be71b() {
+  int2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_4be71b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_4be71b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_4be71b();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/4be71b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/4be71b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..bf593db
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/4be71b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_4be71b() {
+  int2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_4be71b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_4be71b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_4be71b();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/4be71b.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/4be71b.wgsl.expected.glsl
new file mode 100644
index 0000000..13a1e30
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/4be71b.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp usampler2D arg_0_1;
+void textureDimensions_4be71b() {
+  uvec2 res = uvec2(textureSize(arg_0_1, 0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_4be71b();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usampler2D arg_0_1;
+void textureDimensions_4be71b() {
+  uvec2 res = uvec2(textureSize(arg_0_1, 0));
+}
+
+void fragment_main() {
+  textureDimensions_4be71b();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp usampler2D arg_0_1;
+void textureDimensions_4be71b() {
+  uvec2 res = uvec2(textureSize(arg_0_1, 0));
+}
+
+void compute_main() {
+  textureDimensions_4be71b();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/4be71b.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/4be71b.wgsl.expected.msl
new file mode 100644
index 0000000..7bbfb11
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/4be71b.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_4be71b(texture2d<uint, access::sample> tint_symbol_1) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::sample> tint_symbol_2) {
+  textureDimensions_4be71b(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_4be71b(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_4be71b(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/4be71b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/4be71b.wgsl.expected.spvasm
new file mode 100644
index 0000000..0bbbd21
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/4be71b.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_4be71b "textureDimensions_4be71b"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %v2uint = OpTypeVector %uint 2
+        %int = OpTypeInt 32 1
+      %int_0 = OpConstant %int 0
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %24 = OpConstantNull %v2uint
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_4be71b = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %24
+         %19 = OpLoad %11 %arg_0
+         %17 = OpImageQuerySizeLod %v2uint %19 %int_0
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %textureDimensions_4be71b
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureDimensions_4be71b
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureDimensions_4be71b
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/4be71b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/4be71b.wgsl.expected.wgsl
new file mode 100644
index 0000000..cea7772
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/4be71b.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_2d<u32>;
+
+fn textureDimensions_4be71b() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_4be71b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_4be71b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_4be71b();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl b/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl
deleted file mode 100644
index 8878859..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2022 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_2d<i32>;
-
-// fn textureDimensions(texture: texture_2d<i32>, level: u32) -> vec2<i32>
-fn textureDimensions_4d42cf() {
-  var arg_1 = 1u;
-  var res: vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_4d42cf();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_4d42cf();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_4d42cf();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl.expected.dxc.hlsl
deleted file mode 100644
index ffe5165..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-Texture2D<int4> arg_0 : register(t0, space1);
-
-void textureDimensions_4d42cf() {
-  uint arg_1 = 1u;
-  int3 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_4d42cf();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_4d42cf();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_4d42cf();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl.expected.fxc.hlsl
deleted file mode 100644
index ffe5165..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-Texture2D<int4> arg_0 : register(t0, space1);
-
-void textureDimensions_4d42cf() {
-  uint arg_1 = 1u;
-  int3 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_4d42cf();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_4d42cf();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_4d42cf();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl.expected.glsl
deleted file mode 100644
index 80a93e1..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl.expected.glsl
+++ /dev/null
@@ -1,55 +0,0 @@
-#version 310 es
-
-uniform highp isampler2D arg_0_1;
-void textureDimensions_4d42cf() {
-  uint arg_1 = 1u;
-  ivec2 res = textureSize(arg_0_1, int(arg_1));
-}
-
-vec4 vertex_main() {
-  textureDimensions_4d42cf();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-uniform highp isampler2D arg_0_1;
-void textureDimensions_4d42cf() {
-  uint arg_1 = 1u;
-  ivec2 res = textureSize(arg_0_1, int(arg_1));
-}
-
-void fragment_main() {
-  textureDimensions_4d42cf();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-uniform highp isampler2D arg_0_1;
-void textureDimensions_4d42cf() {
-  uint arg_1 = 1u;
-  ivec2 res = textureSize(arg_0_1, int(arg_1));
-}
-
-void compute_main() {
-  textureDimensions_4d42cf();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl.expected.msl
deleted file mode 100644
index 3876b26..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl.expected.msl
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_4d42cf(texture2d<int, access::sample> tint_symbol_1) {
-  uint arg_1 = 1u;
-  int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture2d<int, access::sample> tint_symbol_2) {
-  textureDimensions_4d42cf(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture2d<int, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture2d<int, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_4d42cf(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture2d<int, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_4d42cf(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl.expected.spvasm
deleted file mode 100644
index 60daa9b..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl.expected.spvasm
+++ /dev/null
@@ -1,83 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 43
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_4d42cf "textureDimensions_4d42cf"
-               OpName %arg_1 "arg_1"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-        %int = OpTypeInt 32 1
-         %11 = OpTypeImage %int 2D 0 0 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-       %uint = OpTypeInt 32 0
-     %uint_1 = OpConstant %uint 1
-%_ptr_Function_uint = OpTypePointer Function %uint
-         %21 = OpConstantNull %uint
-      %v2int = OpTypeVector %int 2
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %28 = OpConstantNull %v2int
-         %29 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_4d42cf = OpFunction %void None %13
-         %16 = OpLabel
-      %arg_1 = OpVariable %_ptr_Function_uint Function %21
-        %res = OpVariable %_ptr_Function_v2int Function %28
-               OpStore %arg_1 %uint_1
-         %24 = OpLoad %11 %arg_0
-         %25 = OpLoad %uint %arg_1
-         %22 = OpImageQuerySizeLod %v2int %24 %25
-               OpStore %res %22
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %29
-         %31 = OpLabel
-         %32 = OpFunctionCall %void %textureDimensions_4d42cf
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %34 = OpLabel
-         %35 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %35
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %38 = OpLabel
-         %39 = OpFunctionCall %void %textureDimensions_4d42cf
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %41 = OpLabel
-         %42 = OpFunctionCall %void %textureDimensions_4d42cf
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl.expected.wgsl
deleted file mode 100644
index 46f0072..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/4d42cf.wgsl.expected.wgsl
+++ /dev/null
@@ -1,22 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_2d<i32>;
-
-fn textureDimensions_4d42cf() {
-  var arg_1 = 1u;
-  var res : vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_4d42cf();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_4d42cf();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_4d42cf();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/4df9a8.wgsl b/test/tint/builtins/gen/var/textureDimensions/4df9a8.wgsl
deleted file mode 100644
index fc79c53..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/4df9a8.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_1d<rg32uint, write>;
-
-// fn textureDimensions(texture: texture_storage_1d<rg32uint, write>) -> i32
-fn textureDimensions_4df9a8() {
-  var res: i32 = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_4df9a8();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_4df9a8();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_4df9a8();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/4df9a8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/4df9a8.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 8541c75..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/4df9a8.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture1D<uint4> arg_0 : register(u0, space1);
-
-void textureDimensions_4df9a8() {
-  int tint_tmp;
-  arg_0.GetDimensions(tint_tmp);
-  int res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_4df9a8();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_4df9a8();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_4df9a8();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/4df9a8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/4df9a8.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 8541c75..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/4df9a8.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture1D<uint4> arg_0 : register(u0, space1);
-
-void textureDimensions_4df9a8() {
-  int tint_tmp;
-  arg_0.GetDimensions(tint_tmp);
-  int res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_4df9a8();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_4df9a8();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_4df9a8();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/4df9a8.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/4df9a8.wgsl.expected.glsl
deleted file mode 100644
index 7871ed7..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/4df9a8.wgsl.expected.glsl
+++ /dev/null
@@ -1,75 +0,0 @@
-SKIP: FAILED
-
-#version 310 es
-
-layout(rg32ui) uniform highp writeonly uimage1D arg_0;
-void textureDimensions_4df9a8() {
-  int res = imageSize(arg_0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_4df9a8();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'image load-store format' : not supported with this profile: es
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision mediump float;
-
-layout(rg32ui) uniform highp writeonly uimage1D arg_0;
-void textureDimensions_4df9a8() {
-  int res = imageSize(arg_0);
-}
-
-void fragment_main() {
-  textureDimensions_4df9a8();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:4: 'image load-store format' : not supported with this profile: es
-ERROR: 0:4: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-
-layout(rg32ui) uniform highp writeonly uimage1D arg_0;
-void textureDimensions_4df9a8() {
-  int res = imageSize(arg_0);
-}
-
-void compute_main() {
-  textureDimensions_4df9a8();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'image load-store format' : not supported with this profile: es
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/4df9a8.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/4df9a8.wgsl.expected.msl
deleted file mode 100644
index 54723cb..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/4df9a8.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_4df9a8(texture1d<uint, access::write> tint_symbol_1) {
-  int res = int(tint_symbol_1.get_width(0));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture1d<uint, access::write> tint_symbol_2) {
-  textureDimensions_4df9a8(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture1d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture1d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_4df9a8(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture1d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_4df9a8(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/4df9a8.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/4df9a8.wgsl.expected.spvasm
deleted file mode 100644
index c4be2a7..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/4df9a8.wgsl.expected.spvasm
+++ /dev/null
@@ -1,78 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 37
-; Schema: 0
-               OpCapability Shader
-               OpCapability Image1D
-               OpCapability StorageImageExtendedFormats
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_4df9a8 "textureDimensions_4df9a8"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-       %uint = OpTypeInt 32 0
-         %11 = OpTypeImage %uint 1D 0 0 0 2 Rg32ui
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-%_ptr_Function_int = OpTypePointer Function %int
-         %22 = OpConstantNull %int
-         %23 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_4df9a8 = OpFunction %void None %13
-         %16 = OpLabel
-        %res = OpVariable %_ptr_Function_int Function %22
-         %19 = OpLoad %11 %arg_0
-         %17 = OpImageQuerySize %int %19
-               OpStore %res %17
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %23
-         %25 = OpLabel
-         %26 = OpFunctionCall %void %textureDimensions_4df9a8
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %28 = OpLabel
-         %29 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %29
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %32 = OpLabel
-         %33 = OpFunctionCall %void %textureDimensions_4df9a8
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %35 = OpLabel
-         %36 = OpFunctionCall %void %textureDimensions_4df9a8
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/4df9a8.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/4df9a8.wgsl.expected.wgsl
deleted file mode 100644
index b771310..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/4df9a8.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_1d<rg32uint, write>;
-
-fn textureDimensions_4df9a8() {
-  var res : i32 = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_4df9a8();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_4df9a8();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_4df9a8();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/50a9ee.wgsl b/test/tint/builtins/gen/var/textureDimensions/50a9ee.wgsl
deleted file mode 100644
index f7b5a63..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/50a9ee.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_cube_array<f32>;
-
-// fn textureDimensions(texture: texture_cube_array<f32>, level: i32) -> vec2<i32>
-fn textureDimensions_50a9ee() {
-  var arg_1 = 1i;
-  var res: vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_50a9ee();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_50a9ee();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_50a9ee();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/50a9ee.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/50a9ee.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 9e011d0..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/50a9ee.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-TextureCubeArray<float4> arg_0 : register(t0, space1);
-
-void textureDimensions_50a9ee() {
-  int arg_1 = 1;
-  int4 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_50a9ee();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_50a9ee();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_50a9ee();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/50a9ee.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/50a9ee.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 9e011d0..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/50a9ee.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-TextureCubeArray<float4> arg_0 : register(t0, space1);
-
-void textureDimensions_50a9ee() {
-  int arg_1 = 1;
-  int4 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_50a9ee();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_50a9ee();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_50a9ee();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/50a9ee.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/50a9ee.wgsl.expected.glsl
deleted file mode 100644
index e06d866..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/50a9ee.wgsl.expected.glsl
+++ /dev/null
@@ -1,78 +0,0 @@
-SKIP: FAILED
-
-#version 310 es
-
-uniform highp samplerCubeArray arg_0_1;
-void textureDimensions_50a9ee() {
-  int arg_1 = 0;
-  ivec2 res = textureSize(arg_0_1, arg_1).xy;
-}
-
-vec4 vertex_main() {
-  textureDimensions_50a9ee();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'samplerCubeArray' : Reserved word. 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision mediump float;
-
-uniform highp samplerCubeArray arg_0_1;
-void textureDimensions_50a9ee() {
-  int arg_1 = 0;
-  ivec2 res = textureSize(arg_0_1, arg_1).xy;
-}
-
-void fragment_main() {
-  textureDimensions_50a9ee();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:4: 'samplerCubeArray' : Reserved word. 
-ERROR: 0:4: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-
-uniform highp samplerCubeArray arg_0_1;
-void textureDimensions_50a9ee() {
-  int arg_1 = 0;
-  ivec2 res = textureSize(arg_0_1, arg_1).xy;
-}
-
-void compute_main() {
-  textureDimensions_50a9ee();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'samplerCubeArray' : Reserved word. 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/50a9ee.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/50a9ee.wgsl.expected.msl
deleted file mode 100644
index 0d2f391..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/50a9ee.wgsl.expected.msl
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_50a9ee(texturecube_array<float, access::sample> tint_symbol_1) {
-  int arg_1 = 1;
-  int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texturecube_array<float, access::sample> tint_symbol_2) {
-  textureDimensions_50a9ee(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texturecube_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texturecube_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_50a9ee(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texturecube_array<float, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_50a9ee(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/50a9ee.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/50a9ee.wgsl.expected.spvasm
deleted file mode 100644
index b96f4f2..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/50a9ee.wgsl.expected.spvasm
+++ /dev/null
@@ -1,85 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 44
-; Schema: 0
-               OpCapability Shader
-               OpCapability SampledCubeArray
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_50a9ee "textureDimensions_50a9ee"
-               OpName %arg_1 "arg_1"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-         %11 = OpTypeImage %float Cube 0 1 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %12 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %int_1 = OpConstant %int 1
-%_ptr_Function_int = OpTypePointer Function %int
-         %20 = OpConstantNull %int
-      %v2int = OpTypeVector %int 2
-      %v3int = OpTypeVector %int 3
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %29 = OpConstantNull %v2int
-         %30 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_50a9ee = OpFunction %void None %12
-         %15 = OpLabel
-      %arg_1 = OpVariable %_ptr_Function_int Function %20
-        %res = OpVariable %_ptr_Function_v2int Function %29
-               OpStore %arg_1 %int_1
-         %25 = OpLoad %11 %arg_0
-         %26 = OpLoad %int %arg_1
-         %23 = OpImageQuerySizeLod %v3int %25 %26
-         %21 = OpVectorShuffle %v2int %23 %23 0 1
-               OpStore %res %21
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %30
-         %32 = OpLabel
-         %33 = OpFunctionCall %void %textureDimensions_50a9ee
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %12
-         %35 = OpLabel
-         %36 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %36
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %12
-         %39 = OpLabel
-         %40 = OpFunctionCall %void %textureDimensions_50a9ee
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %12
-         %42 = OpLabel
-         %43 = OpFunctionCall %void %textureDimensions_50a9ee
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/50a9ee.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/50a9ee.wgsl.expected.wgsl
deleted file mode 100644
index 220c9b5..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/50a9ee.wgsl.expected.wgsl
+++ /dev/null
@@ -1,22 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_cube_array<f32>;
-
-fn textureDimensions_50a9ee() {
-  var arg_1 = 1i;
-  var res : vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_50a9ee();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_50a9ee();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_50a9ee();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/52045c.wgsl b/test/tint/builtins/gen/var/textureDimensions/52045c.wgsl
deleted file mode 100644
index 31db829..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/52045c.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_1d<i32>;
-
-// fn textureDimensions(texture: texture_1d<i32>, level: i32) -> i32
-fn textureDimensions_52045c() {
-  var arg_1 = 1i;
-  var res: i32 = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_52045c();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_52045c();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_52045c();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/52045c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/52045c.wgsl.expected.dxc.hlsl
deleted file mode 100644
index c3ff009..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/52045c.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-Texture1D<int4> arg_0 : register(t0, space1);
-
-void textureDimensions_52045c() {
-  int arg_1 = 1;
-  int2 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y);
-  int res = tint_tmp.x;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_52045c();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_52045c();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_52045c();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/52045c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/52045c.wgsl.expected.fxc.hlsl
deleted file mode 100644
index c3ff009..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/52045c.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-Texture1D<int4> arg_0 : register(t0, space1);
-
-void textureDimensions_52045c() {
-  int arg_1 = 1;
-  int2 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y);
-  int res = tint_tmp.x;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_52045c();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_52045c();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_52045c();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/52045c.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/52045c.wgsl.expected.glsl
deleted file mode 100644
index d4f8701..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/52045c.wgsl.expected.glsl
+++ /dev/null
@@ -1,78 +0,0 @@
-SKIP: FAILED
-
-#version 310 es
-
-uniform highp isampler1D arg_0_1;
-void textureDimensions_52045c() {
-  int arg_1 = 0;
-  int res = textureSize(arg_0_1, arg_1);
-}
-
-vec4 vertex_main() {
-  textureDimensions_52045c();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'isampler1D' : Reserved word. 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision mediump float;
-
-uniform highp isampler1D arg_0_1;
-void textureDimensions_52045c() {
-  int arg_1 = 0;
-  int res = textureSize(arg_0_1, arg_1);
-}
-
-void fragment_main() {
-  textureDimensions_52045c();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:4: 'isampler1D' : Reserved word. 
-ERROR: 0:4: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-
-uniform highp isampler1D arg_0_1;
-void textureDimensions_52045c() {
-  int arg_1 = 0;
-  int res = textureSize(arg_0_1, arg_1);
-}
-
-void compute_main() {
-  textureDimensions_52045c();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'isampler1D' : Reserved word. 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/52045c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/52045c.wgsl.expected.msl
deleted file mode 100644
index 7fe228a..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/52045c.wgsl.expected.msl
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_52045c(texture1d<int, access::sample> tint_symbol_1) {
-  int arg_1 = 1;
-  int res = int(tint_symbol_1.get_width(0));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture1d<int, access::sample> tint_symbol_2) {
-  textureDimensions_52045c(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture1d<int, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture1d<int, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_52045c(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture1d<int, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_52045c(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/52045c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/52045c.wgsl.expected.spvasm
deleted file mode 100644
index 2989ab6..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/52045c.wgsl.expected.spvasm
+++ /dev/null
@@ -1,80 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 39
-; Schema: 0
-               OpCapability Shader
-               OpCapability Sampled1D
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_52045c "textureDimensions_52045c"
-               OpName %arg_1 "arg_1"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-        %int = OpTypeInt 32 1
-         %11 = OpTypeImage %int 1D 0 0 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-      %int_1 = OpConstant %int 1
-%_ptr_Function_int = OpTypePointer Function %int
-         %20 = OpConstantNull %int
-         %25 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_52045c = OpFunction %void None %13
-         %16 = OpLabel
-      %arg_1 = OpVariable %_ptr_Function_int Function %20
-        %res = OpVariable %_ptr_Function_int Function %20
-               OpStore %arg_1 %int_1
-         %22 = OpLoad %11 %arg_0
-         %23 = OpLoad %int %arg_1
-         %21 = OpImageQuerySizeLod %int %22 %23
-               OpStore %res %21
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %25
-         %27 = OpLabel
-         %28 = OpFunctionCall %void %textureDimensions_52045c
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %30 = OpLabel
-         %31 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %31
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %34 = OpLabel
-         %35 = OpFunctionCall %void %textureDimensions_52045c
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %37 = OpLabel
-         %38 = OpFunctionCall %void %textureDimensions_52045c
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/52045c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/52045c.wgsl.expected.wgsl
deleted file mode 100644
index 38850ba..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/52045c.wgsl.expected.wgsl
+++ /dev/null
@@ -1,22 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_1d<i32>;
-
-fn textureDimensions_52045c() {
-  var arg_1 = 1i;
-  var res : i32 = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_52045c();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_52045c();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_52045c();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/528c0e.wgsl b/test/tint/builtins/gen/var/textureDimensions/528c0e.wgsl
new file mode 100644
index 0000000..816f05b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/528c0e.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<u32>;
+
+// fn textureDimensions(texture: texture_2d_array<u32>, level: u32) -> vec2<u32>
+fn textureDimensions_528c0e() {
+  var arg_1 = 1u;
+  var res: vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_528c0e();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_528c0e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_528c0e();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/528c0e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/528c0e.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e270588
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/528c0e.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_528c0e() {
+  uint arg_1 = 1u;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_528c0e();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_528c0e();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_528c0e();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/528c0e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/528c0e.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..e270588
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/528c0e.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_528c0e() {
+  uint arg_1 = 1u;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_528c0e();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_528c0e();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_528c0e();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/528c0e.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/528c0e.wgsl.expected.glsl
new file mode 100644
index 0000000..c639e05
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/528c0e.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp usampler2DArray arg_0_1;
+void textureDimensions_528c0e() {
+  uint arg_1 = 1u;
+  uvec2 res = uvec2(textureSize(arg_0_1, int(arg_1)).xy);
+}
+
+vec4 vertex_main() {
+  textureDimensions_528c0e();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usampler2DArray arg_0_1;
+void textureDimensions_528c0e() {
+  uint arg_1 = 1u;
+  uvec2 res = uvec2(textureSize(arg_0_1, int(arg_1)).xy);
+}
+
+void fragment_main() {
+  textureDimensions_528c0e();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp usampler2DArray arg_0_1;
+void textureDimensions_528c0e() {
+  uint arg_1 = 1u;
+  uvec2 res = uvec2(textureSize(arg_0_1, int(arg_1)).xy);
+}
+
+void compute_main() {
+  textureDimensions_528c0e();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/528c0e.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/528c0e.wgsl.expected.msl
new file mode 100644
index 0000000..eae0de8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/528c0e.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_528c0e(texture2d_array<uint, access::sample> tint_symbol_1) {
+  uint arg_1 = 1u;
+  uint2 res = uint2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::sample> tint_symbol_2) {
+  textureDimensions_528c0e(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_528c0e(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_528c0e(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/528c0e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/528c0e.wgsl.expected.spvasm
new file mode 100644
index 0000000..969ca17
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/528c0e.wgsl.expected.spvasm
@@ -0,0 +1,84 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_528c0e "textureDimensions_528c0e"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %20 = OpConstantNull %uint
+     %v2uint = OpTypeVector %uint 2
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %29 = OpConstantNull %v2uint
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_528c0e = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %20
+        %res = OpVariable %_ptr_Function_v2uint Function %29
+               OpStore %arg_1 %uint_1
+         %25 = OpLoad %11 %arg_0
+         %26 = OpLoad %uint %arg_1
+         %23 = OpImageQuerySizeLod %v3uint %25 %26
+         %21 = OpVectorShuffle %v2uint %23 %23 0 1
+               OpStore %res %21
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_528c0e
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureDimensions_528c0e
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureDimensions_528c0e
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/528c0e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/528c0e.wgsl.expected.wgsl
new file mode 100644
index 0000000..fcc8b8d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/528c0e.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<u32>;
+
+fn textureDimensions_528c0e() {
+  var arg_1 = 1u;
+  var res : vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_528c0e();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_528c0e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_528c0e();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl b/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl
deleted file mode 100644
index f4fd35d..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2022 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_2d<f32>;
-
-// fn textureDimensions(texture: texture_2d<f32>, level: u32) -> vec2<i32>
-fn textureDimensions_5331e0() {
-  var arg_1 = 1u;
-  var res: vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_5331e0();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_5331e0();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_5331e0();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 2a72144..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-Texture2D<float4> arg_0 : register(t0, space1);
-
-void textureDimensions_5331e0() {
-  uint arg_1 = 1u;
-  int3 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_5331e0();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_5331e0();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_5331e0();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 2a72144..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-Texture2D<float4> arg_0 : register(t0, space1);
-
-void textureDimensions_5331e0() {
-  uint arg_1 = 1u;
-  int3 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_5331e0();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_5331e0();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_5331e0();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl.expected.glsl
deleted file mode 100644
index 4d19c59..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl.expected.glsl
+++ /dev/null
@@ -1,55 +0,0 @@
-#version 310 es
-
-uniform highp sampler2D arg_0_1;
-void textureDimensions_5331e0() {
-  uint arg_1 = 1u;
-  ivec2 res = textureSize(arg_0_1, int(arg_1));
-}
-
-vec4 vertex_main() {
-  textureDimensions_5331e0();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-uniform highp sampler2D arg_0_1;
-void textureDimensions_5331e0() {
-  uint arg_1 = 1u;
-  ivec2 res = textureSize(arg_0_1, int(arg_1));
-}
-
-void fragment_main() {
-  textureDimensions_5331e0();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-uniform highp sampler2D arg_0_1;
-void textureDimensions_5331e0() {
-  uint arg_1 = 1u;
-  ivec2 res = textureSize(arg_0_1, int(arg_1));
-}
-
-void compute_main() {
-  textureDimensions_5331e0();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl.expected.msl
deleted file mode 100644
index 4b62c26..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl.expected.msl
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_5331e0(texture2d<float, access::sample> tint_symbol_1) {
-  uint arg_1 = 1u;
-  int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture2d<float, access::sample> tint_symbol_2) {
-  textureDimensions_5331e0(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture2d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture2d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_5331e0(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture2d<float, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_5331e0(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl.expected.spvasm
deleted file mode 100644
index 57f4f74..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl.expected.spvasm
+++ /dev/null
@@ -1,83 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 43
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_5331e0 "textureDimensions_5331e0"
-               OpName %arg_1 "arg_1"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-         %11 = OpTypeImage %float 2D 0 0 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %12 = OpTypeFunction %void
-       %uint = OpTypeInt 32 0
-     %uint_1 = OpConstant %uint 1
-%_ptr_Function_uint = OpTypePointer Function %uint
-         %20 = OpConstantNull %uint
-        %int = OpTypeInt 32 1
-      %v2int = OpTypeVector %int 2
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %28 = OpConstantNull %v2int
-         %29 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_5331e0 = OpFunction %void None %12
-         %15 = OpLabel
-      %arg_1 = OpVariable %_ptr_Function_uint Function %20
-        %res = OpVariable %_ptr_Function_v2int Function %28
-               OpStore %arg_1 %uint_1
-         %24 = OpLoad %11 %arg_0
-         %25 = OpLoad %uint %arg_1
-         %21 = OpImageQuerySizeLod %v2int %24 %25
-               OpStore %res %21
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %29
-         %31 = OpLabel
-         %32 = OpFunctionCall %void %textureDimensions_5331e0
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %12
-         %34 = OpLabel
-         %35 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %35
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %12
-         %38 = OpLabel
-         %39 = OpFunctionCall %void %textureDimensions_5331e0
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %12
-         %41 = OpLabel
-         %42 = OpFunctionCall %void %textureDimensions_5331e0
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl.expected.wgsl
deleted file mode 100644
index 632c211..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/5331e0.wgsl.expected.wgsl
+++ /dev/null
@@ -1,22 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_2d<f32>;
-
-fn textureDimensions_5331e0() {
-  var arg_1 = 1u;
-  var res : vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_5331e0();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_5331e0();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_5331e0();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/55b23e.wgsl b/test/tint/builtins/gen/var/textureDimensions/55b23e.wgsl
deleted file mode 100644
index a7efa73..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/55b23e.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_1d<rg32float, write>;
-
-// fn textureDimensions(texture: texture_storage_1d<rg32float, write>) -> i32
-fn textureDimensions_55b23e() {
-  var res: i32 = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_55b23e();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_55b23e();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_55b23e();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/55b23e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/55b23e.wgsl.expected.dxc.hlsl
deleted file mode 100644
index c3634a3..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/55b23e.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture1D<float4> arg_0 : register(u0, space1);
-
-void textureDimensions_55b23e() {
-  int tint_tmp;
-  arg_0.GetDimensions(tint_tmp);
-  int res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_55b23e();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_55b23e();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_55b23e();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/55b23e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/55b23e.wgsl.expected.fxc.hlsl
deleted file mode 100644
index c3634a3..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/55b23e.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture1D<float4> arg_0 : register(u0, space1);
-
-void textureDimensions_55b23e() {
-  int tint_tmp;
-  arg_0.GetDimensions(tint_tmp);
-  int res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_55b23e();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_55b23e();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_55b23e();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/55b23e.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/55b23e.wgsl.expected.glsl
deleted file mode 100644
index a9465b8..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/55b23e.wgsl.expected.glsl
+++ /dev/null
@@ -1,75 +0,0 @@
-SKIP: FAILED
-
-#version 310 es
-
-layout(rg32f) uniform highp writeonly image1D arg_0;
-void textureDimensions_55b23e() {
-  int res = imageSize(arg_0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_55b23e();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'image load-store format' : not supported with this profile: es
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision mediump float;
-
-layout(rg32f) uniform highp writeonly image1D arg_0;
-void textureDimensions_55b23e() {
-  int res = imageSize(arg_0);
-}
-
-void fragment_main() {
-  textureDimensions_55b23e();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:4: 'image load-store format' : not supported with this profile: es
-ERROR: 0:4: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-
-layout(rg32f) uniform highp writeonly image1D arg_0;
-void textureDimensions_55b23e() {
-  int res = imageSize(arg_0);
-}
-
-void compute_main() {
-  textureDimensions_55b23e();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'image load-store format' : not supported with this profile: es
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/55b23e.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/55b23e.wgsl.expected.msl
deleted file mode 100644
index 0778752..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/55b23e.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_55b23e(texture1d<float, access::write> tint_symbol_1) {
-  int res = int(tint_symbol_1.get_width(0));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture1d<float, access::write> tint_symbol_2) {
-  textureDimensions_55b23e(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture1d<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture1d<float, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_55b23e(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture1d<float, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_55b23e(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/55b23e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/55b23e.wgsl.expected.spvasm
deleted file mode 100644
index e6470a9..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/55b23e.wgsl.expected.spvasm
+++ /dev/null
@@ -1,77 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 36
-; Schema: 0
-               OpCapability Shader
-               OpCapability Image1D
-               OpCapability StorageImageExtendedFormats
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_55b23e "textureDimensions_55b23e"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-         %11 = OpTypeImage %float 1D 0 0 0 2 Rg32f
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %12 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-%_ptr_Function_int = OpTypePointer Function %int
-         %21 = OpConstantNull %int
-         %22 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_55b23e = OpFunction %void None %12
-         %15 = OpLabel
-        %res = OpVariable %_ptr_Function_int Function %21
-         %18 = OpLoad %11 %arg_0
-         %16 = OpImageQuerySize %int %18
-               OpStore %res %16
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %22
-         %24 = OpLabel
-         %25 = OpFunctionCall %void %textureDimensions_55b23e
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %12
-         %27 = OpLabel
-         %28 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %28
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %12
-         %31 = OpLabel
-         %32 = OpFunctionCall %void %textureDimensions_55b23e
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %12
-         %34 = OpLabel
-         %35 = OpFunctionCall %void %textureDimensions_55b23e
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/55b23e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/55b23e.wgsl.expected.wgsl
deleted file mode 100644
index 430da3c..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/55b23e.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_1d<rg32float, write>;
-
-fn textureDimensions_55b23e() {
-  var res : i32 = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_55b23e();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_55b23e();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_55b23e();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/579629.wgsl b/test/tint/builtins/gen/var/textureDimensions/579629.wgsl
deleted file mode 100644
index 111e70b..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/579629.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_multisampled_2d<u32>;
-
-// fn textureDimensions(texture: texture_multisampled_2d<u32>) -> vec2<i32>
-fn textureDimensions_579629() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_579629();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_579629();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_579629();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/579629.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/579629.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 297d5dd..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/579629.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-Texture2DMS<uint4> arg_0 : register(t0, space1);
-
-void textureDimensions_579629() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_579629();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_579629();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_579629();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/579629.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/579629.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 297d5dd..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/579629.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-Texture2DMS<uint4> arg_0 : register(t0, space1);
-
-void textureDimensions_579629() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_579629();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_579629();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_579629();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/579629.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/579629.wgsl.expected.glsl
deleted file mode 100644
index d1ca2e7..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/579629.wgsl.expected.glsl
+++ /dev/null
@@ -1,52 +0,0 @@
-#version 310 es
-
-uniform highp usampler2DMS arg_0_1;
-void textureDimensions_579629() {
-  ivec2 res = textureSize(arg_0_1);
-}
-
-vec4 vertex_main() {
-  textureDimensions_579629();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-uniform highp usampler2DMS arg_0_1;
-void textureDimensions_579629() {
-  ivec2 res = textureSize(arg_0_1);
-}
-
-void fragment_main() {
-  textureDimensions_579629();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-uniform highp usampler2DMS arg_0_1;
-void textureDimensions_579629() {
-  ivec2 res = textureSize(arg_0_1);
-}
-
-void compute_main() {
-  textureDimensions_579629();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/579629.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/579629.wgsl.expected.msl
deleted file mode 100644
index d6c497b..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/579629.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_579629(texture2d_ms<uint, access::read> tint_symbol_1) {
-  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture2d_ms<uint, access::read> tint_symbol_2) {
-  textureDimensions_579629(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture2d_ms<uint, access::read> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture2d_ms<uint, access::read> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_579629(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture2d_ms<uint, access::read> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_579629(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/579629.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/579629.wgsl.expected.spvasm
deleted file mode 100644
index 5d35bf9..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/579629.wgsl.expected.spvasm
+++ /dev/null
@@ -1,76 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 38
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_579629 "textureDimensions_579629"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-       %uint = OpTypeInt 32 0
-         %11 = OpTypeImage %uint 2D 0 0 1 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %v2int = OpTypeVector %int 2
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %23 = OpConstantNull %v2int
-         %24 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_579629 = OpFunction %void None %13
-         %16 = OpLabel
-        %res = OpVariable %_ptr_Function_v2int Function %23
-         %20 = OpLoad %11 %arg_0
-         %17 = OpImageQuerySize %v2int %20
-               OpStore %res %17
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %24
-         %26 = OpLabel
-         %27 = OpFunctionCall %void %textureDimensions_579629
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %29 = OpLabel
-         %30 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %30
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %33 = OpLabel
-         %34 = OpFunctionCall %void %textureDimensions_579629
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %36 = OpLabel
-         %37 = OpFunctionCall %void %textureDimensions_579629
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/579629.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/579629.wgsl.expected.wgsl
deleted file mode 100644
index 1e1d6d7..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/579629.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_multisampled_2d<u32>;
-
-fn textureDimensions_579629() {
-  var res : vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_579629();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_579629();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_579629();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/57da0b.wgsl b/test/tint/builtins/gen/var/textureDimensions/57da0b.wgsl
deleted file mode 100644
index f56dbbd..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/57da0b.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_1d<r32uint, write>;
-
-// fn textureDimensions(texture: texture_storage_1d<r32uint, write>) -> i32
-fn textureDimensions_57da0b() {
-  var res: i32 = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_57da0b();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_57da0b();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_57da0b();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/57da0b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/57da0b.wgsl.expected.dxc.hlsl
deleted file mode 100644
index f9df5ef..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/57da0b.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture1D<uint4> arg_0 : register(u0, space1);
-
-void textureDimensions_57da0b() {
-  int tint_tmp;
-  arg_0.GetDimensions(tint_tmp);
-  int res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_57da0b();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_57da0b();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_57da0b();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/57da0b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/57da0b.wgsl.expected.fxc.hlsl
deleted file mode 100644
index f9df5ef..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/57da0b.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture1D<uint4> arg_0 : register(u0, space1);
-
-void textureDimensions_57da0b() {
-  int tint_tmp;
-  arg_0.GetDimensions(tint_tmp);
-  int res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_57da0b();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_57da0b();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_57da0b();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/57da0b.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/57da0b.wgsl.expected.glsl
deleted file mode 100644
index c45ed2f..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/57da0b.wgsl.expected.glsl
+++ /dev/null
@@ -1,78 +0,0 @@
-SKIP: FAILED
-
-#version 310 es
-
-layout(r32ui) uniform highp writeonly uimage1D arg_0;
-void textureDimensions_57da0b() {
-  int res = imageSize(arg_0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_57da0b();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'uimage1D' : Reserved word. 
-WARNING: 0:3: 'layout' : useless application of layout qualifier 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision mediump float;
-
-layout(r32ui) uniform highp writeonly uimage1D arg_0;
-void textureDimensions_57da0b() {
-  int res = imageSize(arg_0);
-}
-
-void fragment_main() {
-  textureDimensions_57da0b();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:4: 'uimage1D' : Reserved word. 
-WARNING: 0:4: 'layout' : useless application of layout qualifier 
-ERROR: 0:4: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-
-layout(r32ui) uniform highp writeonly uimage1D arg_0;
-void textureDimensions_57da0b() {
-  int res = imageSize(arg_0);
-}
-
-void compute_main() {
-  textureDimensions_57da0b();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'uimage1D' : Reserved word. 
-WARNING: 0:3: 'layout' : useless application of layout qualifier 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/57da0b.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/57da0b.wgsl.expected.msl
deleted file mode 100644
index fb1c232..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/57da0b.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_57da0b(texture1d<uint, access::write> tint_symbol_1) {
-  int res = int(tint_symbol_1.get_width(0));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture1d<uint, access::write> tint_symbol_2) {
-  textureDimensions_57da0b(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture1d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture1d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_57da0b(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture1d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_57da0b(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/57da0b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/57da0b.wgsl.expected.spvasm
deleted file mode 100644
index 9d0c96d..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/57da0b.wgsl.expected.spvasm
+++ /dev/null
@@ -1,77 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 37
-; Schema: 0
-               OpCapability Shader
-               OpCapability Image1D
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_57da0b "textureDimensions_57da0b"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-       %uint = OpTypeInt 32 0
-         %11 = OpTypeImage %uint 1D 0 0 0 2 R32ui
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-%_ptr_Function_int = OpTypePointer Function %int
-         %22 = OpConstantNull %int
-         %23 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_57da0b = OpFunction %void None %13
-         %16 = OpLabel
-        %res = OpVariable %_ptr_Function_int Function %22
-         %19 = OpLoad %11 %arg_0
-         %17 = OpImageQuerySize %int %19
-               OpStore %res %17
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %23
-         %25 = OpLabel
-         %26 = OpFunctionCall %void %textureDimensions_57da0b
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %28 = OpLabel
-         %29 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %29
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %32 = OpLabel
-         %33 = OpFunctionCall %void %textureDimensions_57da0b
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %35 = OpLabel
-         %36 = OpFunctionCall %void %textureDimensions_57da0b
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/57da0b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/57da0b.wgsl.expected.wgsl
deleted file mode 100644
index b599184..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/57da0b.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_1d<r32uint, write>;
-
-fn textureDimensions_57da0b() {
-  var res : i32 = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_57da0b();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_57da0b();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_57da0b();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/57e28f.wgsl b/test/tint/builtins/gen/var/textureDimensions/57e28f.wgsl
deleted file mode 100644
index 9da6a8a..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/57e28f.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_depth_cube;
-
-// fn textureDimensions(texture: texture_depth_cube) -> vec2<i32>
-fn textureDimensions_57e28f() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_57e28f();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_57e28f();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_57e28f();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/57e28f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/57e28f.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 8da8d7d..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/57e28f.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-TextureCube arg_0 : register(t0, space1);
-
-void textureDimensions_57e28f() {
-  int2 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
-  int2 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_57e28f();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_57e28f();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_57e28f();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/57e28f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/57e28f.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 8da8d7d..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/57e28f.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-TextureCube arg_0 : register(t0, space1);
-
-void textureDimensions_57e28f() {
-  int2 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
-  int2 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_57e28f();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_57e28f();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_57e28f();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/57e28f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/57e28f.wgsl.expected.glsl
deleted file mode 100644
index c8713a2..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/57e28f.wgsl.expected.glsl
+++ /dev/null
@@ -1,52 +0,0 @@
-#version 310 es
-
-uniform highp samplerCube arg_0_1;
-void textureDimensions_57e28f() {
-  ivec2 res = textureSize(arg_0_1, 0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_57e28f();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-uniform highp samplerCube arg_0_1;
-void textureDimensions_57e28f() {
-  ivec2 res = textureSize(arg_0_1, 0);
-}
-
-void fragment_main() {
-  textureDimensions_57e28f();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-uniform highp samplerCube arg_0_1;
-void textureDimensions_57e28f() {
-  ivec2 res = textureSize(arg_0_1, 0);
-}
-
-void compute_main() {
-  textureDimensions_57e28f();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/57e28f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/57e28f.wgsl.expected.msl
deleted file mode 100644
index c089020..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/57e28f.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_57e28f(depthcube<float, access::sample> tint_symbol_1) {
-  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(depthcube<float, access::sample> tint_symbol_2) {
-  textureDimensions_57e28f(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(depthcube<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(depthcube<float, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_57e28f(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(depthcube<float, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_57e28f(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/57e28f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/57e28f.wgsl.expected.spvasm
deleted file mode 100644
index 9dd34bf..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/57e28f.wgsl.expected.spvasm
+++ /dev/null
@@ -1,76 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 38
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_57e28f "textureDimensions_57e28f"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-         %11 = OpTypeImage %float Cube 0 0 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %12 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %v2int = OpTypeVector %int 2
-      %int_0 = OpConstant %int 0
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %23 = OpConstantNull %v2int
-         %24 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_57e28f = OpFunction %void None %12
-         %15 = OpLabel
-        %res = OpVariable %_ptr_Function_v2int Function %23
-         %19 = OpLoad %11 %arg_0
-         %16 = OpImageQuerySizeLod %v2int %19 %int_0
-               OpStore %res %16
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %24
-         %26 = OpLabel
-         %27 = OpFunctionCall %void %textureDimensions_57e28f
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %12
-         %29 = OpLabel
-         %30 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %30
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %12
-         %33 = OpLabel
-         %34 = OpFunctionCall %void %textureDimensions_57e28f
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %12
-         %36 = OpLabel
-         %37 = OpFunctionCall %void %textureDimensions_57e28f
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/57e28f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/57e28f.wgsl.expected.wgsl
deleted file mode 100644
index e0b854e..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/57e28f.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_depth_cube;
-
-fn textureDimensions_57e28f() {
-  var res : vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_57e28f();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_57e28f();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_57e28f();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/58a515.wgsl b/test/tint/builtins/gen/var/textureDimensions/58a515.wgsl
deleted file mode 100644
index ac97548..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/58a515.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16float, write>;
-
-// fn textureDimensions(texture: texture_storage_2d_array<rgba16float, write>) -> vec2<i32>
-fn textureDimensions_58a515() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_58a515();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_58a515();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_58a515();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/58a515.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/58a515.wgsl.expected.dxc.hlsl
deleted file mode 100644
index e8a7b4b..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/58a515.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2DArray<float4> arg_0 : register(u0, space1);
-
-void textureDimensions_58a515() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_58a515();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_58a515();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_58a515();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/58a515.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/58a515.wgsl.expected.fxc.hlsl
deleted file mode 100644
index e8a7b4b..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/58a515.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2DArray<float4> arg_0 : register(u0, space1);
-
-void textureDimensions_58a515() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_58a515();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_58a515();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_58a515();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/58a515.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/58a515.wgsl.expected.glsl
deleted file mode 100644
index b67bb0f..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/58a515.wgsl.expected.glsl
+++ /dev/null
@@ -1,52 +0,0 @@
-#version 310 es
-
-layout(rgba16f) uniform highp writeonly image2DArray arg_0;
-void textureDimensions_58a515() {
-  ivec2 res = imageSize(arg_0).xy;
-}
-
-vec4 vertex_main() {
-  textureDimensions_58a515();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-layout(rgba16f) uniform highp writeonly image2DArray arg_0;
-void textureDimensions_58a515() {
-  ivec2 res = imageSize(arg_0).xy;
-}
-
-void fragment_main() {
-  textureDimensions_58a515();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-layout(rgba16f) uniform highp writeonly image2DArray arg_0;
-void textureDimensions_58a515() {
-  ivec2 res = imageSize(arg_0).xy;
-}
-
-void compute_main() {
-  textureDimensions_58a515();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/58a515.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/58a515.wgsl.expected.msl
deleted file mode 100644
index c8d90cd..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/58a515.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_58a515(texture2d_array<float, access::write> tint_symbol_1) {
-  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
-  textureDimensions_58a515(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture2d_array<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture2d_array<float, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_58a515(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture2d_array<float, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_58a515(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/58a515.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/58a515.wgsl.expected.spvasm
deleted file mode 100644
index 5afc929..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/58a515.wgsl.expected.spvasm
+++ /dev/null
@@ -1,78 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 39
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_58a515 "textureDimensions_58a515"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba16f
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %12 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %v2int = OpTypeVector %int 2
-      %v3int = OpTypeVector %int 3
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %24 = OpConstantNull %v2int
-         %25 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_58a515 = OpFunction %void None %12
-         %15 = OpLabel
-        %res = OpVariable %_ptr_Function_v2int Function %24
-         %21 = OpLoad %11 %arg_0
-         %19 = OpImageQuerySize %v3int %21
-         %16 = OpVectorShuffle %v2int %19 %19 0 1
-               OpStore %res %16
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %25
-         %27 = OpLabel
-         %28 = OpFunctionCall %void %textureDimensions_58a515
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %12
-         %30 = OpLabel
-         %31 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %31
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %12
-         %34 = OpLabel
-         %35 = OpFunctionCall %void %textureDimensions_58a515
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %12
-         %37 = OpLabel
-         %38 = OpFunctionCall %void %textureDimensions_58a515
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/58a515.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/58a515.wgsl.expected.wgsl
deleted file mode 100644
index 21bad72..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/58a515.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16float, write>;
-
-fn textureDimensions_58a515() {
-  var res : vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_58a515();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_58a515();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_58a515();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/58a82d.wgsl b/test/tint/builtins/gen/var/textureDimensions/58a82d.wgsl
new file mode 100644
index 0000000..e3e1557
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/58a82d.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba16uint, write>;
+
+// fn textureDimensions(texture: texture_storage_1d<rgba16uint, write>) -> u32
+fn textureDimensions_58a82d() {
+  var res: u32 = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_58a82d();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_58a82d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_58a82d();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/58a82d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/58a82d.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..80b2c98
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/58a82d.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<uint4> arg_0 : register(u0, space1);
+
+void textureDimensions_58a82d() {
+  int tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_58a82d();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_58a82d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_58a82d();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/58a82d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/58a82d.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..80b2c98
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/58a82d.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<uint4> arg_0 : register(u0, space1);
+
+void textureDimensions_58a82d() {
+  int tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_58a82d();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_58a82d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_58a82d();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/58a82d.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/58a82d.wgsl.expected.glsl
new file mode 100644
index 0000000..2fcd82e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/58a82d.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16ui) uniform highp writeonly uimage1D arg_0;
+void textureDimensions_58a82d() {
+  uint res = uint(imageSize(arg_0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_58a82d();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'uimage1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rgba16ui) uniform highp writeonly uimage1D arg_0;
+void textureDimensions_58a82d() {
+  uint res = uint(imageSize(arg_0));
+}
+
+void fragment_main() {
+  textureDimensions_58a82d();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'uimage1D' : Reserved word. 
+WARNING: 0:4: 'layout' : useless application of layout qualifier 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16ui) uniform highp writeonly uimage1D arg_0;
+void textureDimensions_58a82d() {
+  uint res = uint(imageSize(arg_0));
+}
+
+void compute_main() {
+  textureDimensions_58a82d();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'uimage1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/58a82d.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/58a82d.wgsl.expected.msl
new file mode 100644
index 0000000..34b38cc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/58a82d.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_58a82d(texture1d<uint, access::write> tint_symbol_1) {
+  uint res = tint_symbol_1.get_width(0);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<uint, access::write> tint_symbol_2) {
+  textureDimensions_58a82d(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_58a82d(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_58a82d(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/58a82d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/58a82d.wgsl.expected.spvasm
new file mode 100644
index 0000000..cc519c7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/58a82d.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_58a82d "textureDimensions_58a82d"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 1D 0 0 0 2 Rgba16ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %21 = OpConstantNull %uint
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_58a82d = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_uint Function %21
+         %18 = OpLoad %11 %arg_0
+         %17 = OpImageQuerySize %uint %18
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %textureDimensions_58a82d
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %27 = OpLabel
+         %28 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %28
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureDimensions_58a82d
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureDimensions_58a82d
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/58a82d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/58a82d.wgsl.expected.wgsl
new file mode 100644
index 0000000..f61f64b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/58a82d.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba16uint, write>;
+
+fn textureDimensions_58a82d() {
+  var res : u32 = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_58a82d();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_58a82d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_58a82d();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/591981.wgsl b/test/tint/builtins/gen/var/textureDimensions/591981.wgsl
new file mode 100644
index 0000000..062e5ad
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/591981.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba16sint, write>;
+
+// fn textureDimensions(texture: texture_storage_3d<rgba16sint, write>) -> vec3<u32>
+fn textureDimensions_591981() {
+  var res: vec3<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_591981();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_591981();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_591981();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/591981.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/591981.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..4f3144c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/591981.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<int4> arg_0 : register(u0, space1);
+
+void textureDimensions_591981() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_591981();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_591981();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_591981();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/591981.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/591981.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..4f3144c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/591981.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<int4> arg_0 : register(u0, space1);
+
+void textureDimensions_591981() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_591981();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_591981();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_591981();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/591981.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/591981.wgsl.expected.glsl
new file mode 100644
index 0000000..03a38d7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/591981.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba16i) uniform highp writeonly iimage3D arg_0;
+void textureDimensions_591981() {
+  uvec3 res = uvec3(imageSize(arg_0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_591981();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba16i) uniform highp writeonly iimage3D arg_0;
+void textureDimensions_591981() {
+  uvec3 res = uvec3(imageSize(arg_0));
+}
+
+void fragment_main() {
+  textureDimensions_591981();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba16i) uniform highp writeonly iimage3D arg_0;
+void textureDimensions_591981() {
+  uvec3 res = uvec3(imageSize(arg_0));
+}
+
+void compute_main() {
+  textureDimensions_591981();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/591981.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/591981.wgsl.expected.msl
new file mode 100644
index 0000000..b80abf1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/591981.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_591981(texture3d<int, access::write> tint_symbol_1) {
+  uint3 res = uint3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<int, access::write> tint_symbol_2) {
+  textureDimensions_591981(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_591981(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture3d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_591981(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/591981.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/591981.wgsl.expected.spvasm
new file mode 100644
index 0000000..f66c1ef
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/591981.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_591981 "textureDimensions_591981"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 3D 0 0 0 2 Rgba16i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+         %23 = OpConstantNull %v3uint
+         %24 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_591981 = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_v3uint Function %23
+         %20 = OpLoad %11 %arg_0
+         %17 = OpImageQuerySize %v3uint %20
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %textureDimensions_591981
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %29 = OpLabel
+         %30 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %30
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureDimensions_591981
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureDimensions_591981
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/591981.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/591981.wgsl.expected.wgsl
new file mode 100644
index 0000000..9f1b90b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/591981.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba16sint, write>;
+
+fn textureDimensions_591981() {
+  var res : vec3<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_591981();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_591981();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_591981();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/5985f3.wgsl b/test/tint/builtins/gen/var/textureDimensions/5985f3.wgsl
deleted file mode 100644
index 52d9859..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/5985f3.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32sint, write>;
-
-// fn textureDimensions(texture: texture_storage_2d_array<rgba32sint, write>) -> vec2<i32>
-fn textureDimensions_5985f3() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_5985f3();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_5985f3();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_5985f3();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/5985f3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/5985f3.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 488cb17..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/5985f3.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2DArray<int4> arg_0 : register(u0, space1);
-
-void textureDimensions_5985f3() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_5985f3();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_5985f3();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_5985f3();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/5985f3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/5985f3.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 488cb17..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/5985f3.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2DArray<int4> arg_0 : register(u0, space1);
-
-void textureDimensions_5985f3() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_5985f3();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_5985f3();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_5985f3();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/5985f3.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/5985f3.wgsl.expected.glsl
deleted file mode 100644
index 4c33a17..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/5985f3.wgsl.expected.glsl
+++ /dev/null
@@ -1,52 +0,0 @@
-#version 310 es
-
-layout(rgba32i) uniform highp writeonly iimage2DArray arg_0;
-void textureDimensions_5985f3() {
-  ivec2 res = imageSize(arg_0).xy;
-}
-
-vec4 vertex_main() {
-  textureDimensions_5985f3();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-layout(rgba32i) uniform highp writeonly iimage2DArray arg_0;
-void textureDimensions_5985f3() {
-  ivec2 res = imageSize(arg_0).xy;
-}
-
-void fragment_main() {
-  textureDimensions_5985f3();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-layout(rgba32i) uniform highp writeonly iimage2DArray arg_0;
-void textureDimensions_5985f3() {
-  ivec2 res = imageSize(arg_0).xy;
-}
-
-void compute_main() {
-  textureDimensions_5985f3();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/5985f3.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/5985f3.wgsl.expected.msl
deleted file mode 100644
index 90f407d..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/5985f3.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_5985f3(texture2d_array<int, access::write> tint_symbol_1) {
-  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture2d_array<int, access::write> tint_symbol_2) {
-  textureDimensions_5985f3(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture2d_array<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture2d_array<int, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_5985f3(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture2d_array<int, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_5985f3(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/5985f3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/5985f3.wgsl.expected.spvasm
deleted file mode 100644
index f51c50b..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/5985f3.wgsl.expected.spvasm
+++ /dev/null
@@ -1,78 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 39
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_5985f3 "textureDimensions_5985f3"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-        %int = OpTypeInt 32 1
-         %11 = OpTypeImage %int 2D 0 1 0 2 Rgba32i
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-      %v2int = OpTypeVector %int 2
-      %v3int = OpTypeVector %int 3
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %24 = OpConstantNull %v2int
-         %25 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_5985f3 = OpFunction %void None %13
-         %16 = OpLabel
-        %res = OpVariable %_ptr_Function_v2int Function %24
-         %21 = OpLoad %11 %arg_0
-         %19 = OpImageQuerySize %v3int %21
-         %17 = OpVectorShuffle %v2int %19 %19 0 1
-               OpStore %res %17
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %25
-         %27 = OpLabel
-         %28 = OpFunctionCall %void %textureDimensions_5985f3
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %30 = OpLabel
-         %31 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %31
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %34 = OpLabel
-         %35 = OpFunctionCall %void %textureDimensions_5985f3
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %37 = OpLabel
-         %38 = OpFunctionCall %void %textureDimensions_5985f3
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/5985f3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/5985f3.wgsl.expected.wgsl
deleted file mode 100644
index 8449517..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/5985f3.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32sint, write>;
-
-fn textureDimensions_5985f3() {
-  var res : vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_5985f3();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_5985f3();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_5985f3();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/599ab5.wgsl b/test/tint/builtins/gen/var/textureDimensions/599ab5.wgsl
new file mode 100644
index 0000000..25708ba
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/599ab5.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba16float, write>;
+
+// fn textureDimensions(texture: texture_storage_2d<rgba16float, write>) -> vec2<u32>
+fn textureDimensions_599ab5() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_599ab5();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_599ab5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_599ab5();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/599ab5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/599ab5.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..161321e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/599ab5.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<float4> arg_0 : register(u0, space1);
+
+void textureDimensions_599ab5() {
+  int2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_599ab5();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_599ab5();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_599ab5();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/599ab5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/599ab5.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..161321e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/599ab5.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<float4> arg_0 : register(u0, space1);
+
+void textureDimensions_599ab5() {
+  int2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_599ab5();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_599ab5();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_599ab5();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/599ab5.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/599ab5.wgsl.expected.glsl
new file mode 100644
index 0000000..e4e61d5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/599ab5.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba16f) uniform highp writeonly image2D arg_0;
+void textureDimensions_599ab5() {
+  uvec2 res = uvec2(imageSize(arg_0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_599ab5();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba16f) uniform highp writeonly image2D arg_0;
+void textureDimensions_599ab5() {
+  uvec2 res = uvec2(imageSize(arg_0));
+}
+
+void fragment_main() {
+  textureDimensions_599ab5();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba16f) uniform highp writeonly image2D arg_0;
+void textureDimensions_599ab5() {
+  uvec2 res = uvec2(imageSize(arg_0));
+}
+
+void compute_main() {
+  textureDimensions_599ab5();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/599ab5.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/599ab5.wgsl.expected.msl
new file mode 100644
index 0000000..9d36a4b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/599ab5.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_599ab5(texture2d<float, access::write> tint_symbol_1) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::write> tint_symbol_2) {
+  textureDimensions_599ab5(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_599ab5(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_599ab5(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/599ab5.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/599ab5.wgsl.expected.spvasm
new file mode 100644
index 0000000..6a2e7c1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/599ab5.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_599ab5 "textureDimensions_599ab5"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 2 Rgba16f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %22 = OpConstantNull %v2uint
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_599ab5 = OpFunction %void None %12
+         %15 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %22
+         %19 = OpLoad %11 %arg_0
+         %16 = OpImageQuerySize %v2uint %19
+               OpStore %res %16
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %textureDimensions_599ab5
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %28 = OpLabel
+         %29 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %29
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_599ab5
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureDimensions_599ab5
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/599ab5.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/599ab5.wgsl.expected.wgsl
new file mode 100644
index 0000000..0607926
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/599ab5.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba16float, write>;
+
+fn textureDimensions_599ab5() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_599ab5();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_599ab5();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_599ab5();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/5caa5e.wgsl b/test/tint/builtins/gen/var/textureDimensions/5caa5e.wgsl
deleted file mode 100644
index 8de30ac..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/5caa5e.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_1d<rgba32uint, write>;
-
-// fn textureDimensions(texture: texture_storage_1d<rgba32uint, write>) -> i32
-fn textureDimensions_5caa5e() {
-  var res: i32 = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_5caa5e();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_5caa5e();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_5caa5e();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/5caa5e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/5caa5e.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 066fbdf..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/5caa5e.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture1D<uint4> arg_0 : register(u0, space1);
-
-void textureDimensions_5caa5e() {
-  int tint_tmp;
-  arg_0.GetDimensions(tint_tmp);
-  int res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_5caa5e();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_5caa5e();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_5caa5e();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/5caa5e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/5caa5e.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 066fbdf..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/5caa5e.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture1D<uint4> arg_0 : register(u0, space1);
-
-void textureDimensions_5caa5e() {
-  int tint_tmp;
-  arg_0.GetDimensions(tint_tmp);
-  int res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_5caa5e();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_5caa5e();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_5caa5e();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/5caa5e.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/5caa5e.wgsl.expected.glsl
deleted file mode 100644
index d02caf1..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/5caa5e.wgsl.expected.glsl
+++ /dev/null
@@ -1,78 +0,0 @@
-SKIP: FAILED
-
-#version 310 es
-
-layout(rgba32ui) uniform highp writeonly uimage1D arg_0;
-void textureDimensions_5caa5e() {
-  int res = imageSize(arg_0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_5caa5e();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'uimage1D' : Reserved word. 
-WARNING: 0:3: 'layout' : useless application of layout qualifier 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision mediump float;
-
-layout(rgba32ui) uniform highp writeonly uimage1D arg_0;
-void textureDimensions_5caa5e() {
-  int res = imageSize(arg_0);
-}
-
-void fragment_main() {
-  textureDimensions_5caa5e();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:4: 'uimage1D' : Reserved word. 
-WARNING: 0:4: 'layout' : useless application of layout qualifier 
-ERROR: 0:4: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-
-layout(rgba32ui) uniform highp writeonly uimage1D arg_0;
-void textureDimensions_5caa5e() {
-  int res = imageSize(arg_0);
-}
-
-void compute_main() {
-  textureDimensions_5caa5e();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'uimage1D' : Reserved word. 
-WARNING: 0:3: 'layout' : useless application of layout qualifier 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/5caa5e.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/5caa5e.wgsl.expected.msl
deleted file mode 100644
index 56e5f71..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/5caa5e.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_5caa5e(texture1d<uint, access::write> tint_symbol_1) {
-  int res = int(tint_symbol_1.get_width(0));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture1d<uint, access::write> tint_symbol_2) {
-  textureDimensions_5caa5e(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture1d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture1d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_5caa5e(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture1d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_5caa5e(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/5caa5e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/5caa5e.wgsl.expected.spvasm
deleted file mode 100644
index 68ec968..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/5caa5e.wgsl.expected.spvasm
+++ /dev/null
@@ -1,77 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 37
-; Schema: 0
-               OpCapability Shader
-               OpCapability Image1D
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_5caa5e "textureDimensions_5caa5e"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-       %uint = OpTypeInt 32 0
-         %11 = OpTypeImage %uint 1D 0 0 0 2 Rgba32ui
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-%_ptr_Function_int = OpTypePointer Function %int
-         %22 = OpConstantNull %int
-         %23 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_5caa5e = OpFunction %void None %13
-         %16 = OpLabel
-        %res = OpVariable %_ptr_Function_int Function %22
-         %19 = OpLoad %11 %arg_0
-         %17 = OpImageQuerySize %int %19
-               OpStore %res %17
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %23
-         %25 = OpLabel
-         %26 = OpFunctionCall %void %textureDimensions_5caa5e
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %28 = OpLabel
-         %29 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %29
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %32 = OpLabel
-         %33 = OpFunctionCall %void %textureDimensions_5caa5e
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %35 = OpLabel
-         %36 = OpFunctionCall %void %textureDimensions_5caa5e
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/5caa5e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/5caa5e.wgsl.expected.wgsl
deleted file mode 100644
index ac87720..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/5caa5e.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba32uint, write>;
-
-fn textureDimensions_5caa5e() {
-  var res : i32 = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_5caa5e();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_5caa5e();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_5caa5e();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/5df042.wgsl b/test/tint/builtins/gen/var/textureDimensions/5df042.wgsl
new file mode 100644
index 0000000..b89ffbb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/5df042.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_1d<i32>;
+
+// fn textureDimensions(texture: texture_1d<i32>) -> u32
+fn textureDimensions_5df042() {
+  var res: u32 = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_5df042();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_5df042();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_5df042();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/5df042.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/5df042.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..25b206a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/5df042.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_5df042() {
+  int tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_5df042();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_5df042();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_5df042();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/5df042.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/5df042.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..25b206a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/5df042.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_5df042() {
+  int tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_5df042();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_5df042();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_5df042();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/5df042.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/5df042.wgsl.expected.glsl
new file mode 100644
index 0000000..c8e4d65
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/5df042.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp isampler1D arg_0_1;
+void textureDimensions_5df042() {
+  uint res = uint(textureSize(arg_0_1, 0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_5df042();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'isampler1D' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp isampler1D arg_0_1;
+void textureDimensions_5df042() {
+  uint res = uint(textureSize(arg_0_1, 0));
+}
+
+void fragment_main() {
+  textureDimensions_5df042();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'isampler1D' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp isampler1D arg_0_1;
+void textureDimensions_5df042() {
+  uint res = uint(textureSize(arg_0_1, 0));
+}
+
+void compute_main() {
+  textureDimensions_5df042();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'isampler1D' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/5df042.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/5df042.wgsl.expected.msl
new file mode 100644
index 0000000..c3d1fc2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/5df042.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_5df042(texture1d<int, access::sample> tint_symbol_1) {
+  uint res = tint_symbol_1.get_width(0);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<int, access::sample> tint_symbol_2) {
+  textureDimensions_5df042(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<int, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<int, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_5df042(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<int, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_5df042(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/5df042.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/5df042.wgsl.expected.spvasm
new file mode 100644
index 0000000..7205a05
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/5df042.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; Schema: 0
+               OpCapability Shader
+               OpCapability Sampled1D
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_5df042 "textureDimensions_5df042"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 1D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+      %int_0 = OpConstant %int 0
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %23 = OpConstantNull %uint
+         %24 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_5df042 = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_uint Function %23
+         %19 = OpLoad %11 %arg_0
+         %17 = OpImageQuerySizeLod %uint %19 %int_0
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %textureDimensions_5df042
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %29 = OpLabel
+         %30 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %30
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureDimensions_5df042
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureDimensions_5df042
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/5df042.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/5df042.wgsl.expected.wgsl
new file mode 100644
index 0000000..8e083a2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/5df042.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_1d<i32>;
+
+fn textureDimensions_5df042() {
+  var res : u32 = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_5df042();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_5df042();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_5df042();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/5e295d.wgsl b/test/tint/builtins/gen/var/textureDimensions/5e295d.wgsl
deleted file mode 100644
index 6e8e71e..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/5e295d.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16uint, write>;
-
-// fn textureDimensions(texture: texture_storage_2d_array<rgba16uint, write>) -> vec2<i32>
-fn textureDimensions_5e295d() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_5e295d();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_5e295d();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_5e295d();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/5e295d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/5e295d.wgsl.expected.dxc.hlsl
deleted file mode 100644
index a88725c..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/5e295d.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2DArray<uint4> arg_0 : register(u0, space1);
-
-void textureDimensions_5e295d() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_5e295d();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_5e295d();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_5e295d();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/5e295d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/5e295d.wgsl.expected.fxc.hlsl
deleted file mode 100644
index a88725c..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/5e295d.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2DArray<uint4> arg_0 : register(u0, space1);
-
-void textureDimensions_5e295d() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_5e295d();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_5e295d();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_5e295d();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/5e295d.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/5e295d.wgsl.expected.glsl
deleted file mode 100644
index f079eb8..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/5e295d.wgsl.expected.glsl
+++ /dev/null
@@ -1,52 +0,0 @@
-#version 310 es
-
-layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0;
-void textureDimensions_5e295d() {
-  ivec2 res = imageSize(arg_0).xy;
-}
-
-vec4 vertex_main() {
-  textureDimensions_5e295d();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0;
-void textureDimensions_5e295d() {
-  ivec2 res = imageSize(arg_0).xy;
-}
-
-void fragment_main() {
-  textureDimensions_5e295d();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-layout(rgba16ui) uniform highp writeonly uimage2DArray arg_0;
-void textureDimensions_5e295d() {
-  ivec2 res = imageSize(arg_0).xy;
-}
-
-void compute_main() {
-  textureDimensions_5e295d();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/5e295d.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/5e295d.wgsl.expected.msl
deleted file mode 100644
index 50d3988..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/5e295d.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_5e295d(texture2d_array<uint, access::write> tint_symbol_1) {
-  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture2d_array<uint, access::write> tint_symbol_2) {
-  textureDimensions_5e295d(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture2d_array<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture2d_array<uint, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_5e295d(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture2d_array<uint, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_5e295d(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/5e295d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/5e295d.wgsl.expected.spvasm
deleted file mode 100644
index 05297b0..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/5e295d.wgsl.expected.spvasm
+++ /dev/null
@@ -1,79 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 40
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_5e295d "textureDimensions_5e295d"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-       %uint = OpTypeInt 32 0
-         %11 = OpTypeImage %uint 2D 0 1 0 2 Rgba16ui
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %v2int = OpTypeVector %int 2
-      %v3int = OpTypeVector %int 3
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %25 = OpConstantNull %v2int
-         %26 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_5e295d = OpFunction %void None %13
-         %16 = OpLabel
-        %res = OpVariable %_ptr_Function_v2int Function %25
-         %22 = OpLoad %11 %arg_0
-         %20 = OpImageQuerySize %v3int %22
-         %17 = OpVectorShuffle %v2int %20 %20 0 1
-               OpStore %res %17
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %26
-         %28 = OpLabel
-         %29 = OpFunctionCall %void %textureDimensions_5e295d
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %31 = OpLabel
-         %32 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %32
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %35 = OpLabel
-         %36 = OpFunctionCall %void %textureDimensions_5e295d
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %38 = OpLabel
-         %39 = OpFunctionCall %void %textureDimensions_5e295d
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/5e295d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/5e295d.wgsl.expected.wgsl
deleted file mode 100644
index ae8f763..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/5e295d.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16uint, write>;
-
-fn textureDimensions_5e295d() {
-  var res : vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_5e295d();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_5e295d();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_5e295d();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/607979.wgsl b/test/tint/builtins/gen/var/textureDimensions/607979.wgsl
new file mode 100644
index 0000000..f03cde1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/607979.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<r32sint, write>;
+
+// fn textureDimensions(texture: texture_storage_1d<r32sint, write>) -> u32
+fn textureDimensions_607979() {
+  var res: u32 = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_607979();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_607979();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_607979();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/607979.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/607979.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..8fbf889
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/607979.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<int4> arg_0 : register(u0, space1);
+
+void textureDimensions_607979() {
+  int tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_607979();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_607979();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_607979();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/607979.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/607979.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..8fbf889
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/607979.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<int4> arg_0 : register(u0, space1);
+
+void textureDimensions_607979() {
+  int tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_607979();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_607979();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_607979();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/607979.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/607979.wgsl.expected.glsl
new file mode 100644
index 0000000..5b5a4c3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/607979.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32i) uniform highp writeonly iimage1D arg_0;
+void textureDimensions_607979() {
+  uint res = uint(imageSize(arg_0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_607979();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'iimage1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(r32i) uniform highp writeonly iimage1D arg_0;
+void textureDimensions_607979() {
+  uint res = uint(imageSize(arg_0));
+}
+
+void fragment_main() {
+  textureDimensions_607979();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'iimage1D' : Reserved word. 
+WARNING: 0:4: 'layout' : useless application of layout qualifier 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32i) uniform highp writeonly iimage1D arg_0;
+void textureDimensions_607979() {
+  uint res = uint(imageSize(arg_0));
+}
+
+void compute_main() {
+  textureDimensions_607979();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'iimage1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/607979.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/607979.wgsl.expected.msl
new file mode 100644
index 0000000..360b5a3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/607979.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_607979(texture1d<int, access::write> tint_symbol_1) {
+  uint res = tint_symbol_1.get_width(0);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<int, access::write> tint_symbol_2) {
+  textureDimensions_607979(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_607979(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_607979(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/607979.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/607979.wgsl.expected.spvasm
new file mode 100644
index 0000000..d8c6402
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/607979.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_607979 "textureDimensions_607979"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 1D 0 0 0 2 R32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %22 = OpConstantNull %uint
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_607979 = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_uint Function %22
+         %19 = OpLoad %11 %arg_0
+         %17 = OpImageQuerySize %uint %19
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %textureDimensions_607979
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %28 = OpLabel
+         %29 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %29
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_607979
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureDimensions_607979
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/607979.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/607979.wgsl.expected.wgsl
new file mode 100644
index 0000000..d54a65b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/607979.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<r32sint, write>;
+
+fn textureDimensions_607979() {
+  var res : u32 = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_607979();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_607979();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_607979();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/60bf54.wgsl b/test/tint/builtins/gen/var/textureDimensions/60bf54.wgsl
deleted file mode 100644
index 36982d8..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/60bf54.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_3d<rg32sint, write>;
-
-// fn textureDimensions(texture: texture_storage_3d<rg32sint, write>) -> vec3<i32>
-fn textureDimensions_60bf54() {
-  var res: vec3<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_60bf54();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_60bf54();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_60bf54();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/60bf54.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/60bf54.wgsl.expected.dxc.hlsl
deleted file mode 100644
index d7ac1d3..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/60bf54.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture3D<int4> arg_0 : register(u0, space1);
-
-void textureDimensions_60bf54() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int3 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_60bf54();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_60bf54();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_60bf54();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/60bf54.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/60bf54.wgsl.expected.fxc.hlsl
deleted file mode 100644
index d7ac1d3..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/60bf54.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture3D<int4> arg_0 : register(u0, space1);
-
-void textureDimensions_60bf54() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int3 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_60bf54();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_60bf54();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_60bf54();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/60bf54.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/60bf54.wgsl.expected.glsl
deleted file mode 100644
index 91d0815..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/60bf54.wgsl.expected.glsl
+++ /dev/null
@@ -1,75 +0,0 @@
-SKIP: FAILED
-
-#version 310 es
-
-layout(rg32i) uniform highp writeonly iimage3D arg_0;
-void textureDimensions_60bf54() {
-  ivec3 res = imageSize(arg_0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_60bf54();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'image load-store format' : not supported with this profile: es
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision mediump float;
-
-layout(rg32i) uniform highp writeonly iimage3D arg_0;
-void textureDimensions_60bf54() {
-  ivec3 res = imageSize(arg_0);
-}
-
-void fragment_main() {
-  textureDimensions_60bf54();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:4: 'image load-store format' : not supported with this profile: es
-ERROR: 0:4: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-
-layout(rg32i) uniform highp writeonly iimage3D arg_0;
-void textureDimensions_60bf54() {
-  ivec3 res = imageSize(arg_0);
-}
-
-void compute_main() {
-  textureDimensions_60bf54();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'image load-store format' : not supported with this profile: es
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/60bf54.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/60bf54.wgsl.expected.msl
deleted file mode 100644
index bf597c3..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/60bf54.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_60bf54(texture3d<int, access::write> tint_symbol_1) {
-  int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture3d<int, access::write> tint_symbol_2) {
-  textureDimensions_60bf54(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture3d<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture3d<int, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_60bf54(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture3d<int, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_60bf54(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/60bf54.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/60bf54.wgsl.expected.spvasm
deleted file mode 100644
index 5073da1..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/60bf54.wgsl.expected.spvasm
+++ /dev/null
@@ -1,77 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 37
-; Schema: 0
-               OpCapability Shader
-               OpCapability StorageImageExtendedFormats
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_60bf54 "textureDimensions_60bf54"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-        %int = OpTypeInt 32 1
-         %11 = OpTypeImage %int 3D 0 0 0 2 Rg32i
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-      %v3int = OpTypeVector %int 3
-%_ptr_Function_v3int = OpTypePointer Function %v3int
-         %22 = OpConstantNull %v3int
-         %23 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_60bf54 = OpFunction %void None %13
-         %16 = OpLabel
-        %res = OpVariable %_ptr_Function_v3int Function %22
-         %19 = OpLoad %11 %arg_0
-         %17 = OpImageQuerySize %v3int %19
-               OpStore %res %17
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %23
-         %25 = OpLabel
-         %26 = OpFunctionCall %void %textureDimensions_60bf54
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %28 = OpLabel
-         %29 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %29
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %32 = OpLabel
-         %33 = OpFunctionCall %void %textureDimensions_60bf54
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %35 = OpLabel
-         %36 = OpFunctionCall %void %textureDimensions_60bf54
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/60bf54.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/60bf54.wgsl.expected.wgsl
deleted file mode 100644
index fbc7cd7..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/60bf54.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_3d<rg32sint, write>;
-
-fn textureDimensions_60bf54() {
-  var res : vec3<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_60bf54();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_60bf54();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_60bf54();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/62cb5a.wgsl b/test/tint/builtins/gen/var/textureDimensions/62cb5a.wgsl
new file mode 100644
index 0000000..7d34ccd
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/62cb5a.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<i32>;
+
+// fn textureDimensions(texture: texture_2d_array<i32>) -> vec2<u32>
+fn textureDimensions_62cb5a() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_62cb5a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_62cb5a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_62cb5a();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/62cb5a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/62cb5a.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9ce8aa4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/62cb5a.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_62cb5a() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_62cb5a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_62cb5a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_62cb5a();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/62cb5a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/62cb5a.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9ce8aa4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/62cb5a.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_62cb5a() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_62cb5a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_62cb5a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_62cb5a();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/62cb5a.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/62cb5a.wgsl.expected.glsl
new file mode 100644
index 0000000..421af5e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/62cb5a.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp isampler2DArray arg_0_1;
+void textureDimensions_62cb5a() {
+  uvec2 res = uvec2(textureSize(arg_0_1, 0).xy);
+}
+
+vec4 vertex_main() {
+  textureDimensions_62cb5a();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isampler2DArray arg_0_1;
+void textureDimensions_62cb5a() {
+  uvec2 res = uvec2(textureSize(arg_0_1, 0).xy);
+}
+
+void fragment_main() {
+  textureDimensions_62cb5a();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp isampler2DArray arg_0_1;
+void textureDimensions_62cb5a() {
+  uvec2 res = uvec2(textureSize(arg_0_1, 0).xy);
+}
+
+void compute_main() {
+  textureDimensions_62cb5a();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/62cb5a.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/62cb5a.wgsl.expected.msl
new file mode 100644
index 0000000..8702a25
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/62cb5a.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_62cb5a(texture2d_array<int, access::sample> tint_symbol_1) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::sample> tint_symbol_2) {
+  textureDimensions_62cb5a(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_62cb5a(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_62cb5a(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/62cb5a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/62cb5a.wgsl.expected.spvasm
new file mode 100644
index 0000000..622c055
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/62cb5a.wgsl.expected.spvasm
@@ -0,0 +1,79 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_62cb5a "textureDimensions_62cb5a"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %v3uint = OpTypeVector %uint 3
+      %int_0 = OpConstant %int 0
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %26 = OpConstantNull %v2uint
+         %27 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_62cb5a = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %26
+         %22 = OpLoad %11 %arg_0
+         %20 = OpImageQuerySizeLod %v3uint %22 %int_0
+         %17 = OpVectorShuffle %v2uint %20 %20 0 1
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureDimensions_62cb5a
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %32 = OpLabel
+         %33 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %33
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureDimensions_62cb5a
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureDimensions_62cb5a
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/62cb5a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/62cb5a.wgsl.expected.wgsl
new file mode 100644
index 0000000..4fd56a7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/62cb5a.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<i32>;
+
+fn textureDimensions_62cb5a() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_62cb5a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_62cb5a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_62cb5a();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/63f3cf.wgsl b/test/tint/builtins/gen/var/textureDimensions/63f3cf.wgsl
deleted file mode 100644
index deb1125..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/63f3cf.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_3d<rg32float, write>;
-
-// fn textureDimensions(texture: texture_storage_3d<rg32float, write>) -> vec3<i32>
-fn textureDimensions_63f3cf() {
-  var res: vec3<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_63f3cf();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_63f3cf();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_63f3cf();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/63f3cf.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/63f3cf.wgsl.expected.dxc.hlsl
deleted file mode 100644
index f03906d..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/63f3cf.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture3D<float4> arg_0 : register(u0, space1);
-
-void textureDimensions_63f3cf() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int3 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_63f3cf();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_63f3cf();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_63f3cf();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/63f3cf.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/63f3cf.wgsl.expected.fxc.hlsl
deleted file mode 100644
index f03906d..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/63f3cf.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture3D<float4> arg_0 : register(u0, space1);
-
-void textureDimensions_63f3cf() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int3 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_63f3cf();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_63f3cf();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_63f3cf();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/63f3cf.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/63f3cf.wgsl.expected.glsl
deleted file mode 100644
index 6a77ea9..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/63f3cf.wgsl.expected.glsl
+++ /dev/null
@@ -1,75 +0,0 @@
-SKIP: FAILED
-
-#version 310 es
-
-layout(rg32f) uniform highp writeonly image3D arg_0;
-void textureDimensions_63f3cf() {
-  ivec3 res = imageSize(arg_0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_63f3cf();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'image load-store format' : not supported with this profile: es
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision mediump float;
-
-layout(rg32f) uniform highp writeonly image3D arg_0;
-void textureDimensions_63f3cf() {
-  ivec3 res = imageSize(arg_0);
-}
-
-void fragment_main() {
-  textureDimensions_63f3cf();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:4: 'image load-store format' : not supported with this profile: es
-ERROR: 0:4: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-
-layout(rg32f) uniform highp writeonly image3D arg_0;
-void textureDimensions_63f3cf() {
-  ivec3 res = imageSize(arg_0);
-}
-
-void compute_main() {
-  textureDimensions_63f3cf();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'image load-store format' : not supported with this profile: es
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/63f3cf.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/63f3cf.wgsl.expected.msl
deleted file mode 100644
index 931b457..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/63f3cf.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_63f3cf(texture3d<float, access::write> tint_symbol_1) {
-  int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture3d<float, access::write> tint_symbol_2) {
-  textureDimensions_63f3cf(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture3d<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture3d<float, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_63f3cf(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture3d<float, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_63f3cf(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/63f3cf.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/63f3cf.wgsl.expected.spvasm
deleted file mode 100644
index f146e10..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/63f3cf.wgsl.expected.spvasm
+++ /dev/null
@@ -1,77 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 37
-; Schema: 0
-               OpCapability Shader
-               OpCapability StorageImageExtendedFormats
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_63f3cf "textureDimensions_63f3cf"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-         %11 = OpTypeImage %float 3D 0 0 0 2 Rg32f
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %12 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %v3int = OpTypeVector %int 3
-%_ptr_Function_v3int = OpTypePointer Function %v3int
-         %22 = OpConstantNull %v3int
-         %23 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_63f3cf = OpFunction %void None %12
-         %15 = OpLabel
-        %res = OpVariable %_ptr_Function_v3int Function %22
-         %19 = OpLoad %11 %arg_0
-         %16 = OpImageQuerySize %v3int %19
-               OpStore %res %16
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %23
-         %25 = OpLabel
-         %26 = OpFunctionCall %void %textureDimensions_63f3cf
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %12
-         %28 = OpLabel
-         %29 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %29
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %12
-         %32 = OpLabel
-         %33 = OpFunctionCall %void %textureDimensions_63f3cf
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %12
-         %35 = OpLabel
-         %36 = OpFunctionCall %void %textureDimensions_63f3cf
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/63f3cf.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/63f3cf.wgsl.expected.wgsl
deleted file mode 100644
index 3e0ebfd..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/63f3cf.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_3d<rg32float, write>;
-
-fn textureDimensions_63f3cf() {
-  var res : vec3<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_63f3cf();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_63f3cf();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_63f3cf();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/647386.wgsl b/test/tint/builtins/gen/var/textureDimensions/647386.wgsl
deleted file mode 100644
index aa317c2..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/647386.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2022 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_depth_cube;
-
-// fn textureDimensions(texture: texture_depth_cube, level: u32) -> vec2<i32>
-fn textureDimensions_647386() {
-  var arg_1 = 1u;
-  var res: vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_647386();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_647386();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_647386();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/647386.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/647386.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 0c55003..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/647386.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-TextureCube arg_0 : register(t0, space1);
-
-void textureDimensions_647386() {
-  uint arg_1 = 1u;
-  int3 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_647386();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_647386();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_647386();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/647386.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/647386.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 0c55003..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/647386.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-TextureCube arg_0 : register(t0, space1);
-
-void textureDimensions_647386() {
-  uint arg_1 = 1u;
-  int3 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_647386();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_647386();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_647386();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/647386.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/647386.wgsl.expected.glsl
deleted file mode 100644
index f8b6013..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/647386.wgsl.expected.glsl
+++ /dev/null
@@ -1,55 +0,0 @@
-#version 310 es
-
-uniform highp samplerCube arg_0_1;
-void textureDimensions_647386() {
-  uint arg_1 = 1u;
-  ivec2 res = textureSize(arg_0_1, int(arg_1));
-}
-
-vec4 vertex_main() {
-  textureDimensions_647386();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-uniform highp samplerCube arg_0_1;
-void textureDimensions_647386() {
-  uint arg_1 = 1u;
-  ivec2 res = textureSize(arg_0_1, int(arg_1));
-}
-
-void fragment_main() {
-  textureDimensions_647386();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-uniform highp samplerCube arg_0_1;
-void textureDimensions_647386() {
-  uint arg_1 = 1u;
-  ivec2 res = textureSize(arg_0_1, int(arg_1));
-}
-
-void compute_main() {
-  textureDimensions_647386();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/647386.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/647386.wgsl.expected.msl
deleted file mode 100644
index c2d57d1..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/647386.wgsl.expected.msl
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_647386(depthcube<float, access::sample> tint_symbol_1) {
-  uint arg_1 = 1u;
-  int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(depthcube<float, access::sample> tint_symbol_2) {
-  textureDimensions_647386(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(depthcube<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(depthcube<float, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_647386(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(depthcube<float, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_647386(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/647386.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/647386.wgsl.expected.spvasm
deleted file mode 100644
index 9421e4c..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/647386.wgsl.expected.spvasm
+++ /dev/null
@@ -1,83 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 43
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_647386 "textureDimensions_647386"
-               OpName %arg_1 "arg_1"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-         %11 = OpTypeImage %float Cube 0 0 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %12 = OpTypeFunction %void
-       %uint = OpTypeInt 32 0
-     %uint_1 = OpConstant %uint 1
-%_ptr_Function_uint = OpTypePointer Function %uint
-         %20 = OpConstantNull %uint
-        %int = OpTypeInt 32 1
-      %v2int = OpTypeVector %int 2
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %28 = OpConstantNull %v2int
-         %29 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_647386 = OpFunction %void None %12
-         %15 = OpLabel
-      %arg_1 = OpVariable %_ptr_Function_uint Function %20
-        %res = OpVariable %_ptr_Function_v2int Function %28
-               OpStore %arg_1 %uint_1
-         %24 = OpLoad %11 %arg_0
-         %25 = OpLoad %uint %arg_1
-         %21 = OpImageQuerySizeLod %v2int %24 %25
-               OpStore %res %21
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %29
-         %31 = OpLabel
-         %32 = OpFunctionCall %void %textureDimensions_647386
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %12
-         %34 = OpLabel
-         %35 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %35
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %12
-         %38 = OpLabel
-         %39 = OpFunctionCall %void %textureDimensions_647386
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %12
-         %41 = OpLabel
-         %42 = OpFunctionCall %void %textureDimensions_647386
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/647386.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/647386.wgsl.expected.wgsl
deleted file mode 100644
index 291fd11..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/647386.wgsl.expected.wgsl
+++ /dev/null
@@ -1,22 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_depth_cube;
-
-fn textureDimensions_647386() {
-  var arg_1 = 1u;
-  var res : vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_647386();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_647386();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_647386();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/64dc74.wgsl b/test/tint/builtins/gen/var/textureDimensions/64dc74.wgsl
new file mode 100644
index 0000000..5264a0c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/64dc74.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube<i32>;
+
+// fn textureDimensions(texture: texture_cube<i32>, level: u32) -> vec2<u32>
+fn textureDimensions_64dc74() {
+  var arg_1 = 1u;
+  var res: vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_64dc74();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_64dc74();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_64dc74();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/64dc74.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/64dc74.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..2a454c2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/64dc74.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+TextureCube<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_64dc74() {
+  uint arg_1 = 1u;
+  int3 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_64dc74();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_64dc74();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_64dc74();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/64dc74.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/64dc74.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..2a454c2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/64dc74.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+TextureCube<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_64dc74() {
+  uint arg_1 = 1u;
+  int3 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_64dc74();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_64dc74();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_64dc74();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/64dc74.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/64dc74.wgsl.expected.glsl
new file mode 100644
index 0000000..c6d050b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/64dc74.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp isamplerCube arg_0_1;
+void textureDimensions_64dc74() {
+  uint arg_1 = 1u;
+  uvec2 res = uvec2(textureSize(arg_0_1, int(arg_1)));
+}
+
+vec4 vertex_main() {
+  textureDimensions_64dc74();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isamplerCube arg_0_1;
+void textureDimensions_64dc74() {
+  uint arg_1 = 1u;
+  uvec2 res = uvec2(textureSize(arg_0_1, int(arg_1)));
+}
+
+void fragment_main() {
+  textureDimensions_64dc74();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp isamplerCube arg_0_1;
+void textureDimensions_64dc74() {
+  uint arg_1 = 1u;
+  uvec2 res = uvec2(textureSize(arg_0_1, int(arg_1)));
+}
+
+void compute_main() {
+  textureDimensions_64dc74();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/64dc74.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/64dc74.wgsl.expected.msl
new file mode 100644
index 0000000..a8cfc3e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/64dc74.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_64dc74(texturecube<int, access::sample> tint_symbol_1) {
+  uint arg_1 = 1u;
+  uint2 res = uint2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube<int, access::sample> tint_symbol_2) {
+  textureDimensions_64dc74(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube<int, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texturecube<int, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_64dc74(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texturecube<int, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_64dc74(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/64dc74.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/64dc74.wgsl.expected.spvasm
new file mode 100644
index 0000000..60b1d3b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/64dc74.wgsl.expected.spvasm
@@ -0,0 +1,83 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_64dc74 "textureDimensions_64dc74"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int Cube 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %21 = OpConstantNull %uint
+     %v2uint = OpTypeVector %uint 2
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %28 = OpConstantNull %v2uint
+         %29 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_64dc74 = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %21
+        %res = OpVariable %_ptr_Function_v2uint Function %28
+               OpStore %arg_1 %uint_1
+         %24 = OpLoad %11 %arg_0
+         %25 = OpLoad %uint %arg_1
+         %22 = OpImageQuerySizeLod %v2uint %24 %25
+               OpStore %res %22
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureDimensions_64dc74
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %34 = OpLabel
+         %35 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %35
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureDimensions_64dc74
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureDimensions_64dc74
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/64dc74.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/64dc74.wgsl.expected.wgsl
new file mode 100644
index 0000000..878928c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/64dc74.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_cube<i32>;
+
+fn textureDimensions_64dc74() {
+  var arg_1 = 1u;
+  var res : vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_64dc74();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_64dc74();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_64dc74();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/674058.wgsl b/test/tint/builtins/gen/var/textureDimensions/674058.wgsl
new file mode 100644
index 0000000..5e964b3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/674058.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32sint, write>;
+
+// fn textureDimensions(texture: texture_storage_2d_array<r32sint, write>) -> vec2<u32>
+fn textureDimensions_674058() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_674058();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_674058();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_674058();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/674058.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/674058.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9369bd2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/674058.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureDimensions_674058() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_674058();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_674058();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_674058();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/674058.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/674058.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9369bd2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/674058.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureDimensions_674058() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_674058();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_674058();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_674058();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/674058.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/674058.wgsl.expected.glsl
new file mode 100644
index 0000000..7e3dc84
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/674058.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(r32i) uniform highp writeonly iimage2DArray arg_0;
+void textureDimensions_674058() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+}
+
+vec4 vertex_main() {
+  textureDimensions_674058();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(r32i) uniform highp writeonly iimage2DArray arg_0;
+void textureDimensions_674058() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+}
+
+void fragment_main() {
+  textureDimensions_674058();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(r32i) uniform highp writeonly iimage2DArray arg_0;
+void textureDimensions_674058() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+}
+
+void compute_main() {
+  textureDimensions_674058();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/674058.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/674058.wgsl.expected.msl
new file mode 100644
index 0000000..6c86158
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/674058.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_674058(texture2d_array<int, access::write> tint_symbol_1) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::write> tint_symbol_2) {
+  textureDimensions_674058(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_674058(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_674058(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/674058.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/674058.wgsl.expected.spvasm
new file mode 100644
index 0000000..b312fbf
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/674058.wgsl.expected.spvasm
@@ -0,0 +1,79 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 40
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_674058 "textureDimensions_674058"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 R32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %25 = OpConstantNull %v2uint
+         %26 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_674058 = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %25
+         %22 = OpLoad %11 %arg_0
+         %20 = OpImageQuerySize %v3uint %22
+         %17 = OpVectorShuffle %v2uint %20 %20 0 1
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %26
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %textureDimensions_674058
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %31 = OpLabel
+         %32 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %32
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureDimensions_674058
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureDimensions_674058
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/674058.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/674058.wgsl.expected.wgsl
new file mode 100644
index 0000000..207af65
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/674058.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32sint, write>;
+
+fn textureDimensions_674058() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_674058();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_674058();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_674058();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/68105c.wgsl b/test/tint/builtins/gen/var/textureDimensions/68105c.wgsl
deleted file mode 100644
index 6a41cfe..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/68105c.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d<rgba32uint, write>;
-
-// fn textureDimensions(texture: texture_storage_2d<rgba32uint, write>) -> vec2<i32>
-fn textureDimensions_68105c() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_68105c();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_68105c();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_68105c();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/68105c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/68105c.wgsl.expected.dxc.hlsl
deleted file mode 100644
index c372328..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/68105c.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2D<uint4> arg_0 : register(u0, space1);
-
-void textureDimensions_68105c() {
-  int2 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
-  int2 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_68105c();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_68105c();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_68105c();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/68105c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/68105c.wgsl.expected.fxc.hlsl
deleted file mode 100644
index c372328..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/68105c.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2D<uint4> arg_0 : register(u0, space1);
-
-void textureDimensions_68105c() {
-  int2 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
-  int2 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_68105c();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_68105c();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_68105c();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/68105c.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/68105c.wgsl.expected.glsl
deleted file mode 100644
index d366071..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/68105c.wgsl.expected.glsl
+++ /dev/null
@@ -1,52 +0,0 @@
-#version 310 es
-
-layout(rgba32ui) uniform highp writeonly uimage2D arg_0;
-void textureDimensions_68105c() {
-  ivec2 res = imageSize(arg_0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_68105c();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-layout(rgba32ui) uniform highp writeonly uimage2D arg_0;
-void textureDimensions_68105c() {
-  ivec2 res = imageSize(arg_0);
-}
-
-void fragment_main() {
-  textureDimensions_68105c();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-layout(rgba32ui) uniform highp writeonly uimage2D arg_0;
-void textureDimensions_68105c() {
-  ivec2 res = imageSize(arg_0);
-}
-
-void compute_main() {
-  textureDimensions_68105c();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/68105c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/68105c.wgsl.expected.msl
deleted file mode 100644
index a1fdb63..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/68105c.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_68105c(texture2d<uint, access::write> tint_symbol_1) {
-  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture2d<uint, access::write> tint_symbol_2) {
-  textureDimensions_68105c(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture2d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture2d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_68105c(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture2d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_68105c(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/68105c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/68105c.wgsl.expected.spvasm
deleted file mode 100644
index 471b570..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/68105c.wgsl.expected.spvasm
+++ /dev/null
@@ -1,77 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 38
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_68105c "textureDimensions_68105c"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-       %uint = OpTypeInt 32 0
-         %11 = OpTypeImage %uint 2D 0 0 0 2 Rgba32ui
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %v2int = OpTypeVector %int 2
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %23 = OpConstantNull %v2int
-         %24 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_68105c = OpFunction %void None %13
-         %16 = OpLabel
-        %res = OpVariable %_ptr_Function_v2int Function %23
-         %20 = OpLoad %11 %arg_0
-         %17 = OpImageQuerySize %v2int %20
-               OpStore %res %17
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %24
-         %26 = OpLabel
-         %27 = OpFunctionCall %void %textureDimensions_68105c
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %29 = OpLabel
-         %30 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %30
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %33 = OpLabel
-         %34 = OpFunctionCall %void %textureDimensions_68105c
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %36 = OpLabel
-         %37 = OpFunctionCall %void %textureDimensions_68105c
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/68105c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/68105c.wgsl.expected.wgsl
deleted file mode 100644
index 19c4929..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/68105c.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba32uint, write>;
-
-fn textureDimensions_68105c() {
-  var res : vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_68105c();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_68105c();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_68105c();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/686ef2.wgsl b/test/tint/builtins/gen/var/textureDimensions/686ef2.wgsl
deleted file mode 100644
index ff32044..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/686ef2.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_cube<i32>;
-
-// fn textureDimensions(texture: texture_cube<i32>, level: i32) -> vec2<i32>
-fn textureDimensions_686ef2() {
-  var arg_1 = 1i;
-  var res: vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_686ef2();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_686ef2();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_686ef2();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/686ef2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/686ef2.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 62725b4..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/686ef2.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-TextureCube<int4> arg_0 : register(t0, space1);
-
-void textureDimensions_686ef2() {
-  int arg_1 = 1;
-  int3 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_686ef2();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_686ef2();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_686ef2();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/686ef2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/686ef2.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 62725b4..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/686ef2.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-TextureCube<int4> arg_0 : register(t0, space1);
-
-void textureDimensions_686ef2() {
-  int arg_1 = 1;
-  int3 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_686ef2();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_686ef2();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_686ef2();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/686ef2.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/686ef2.wgsl.expected.glsl
deleted file mode 100644
index 01a4ceee..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/686ef2.wgsl.expected.glsl
+++ /dev/null
@@ -1,55 +0,0 @@
-#version 310 es
-
-uniform highp isamplerCube arg_0_1;
-void textureDimensions_686ef2() {
-  int arg_1 = 1;
-  ivec2 res = textureSize(arg_0_1, arg_1);
-}
-
-vec4 vertex_main() {
-  textureDimensions_686ef2();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-uniform highp isamplerCube arg_0_1;
-void textureDimensions_686ef2() {
-  int arg_1 = 1;
-  ivec2 res = textureSize(arg_0_1, arg_1);
-}
-
-void fragment_main() {
-  textureDimensions_686ef2();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-uniform highp isamplerCube arg_0_1;
-void textureDimensions_686ef2() {
-  int arg_1 = 1;
-  ivec2 res = textureSize(arg_0_1, arg_1);
-}
-
-void compute_main() {
-  textureDimensions_686ef2();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/686ef2.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/686ef2.wgsl.expected.msl
deleted file mode 100644
index d7bb244..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/686ef2.wgsl.expected.msl
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_686ef2(texturecube<int, access::sample> tint_symbol_1) {
-  int arg_1 = 1;
-  int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texturecube<int, access::sample> tint_symbol_2) {
-  textureDimensions_686ef2(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texturecube<int, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texturecube<int, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_686ef2(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texturecube<int, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_686ef2(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/686ef2.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/686ef2.wgsl.expected.spvasm
deleted file mode 100644
index f77e1fd..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/686ef2.wgsl.expected.spvasm
+++ /dev/null
@@ -1,82 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 42
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_686ef2 "textureDimensions_686ef2"
-               OpName %arg_1 "arg_1"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-        %int = OpTypeInt 32 1
-         %11 = OpTypeImage %int Cube 0 0 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-      %int_1 = OpConstant %int 1
-%_ptr_Function_int = OpTypePointer Function %int
-         %20 = OpConstantNull %int
-      %v2int = OpTypeVector %int 2
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %27 = OpConstantNull %v2int
-         %28 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_686ef2 = OpFunction %void None %13
-         %16 = OpLabel
-      %arg_1 = OpVariable %_ptr_Function_int Function %20
-        %res = OpVariable %_ptr_Function_v2int Function %27
-               OpStore %arg_1 %int_1
-         %23 = OpLoad %11 %arg_0
-         %24 = OpLoad %int %arg_1
-         %21 = OpImageQuerySizeLod %v2int %23 %24
-               OpStore %res %21
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %28
-         %30 = OpLabel
-         %31 = OpFunctionCall %void %textureDimensions_686ef2
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %33 = OpLabel
-         %34 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %34
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %37 = OpLabel
-         %38 = OpFunctionCall %void %textureDimensions_686ef2
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %40 = OpLabel
-         %41 = OpFunctionCall %void %textureDimensions_686ef2
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/686ef2.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/686ef2.wgsl.expected.wgsl
deleted file mode 100644
index ebc53a5..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/686ef2.wgsl.expected.wgsl
+++ /dev/null
@@ -1,22 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_cube<i32>;
-
-fn textureDimensions_686ef2() {
-  var arg_1 = 1i;
-  var res : vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_686ef2();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_686ef2();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_686ef2();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/6adac6.wgsl b/test/tint/builtins/gen/var/textureDimensions/6adac6.wgsl
deleted file mode 100644
index d2d4a11..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/6adac6.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_1d<rgba32sint, write>;
-
-// fn textureDimensions(texture: texture_storage_1d<rgba32sint, write>) -> i32
-fn textureDimensions_6adac6() {
-  var res: i32 = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_6adac6();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_6adac6();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_6adac6();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/6adac6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/6adac6.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 52b2080..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/6adac6.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture1D<int4> arg_0 : register(u0, space1);
-
-void textureDimensions_6adac6() {
-  int tint_tmp;
-  arg_0.GetDimensions(tint_tmp);
-  int res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_6adac6();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_6adac6();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_6adac6();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/6adac6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/6adac6.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 52b2080..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/6adac6.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture1D<int4> arg_0 : register(u0, space1);
-
-void textureDimensions_6adac6() {
-  int tint_tmp;
-  arg_0.GetDimensions(tint_tmp);
-  int res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_6adac6();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_6adac6();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_6adac6();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/6adac6.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/6adac6.wgsl.expected.glsl
deleted file mode 100644
index acaaa5a..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/6adac6.wgsl.expected.glsl
+++ /dev/null
@@ -1,78 +0,0 @@
-SKIP: FAILED
-
-#version 310 es
-
-layout(rgba32i) uniform highp writeonly iimage1D arg_0;
-void textureDimensions_6adac6() {
-  int res = imageSize(arg_0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_6adac6();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'iimage1D' : Reserved word. 
-WARNING: 0:3: 'layout' : useless application of layout qualifier 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision mediump float;
-
-layout(rgba32i) uniform highp writeonly iimage1D arg_0;
-void textureDimensions_6adac6() {
-  int res = imageSize(arg_0);
-}
-
-void fragment_main() {
-  textureDimensions_6adac6();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:4: 'iimage1D' : Reserved word. 
-WARNING: 0:4: 'layout' : useless application of layout qualifier 
-ERROR: 0:4: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-
-layout(rgba32i) uniform highp writeonly iimage1D arg_0;
-void textureDimensions_6adac6() {
-  int res = imageSize(arg_0);
-}
-
-void compute_main() {
-  textureDimensions_6adac6();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'iimage1D' : Reserved word. 
-WARNING: 0:3: 'layout' : useless application of layout qualifier 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/6adac6.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/6adac6.wgsl.expected.msl
deleted file mode 100644
index 7087625..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/6adac6.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_6adac6(texture1d<int, access::write> tint_symbol_1) {
-  int res = int(tint_symbol_1.get_width(0));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture1d<int, access::write> tint_symbol_2) {
-  textureDimensions_6adac6(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture1d<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture1d<int, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_6adac6(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture1d<int, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_6adac6(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/6adac6.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/6adac6.wgsl.expected.spvasm
deleted file mode 100644
index 363af60..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/6adac6.wgsl.expected.spvasm
+++ /dev/null
@@ -1,76 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 36
-; Schema: 0
-               OpCapability Shader
-               OpCapability Image1D
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_6adac6 "textureDimensions_6adac6"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-        %int = OpTypeInt 32 1
-         %11 = OpTypeImage %int 1D 0 0 0 2 Rgba32i
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-%_ptr_Function_int = OpTypePointer Function %int
-         %21 = OpConstantNull %int
-         %22 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_6adac6 = OpFunction %void None %13
-         %16 = OpLabel
-        %res = OpVariable %_ptr_Function_int Function %21
-         %18 = OpLoad %11 %arg_0
-         %17 = OpImageQuerySize %int %18
-               OpStore %res %17
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %22
-         %24 = OpLabel
-         %25 = OpFunctionCall %void %textureDimensions_6adac6
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %27 = OpLabel
-         %28 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %28
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %31 = OpLabel
-         %32 = OpFunctionCall %void %textureDimensions_6adac6
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %34 = OpLabel
-         %35 = OpFunctionCall %void %textureDimensions_6adac6
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/6adac6.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/6adac6.wgsl.expected.wgsl
deleted file mode 100644
index 8ab67f0..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/6adac6.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba32sint, write>;
-
-fn textureDimensions_6adac6() {
-  var res : i32 = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_6adac6();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_6adac6();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_6adac6();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/6e6c7a.wgsl b/test/tint/builtins/gen/var/textureDimensions/6e6c7a.wgsl
new file mode 100644
index 0000000..136d80e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/6e6c7a.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_3d<u32>;
+
+// fn textureDimensions(texture: texture_3d<u32>, level: u32) -> vec3<u32>
+fn textureDimensions_6e6c7a() {
+  var arg_1 = 1u;
+  var res: vec3<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_6e6c7a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_6e6c7a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_6e6c7a();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/6e6c7a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/6e6c7a.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b930c2e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/6e6c7a.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_6e6c7a() {
+  uint arg_1 = 1u;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  uint3 res = tint_tmp.xyz;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_6e6c7a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_6e6c7a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_6e6c7a();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/6e6c7a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/6e6c7a.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b930c2e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/6e6c7a.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_6e6c7a() {
+  uint arg_1 = 1u;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  uint3 res = tint_tmp.xyz;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_6e6c7a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_6e6c7a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_6e6c7a();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/6e6c7a.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/6e6c7a.wgsl.expected.glsl
new file mode 100644
index 0000000..9e5d060
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/6e6c7a.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp usampler3D arg_0_1;
+void textureDimensions_6e6c7a() {
+  uint arg_1 = 1u;
+  uvec3 res = uvec3(textureSize(arg_0_1, int(arg_1)));
+}
+
+vec4 vertex_main() {
+  textureDimensions_6e6c7a();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usampler3D arg_0_1;
+void textureDimensions_6e6c7a() {
+  uint arg_1 = 1u;
+  uvec3 res = uvec3(textureSize(arg_0_1, int(arg_1)));
+}
+
+void fragment_main() {
+  textureDimensions_6e6c7a();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp usampler3D arg_0_1;
+void textureDimensions_6e6c7a() {
+  uint arg_1 = 1u;
+  uvec3 res = uvec3(textureSize(arg_0_1, int(arg_1)));
+}
+
+void compute_main() {
+  textureDimensions_6e6c7a();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/6e6c7a.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/6e6c7a.wgsl.expected.msl
new file mode 100644
index 0000000..6edcc20
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/6e6c7a.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_6e6c7a(texture3d<uint, access::sample> tint_symbol_1) {
+  uint arg_1 = 1u;
+  uint3 res = uint3(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1), tint_symbol_1.get_depth(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<uint, access::sample> tint_symbol_2) {
+  textureDimensions_6e6c7a(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_6e6c7a(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture3d<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_6e6c7a(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/6e6c7a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/6e6c7a.wgsl.expected.spvasm
new file mode 100644
index 0000000..7a72a35
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/6e6c7a.wgsl.expected.spvasm
@@ -0,0 +1,82 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 42
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_6e6c7a "textureDimensions_6e6c7a"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 3D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %20 = OpConstantNull %uint
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+         %27 = OpConstantNull %v3uint
+         %28 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_6e6c7a = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %20
+        %res = OpVariable %_ptr_Function_v3uint Function %27
+               OpStore %arg_1 %uint_1
+         %23 = OpLoad %11 %arg_0
+         %24 = OpLoad %uint %arg_1
+         %21 = OpImageQuerySizeLod %v3uint %23 %24
+               OpStore %res %21
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %28
+         %30 = OpLabel
+         %31 = OpFunctionCall %void %textureDimensions_6e6c7a
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %33 = OpLabel
+         %34 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %34
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureDimensions_6e6c7a
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureDimensions_6e6c7a
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/6e6c7a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/6e6c7a.wgsl.expected.wgsl
new file mode 100644
index 0000000..4073327
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/6e6c7a.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_3d<u32>;
+
+fn textureDimensions_6e6c7a() {
+  var arg_1 = 1u;
+  var res : vec3<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_6e6c7a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_6e6c7a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_6e6c7a();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl b/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl
deleted file mode 100644
index 62b84fd..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2022 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_cube<i32>;
-
-// fn textureDimensions(texture: texture_cube<i32>, level: u32) -> vec2<i32>
-fn textureDimensions_6eae7f() {
-  var arg_1 = 1u;
-  var res: vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_6eae7f();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_6eae7f();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_6eae7f();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl.expected.dxc.hlsl
deleted file mode 100644
index b39d4cc..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-TextureCube<int4> arg_0 : register(t0, space1);
-
-void textureDimensions_6eae7f() {
-  uint arg_1 = 1u;
-  int3 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_6eae7f();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_6eae7f();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_6eae7f();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl.expected.fxc.hlsl
deleted file mode 100644
index b39d4cc..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-TextureCube<int4> arg_0 : register(t0, space1);
-
-void textureDimensions_6eae7f() {
-  uint arg_1 = 1u;
-  int3 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_6eae7f();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_6eae7f();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_6eae7f();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl.expected.glsl
deleted file mode 100644
index d9dbf803..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl.expected.glsl
+++ /dev/null
@@ -1,55 +0,0 @@
-#version 310 es
-
-uniform highp isamplerCube arg_0_1;
-void textureDimensions_6eae7f() {
-  uint arg_1 = 1u;
-  ivec2 res = textureSize(arg_0_1, int(arg_1));
-}
-
-vec4 vertex_main() {
-  textureDimensions_6eae7f();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-uniform highp isamplerCube arg_0_1;
-void textureDimensions_6eae7f() {
-  uint arg_1 = 1u;
-  ivec2 res = textureSize(arg_0_1, int(arg_1));
-}
-
-void fragment_main() {
-  textureDimensions_6eae7f();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-uniform highp isamplerCube arg_0_1;
-void textureDimensions_6eae7f() {
-  uint arg_1 = 1u;
-  ivec2 res = textureSize(arg_0_1, int(arg_1));
-}
-
-void compute_main() {
-  textureDimensions_6eae7f();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl.expected.msl
deleted file mode 100644
index 7560fd6..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl.expected.msl
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_6eae7f(texturecube<int, access::sample> tint_symbol_1) {
-  uint arg_1 = 1u;
-  int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texturecube<int, access::sample> tint_symbol_2) {
-  textureDimensions_6eae7f(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texturecube<int, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texturecube<int, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_6eae7f(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texturecube<int, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_6eae7f(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl.expected.spvasm
deleted file mode 100644
index b794707..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl.expected.spvasm
+++ /dev/null
@@ -1,83 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 43
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_6eae7f "textureDimensions_6eae7f"
-               OpName %arg_1 "arg_1"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-        %int = OpTypeInt 32 1
-         %11 = OpTypeImage %int Cube 0 0 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-       %uint = OpTypeInt 32 0
-     %uint_1 = OpConstant %uint 1
-%_ptr_Function_uint = OpTypePointer Function %uint
-         %21 = OpConstantNull %uint
-      %v2int = OpTypeVector %int 2
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %28 = OpConstantNull %v2int
-         %29 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_6eae7f = OpFunction %void None %13
-         %16 = OpLabel
-      %arg_1 = OpVariable %_ptr_Function_uint Function %21
-        %res = OpVariable %_ptr_Function_v2int Function %28
-               OpStore %arg_1 %uint_1
-         %24 = OpLoad %11 %arg_0
-         %25 = OpLoad %uint %arg_1
-         %22 = OpImageQuerySizeLod %v2int %24 %25
-               OpStore %res %22
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %29
-         %31 = OpLabel
-         %32 = OpFunctionCall %void %textureDimensions_6eae7f
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %34 = OpLabel
-         %35 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %35
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %38 = OpLabel
-         %39 = OpFunctionCall %void %textureDimensions_6eae7f
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %41 = OpLabel
-         %42 = OpFunctionCall %void %textureDimensions_6eae7f
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl.expected.wgsl
deleted file mode 100644
index 8205d78..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/6eae7f.wgsl.expected.wgsl
+++ /dev/null
@@ -1,22 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_cube<i32>;
-
-fn textureDimensions_6eae7f() {
-  var arg_1 = 1u;
-  var res : vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_6eae7f();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_6eae7f();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_6eae7f();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/6ec1b4.wgsl b/test/tint/builtins/gen/var/textureDimensions/6ec1b4.wgsl
deleted file mode 100644
index ef7fe5d..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/6ec1b4.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_3d<u32>;
-
-// fn textureDimensions(texture: texture_3d<u32>) -> vec3<i32>
-fn textureDimensions_6ec1b4() {
-  var res: vec3<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_6ec1b4();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_6ec1b4();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_6ec1b4();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/6ec1b4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/6ec1b4.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 6e9cb1f..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/6ec1b4.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-Texture3D<uint4> arg_0 : register(t0, space1);
-
-void textureDimensions_6ec1b4() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int3 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_6ec1b4();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_6ec1b4();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_6ec1b4();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/6ec1b4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/6ec1b4.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 6e9cb1f..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/6ec1b4.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-Texture3D<uint4> arg_0 : register(t0, space1);
-
-void textureDimensions_6ec1b4() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int3 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_6ec1b4();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_6ec1b4();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_6ec1b4();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/6ec1b4.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/6ec1b4.wgsl.expected.glsl
deleted file mode 100644
index 482455d..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/6ec1b4.wgsl.expected.glsl
+++ /dev/null
@@ -1,52 +0,0 @@
-#version 310 es
-
-uniform highp usampler3D arg_0_1;
-void textureDimensions_6ec1b4() {
-  ivec3 res = textureSize(arg_0_1, 0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_6ec1b4();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-uniform highp usampler3D arg_0_1;
-void textureDimensions_6ec1b4() {
-  ivec3 res = textureSize(arg_0_1, 0);
-}
-
-void fragment_main() {
-  textureDimensions_6ec1b4();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-uniform highp usampler3D arg_0_1;
-void textureDimensions_6ec1b4() {
-  ivec3 res = textureSize(arg_0_1, 0);
-}
-
-void compute_main() {
-  textureDimensions_6ec1b4();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/6ec1b4.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/6ec1b4.wgsl.expected.msl
deleted file mode 100644
index 52a3369..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/6ec1b4.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_6ec1b4(texture3d<uint, access::sample> tint_symbol_1) {
-  int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture3d<uint, access::sample> tint_symbol_2) {
-  textureDimensions_6ec1b4(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture3d<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture3d<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_6ec1b4(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture3d<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_6ec1b4(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/6ec1b4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/6ec1b4.wgsl.expected.spvasm
deleted file mode 100644
index 4f8be17..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/6ec1b4.wgsl.expected.spvasm
+++ /dev/null
@@ -1,77 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 39
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_6ec1b4 "textureDimensions_6ec1b4"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-       %uint = OpTypeInt 32 0
-         %11 = OpTypeImage %uint 3D 0 0 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %v3int = OpTypeVector %int 3
-      %int_0 = OpConstant %int 0
-%_ptr_Function_v3int = OpTypePointer Function %v3int
-         %24 = OpConstantNull %v3int
-         %25 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_6ec1b4 = OpFunction %void None %13
-         %16 = OpLabel
-        %res = OpVariable %_ptr_Function_v3int Function %24
-         %20 = OpLoad %11 %arg_0
-         %17 = OpImageQuerySizeLod %v3int %20 %int_0
-               OpStore %res %17
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %25
-         %27 = OpLabel
-         %28 = OpFunctionCall %void %textureDimensions_6ec1b4
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %30 = OpLabel
-         %31 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %31
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %34 = OpLabel
-         %35 = OpFunctionCall %void %textureDimensions_6ec1b4
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %37 = OpLabel
-         %38 = OpFunctionCall %void %textureDimensions_6ec1b4
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/6ec1b4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/6ec1b4.wgsl.expected.wgsl
deleted file mode 100644
index 7573c55..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/6ec1b4.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_3d<u32>;
-
-fn textureDimensions_6ec1b4() {
-  var res : vec3<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_6ec1b4();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_6ec1b4();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_6ec1b4();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/6f0d79.wgsl b/test/tint/builtins/gen/var/textureDimensions/6f0d79.wgsl
deleted file mode 100644
index 2e0eb57..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/6f0d79.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8snorm, write>;
-
-// fn textureDimensions(texture: texture_storage_2d_array<rgba8snorm, write>) -> vec2<i32>
-fn textureDimensions_6f0d79() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_6f0d79();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_6f0d79();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_6f0d79();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/6f0d79.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/6f0d79.wgsl.expected.dxc.hlsl
deleted file mode 100644
index cd1a3a4..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/6f0d79.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2DArray<float4> arg_0 : register(u0, space1);
-
-void textureDimensions_6f0d79() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_6f0d79();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_6f0d79();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_6f0d79();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/6f0d79.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/6f0d79.wgsl.expected.fxc.hlsl
deleted file mode 100644
index cd1a3a4..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/6f0d79.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2DArray<float4> arg_0 : register(u0, space1);
-
-void textureDimensions_6f0d79() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_6f0d79();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_6f0d79();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_6f0d79();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/6f0d79.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/6f0d79.wgsl.expected.glsl
deleted file mode 100644
index 71893cb..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/6f0d79.wgsl.expected.glsl
+++ /dev/null
@@ -1,52 +0,0 @@
-#version 310 es
-
-layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0;
-void textureDimensions_6f0d79() {
-  ivec2 res = imageSize(arg_0).xy;
-}
-
-vec4 vertex_main() {
-  textureDimensions_6f0d79();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0;
-void textureDimensions_6f0d79() {
-  ivec2 res = imageSize(arg_0).xy;
-}
-
-void fragment_main() {
-  textureDimensions_6f0d79();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0;
-void textureDimensions_6f0d79() {
-  ivec2 res = imageSize(arg_0).xy;
-}
-
-void compute_main() {
-  textureDimensions_6f0d79();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/6f0d79.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/6f0d79.wgsl.expected.msl
deleted file mode 100644
index 5154f6c..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/6f0d79.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_6f0d79(texture2d_array<float, access::write> tint_symbol_1) {
-  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
-  textureDimensions_6f0d79(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture2d_array<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture2d_array<float, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_6f0d79(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture2d_array<float, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_6f0d79(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/6f0d79.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/6f0d79.wgsl.expected.spvasm
deleted file mode 100644
index f1032b69..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/6f0d79.wgsl.expected.spvasm
+++ /dev/null
@@ -1,78 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 39
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_6f0d79 "textureDimensions_6f0d79"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba8Snorm
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %12 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %v2int = OpTypeVector %int 2
-      %v3int = OpTypeVector %int 3
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %24 = OpConstantNull %v2int
-         %25 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_6f0d79 = OpFunction %void None %12
-         %15 = OpLabel
-        %res = OpVariable %_ptr_Function_v2int Function %24
-         %21 = OpLoad %11 %arg_0
-         %19 = OpImageQuerySize %v3int %21
-         %16 = OpVectorShuffle %v2int %19 %19 0 1
-               OpStore %res %16
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %25
-         %27 = OpLabel
-         %28 = OpFunctionCall %void %textureDimensions_6f0d79
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %12
-         %30 = OpLabel
-         %31 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %31
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %12
-         %34 = OpLabel
-         %35 = OpFunctionCall %void %textureDimensions_6f0d79
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %12
-         %37 = OpLabel
-         %38 = OpFunctionCall %void %textureDimensions_6f0d79
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/6f0d79.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/6f0d79.wgsl.expected.wgsl
deleted file mode 100644
index b055eea..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/6f0d79.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8snorm, write>;
-
-fn textureDimensions_6f0d79() {
-  var res : vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_6f0d79();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_6f0d79();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_6f0d79();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/6f1b5d.wgsl b/test/tint/builtins/gen/var/textureDimensions/6f1b5d.wgsl
new file mode 100644
index 0000000..d4e1e80
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/6f1b5d.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d;
+
+// fn textureDimensions(texture: texture_depth_2d, level: i32) -> vec2<u32>
+fn textureDimensions_6f1b5d() {
+  var arg_1 = 1i;
+  var res: vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_6f1b5d();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_6f1b5d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_6f1b5d();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/6f1b5d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/6f1b5d.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..a6a31de
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/6f1b5d.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D arg_0 : register(t0, space1);
+
+void textureDimensions_6f1b5d() {
+  int arg_1 = 1;
+  int3 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_6f1b5d();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_6f1b5d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_6f1b5d();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/6f1b5d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/6f1b5d.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..a6a31de
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/6f1b5d.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D arg_0 : register(t0, space1);
+
+void textureDimensions_6f1b5d() {
+  int arg_1 = 1;
+  int3 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_6f1b5d();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_6f1b5d();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_6f1b5d();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/6f1b5d.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/6f1b5d.wgsl.expected.glsl
new file mode 100644
index 0000000..ee9d548
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/6f1b5d.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp sampler2D arg_0_1;
+void textureDimensions_6f1b5d() {
+  int arg_1 = 1;
+  uvec2 res = uvec2(textureSize(arg_0_1, arg_1));
+}
+
+vec4 vertex_main() {
+  textureDimensions_6f1b5d();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2D arg_0_1;
+void textureDimensions_6f1b5d() {
+  int arg_1 = 1;
+  uvec2 res = uvec2(textureSize(arg_0_1, arg_1));
+}
+
+void fragment_main() {
+  textureDimensions_6f1b5d();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2D arg_0_1;
+void textureDimensions_6f1b5d() {
+  int arg_1 = 1;
+  uvec2 res = uvec2(textureSize(arg_0_1, arg_1));
+}
+
+void compute_main() {
+  textureDimensions_6f1b5d();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/6f1b5d.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/6f1b5d.wgsl.expected.msl
new file mode 100644
index 0000000..9628555
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/6f1b5d.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_6f1b5d(depth2d<float, access::sample> tint_symbol_1) {
+  int arg_1 = 1;
+  uint2 res = uint2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d<float, access::sample> tint_symbol_2) {
+  textureDimensions_6f1b5d(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depth2d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_6f1b5d(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(depth2d<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_6f1b5d(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/6f1b5d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/6f1b5d.wgsl.expected.spvasm
new file mode 100644
index 0000000..f0ab644
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/6f1b5d.wgsl.expected.spvasm
@@ -0,0 +1,83 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_6f1b5d "textureDimensions_6f1b5d"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_int = OpTypePointer Function %int
+         %20 = OpConstantNull %int
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %28 = OpConstantNull %v2uint
+         %29 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_6f1b5d = OpFunction %void None %12
+         %15 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_int Function %20
+        %res = OpVariable %_ptr_Function_v2uint Function %28
+               OpStore %arg_1 %int_1
+         %24 = OpLoad %11 %arg_0
+         %25 = OpLoad %int %arg_1
+         %21 = OpImageQuerySizeLod %v2uint %24 %25
+               OpStore %res %21
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureDimensions_6f1b5d
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %34 = OpLabel
+         %35 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %35
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureDimensions_6f1b5d
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureDimensions_6f1b5d
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/6f1b5d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/6f1b5d.wgsl.expected.wgsl
new file mode 100644
index 0000000..a0fb93d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/6f1b5d.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d;
+
+fn textureDimensions_6f1b5d() {
+  var arg_1 = 1i;
+  var res : vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_6f1b5d();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_6f1b5d();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_6f1b5d();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/702c53.wgsl b/test/tint/builtins/gen/var/textureDimensions/702c53.wgsl
deleted file mode 100644
index 99afe61..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/702c53.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d<rgba8unorm, write>;
-
-// fn textureDimensions(texture: texture_storage_2d<rgba8unorm, write>) -> vec2<i32>
-fn textureDimensions_702c53() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_702c53();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_702c53();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_702c53();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/702c53.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/702c53.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 40c27c8..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/702c53.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2D<float4> arg_0 : register(u0, space1);
-
-void textureDimensions_702c53() {
-  int2 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
-  int2 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_702c53();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_702c53();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_702c53();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/702c53.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/702c53.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 40c27c8..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/702c53.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2D<float4> arg_0 : register(u0, space1);
-
-void textureDimensions_702c53() {
-  int2 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
-  int2 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_702c53();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_702c53();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_702c53();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/702c53.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/702c53.wgsl.expected.glsl
deleted file mode 100644
index e4f0c34..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/702c53.wgsl.expected.glsl
+++ /dev/null
@@ -1,52 +0,0 @@
-#version 310 es
-
-layout(rgba8) uniform highp writeonly image2D arg_0;
-void textureDimensions_702c53() {
-  ivec2 res = imageSize(arg_0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_702c53();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-layout(rgba8) uniform highp writeonly image2D arg_0;
-void textureDimensions_702c53() {
-  ivec2 res = imageSize(arg_0);
-}
-
-void fragment_main() {
-  textureDimensions_702c53();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-layout(rgba8) uniform highp writeonly image2D arg_0;
-void textureDimensions_702c53() {
-  ivec2 res = imageSize(arg_0);
-}
-
-void compute_main() {
-  textureDimensions_702c53();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/702c53.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/702c53.wgsl.expected.msl
deleted file mode 100644
index d202631..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/702c53.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_702c53(texture2d<float, access::write> tint_symbol_1) {
-  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture2d<float, access::write> tint_symbol_2) {
-  textureDimensions_702c53(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture2d<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture2d<float, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_702c53(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture2d<float, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_702c53(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/702c53.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/702c53.wgsl.expected.spvasm
deleted file mode 100644
index 514d19f..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/702c53.wgsl.expected.spvasm
+++ /dev/null
@@ -1,76 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 37
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_702c53 "textureDimensions_702c53"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-         %11 = OpTypeImage %float 2D 0 0 0 2 Rgba8
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %12 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %v2int = OpTypeVector %int 2
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %22 = OpConstantNull %v2int
-         %23 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_702c53 = OpFunction %void None %12
-         %15 = OpLabel
-        %res = OpVariable %_ptr_Function_v2int Function %22
-         %19 = OpLoad %11 %arg_0
-         %16 = OpImageQuerySize %v2int %19
-               OpStore %res %16
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %23
-         %25 = OpLabel
-         %26 = OpFunctionCall %void %textureDimensions_702c53
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %12
-         %28 = OpLabel
-         %29 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %29
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %12
-         %32 = OpLabel
-         %33 = OpFunctionCall %void %textureDimensions_702c53
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %12
-         %35 = OpLabel
-         %36 = OpFunctionCall %void %textureDimensions_702c53
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/702c53.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/702c53.wgsl.expected.wgsl
deleted file mode 100644
index 093625d..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/702c53.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba8unorm, write>;
-
-fn textureDimensions_702c53() {
-  var res : vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_702c53();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_702c53();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_702c53();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl b/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl
deleted file mode 100644
index 623c316..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2022 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_3d<i32>;
-
-// fn textureDimensions(texture: texture_3d<i32>, level: u32) -> vec3<i32>
-fn textureDimensions_71b9f4() {
-  var arg_1 = 1u;
-  var res: vec3<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_71b9f4();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_71b9f4();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_71b9f4();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 407d300..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-Texture3D<int4> arg_0 : register(t0, space1);
-
-void textureDimensions_71b9f4() {
-  uint arg_1 = 1u;
-  int4 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
-  int3 res = tint_tmp.xyz;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_71b9f4();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_71b9f4();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_71b9f4();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 407d300..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-Texture3D<int4> arg_0 : register(t0, space1);
-
-void textureDimensions_71b9f4() {
-  uint arg_1 = 1u;
-  int4 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
-  int3 res = tint_tmp.xyz;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_71b9f4();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_71b9f4();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_71b9f4();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl.expected.glsl
deleted file mode 100644
index 6294f19..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl.expected.glsl
+++ /dev/null
@@ -1,55 +0,0 @@
-#version 310 es
-
-uniform highp isampler3D arg_0_1;
-void textureDimensions_71b9f4() {
-  uint arg_1 = 1u;
-  ivec3 res = textureSize(arg_0_1, int(arg_1));
-}
-
-vec4 vertex_main() {
-  textureDimensions_71b9f4();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-uniform highp isampler3D arg_0_1;
-void textureDimensions_71b9f4() {
-  uint arg_1 = 1u;
-  ivec3 res = textureSize(arg_0_1, int(arg_1));
-}
-
-void fragment_main() {
-  textureDimensions_71b9f4();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-uniform highp isampler3D arg_0_1;
-void textureDimensions_71b9f4() {
-  uint arg_1 = 1u;
-  ivec3 res = textureSize(arg_0_1, int(arg_1));
-}
-
-void compute_main() {
-  textureDimensions_71b9f4();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl.expected.msl
deleted file mode 100644
index 21a0b0a..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl.expected.msl
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_71b9f4(texture3d<int, access::sample> tint_symbol_1) {
-  uint arg_1 = 1u;
-  int3 res = int3(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1), tint_symbol_1.get_depth(arg_1));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture3d<int, access::sample> tint_symbol_2) {
-  textureDimensions_71b9f4(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture3d<int, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture3d<int, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_71b9f4(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture3d<int, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_71b9f4(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl.expected.spvasm
deleted file mode 100644
index d48fdbf..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl.expected.spvasm
+++ /dev/null
@@ -1,83 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 43
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_71b9f4 "textureDimensions_71b9f4"
-               OpName %arg_1 "arg_1"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-        %int = OpTypeInt 32 1
-         %11 = OpTypeImage %int 3D 0 0 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-       %uint = OpTypeInt 32 0
-     %uint_1 = OpConstant %uint 1
-%_ptr_Function_uint = OpTypePointer Function %uint
-         %21 = OpConstantNull %uint
-      %v3int = OpTypeVector %int 3
-%_ptr_Function_v3int = OpTypePointer Function %v3int
-         %28 = OpConstantNull %v3int
-         %29 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_71b9f4 = OpFunction %void None %13
-         %16 = OpLabel
-      %arg_1 = OpVariable %_ptr_Function_uint Function %21
-        %res = OpVariable %_ptr_Function_v3int Function %28
-               OpStore %arg_1 %uint_1
-         %24 = OpLoad %11 %arg_0
-         %25 = OpLoad %uint %arg_1
-         %22 = OpImageQuerySizeLod %v3int %24 %25
-               OpStore %res %22
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %29
-         %31 = OpLabel
-         %32 = OpFunctionCall %void %textureDimensions_71b9f4
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %34 = OpLabel
-         %35 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %35
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %38 = OpLabel
-         %39 = OpFunctionCall %void %textureDimensions_71b9f4
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %41 = OpLabel
-         %42 = OpFunctionCall %void %textureDimensions_71b9f4
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl.expected.wgsl
deleted file mode 100644
index 816599d..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/71b9f4.wgsl.expected.wgsl
+++ /dev/null
@@ -1,22 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_3d<i32>;
-
-fn textureDimensions_71b9f4() {
-  var arg_1 = 1u;
-  var res : vec3<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_71b9f4();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_71b9f4();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_71b9f4();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/7228de.wgsl b/test/tint/builtins/gen/var/textureDimensions/7228de.wgsl
new file mode 100644
index 0000000..48176cf
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/7228de.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<r32uint, write>;
+
+// fn textureDimensions(texture: texture_storage_1d<r32uint, write>) -> u32
+fn textureDimensions_7228de() {
+  var res: u32 = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_7228de();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_7228de();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_7228de();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/7228de.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/7228de.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..79216e6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/7228de.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<uint4> arg_0 : register(u0, space1);
+
+void textureDimensions_7228de() {
+  int tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_7228de();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_7228de();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_7228de();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/7228de.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/7228de.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..79216e6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/7228de.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<uint4> arg_0 : register(u0, space1);
+
+void textureDimensions_7228de() {
+  int tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_7228de();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_7228de();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_7228de();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/7228de.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/7228de.wgsl.expected.glsl
new file mode 100644
index 0000000..d148823
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/7228de.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32ui) uniform highp writeonly uimage1D arg_0;
+void textureDimensions_7228de() {
+  uint res = uint(imageSize(arg_0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_7228de();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'uimage1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(r32ui) uniform highp writeonly uimage1D arg_0;
+void textureDimensions_7228de() {
+  uint res = uint(imageSize(arg_0));
+}
+
+void fragment_main() {
+  textureDimensions_7228de();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'uimage1D' : Reserved word. 
+WARNING: 0:4: 'layout' : useless application of layout qualifier 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32ui) uniform highp writeonly uimage1D arg_0;
+void textureDimensions_7228de() {
+  uint res = uint(imageSize(arg_0));
+}
+
+void compute_main() {
+  textureDimensions_7228de();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'uimage1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/7228de.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/7228de.wgsl.expected.msl
new file mode 100644
index 0000000..d5d9363
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/7228de.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_7228de(texture1d<uint, access::write> tint_symbol_1) {
+  uint res = tint_symbol_1.get_width(0);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<uint, access::write> tint_symbol_2) {
+  textureDimensions_7228de(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_7228de(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_7228de(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/7228de.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/7228de.wgsl.expected.spvasm
new file mode 100644
index 0000000..defd7fb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/7228de.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_7228de "textureDimensions_7228de"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 1D 0 0 0 2 R32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %21 = OpConstantNull %uint
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_7228de = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_uint Function %21
+         %18 = OpLoad %11 %arg_0
+         %17 = OpImageQuerySize %uint %18
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %textureDimensions_7228de
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %27 = OpLabel
+         %28 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %28
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureDimensions_7228de
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureDimensions_7228de
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/7228de.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/7228de.wgsl.expected.wgsl
new file mode 100644
index 0000000..6f791d8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/7228de.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<r32uint, write>;
+
+fn textureDimensions_7228de() {
+  var res : u32 = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_7228de();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_7228de();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_7228de();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/72e5d6.wgsl b/test/tint/builtins/gen/var/textureDimensions/72e5d6.wgsl
deleted file mode 100644
index effe723..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/72e5d6.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_depth_2d_array;
-
-// fn textureDimensions(texture: texture_depth_2d_array, level: i32) -> vec2<i32>
-fn textureDimensions_72e5d6() {
-  var arg_1 = 1i;
-  var res: vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_72e5d6();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_72e5d6();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_72e5d6();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/72e5d6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/72e5d6.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 53e6671..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/72e5d6.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-Texture2DArray arg_0 : register(t0, space1);
-
-void textureDimensions_72e5d6() {
-  int arg_1 = 1;
-  int4 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_72e5d6();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_72e5d6();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_72e5d6();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/72e5d6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/72e5d6.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 53e6671..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/72e5d6.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-Texture2DArray arg_0 : register(t0, space1);
-
-void textureDimensions_72e5d6() {
-  int arg_1 = 1;
-  int4 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_72e5d6();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_72e5d6();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_72e5d6();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/72e5d6.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/72e5d6.wgsl.expected.glsl
deleted file mode 100644
index 1f2fc86..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/72e5d6.wgsl.expected.glsl
+++ /dev/null
@@ -1,55 +0,0 @@
-#version 310 es
-
-uniform highp sampler2DArray arg_0_1;
-void textureDimensions_72e5d6() {
-  int arg_1 = 1;
-  ivec2 res = textureSize(arg_0_1, arg_1).xy;
-}
-
-vec4 vertex_main() {
-  textureDimensions_72e5d6();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-uniform highp sampler2DArray arg_0_1;
-void textureDimensions_72e5d6() {
-  int arg_1 = 1;
-  ivec2 res = textureSize(arg_0_1, arg_1).xy;
-}
-
-void fragment_main() {
-  textureDimensions_72e5d6();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-uniform highp sampler2DArray arg_0_1;
-void textureDimensions_72e5d6() {
-  int arg_1 = 1;
-  ivec2 res = textureSize(arg_0_1, arg_1).xy;
-}
-
-void compute_main() {
-  textureDimensions_72e5d6();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/72e5d6.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/72e5d6.wgsl.expected.msl
deleted file mode 100644
index 2de47be..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/72e5d6.wgsl.expected.msl
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_72e5d6(depth2d_array<float, access::sample> tint_symbol_1) {
-  int arg_1 = 1;
-  int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(depth2d_array<float, access::sample> tint_symbol_2) {
-  textureDimensions_72e5d6(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_72e5d6(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(depth2d_array<float, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_72e5d6(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/72e5d6.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/72e5d6.wgsl.expected.spvasm
deleted file mode 100644
index 6c0e739..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/72e5d6.wgsl.expected.spvasm
+++ /dev/null
@@ -1,84 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 44
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_72e5d6 "textureDimensions_72e5d6"
-               OpName %arg_1 "arg_1"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-         %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %12 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %int_1 = OpConstant %int 1
-%_ptr_Function_int = OpTypePointer Function %int
-         %20 = OpConstantNull %int
-      %v2int = OpTypeVector %int 2
-      %v3int = OpTypeVector %int 3
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %29 = OpConstantNull %v2int
-         %30 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_72e5d6 = OpFunction %void None %12
-         %15 = OpLabel
-      %arg_1 = OpVariable %_ptr_Function_int Function %20
-        %res = OpVariable %_ptr_Function_v2int Function %29
-               OpStore %arg_1 %int_1
-         %25 = OpLoad %11 %arg_0
-         %26 = OpLoad %int %arg_1
-         %23 = OpImageQuerySizeLod %v3int %25 %26
-         %21 = OpVectorShuffle %v2int %23 %23 0 1
-               OpStore %res %21
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %30
-         %32 = OpLabel
-         %33 = OpFunctionCall %void %textureDimensions_72e5d6
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %12
-         %35 = OpLabel
-         %36 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %36
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %12
-         %39 = OpLabel
-         %40 = OpFunctionCall %void %textureDimensions_72e5d6
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %12
-         %42 = OpLabel
-         %43 = OpFunctionCall %void %textureDimensions_72e5d6
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/72e5d6.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/72e5d6.wgsl.expected.wgsl
deleted file mode 100644
index a0def88..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/72e5d6.wgsl.expected.wgsl
+++ /dev/null
@@ -1,22 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
-
-fn textureDimensions_72e5d6() {
-  var arg_1 = 1i;
-  var res : vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_72e5d6();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_72e5d6();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_72e5d6();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/756031.wgsl b/test/tint/builtins/gen/var/textureDimensions/756031.wgsl
new file mode 100644
index 0000000..336207e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/756031.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_3d<i32>;
+
+// fn textureDimensions(texture: texture_3d<i32>, level: i32) -> vec3<u32>
+fn textureDimensions_756031() {
+  var arg_1 = 1i;
+  var res: vec3<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_756031();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_756031();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_756031();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/756031.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/756031.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9e45538
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/756031.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_756031() {
+  int arg_1 = 1;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  uint3 res = tint_tmp.xyz;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_756031();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_756031();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_756031();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/756031.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/756031.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9e45538
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/756031.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_756031() {
+  int arg_1 = 1;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  uint3 res = tint_tmp.xyz;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_756031();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_756031();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_756031();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/756031.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/756031.wgsl.expected.glsl
new file mode 100644
index 0000000..02ed7ea
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/756031.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp isampler3D arg_0_1;
+void textureDimensions_756031() {
+  int arg_1 = 1;
+  uvec3 res = uvec3(textureSize(arg_0_1, arg_1));
+}
+
+vec4 vertex_main() {
+  textureDimensions_756031();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isampler3D arg_0_1;
+void textureDimensions_756031() {
+  int arg_1 = 1;
+  uvec3 res = uvec3(textureSize(arg_0_1, arg_1));
+}
+
+void fragment_main() {
+  textureDimensions_756031();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp isampler3D arg_0_1;
+void textureDimensions_756031() {
+  int arg_1 = 1;
+  uvec3 res = uvec3(textureSize(arg_0_1, arg_1));
+}
+
+void compute_main() {
+  textureDimensions_756031();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/756031.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/756031.wgsl.expected.msl
new file mode 100644
index 0000000..c267c67
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/756031.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_756031(texture3d<int, access::sample> tint_symbol_1) {
+  int arg_1 = 1;
+  uint3 res = uint3(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1), tint_symbol_1.get_depth(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<int, access::sample> tint_symbol_2) {
+  textureDimensions_756031(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<int, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<int, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_756031(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture3d<int, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_756031(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/756031.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/756031.wgsl.expected.spvasm
new file mode 100644
index 0000000..38d19dc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/756031.wgsl.expected.spvasm
@@ -0,0 +1,83 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_756031 "textureDimensions_756031"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 3D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+      %int_1 = OpConstant %int 1
+%_ptr_Function_int = OpTypePointer Function %int
+         %20 = OpConstantNull %int
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+         %28 = OpConstantNull %v3uint
+         %29 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_756031 = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_int Function %20
+        %res = OpVariable %_ptr_Function_v3uint Function %28
+               OpStore %arg_1 %int_1
+         %24 = OpLoad %11 %arg_0
+         %25 = OpLoad %int %arg_1
+         %21 = OpImageQuerySizeLod %v3uint %24 %25
+               OpStore %res %21
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureDimensions_756031
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %34 = OpLabel
+         %35 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %35
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureDimensions_756031
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureDimensions_756031
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/756031.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/756031.wgsl.expected.wgsl
new file mode 100644
index 0000000..389c758
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/756031.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_3d<i32>;
+
+fn textureDimensions_756031() {
+  var arg_1 = 1i;
+  var res : vec3<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_756031();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_756031();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_756031();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/756304.wgsl b/test/tint/builtins/gen/var/textureDimensions/756304.wgsl
new file mode 100644
index 0000000..d06fb96
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/756304.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32float, write>;
+
+// fn textureDimensions(texture: texture_storage_2d_array<r32float, write>) -> vec2<u32>
+fn textureDimensions_756304() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_756304();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_756304();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_756304();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/756304.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/756304.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..70b5dc9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/756304.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureDimensions_756304() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_756304();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_756304();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_756304();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/756304.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/756304.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..70b5dc9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/756304.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureDimensions_756304() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_756304();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_756304();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_756304();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/756304.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/756304.wgsl.expected.glsl
new file mode 100644
index 0000000..a1d9085
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/756304.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(r32f) uniform highp writeonly image2DArray arg_0;
+void textureDimensions_756304() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+}
+
+vec4 vertex_main() {
+  textureDimensions_756304();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(r32f) uniform highp writeonly image2DArray arg_0;
+void textureDimensions_756304() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+}
+
+void fragment_main() {
+  textureDimensions_756304();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(r32f) uniform highp writeonly image2DArray arg_0;
+void textureDimensions_756304() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+}
+
+void compute_main() {
+  textureDimensions_756304();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/756304.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/756304.wgsl.expected.msl
new file mode 100644
index 0000000..21be296f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/756304.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_756304(texture2d_array<float, access::write> tint_symbol_1) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
+  textureDimensions_756304(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_756304(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_756304(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/756304.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/756304.wgsl.expected.spvasm
new file mode 100644
index 0000000..2c2eeb3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/756304.wgsl.expected.spvasm
@@ -0,0 +1,78 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_756304 "textureDimensions_756304"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 R32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %24 = OpConstantNull %v2uint
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_756304 = OpFunction %void None %12
+         %15 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %24
+         %21 = OpLoad %11 %arg_0
+         %19 = OpImageQuerySize %v3uint %21
+         %16 = OpVectorShuffle %v2uint %19 %19 0 1
+               OpStore %res %16
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %textureDimensions_756304
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureDimensions_756304
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureDimensions_756304
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/756304.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/756304.wgsl.expected.wgsl
new file mode 100644
index 0000000..16fcc5c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/756304.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32float, write>;
+
+fn textureDimensions_756304() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_756304();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_756304();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_756304();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/79d168.wgsl b/test/tint/builtins/gen/var/textureDimensions/79d168.wgsl
new file mode 100644
index 0000000..a45a3fe
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/79d168.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_cube;
+
+// fn textureDimensions(texture: texture_depth_cube, level: i32) -> vec2<u32>
+fn textureDimensions_79d168() {
+  var arg_1 = 1i;
+  var res: vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_79d168();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_79d168();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_79d168();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/79d168.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/79d168.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..4bbc5c7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/79d168.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+TextureCube arg_0 : register(t0, space1);
+
+void textureDimensions_79d168() {
+  int arg_1 = 1;
+  int3 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_79d168();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_79d168();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_79d168();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/79d168.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/79d168.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..4bbc5c7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/79d168.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+TextureCube arg_0 : register(t0, space1);
+
+void textureDimensions_79d168() {
+  int arg_1 = 1;
+  int3 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_79d168();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_79d168();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_79d168();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/79d168.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/79d168.wgsl.expected.glsl
new file mode 100644
index 0000000..34e9119
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/79d168.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp samplerCube arg_0_1;
+void textureDimensions_79d168() {
+  int arg_1 = 1;
+  uvec2 res = uvec2(textureSize(arg_0_1, arg_1));
+}
+
+vec4 vertex_main() {
+  textureDimensions_79d168();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCube arg_0_1;
+void textureDimensions_79d168() {
+  int arg_1 = 1;
+  uvec2 res = uvec2(textureSize(arg_0_1, arg_1));
+}
+
+void fragment_main() {
+  textureDimensions_79d168();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp samplerCube arg_0_1;
+void textureDimensions_79d168() {
+  int arg_1 = 1;
+  uvec2 res = uvec2(textureSize(arg_0_1, arg_1));
+}
+
+void compute_main() {
+  textureDimensions_79d168();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/79d168.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/79d168.wgsl.expected.msl
new file mode 100644
index 0000000..08a009b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/79d168.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_79d168(depthcube<float, access::sample> tint_symbol_1) {
+  int arg_1 = 1;
+  uint2 res = uint2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(depthcube<float, access::sample> tint_symbol_2) {
+  textureDimensions_79d168(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depthcube<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depthcube<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_79d168(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(depthcube<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_79d168(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/79d168.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/79d168.wgsl.expected.spvasm
new file mode 100644
index 0000000..88d67cd3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/79d168.wgsl.expected.spvasm
@@ -0,0 +1,83 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_79d168 "textureDimensions_79d168"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float Cube 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_int = OpTypePointer Function %int
+         %20 = OpConstantNull %int
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %28 = OpConstantNull %v2uint
+         %29 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_79d168 = OpFunction %void None %12
+         %15 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_int Function %20
+        %res = OpVariable %_ptr_Function_v2uint Function %28
+               OpStore %arg_1 %int_1
+         %24 = OpLoad %11 %arg_0
+         %25 = OpLoad %int %arg_1
+         %21 = OpImageQuerySizeLod %v2uint %24 %25
+               OpStore %res %21
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureDimensions_79d168
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %34 = OpLabel
+         %35 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %35
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureDimensions_79d168
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureDimensions_79d168
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/79d168.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/79d168.wgsl.expected.wgsl
new file mode 100644
index 0000000..eba133c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/79d168.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_depth_cube;
+
+fn textureDimensions_79d168() {
+  var arg_1 = 1i;
+  var res : vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_79d168();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_79d168();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_79d168();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/79df87.wgsl b/test/tint/builtins/gen/var/textureDimensions/79df87.wgsl
deleted file mode 100644
index 9669ba9..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/79df87.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_1d<u32>;
-
-// fn textureDimensions(texture: texture_1d<u32>, level: i32) -> i32
-fn textureDimensions_79df87() {
-  var arg_1 = 1i;
-  var res: i32 = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_79df87();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_79df87();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_79df87();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/79df87.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/79df87.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 149c28f..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/79df87.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-Texture1D<uint4> arg_0 : register(t0, space1);
-
-void textureDimensions_79df87() {
-  int arg_1 = 1;
-  int2 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y);
-  int res = tint_tmp.x;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_79df87();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_79df87();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_79df87();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/79df87.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/79df87.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 149c28f..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/79df87.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-Texture1D<uint4> arg_0 : register(t0, space1);
-
-void textureDimensions_79df87() {
-  int arg_1 = 1;
-  int2 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y);
-  int res = tint_tmp.x;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_79df87();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_79df87();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_79df87();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/79df87.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/79df87.wgsl.expected.glsl
deleted file mode 100644
index 1b5edf0..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/79df87.wgsl.expected.glsl
+++ /dev/null
@@ -1,78 +0,0 @@
-SKIP: FAILED
-
-#version 310 es
-
-uniform highp usampler1D arg_0_1;
-void textureDimensions_79df87() {
-  int arg_1 = 0;
-  int res = textureSize(arg_0_1, arg_1);
-}
-
-vec4 vertex_main() {
-  textureDimensions_79df87();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'usampler1D' : Reserved word. 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision mediump float;
-
-uniform highp usampler1D arg_0_1;
-void textureDimensions_79df87() {
-  int arg_1 = 0;
-  int res = textureSize(arg_0_1, arg_1);
-}
-
-void fragment_main() {
-  textureDimensions_79df87();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:4: 'usampler1D' : Reserved word. 
-ERROR: 0:4: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-
-uniform highp usampler1D arg_0_1;
-void textureDimensions_79df87() {
-  int arg_1 = 0;
-  int res = textureSize(arg_0_1, arg_1);
-}
-
-void compute_main() {
-  textureDimensions_79df87();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'usampler1D' : Reserved word. 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/79df87.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/79df87.wgsl.expected.msl
deleted file mode 100644
index b62c801..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/79df87.wgsl.expected.msl
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_79df87(texture1d<uint, access::sample> tint_symbol_1) {
-  int arg_1 = 1;
-  int res = int(tint_symbol_1.get_width(0));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture1d<uint, access::sample> tint_symbol_2) {
-  textureDimensions_79df87(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture1d<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture1d<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_79df87(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture1d<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_79df87(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/79df87.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/79df87.wgsl.expected.spvasm
deleted file mode 100644
index 6fdc63c..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/79df87.wgsl.expected.spvasm
+++ /dev/null
@@ -1,81 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 40
-; Schema: 0
-               OpCapability Shader
-               OpCapability Sampled1D
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_79df87 "textureDimensions_79df87"
-               OpName %arg_1 "arg_1"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-       %uint = OpTypeInt 32 0
-         %11 = OpTypeImage %uint 1D 0 0 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %int_1 = OpConstant %int 1
-%_ptr_Function_int = OpTypePointer Function %int
-         %21 = OpConstantNull %int
-         %26 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_79df87 = OpFunction %void None %13
-         %16 = OpLabel
-      %arg_1 = OpVariable %_ptr_Function_int Function %21
-        %res = OpVariable %_ptr_Function_int Function %21
-               OpStore %arg_1 %int_1
-         %23 = OpLoad %11 %arg_0
-         %24 = OpLoad %int %arg_1
-         %22 = OpImageQuerySizeLod %int %23 %24
-               OpStore %res %22
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %26
-         %28 = OpLabel
-         %29 = OpFunctionCall %void %textureDimensions_79df87
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %31 = OpLabel
-         %32 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %32
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %35 = OpLabel
-         %36 = OpFunctionCall %void %textureDimensions_79df87
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %38 = OpLabel
-         %39 = OpFunctionCall %void %textureDimensions_79df87
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/79df87.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/79df87.wgsl.expected.wgsl
deleted file mode 100644
index 2eba528..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/79df87.wgsl.expected.wgsl
+++ /dev/null
@@ -1,22 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_1d<u32>;
-
-fn textureDimensions_79df87() {
-  var arg_1 = 1i;
-  var res : i32 = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_79df87();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_79df87();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_79df87();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/7a3890.wgsl b/test/tint/builtins/gen/var/textureDimensions/7a3890.wgsl
new file mode 100644
index 0000000..30e8a51
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/7a3890.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_3d<u32>;
+
+// fn textureDimensions(texture: texture_3d<u32>) -> vec3<u32>
+fn textureDimensions_7a3890() {
+  var res: vec3<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_7a3890();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_7a3890();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_7a3890();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/7a3890.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/7a3890.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..3a01cb7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/7a3890.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_7a3890() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_7a3890();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_7a3890();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_7a3890();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/7a3890.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/7a3890.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..3a01cb7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/7a3890.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_7a3890() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_7a3890();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_7a3890();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_7a3890();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/7a3890.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/7a3890.wgsl.expected.glsl
new file mode 100644
index 0000000..533a4f8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/7a3890.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp usampler3D arg_0_1;
+void textureDimensions_7a3890() {
+  uvec3 res = uvec3(textureSize(arg_0_1, 0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_7a3890();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usampler3D arg_0_1;
+void textureDimensions_7a3890() {
+  uvec3 res = uvec3(textureSize(arg_0_1, 0));
+}
+
+void fragment_main() {
+  textureDimensions_7a3890();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp usampler3D arg_0_1;
+void textureDimensions_7a3890() {
+  uvec3 res = uvec3(textureSize(arg_0_1, 0));
+}
+
+void compute_main() {
+  textureDimensions_7a3890();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/7a3890.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/7a3890.wgsl.expected.msl
new file mode 100644
index 0000000..3118213
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/7a3890.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_7a3890(texture3d<uint, access::sample> tint_symbol_1) {
+  uint3 res = uint3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<uint, access::sample> tint_symbol_2) {
+  textureDimensions_7a3890(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_7a3890(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture3d<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_7a3890(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/7a3890.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/7a3890.wgsl.expected.spvasm
new file mode 100644
index 0000000..43921a9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/7a3890.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_7a3890 "textureDimensions_7a3890"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 3D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+        %int = OpTypeInt 32 1
+      %int_0 = OpConstant %int 0
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+         %24 = OpConstantNull %v3uint
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_7a3890 = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_v3uint Function %24
+         %19 = OpLoad %11 %arg_0
+         %17 = OpImageQuerySizeLod %v3uint %19 %int_0
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %textureDimensions_7a3890
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureDimensions_7a3890
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureDimensions_7a3890
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/7a3890.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/7a3890.wgsl.expected.wgsl
new file mode 100644
index 0000000..82213cc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/7a3890.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_3d<u32>;
+
+fn textureDimensions_7a3890() {
+  var res : vec3<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_7a3890();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_7a3890();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_7a3890();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/7a9e30.wgsl b/test/tint/builtins/gen/var/textureDimensions/7a9e30.wgsl
new file mode 100644
index 0000000..9d1f0b9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/7a9e30.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube<u32>;
+
+// fn textureDimensions(texture: texture_cube<u32>) -> vec2<u32>
+fn textureDimensions_7a9e30() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_7a9e30();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_7a9e30();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_7a9e30();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/7a9e30.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/7a9e30.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..12d975c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/7a9e30.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+TextureCube<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_7a9e30() {
+  int2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_7a9e30();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_7a9e30();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_7a9e30();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/7a9e30.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/7a9e30.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..12d975c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/7a9e30.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+TextureCube<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_7a9e30() {
+  int2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_7a9e30();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_7a9e30();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_7a9e30();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/7a9e30.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/7a9e30.wgsl.expected.glsl
new file mode 100644
index 0000000..c7e9efa
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/7a9e30.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp usamplerCube arg_0_1;
+void textureDimensions_7a9e30() {
+  uvec2 res = uvec2(textureSize(arg_0_1, 0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_7a9e30();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usamplerCube arg_0_1;
+void textureDimensions_7a9e30() {
+  uvec2 res = uvec2(textureSize(arg_0_1, 0));
+}
+
+void fragment_main() {
+  textureDimensions_7a9e30();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp usamplerCube arg_0_1;
+void textureDimensions_7a9e30() {
+  uvec2 res = uvec2(textureSize(arg_0_1, 0));
+}
+
+void compute_main() {
+  textureDimensions_7a9e30();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/7a9e30.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/7a9e30.wgsl.expected.msl
new file mode 100644
index 0000000..4456cad
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/7a9e30.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_7a9e30(texturecube<uint, access::sample> tint_symbol_1) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube<uint, access::sample> tint_symbol_2) {
+  textureDimensions_7a9e30(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texturecube<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_7a9e30(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texturecube<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_7a9e30(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/7a9e30.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/7a9e30.wgsl.expected.spvasm
new file mode 100644
index 0000000..b036bf4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/7a9e30.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_7a9e30 "textureDimensions_7a9e30"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint Cube 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %v2uint = OpTypeVector %uint 2
+        %int = OpTypeInt 32 1
+      %int_0 = OpConstant %int 0
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %24 = OpConstantNull %v2uint
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_7a9e30 = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %24
+         %19 = OpLoad %11 %arg_0
+         %17 = OpImageQuerySizeLod %v2uint %19 %int_0
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %textureDimensions_7a9e30
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureDimensions_7a9e30
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureDimensions_7a9e30
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/7a9e30.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/7a9e30.wgsl.expected.wgsl
new file mode 100644
index 0000000..bd784d3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/7a9e30.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_cube<u32>;
+
+fn textureDimensions_7a9e30() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_7a9e30();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_7a9e30();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_7a9e30();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/7bf826.wgsl b/test/tint/builtins/gen/var/textureDimensions/7bf826.wgsl
deleted file mode 100644
index 8245cc2..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/7bf826.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_depth_2d_array;
-
-// fn textureDimensions(texture: texture_depth_2d_array) -> vec2<i32>
-fn textureDimensions_7bf826() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_7bf826();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_7bf826();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_7bf826();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/7bf826.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/7bf826.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 9c0e675..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/7bf826.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-Texture2DArray arg_0 : register(t0, space1);
-
-void textureDimensions_7bf826() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_7bf826();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_7bf826();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_7bf826();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/7bf826.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/7bf826.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 9c0e675..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/7bf826.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-Texture2DArray arg_0 : register(t0, space1);
-
-void textureDimensions_7bf826() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_7bf826();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_7bf826();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_7bf826();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/7bf826.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/7bf826.wgsl.expected.glsl
deleted file mode 100644
index 9859cdd9..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/7bf826.wgsl.expected.glsl
+++ /dev/null
@@ -1,52 +0,0 @@
-#version 310 es
-
-uniform highp sampler2DArray arg_0_1;
-void textureDimensions_7bf826() {
-  ivec2 res = textureSize(arg_0_1, 0).xy;
-}
-
-vec4 vertex_main() {
-  textureDimensions_7bf826();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-uniform highp sampler2DArray arg_0_1;
-void textureDimensions_7bf826() {
-  ivec2 res = textureSize(arg_0_1, 0).xy;
-}
-
-void fragment_main() {
-  textureDimensions_7bf826();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-uniform highp sampler2DArray arg_0_1;
-void textureDimensions_7bf826() {
-  ivec2 res = textureSize(arg_0_1, 0).xy;
-}
-
-void compute_main() {
-  textureDimensions_7bf826();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/7bf826.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/7bf826.wgsl.expected.msl
deleted file mode 100644
index 59cd373..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/7bf826.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_7bf826(depth2d_array<float, access::sample> tint_symbol_1) {
-  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(depth2d_array<float, access::sample> tint_symbol_2) {
-  textureDimensions_7bf826(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_7bf826(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(depth2d_array<float, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_7bf826(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/7bf826.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/7bf826.wgsl.expected.spvasm
deleted file mode 100644
index 2229e18..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/7bf826.wgsl.expected.spvasm
+++ /dev/null
@@ -1,78 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 40
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_7bf826 "textureDimensions_7bf826"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-         %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %12 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %v2int = OpTypeVector %int 2
-      %v3int = OpTypeVector %int 3
-      %int_0 = OpConstant %int 0
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %25 = OpConstantNull %v2int
-         %26 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_7bf826 = OpFunction %void None %12
-         %15 = OpLabel
-        %res = OpVariable %_ptr_Function_v2int Function %25
-         %21 = OpLoad %11 %arg_0
-         %19 = OpImageQuerySizeLod %v3int %21 %int_0
-         %16 = OpVectorShuffle %v2int %19 %19 0 1
-               OpStore %res %16
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %26
-         %28 = OpLabel
-         %29 = OpFunctionCall %void %textureDimensions_7bf826
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %12
-         %31 = OpLabel
-         %32 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %32
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %12
-         %35 = OpLabel
-         %36 = OpFunctionCall %void %textureDimensions_7bf826
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %12
-         %38 = OpLabel
-         %39 = OpFunctionCall %void %textureDimensions_7bf826
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/7bf826.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/7bf826.wgsl.expected.wgsl
deleted file mode 100644
index 4953ba3..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/7bf826.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
-
-fn textureDimensions_7bf826() {
-  var res : vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_7bf826();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_7bf826();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_7bf826();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl b/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl
deleted file mode 100644
index 1ced4d8..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2022 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_2d_array<i32>;
-
-// fn textureDimensions(texture: texture_2d_array<i32>, level: u32) -> vec2<i32>
-fn textureDimensions_7c8821() {
-  var arg_1 = 1u;
-  var res: vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_7c8821();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_7c8821();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_7c8821();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl.expected.dxc.hlsl
deleted file mode 100644
index f7ce2e2..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-Texture2DArray<int4> arg_0 : register(t0, space1);
-
-void textureDimensions_7c8821() {
-  uint arg_1 = 1u;
-  int4 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_7c8821();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_7c8821();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_7c8821();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl.expected.fxc.hlsl
deleted file mode 100644
index f7ce2e2..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-Texture2DArray<int4> arg_0 : register(t0, space1);
-
-void textureDimensions_7c8821() {
-  uint arg_1 = 1u;
-  int4 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_7c8821();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_7c8821();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_7c8821();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl.expected.glsl
deleted file mode 100644
index bbb0144..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl.expected.glsl
+++ /dev/null
@@ -1,55 +0,0 @@
-#version 310 es
-
-uniform highp isampler2DArray arg_0_1;
-void textureDimensions_7c8821() {
-  uint arg_1 = 1u;
-  ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
-}
-
-vec4 vertex_main() {
-  textureDimensions_7c8821();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-uniform highp isampler2DArray arg_0_1;
-void textureDimensions_7c8821() {
-  uint arg_1 = 1u;
-  ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
-}
-
-void fragment_main() {
-  textureDimensions_7c8821();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-uniform highp isampler2DArray arg_0_1;
-void textureDimensions_7c8821() {
-  uint arg_1 = 1u;
-  ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
-}
-
-void compute_main() {
-  textureDimensions_7c8821();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl.expected.msl
deleted file mode 100644
index e8839a3..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl.expected.msl
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_7c8821(texture2d_array<int, access::sample> tint_symbol_1) {
-  uint arg_1 = 1u;
-  int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture2d_array<int, access::sample> tint_symbol_2) {
-  textureDimensions_7c8821(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture2d_array<int, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture2d_array<int, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_7c8821(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture2d_array<int, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_7c8821(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl.expected.spvasm
deleted file mode 100644
index 33509d2..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl.expected.spvasm
+++ /dev/null
@@ -1,85 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 45
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_7c8821 "textureDimensions_7c8821"
-               OpName %arg_1 "arg_1"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-        %int = OpTypeInt 32 1
-         %11 = OpTypeImage %int 2D 0 1 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-       %uint = OpTypeInt 32 0
-     %uint_1 = OpConstant %uint 1
-%_ptr_Function_uint = OpTypePointer Function %uint
-         %21 = OpConstantNull %uint
-      %v2int = OpTypeVector %int 2
-      %v3int = OpTypeVector %int 3
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %30 = OpConstantNull %v2int
-         %31 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_7c8821 = OpFunction %void None %13
-         %16 = OpLabel
-      %arg_1 = OpVariable %_ptr_Function_uint Function %21
-        %res = OpVariable %_ptr_Function_v2int Function %30
-               OpStore %arg_1 %uint_1
-         %26 = OpLoad %11 %arg_0
-         %27 = OpLoad %uint %arg_1
-         %24 = OpImageQuerySizeLod %v3int %26 %27
-         %22 = OpVectorShuffle %v2int %24 %24 0 1
-               OpStore %res %22
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %31
-         %33 = OpLabel
-         %34 = OpFunctionCall %void %textureDimensions_7c8821
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %36 = OpLabel
-         %37 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %37
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %40 = OpLabel
-         %41 = OpFunctionCall %void %textureDimensions_7c8821
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %43 = OpLabel
-         %44 = OpFunctionCall %void %textureDimensions_7c8821
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl.expected.wgsl
deleted file mode 100644
index 9baa51c..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/7c8821.wgsl.expected.wgsl
+++ /dev/null
@@ -1,22 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_2d_array<i32>;
-
-fn textureDimensions_7c8821() {
-  var arg_1 = 1u;
-  var res : vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_7c8821();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_7c8821();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_7c8821();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/7f5c2e.wgsl b/test/tint/builtins/gen/var/textureDimensions/7f5c2e.wgsl
deleted file mode 100644
index 87caa44..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/7f5c2e.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d<rg32sint, write>;
-
-// fn textureDimensions(texture: texture_storage_2d<rg32sint, write>) -> vec2<i32>
-fn textureDimensions_7f5c2e() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_7f5c2e();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_7f5c2e();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_7f5c2e();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/7f5c2e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/7f5c2e.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 9c6abe3..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/7f5c2e.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2D<int4> arg_0 : register(u0, space1);
-
-void textureDimensions_7f5c2e() {
-  int2 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
-  int2 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_7f5c2e();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_7f5c2e();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_7f5c2e();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/7f5c2e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/7f5c2e.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 9c6abe3..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/7f5c2e.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2D<int4> arg_0 : register(u0, space1);
-
-void textureDimensions_7f5c2e() {
-  int2 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
-  int2 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_7f5c2e();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_7f5c2e();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_7f5c2e();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/7f5c2e.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/7f5c2e.wgsl.expected.glsl
deleted file mode 100644
index ed85e7d..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/7f5c2e.wgsl.expected.glsl
+++ /dev/null
@@ -1,75 +0,0 @@
-SKIP: FAILED
-
-#version 310 es
-
-layout(rg32i) uniform highp writeonly iimage2D arg_0;
-void textureDimensions_7f5c2e() {
-  ivec2 res = imageSize(arg_0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_7f5c2e();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'image load-store format' : not supported with this profile: es
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision mediump float;
-
-layout(rg32i) uniform highp writeonly iimage2D arg_0;
-void textureDimensions_7f5c2e() {
-  ivec2 res = imageSize(arg_0);
-}
-
-void fragment_main() {
-  textureDimensions_7f5c2e();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:4: 'image load-store format' : not supported with this profile: es
-ERROR: 0:4: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-
-layout(rg32i) uniform highp writeonly iimage2D arg_0;
-void textureDimensions_7f5c2e() {
-  ivec2 res = imageSize(arg_0);
-}
-
-void compute_main() {
-  textureDimensions_7f5c2e();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'image load-store format' : not supported with this profile: es
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/7f5c2e.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/7f5c2e.wgsl.expected.msl
deleted file mode 100644
index f853ebc..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/7f5c2e.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_7f5c2e(texture2d<int, access::write> tint_symbol_1) {
-  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture2d<int, access::write> tint_symbol_2) {
-  textureDimensions_7f5c2e(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture2d<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture2d<int, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_7f5c2e(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture2d<int, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_7f5c2e(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/7f5c2e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/7f5c2e.wgsl.expected.spvasm
deleted file mode 100644
index 5a25cc1..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/7f5c2e.wgsl.expected.spvasm
+++ /dev/null
@@ -1,77 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 37
-; Schema: 0
-               OpCapability Shader
-               OpCapability StorageImageExtendedFormats
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_7f5c2e "textureDimensions_7f5c2e"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-        %int = OpTypeInt 32 1
-         %11 = OpTypeImage %int 2D 0 0 0 2 Rg32i
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-      %v2int = OpTypeVector %int 2
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %22 = OpConstantNull %v2int
-         %23 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_7f5c2e = OpFunction %void None %13
-         %16 = OpLabel
-        %res = OpVariable %_ptr_Function_v2int Function %22
-         %19 = OpLoad %11 %arg_0
-         %17 = OpImageQuerySize %v2int %19
-               OpStore %res %17
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %23
-         %25 = OpLabel
-         %26 = OpFunctionCall %void %textureDimensions_7f5c2e
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %28 = OpLabel
-         %29 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %29
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %32 = OpLabel
-         %33 = OpFunctionCall %void %textureDimensions_7f5c2e
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %35 = OpLabel
-         %36 = OpFunctionCall %void %textureDimensions_7f5c2e
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/7f5c2e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/7f5c2e.wgsl.expected.wgsl
deleted file mode 100644
index 85bbc4b..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/7f5c2e.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_2d<rg32sint, write>;
-
-fn textureDimensions_7f5c2e() {
-  var res : vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_7f5c2e();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_7f5c2e();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_7f5c2e();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/8028f3.wgsl b/test/tint/builtins/gen/var/textureDimensions/8028f3.wgsl
deleted file mode 100644
index 99c4483..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/8028f3.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_3d<r32float, write>;
-
-// fn textureDimensions(texture: texture_storage_3d<r32float, write>) -> vec3<i32>
-fn textureDimensions_8028f3() {
-  var res: vec3<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_8028f3();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_8028f3();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_8028f3();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/8028f3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/8028f3.wgsl.expected.dxc.hlsl
deleted file mode 100644
index f18db34..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/8028f3.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture3D<float4> arg_0 : register(u0, space1);
-
-void textureDimensions_8028f3() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int3 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_8028f3();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_8028f3();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_8028f3();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/8028f3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/8028f3.wgsl.expected.fxc.hlsl
deleted file mode 100644
index f18db34..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/8028f3.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture3D<float4> arg_0 : register(u0, space1);
-
-void textureDimensions_8028f3() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int3 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_8028f3();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_8028f3();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_8028f3();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/8028f3.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/8028f3.wgsl.expected.glsl
deleted file mode 100644
index 4ac9ac9..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/8028f3.wgsl.expected.glsl
+++ /dev/null
@@ -1,52 +0,0 @@
-#version 310 es
-
-layout(r32f) uniform highp writeonly image3D arg_0;
-void textureDimensions_8028f3() {
-  ivec3 res = imageSize(arg_0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_8028f3();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-layout(r32f) uniform highp writeonly image3D arg_0;
-void textureDimensions_8028f3() {
-  ivec3 res = imageSize(arg_0);
-}
-
-void fragment_main() {
-  textureDimensions_8028f3();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-layout(r32f) uniform highp writeonly image3D arg_0;
-void textureDimensions_8028f3() {
-  ivec3 res = imageSize(arg_0);
-}
-
-void compute_main() {
-  textureDimensions_8028f3();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/8028f3.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/8028f3.wgsl.expected.msl
deleted file mode 100644
index efc7793..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/8028f3.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_8028f3(texture3d<float, access::write> tint_symbol_1) {
-  int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture3d<float, access::write> tint_symbol_2) {
-  textureDimensions_8028f3(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture3d<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture3d<float, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_8028f3(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture3d<float, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_8028f3(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/8028f3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/8028f3.wgsl.expected.spvasm
deleted file mode 100644
index 814b999..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/8028f3.wgsl.expected.spvasm
+++ /dev/null
@@ -1,76 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 37
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_8028f3 "textureDimensions_8028f3"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-         %11 = OpTypeImage %float 3D 0 0 0 2 R32f
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %12 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %v3int = OpTypeVector %int 3
-%_ptr_Function_v3int = OpTypePointer Function %v3int
-         %22 = OpConstantNull %v3int
-         %23 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_8028f3 = OpFunction %void None %12
-         %15 = OpLabel
-        %res = OpVariable %_ptr_Function_v3int Function %22
-         %19 = OpLoad %11 %arg_0
-         %16 = OpImageQuerySize %v3int %19
-               OpStore %res %16
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %23
-         %25 = OpLabel
-         %26 = OpFunctionCall %void %textureDimensions_8028f3
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %12
-         %28 = OpLabel
-         %29 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %29
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %12
-         %32 = OpLabel
-         %33 = OpFunctionCall %void %textureDimensions_8028f3
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %12
-         %35 = OpLabel
-         %36 = OpFunctionCall %void %textureDimensions_8028f3
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/8028f3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/8028f3.wgsl.expected.wgsl
deleted file mode 100644
index fbc1979..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/8028f3.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_3d<r32float, write>;
-
-fn textureDimensions_8028f3() {
-  var res : vec3<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_8028f3();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_8028f3();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_8028f3();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/811679.wgsl b/test/tint/builtins/gen/var/textureDimensions/811679.wgsl
deleted file mode 100644
index 630debe..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/811679.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_3d<rgba32uint, write>;
-
-// fn textureDimensions(texture: texture_storage_3d<rgba32uint, write>) -> vec3<i32>
-fn textureDimensions_811679() {
-  var res: vec3<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_811679();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_811679();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_811679();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/811679.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/811679.wgsl.expected.dxc.hlsl
deleted file mode 100644
index a474cba..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/811679.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture3D<uint4> arg_0 : register(u0, space1);
-
-void textureDimensions_811679() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int3 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_811679();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_811679();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_811679();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/811679.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/811679.wgsl.expected.fxc.hlsl
deleted file mode 100644
index a474cba..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/811679.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture3D<uint4> arg_0 : register(u0, space1);
-
-void textureDimensions_811679() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int3 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_811679();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_811679();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_811679();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/811679.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/811679.wgsl.expected.glsl
deleted file mode 100644
index 152d367..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/811679.wgsl.expected.glsl
+++ /dev/null
@@ -1,52 +0,0 @@
-#version 310 es
-
-layout(rgba32ui) uniform highp writeonly uimage3D arg_0;
-void textureDimensions_811679() {
-  ivec3 res = imageSize(arg_0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_811679();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-layout(rgba32ui) uniform highp writeonly uimage3D arg_0;
-void textureDimensions_811679() {
-  ivec3 res = imageSize(arg_0);
-}
-
-void fragment_main() {
-  textureDimensions_811679();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-layout(rgba32ui) uniform highp writeonly uimage3D arg_0;
-void textureDimensions_811679() {
-  ivec3 res = imageSize(arg_0);
-}
-
-void compute_main() {
-  textureDimensions_811679();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/811679.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/811679.wgsl.expected.msl
deleted file mode 100644
index 825c3ad..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/811679.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_811679(texture3d<uint, access::write> tint_symbol_1) {
-  int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture3d<uint, access::write> tint_symbol_2) {
-  textureDimensions_811679(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture3d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture3d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_811679(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture3d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_811679(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/811679.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/811679.wgsl.expected.spvasm
deleted file mode 100644
index c051822..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/811679.wgsl.expected.spvasm
+++ /dev/null
@@ -1,77 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 38
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_811679 "textureDimensions_811679"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-       %uint = OpTypeInt 32 0
-         %11 = OpTypeImage %uint 3D 0 0 0 2 Rgba32ui
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %v3int = OpTypeVector %int 3
-%_ptr_Function_v3int = OpTypePointer Function %v3int
-         %23 = OpConstantNull %v3int
-         %24 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_811679 = OpFunction %void None %13
-         %16 = OpLabel
-        %res = OpVariable %_ptr_Function_v3int Function %23
-         %20 = OpLoad %11 %arg_0
-         %17 = OpImageQuerySize %v3int %20
-               OpStore %res %17
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %24
-         %26 = OpLabel
-         %27 = OpFunctionCall %void %textureDimensions_811679
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %29 = OpLabel
-         %30 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %30
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %33 = OpLabel
-         %34 = OpFunctionCall %void %textureDimensions_811679
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %36 = OpLabel
-         %37 = OpFunctionCall %void %textureDimensions_811679
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/811679.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/811679.wgsl.expected.wgsl
deleted file mode 100644
index 494c1da..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/811679.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba32uint, write>;
-
-fn textureDimensions_811679() {
-  var res : vec3<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_811679();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_811679();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_811679();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/820596.wgsl b/test/tint/builtins/gen/var/textureDimensions/820596.wgsl
deleted file mode 100644
index 793ab47..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/820596.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_3d<rg32uint, write>;
-
-// fn textureDimensions(texture: texture_storage_3d<rg32uint, write>) -> vec3<i32>
-fn textureDimensions_820596() {
-  var res: vec3<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_820596();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_820596();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_820596();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/820596.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/820596.wgsl.expected.dxc.hlsl
deleted file mode 100644
index af2f262..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/820596.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture3D<uint4> arg_0 : register(u0, space1);
-
-void textureDimensions_820596() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int3 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_820596();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_820596();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_820596();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/820596.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/820596.wgsl.expected.fxc.hlsl
deleted file mode 100644
index af2f262..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/820596.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture3D<uint4> arg_0 : register(u0, space1);
-
-void textureDimensions_820596() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int3 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_820596();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_820596();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_820596();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/820596.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/820596.wgsl.expected.glsl
deleted file mode 100644
index 12ee4ec..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/820596.wgsl.expected.glsl
+++ /dev/null
@@ -1,75 +0,0 @@
-SKIP: FAILED
-
-#version 310 es
-
-layout(rg32ui) uniform highp writeonly uimage3D arg_0;
-void textureDimensions_820596() {
-  ivec3 res = imageSize(arg_0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_820596();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'image load-store format' : not supported with this profile: es
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision mediump float;
-
-layout(rg32ui) uniform highp writeonly uimage3D arg_0;
-void textureDimensions_820596() {
-  ivec3 res = imageSize(arg_0);
-}
-
-void fragment_main() {
-  textureDimensions_820596();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:4: 'image load-store format' : not supported with this profile: es
-ERROR: 0:4: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-
-layout(rg32ui) uniform highp writeonly uimage3D arg_0;
-void textureDimensions_820596() {
-  ivec3 res = imageSize(arg_0);
-}
-
-void compute_main() {
-  textureDimensions_820596();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'image load-store format' : not supported with this profile: es
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/820596.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/820596.wgsl.expected.msl
deleted file mode 100644
index 1ecf8c9..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/820596.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_820596(texture3d<uint, access::write> tint_symbol_1) {
-  int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture3d<uint, access::write> tint_symbol_2) {
-  textureDimensions_820596(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture3d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture3d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_820596(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture3d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_820596(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/820596.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/820596.wgsl.expected.spvasm
deleted file mode 100644
index a657294..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/820596.wgsl.expected.spvasm
+++ /dev/null
@@ -1,78 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 38
-; Schema: 0
-               OpCapability Shader
-               OpCapability StorageImageExtendedFormats
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_820596 "textureDimensions_820596"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-       %uint = OpTypeInt 32 0
-         %11 = OpTypeImage %uint 3D 0 0 0 2 Rg32ui
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %v3int = OpTypeVector %int 3
-%_ptr_Function_v3int = OpTypePointer Function %v3int
-         %23 = OpConstantNull %v3int
-         %24 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_820596 = OpFunction %void None %13
-         %16 = OpLabel
-        %res = OpVariable %_ptr_Function_v3int Function %23
-         %20 = OpLoad %11 %arg_0
-         %17 = OpImageQuerySize %v3int %20
-               OpStore %res %17
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %24
-         %26 = OpLabel
-         %27 = OpFunctionCall %void %textureDimensions_820596
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %29 = OpLabel
-         %30 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %30
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %33 = OpLabel
-         %34 = OpFunctionCall %void %textureDimensions_820596
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %36 = OpLabel
-         %37 = OpFunctionCall %void %textureDimensions_820596
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/820596.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/820596.wgsl.expected.wgsl
deleted file mode 100644
index dc1379f..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/820596.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_3d<rg32uint, write>;
-
-fn textureDimensions_820596() {
-  var res : vec3<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_820596();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_820596();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_820596();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/83ee5a.wgsl b/test/tint/builtins/gen/var/textureDimensions/83ee5a.wgsl
deleted file mode 100644
index d0a3eab..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/83ee5a.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d<rgba32sint, write>;
-
-// fn textureDimensions(texture: texture_storage_2d<rgba32sint, write>) -> vec2<i32>
-fn textureDimensions_83ee5a() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_83ee5a();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_83ee5a();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_83ee5a();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/83ee5a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/83ee5a.wgsl.expected.dxc.hlsl
deleted file mode 100644
index efa903a..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/83ee5a.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2D<int4> arg_0 : register(u0, space1);
-
-void textureDimensions_83ee5a() {
-  int2 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
-  int2 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_83ee5a();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_83ee5a();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_83ee5a();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/83ee5a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/83ee5a.wgsl.expected.fxc.hlsl
deleted file mode 100644
index efa903a..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/83ee5a.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2D<int4> arg_0 : register(u0, space1);
-
-void textureDimensions_83ee5a() {
-  int2 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
-  int2 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_83ee5a();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_83ee5a();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_83ee5a();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/83ee5a.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/83ee5a.wgsl.expected.glsl
deleted file mode 100644
index 1f6ce58..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/83ee5a.wgsl.expected.glsl
+++ /dev/null
@@ -1,52 +0,0 @@
-#version 310 es
-
-layout(rgba32i) uniform highp writeonly iimage2D arg_0;
-void textureDimensions_83ee5a() {
-  ivec2 res = imageSize(arg_0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_83ee5a();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-layout(rgba32i) uniform highp writeonly iimage2D arg_0;
-void textureDimensions_83ee5a() {
-  ivec2 res = imageSize(arg_0);
-}
-
-void fragment_main() {
-  textureDimensions_83ee5a();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-layout(rgba32i) uniform highp writeonly iimage2D arg_0;
-void textureDimensions_83ee5a() {
-  ivec2 res = imageSize(arg_0);
-}
-
-void compute_main() {
-  textureDimensions_83ee5a();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/83ee5a.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/83ee5a.wgsl.expected.msl
deleted file mode 100644
index 29cff8f..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/83ee5a.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_83ee5a(texture2d<int, access::write> tint_symbol_1) {
-  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture2d<int, access::write> tint_symbol_2) {
-  textureDimensions_83ee5a(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture2d<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture2d<int, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_83ee5a(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture2d<int, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_83ee5a(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/83ee5a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/83ee5a.wgsl.expected.spvasm
deleted file mode 100644
index 32e7431..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/83ee5a.wgsl.expected.spvasm
+++ /dev/null
@@ -1,76 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 37
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_83ee5a "textureDimensions_83ee5a"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-        %int = OpTypeInt 32 1
-         %11 = OpTypeImage %int 2D 0 0 0 2 Rgba32i
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-      %v2int = OpTypeVector %int 2
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %22 = OpConstantNull %v2int
-         %23 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_83ee5a = OpFunction %void None %13
-         %16 = OpLabel
-        %res = OpVariable %_ptr_Function_v2int Function %22
-         %19 = OpLoad %11 %arg_0
-         %17 = OpImageQuerySize %v2int %19
-               OpStore %res %17
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %23
-         %25 = OpLabel
-         %26 = OpFunctionCall %void %textureDimensions_83ee5a
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %28 = OpLabel
-         %29 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %29
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %32 = OpLabel
-         %33 = OpFunctionCall %void %textureDimensions_83ee5a
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %35 = OpLabel
-         %36 = OpFunctionCall %void %textureDimensions_83ee5a
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/83ee5a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/83ee5a.wgsl.expected.wgsl
deleted file mode 100644
index 0d0d5ea..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/83ee5a.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba32sint, write>;
-
-fn textureDimensions_83ee5a() {
-  var res : vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_83ee5a();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_83ee5a();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_83ee5a();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/85d556.wgsl b/test/tint/builtins/gen/var/textureDimensions/85d556.wgsl
deleted file mode 100644
index aba5847..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/85d556.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_2d_array<f32>;
-
-// fn textureDimensions(texture: texture_2d_array<f32>, level: i32) -> vec2<i32>
-fn textureDimensions_85d556() {
-  var arg_1 = 1i;
-  var res: vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_85d556();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_85d556();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_85d556();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/85d556.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/85d556.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 6551492..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/85d556.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-Texture2DArray<float4> arg_0 : register(t0, space1);
-
-void textureDimensions_85d556() {
-  int arg_1 = 1;
-  int4 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_85d556();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_85d556();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_85d556();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/85d556.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/85d556.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 6551492..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/85d556.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-Texture2DArray<float4> arg_0 : register(t0, space1);
-
-void textureDimensions_85d556() {
-  int arg_1 = 1;
-  int4 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_85d556();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_85d556();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_85d556();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/85d556.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/85d556.wgsl.expected.glsl
deleted file mode 100644
index 55c998e..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/85d556.wgsl.expected.glsl
+++ /dev/null
@@ -1,55 +0,0 @@
-#version 310 es
-
-uniform highp sampler2DArray arg_0_1;
-void textureDimensions_85d556() {
-  int arg_1 = 1;
-  ivec2 res = textureSize(arg_0_1, arg_1).xy;
-}
-
-vec4 vertex_main() {
-  textureDimensions_85d556();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-uniform highp sampler2DArray arg_0_1;
-void textureDimensions_85d556() {
-  int arg_1 = 1;
-  ivec2 res = textureSize(arg_0_1, arg_1).xy;
-}
-
-void fragment_main() {
-  textureDimensions_85d556();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-uniform highp sampler2DArray arg_0_1;
-void textureDimensions_85d556() {
-  int arg_1 = 1;
-  ivec2 res = textureSize(arg_0_1, arg_1).xy;
-}
-
-void compute_main() {
-  textureDimensions_85d556();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/85d556.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/85d556.wgsl.expected.msl
deleted file mode 100644
index 50e7447..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/85d556.wgsl.expected.msl
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_85d556(texture2d_array<float, access::sample> tint_symbol_1) {
-  int arg_1 = 1;
-  int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture2d_array<float, access::sample> tint_symbol_2) {
-  textureDimensions_85d556(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_85d556(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture2d_array<float, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_85d556(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/85d556.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/85d556.wgsl.expected.spvasm
deleted file mode 100644
index 1831dda..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/85d556.wgsl.expected.spvasm
+++ /dev/null
@@ -1,84 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 44
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_85d556 "textureDimensions_85d556"
-               OpName %arg_1 "arg_1"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-         %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %12 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %int_1 = OpConstant %int 1
-%_ptr_Function_int = OpTypePointer Function %int
-         %20 = OpConstantNull %int
-      %v2int = OpTypeVector %int 2
-      %v3int = OpTypeVector %int 3
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %29 = OpConstantNull %v2int
-         %30 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_85d556 = OpFunction %void None %12
-         %15 = OpLabel
-      %arg_1 = OpVariable %_ptr_Function_int Function %20
-        %res = OpVariable %_ptr_Function_v2int Function %29
-               OpStore %arg_1 %int_1
-         %25 = OpLoad %11 %arg_0
-         %26 = OpLoad %int %arg_1
-         %23 = OpImageQuerySizeLod %v3int %25 %26
-         %21 = OpVectorShuffle %v2int %23 %23 0 1
-               OpStore %res %21
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %30
-         %32 = OpLabel
-         %33 = OpFunctionCall %void %textureDimensions_85d556
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %12
-         %35 = OpLabel
-         %36 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %36
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %12
-         %39 = OpLabel
-         %40 = OpFunctionCall %void %textureDimensions_85d556
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %12
-         %42 = OpLabel
-         %43 = OpFunctionCall %void %textureDimensions_85d556
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/85d556.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/85d556.wgsl.expected.wgsl
deleted file mode 100644
index 4da38ad..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/85d556.wgsl.expected.wgsl
+++ /dev/null
@@ -1,22 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_2d_array<f32>;
-
-fn textureDimensions_85d556() {
-  var arg_1 = 1i;
-  var res : vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_85d556();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_85d556();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_85d556();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/867ead.wgsl b/test/tint/builtins/gen/var/textureDimensions/867ead.wgsl
new file mode 100644
index 0000000..2a6540f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/867ead.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8snorm, write>;
+
+// fn textureDimensions(texture: texture_storage_2d_array<rgba8snorm, write>) -> vec2<u32>
+fn textureDimensions_867ead() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_867ead();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_867ead();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_867ead();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/867ead.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/867ead.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..c3db085
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/867ead.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureDimensions_867ead() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_867ead();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_867ead();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_867ead();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/867ead.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/867ead.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c3db085
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/867ead.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureDimensions_867ead() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_867ead();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_867ead();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_867ead();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/867ead.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/867ead.wgsl.expected.glsl
new file mode 100644
index 0000000..ed270a8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/867ead.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0;
+void textureDimensions_867ead() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+}
+
+vec4 vertex_main() {
+  textureDimensions_867ead();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0;
+void textureDimensions_867ead() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+}
+
+void fragment_main() {
+  textureDimensions_867ead();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba8_snorm) uniform highp writeonly image2DArray arg_0;
+void textureDimensions_867ead() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+}
+
+void compute_main() {
+  textureDimensions_867ead();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/867ead.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/867ead.wgsl.expected.msl
new file mode 100644
index 0000000..7985b52
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/867ead.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_867ead(texture2d_array<float, access::write> tint_symbol_1) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
+  textureDimensions_867ead(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_867ead(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_867ead(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/867ead.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/867ead.wgsl.expected.spvasm
new file mode 100644
index 0000000..d0dac2c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/867ead.wgsl.expected.spvasm
@@ -0,0 +1,78 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_867ead "textureDimensions_867ead"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba8Snorm
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %24 = OpConstantNull %v2uint
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_867ead = OpFunction %void None %12
+         %15 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %24
+         %21 = OpLoad %11 %arg_0
+         %19 = OpImageQuerySize %v3uint %21
+         %16 = OpVectorShuffle %v2uint %19 %19 0 1
+               OpStore %res %16
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %textureDimensions_867ead
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureDimensions_867ead
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureDimensions_867ead
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/867ead.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/867ead.wgsl.expected.wgsl
new file mode 100644
index 0000000..50f701a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/867ead.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8snorm, write>;
+
+fn textureDimensions_867ead() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_867ead();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_867ead();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_867ead();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/879b73.wgsl b/test/tint/builtins/gen/var/textureDimensions/879b73.wgsl
new file mode 100644
index 0000000..c3f7003
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/879b73.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube_array<f32>;
+
+// fn textureDimensions(texture: texture_cube_array<f32>) -> vec2<u32>
+fn textureDimensions_879b73() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_879b73();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_879b73();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_879b73();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/879b73.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/879b73.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..8e2f821
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/879b73.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+TextureCubeArray<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_879b73() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_879b73();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_879b73();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_879b73();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/879b73.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/879b73.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..8e2f821
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/879b73.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+TextureCubeArray<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_879b73() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_879b73();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_879b73();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_879b73();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/879b73.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/879b73.wgsl.expected.glsl
new file mode 100644
index 0000000..fe9a84b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/879b73.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp samplerCubeArray arg_0_1;
+void textureDimensions_879b73() {
+  uvec2 res = uvec2(textureSize(arg_0_1, 0).xy);
+}
+
+vec4 vertex_main() {
+  textureDimensions_879b73();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeArray arg_0_1;
+void textureDimensions_879b73() {
+  uvec2 res = uvec2(textureSize(arg_0_1, 0).xy);
+}
+
+void fragment_main() {
+  textureDimensions_879b73();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'samplerCubeArray' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp samplerCubeArray arg_0_1;
+void textureDimensions_879b73() {
+  uvec2 res = uvec2(textureSize(arg_0_1, 0).xy);
+}
+
+void compute_main() {
+  textureDimensions_879b73();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/879b73.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/879b73.wgsl.expected.msl
new file mode 100644
index 0000000..f452786
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/879b73.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_879b73(texturecube_array<float, access::sample> tint_symbol_1) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube_array<float, access::sample> tint_symbol_2) {
+  textureDimensions_879b73(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texturecube_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_879b73(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texturecube_array<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_879b73(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/879b73.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/879b73.wgsl.expected.spvasm
new file mode 100644
index 0000000..f5199b0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/879b73.wgsl.expected.spvasm
@@ -0,0 +1,80 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; Schema: 0
+               OpCapability Shader
+               OpCapability SampledCubeArray
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_879b73 "textureDimensions_879b73"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %v3uint = OpTypeVector %uint 3
+        %int = OpTypeInt 32 1
+      %int_0 = OpConstant %int 0
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %26 = OpConstantNull %v2uint
+         %27 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_879b73 = OpFunction %void None %12
+         %15 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %26
+         %21 = OpLoad %11 %arg_0
+         %19 = OpImageQuerySizeLod %v3uint %21 %int_0
+         %16 = OpVectorShuffle %v2uint %19 %19 0 1
+               OpStore %res %16
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureDimensions_879b73
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %32 = OpLabel
+         %33 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %33
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureDimensions_879b73
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureDimensions_879b73
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/879b73.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/879b73.wgsl.expected.wgsl
new file mode 100644
index 0000000..6078916
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/879b73.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_cube_array<f32>;
+
+fn textureDimensions_879b73() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_879b73();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_879b73();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_879b73();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/88ad17.wgsl b/test/tint/builtins/gen/var/textureDimensions/88ad17.wgsl
deleted file mode 100644
index 8bc8ea6..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/88ad17.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_cube<u32>;
-
-// fn textureDimensions(texture: texture_cube<u32>, level: i32) -> vec2<i32>
-fn textureDimensions_88ad17() {
-  var arg_1 = 1i;
-  var res: vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_88ad17();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_88ad17();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_88ad17();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/88ad17.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/88ad17.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 5ddabd1..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/88ad17.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-TextureCube<uint4> arg_0 : register(t0, space1);
-
-void textureDimensions_88ad17() {
-  int arg_1 = 1;
-  int3 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_88ad17();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_88ad17();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_88ad17();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/88ad17.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/88ad17.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 5ddabd1..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/88ad17.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-TextureCube<uint4> arg_0 : register(t0, space1);
-
-void textureDimensions_88ad17() {
-  int arg_1 = 1;
-  int3 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_88ad17();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_88ad17();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_88ad17();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/88ad17.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/88ad17.wgsl.expected.glsl
deleted file mode 100644
index 589f41e..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/88ad17.wgsl.expected.glsl
+++ /dev/null
@@ -1,55 +0,0 @@
-#version 310 es
-
-uniform highp usamplerCube arg_0_1;
-void textureDimensions_88ad17() {
-  int arg_1 = 1;
-  ivec2 res = textureSize(arg_0_1, arg_1);
-}
-
-vec4 vertex_main() {
-  textureDimensions_88ad17();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-uniform highp usamplerCube arg_0_1;
-void textureDimensions_88ad17() {
-  int arg_1 = 1;
-  ivec2 res = textureSize(arg_0_1, arg_1);
-}
-
-void fragment_main() {
-  textureDimensions_88ad17();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-uniform highp usamplerCube arg_0_1;
-void textureDimensions_88ad17() {
-  int arg_1 = 1;
-  ivec2 res = textureSize(arg_0_1, arg_1);
-}
-
-void compute_main() {
-  textureDimensions_88ad17();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/88ad17.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/88ad17.wgsl.expected.msl
deleted file mode 100644
index 84b817a..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/88ad17.wgsl.expected.msl
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_88ad17(texturecube<uint, access::sample> tint_symbol_1) {
-  int arg_1 = 1;
-  int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texturecube<uint, access::sample> tint_symbol_2) {
-  textureDimensions_88ad17(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texturecube<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texturecube<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_88ad17(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texturecube<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_88ad17(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/88ad17.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/88ad17.wgsl.expected.spvasm
deleted file mode 100644
index 505de31..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/88ad17.wgsl.expected.spvasm
+++ /dev/null
@@ -1,83 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 43
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_88ad17 "textureDimensions_88ad17"
-               OpName %arg_1 "arg_1"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-       %uint = OpTypeInt 32 0
-         %11 = OpTypeImage %uint Cube 0 0 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %int_1 = OpConstant %int 1
-%_ptr_Function_int = OpTypePointer Function %int
-         %21 = OpConstantNull %int
-      %v2int = OpTypeVector %int 2
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %28 = OpConstantNull %v2int
-         %29 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_88ad17 = OpFunction %void None %13
-         %16 = OpLabel
-      %arg_1 = OpVariable %_ptr_Function_int Function %21
-        %res = OpVariable %_ptr_Function_v2int Function %28
-               OpStore %arg_1 %int_1
-         %24 = OpLoad %11 %arg_0
-         %25 = OpLoad %int %arg_1
-         %22 = OpImageQuerySizeLod %v2int %24 %25
-               OpStore %res %22
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %29
-         %31 = OpLabel
-         %32 = OpFunctionCall %void %textureDimensions_88ad17
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %34 = OpLabel
-         %35 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %35
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %38 = OpLabel
-         %39 = OpFunctionCall %void %textureDimensions_88ad17
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %41 = OpLabel
-         %42 = OpFunctionCall %void %textureDimensions_88ad17
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/88ad17.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/88ad17.wgsl.expected.wgsl
deleted file mode 100644
index 5518327..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/88ad17.wgsl.expected.wgsl
+++ /dev/null
@@ -1,22 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_cube<u32>;
-
-fn textureDimensions_88ad17() {
-  var arg_1 = 1i;
-  var res : vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_88ad17();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_88ad17();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_88ad17();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/8a35f9.wgsl b/test/tint/builtins/gen/var/textureDimensions/8a35f9.wgsl
new file mode 100644
index 0000000..349d4aa
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/8a35f9.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rg32float, write>;
+
+// fn textureDimensions(texture: texture_storage_2d<rg32float, write>) -> vec2<u32>
+fn textureDimensions_8a35f9() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_8a35f9();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_8a35f9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_8a35f9();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/8a35f9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/8a35f9.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..cb72f96
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/8a35f9.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<float4> arg_0 : register(u0, space1);
+
+void textureDimensions_8a35f9() {
+  int2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_8a35f9();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_8a35f9();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_8a35f9();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/8a35f9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/8a35f9.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..cb72f96
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/8a35f9.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<float4> arg_0 : register(u0, space1);
+
+void textureDimensions_8a35f9() {
+  int2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_8a35f9();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_8a35f9();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_8a35f9();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/8a35f9.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/8a35f9.wgsl.expected.glsl
new file mode 100644
index 0000000..2da1261
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/8a35f9.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32f) uniform highp writeonly image2D arg_0;
+void textureDimensions_8a35f9() {
+  uvec2 res = uvec2(imageSize(arg_0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_8a35f9();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rg32f) uniform highp writeonly image2D arg_0;
+void textureDimensions_8a35f9() {
+  uvec2 res = uvec2(imageSize(arg_0));
+}
+
+void fragment_main() {
+  textureDimensions_8a35f9();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32f) uniform highp writeonly image2D arg_0;
+void textureDimensions_8a35f9() {
+  uvec2 res = uvec2(imageSize(arg_0));
+}
+
+void compute_main() {
+  textureDimensions_8a35f9();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/8a35f9.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/8a35f9.wgsl.expected.msl
new file mode 100644
index 0000000..f3c2d7c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/8a35f9.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_8a35f9(texture2d<float, access::write> tint_symbol_1) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::write> tint_symbol_2) {
+  textureDimensions_8a35f9(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_8a35f9(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_8a35f9(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/8a35f9.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/8a35f9.wgsl.expected.spvasm
new file mode 100644
index 0000000..f3a454b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/8a35f9.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_8a35f9 "textureDimensions_8a35f9"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 2 Rg32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %22 = OpConstantNull %v2uint
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_8a35f9 = OpFunction %void None %12
+         %15 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %22
+         %19 = OpLoad %11 %arg_0
+         %16 = OpImageQuerySize %v2uint %19
+               OpStore %res %16
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %textureDimensions_8a35f9
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %28 = OpLabel
+         %29 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %29
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_8a35f9
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureDimensions_8a35f9
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/8a35f9.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/8a35f9.wgsl.expected.wgsl
new file mode 100644
index 0000000..04585f3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/8a35f9.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rg32float, write>;
+
+fn textureDimensions_8a35f9() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_8a35f9();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_8a35f9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_8a35f9();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/8aa4c4.wgsl b/test/tint/builtins/gen/var/textureDimensions/8aa4c4.wgsl
deleted file mode 100644
index 4a9ac37..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/8aa4c4.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_3d<f32>;
-
-// fn textureDimensions(texture: texture_3d<f32>) -> vec3<i32>
-fn textureDimensions_8aa4c4() {
-  var res: vec3<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_8aa4c4();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_8aa4c4();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_8aa4c4();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/8aa4c4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/8aa4c4.wgsl.expected.dxc.hlsl
deleted file mode 100644
index e8a2fa1..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/8aa4c4.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-Texture3D<float4> arg_0 : register(t0, space1);
-
-void textureDimensions_8aa4c4() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int3 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_8aa4c4();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_8aa4c4();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_8aa4c4();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/8aa4c4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/8aa4c4.wgsl.expected.fxc.hlsl
deleted file mode 100644
index e8a2fa1..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/8aa4c4.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-Texture3D<float4> arg_0 : register(t0, space1);
-
-void textureDimensions_8aa4c4() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int3 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_8aa4c4();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_8aa4c4();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_8aa4c4();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/8aa4c4.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/8aa4c4.wgsl.expected.glsl
deleted file mode 100644
index 45495e9..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/8aa4c4.wgsl.expected.glsl
+++ /dev/null
@@ -1,52 +0,0 @@
-#version 310 es
-
-uniform highp sampler3D arg_0_1;
-void textureDimensions_8aa4c4() {
-  ivec3 res = textureSize(arg_0_1, 0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_8aa4c4();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-uniform highp sampler3D arg_0_1;
-void textureDimensions_8aa4c4() {
-  ivec3 res = textureSize(arg_0_1, 0);
-}
-
-void fragment_main() {
-  textureDimensions_8aa4c4();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-uniform highp sampler3D arg_0_1;
-void textureDimensions_8aa4c4() {
-  ivec3 res = textureSize(arg_0_1, 0);
-}
-
-void compute_main() {
-  textureDimensions_8aa4c4();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/8aa4c4.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/8aa4c4.wgsl.expected.msl
deleted file mode 100644
index 77f5715..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/8aa4c4.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_8aa4c4(texture3d<float, access::sample> tint_symbol_1) {
-  int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture3d<float, access::sample> tint_symbol_2) {
-  textureDimensions_8aa4c4(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture3d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture3d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_8aa4c4(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture3d<float, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_8aa4c4(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/8aa4c4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/8aa4c4.wgsl.expected.spvasm
deleted file mode 100644
index 4b2376f..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/8aa4c4.wgsl.expected.spvasm
+++ /dev/null
@@ -1,76 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 38
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_8aa4c4 "textureDimensions_8aa4c4"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-         %11 = OpTypeImage %float 3D 0 0 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %12 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %v3int = OpTypeVector %int 3
-      %int_0 = OpConstant %int 0
-%_ptr_Function_v3int = OpTypePointer Function %v3int
-         %23 = OpConstantNull %v3int
-         %24 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_8aa4c4 = OpFunction %void None %12
-         %15 = OpLabel
-        %res = OpVariable %_ptr_Function_v3int Function %23
-         %19 = OpLoad %11 %arg_0
-         %16 = OpImageQuerySizeLod %v3int %19 %int_0
-               OpStore %res %16
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %24
-         %26 = OpLabel
-         %27 = OpFunctionCall %void %textureDimensions_8aa4c4
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %12
-         %29 = OpLabel
-         %30 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %30
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %12
-         %33 = OpLabel
-         %34 = OpFunctionCall %void %textureDimensions_8aa4c4
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %12
-         %36 = OpLabel
-         %37 = OpFunctionCall %void %textureDimensions_8aa4c4
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/8aa4c4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/8aa4c4.wgsl.expected.wgsl
deleted file mode 100644
index 840105b..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/8aa4c4.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_3d<f32>;
-
-fn textureDimensions_8aa4c4() {
-  var res : vec3<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_8aa4c4();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_8aa4c4();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_8aa4c4();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl b/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl
deleted file mode 100644
index 3ea127b..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2022 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_cube<u32>;
-
-// fn textureDimensions(texture: texture_cube<u32>, level: u32) -> vec2<i32>
-fn textureDimensions_8d87ed() {
-  var arg_1 = 1u;
-  var res: vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_8d87ed();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_8d87ed();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_8d87ed();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 29572e5..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-TextureCube<uint4> arg_0 : register(t0, space1);
-
-void textureDimensions_8d87ed() {
-  uint arg_1 = 1u;
-  int3 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_8d87ed();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_8d87ed();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_8d87ed();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 29572e5..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-TextureCube<uint4> arg_0 : register(t0, space1);
-
-void textureDimensions_8d87ed() {
-  uint arg_1 = 1u;
-  int3 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_8d87ed();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_8d87ed();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_8d87ed();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl.expected.glsl
deleted file mode 100644
index bbfcd7a..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl.expected.glsl
+++ /dev/null
@@ -1,55 +0,0 @@
-#version 310 es
-
-uniform highp usamplerCube arg_0_1;
-void textureDimensions_8d87ed() {
-  uint arg_1 = 1u;
-  ivec2 res = textureSize(arg_0_1, int(arg_1));
-}
-
-vec4 vertex_main() {
-  textureDimensions_8d87ed();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-uniform highp usamplerCube arg_0_1;
-void textureDimensions_8d87ed() {
-  uint arg_1 = 1u;
-  ivec2 res = textureSize(arg_0_1, int(arg_1));
-}
-
-void fragment_main() {
-  textureDimensions_8d87ed();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-uniform highp usamplerCube arg_0_1;
-void textureDimensions_8d87ed() {
-  uint arg_1 = 1u;
-  ivec2 res = textureSize(arg_0_1, int(arg_1));
-}
-
-void compute_main() {
-  textureDimensions_8d87ed();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl.expected.msl
deleted file mode 100644
index 9569829..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl.expected.msl
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_8d87ed(texturecube<uint, access::sample> tint_symbol_1) {
-  uint arg_1 = 1u;
-  int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texturecube<uint, access::sample> tint_symbol_2) {
-  textureDimensions_8d87ed(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texturecube<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texturecube<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_8d87ed(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texturecube<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_8d87ed(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl.expected.spvasm
deleted file mode 100644
index d8f2408..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl.expected.spvasm
+++ /dev/null
@@ -1,83 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 43
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_8d87ed "textureDimensions_8d87ed"
-               OpName %arg_1 "arg_1"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-       %uint = OpTypeInt 32 0
-         %11 = OpTypeImage %uint Cube 0 0 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-     %uint_1 = OpConstant %uint 1
-%_ptr_Function_uint = OpTypePointer Function %uint
-         %20 = OpConstantNull %uint
-        %int = OpTypeInt 32 1
-      %v2int = OpTypeVector %int 2
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %28 = OpConstantNull %v2int
-         %29 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_8d87ed = OpFunction %void None %13
-         %16 = OpLabel
-      %arg_1 = OpVariable %_ptr_Function_uint Function %20
-        %res = OpVariable %_ptr_Function_v2int Function %28
-               OpStore %arg_1 %uint_1
-         %24 = OpLoad %11 %arg_0
-         %25 = OpLoad %uint %arg_1
-         %21 = OpImageQuerySizeLod %v2int %24 %25
-               OpStore %res %21
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %29
-         %31 = OpLabel
-         %32 = OpFunctionCall %void %textureDimensions_8d87ed
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %34 = OpLabel
-         %35 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %35
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %38 = OpLabel
-         %39 = OpFunctionCall %void %textureDimensions_8d87ed
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %41 = OpLabel
-         %42 = OpFunctionCall %void %textureDimensions_8d87ed
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl.expected.wgsl
deleted file mode 100644
index 8b60de3..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/8d87ed.wgsl.expected.wgsl
+++ /dev/null
@@ -1,22 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_cube<u32>;
-
-fn textureDimensions_8d87ed() {
-  var arg_1 = 1u;
-  var res : vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_8d87ed();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_8d87ed();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_8d87ed();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/8deb5e.wgsl b/test/tint/builtins/gen/var/textureDimensions/8deb5e.wgsl
deleted file mode 100644
index 9ecc26f..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/8deb5e.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_3d<i32>;
-
-// fn textureDimensions(texture: texture_3d<i32>) -> vec3<i32>
-fn textureDimensions_8deb5e() {
-  var res: vec3<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_8deb5e();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_8deb5e();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_8deb5e();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/8deb5e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/8deb5e.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 398823e..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/8deb5e.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-Texture3D<int4> arg_0 : register(t0, space1);
-
-void textureDimensions_8deb5e() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int3 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_8deb5e();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_8deb5e();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_8deb5e();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/8deb5e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/8deb5e.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 398823e..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/8deb5e.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-Texture3D<int4> arg_0 : register(t0, space1);
-
-void textureDimensions_8deb5e() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int3 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_8deb5e();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_8deb5e();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_8deb5e();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/8deb5e.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/8deb5e.wgsl.expected.glsl
deleted file mode 100644
index 8869c19..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/8deb5e.wgsl.expected.glsl
+++ /dev/null
@@ -1,52 +0,0 @@
-#version 310 es
-
-uniform highp isampler3D arg_0_1;
-void textureDimensions_8deb5e() {
-  ivec3 res = textureSize(arg_0_1, 0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_8deb5e();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-uniform highp isampler3D arg_0_1;
-void textureDimensions_8deb5e() {
-  ivec3 res = textureSize(arg_0_1, 0);
-}
-
-void fragment_main() {
-  textureDimensions_8deb5e();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-uniform highp isampler3D arg_0_1;
-void textureDimensions_8deb5e() {
-  ivec3 res = textureSize(arg_0_1, 0);
-}
-
-void compute_main() {
-  textureDimensions_8deb5e();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/8deb5e.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/8deb5e.wgsl.expected.msl
deleted file mode 100644
index 7899845..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/8deb5e.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_8deb5e(texture3d<int, access::sample> tint_symbol_1) {
-  int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture3d<int, access::sample> tint_symbol_2) {
-  textureDimensions_8deb5e(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture3d<int, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture3d<int, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_8deb5e(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture3d<int, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_8deb5e(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/8deb5e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/8deb5e.wgsl.expected.spvasm
deleted file mode 100644
index 7afdac3..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/8deb5e.wgsl.expected.spvasm
+++ /dev/null
@@ -1,76 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 38
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_8deb5e "textureDimensions_8deb5e"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-        %int = OpTypeInt 32 1
-         %11 = OpTypeImage %int 3D 0 0 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-      %v3int = OpTypeVector %int 3
-      %int_0 = OpConstant %int 0
-%_ptr_Function_v3int = OpTypePointer Function %v3int
-         %23 = OpConstantNull %v3int
-         %24 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_8deb5e = OpFunction %void None %13
-         %16 = OpLabel
-        %res = OpVariable %_ptr_Function_v3int Function %23
-         %19 = OpLoad %11 %arg_0
-         %17 = OpImageQuerySizeLod %v3int %19 %int_0
-               OpStore %res %17
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %24
-         %26 = OpLabel
-         %27 = OpFunctionCall %void %textureDimensions_8deb5e
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %29 = OpLabel
-         %30 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %30
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %33 = OpLabel
-         %34 = OpFunctionCall %void %textureDimensions_8deb5e
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %36 = OpLabel
-         %37 = OpFunctionCall %void %textureDimensions_8deb5e
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/8deb5e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/8deb5e.wgsl.expected.wgsl
deleted file mode 100644
index c3e10c7..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/8deb5e.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_3d<i32>;
-
-fn textureDimensions_8deb5e() {
-  var res : vec3<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_8deb5e();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_8deb5e();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_8deb5e();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/8efd47.wgsl b/test/tint/builtins/gen/var/textureDimensions/8efd47.wgsl
new file mode 100644
index 0000000..e4931ec
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/8efd47.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba32sint, write>;
+
+// fn textureDimensions(texture: texture_storage_1d<rgba32sint, write>) -> u32
+fn textureDimensions_8efd47() {
+  var res: u32 = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_8efd47();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_8efd47();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_8efd47();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/8efd47.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/8efd47.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..0ec2359
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/8efd47.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<int4> arg_0 : register(u0, space1);
+
+void textureDimensions_8efd47() {
+  int tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_8efd47();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_8efd47();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_8efd47();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/8efd47.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/8efd47.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..0ec2359
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/8efd47.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<int4> arg_0 : register(u0, space1);
+
+void textureDimensions_8efd47() {
+  int tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_8efd47();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_8efd47();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_8efd47();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/8efd47.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/8efd47.wgsl.expected.glsl
new file mode 100644
index 0000000..ae3365d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/8efd47.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32i) uniform highp writeonly iimage1D arg_0;
+void textureDimensions_8efd47() {
+  uint res = uint(imageSize(arg_0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_8efd47();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'iimage1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rgba32i) uniform highp writeonly iimage1D arg_0;
+void textureDimensions_8efd47() {
+  uint res = uint(imageSize(arg_0));
+}
+
+void fragment_main() {
+  textureDimensions_8efd47();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'iimage1D' : Reserved word. 
+WARNING: 0:4: 'layout' : useless application of layout qualifier 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32i) uniform highp writeonly iimage1D arg_0;
+void textureDimensions_8efd47() {
+  uint res = uint(imageSize(arg_0));
+}
+
+void compute_main() {
+  textureDimensions_8efd47();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'iimage1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/8efd47.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/8efd47.wgsl.expected.msl
new file mode 100644
index 0000000..1aa9fa8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/8efd47.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_8efd47(texture1d<int, access::write> tint_symbol_1) {
+  uint res = tint_symbol_1.get_width(0);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<int, access::write> tint_symbol_2) {
+  textureDimensions_8efd47(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_8efd47(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_8efd47(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/8efd47.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/8efd47.wgsl.expected.spvasm
new file mode 100644
index 0000000..cb6145d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/8efd47.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_8efd47 "textureDimensions_8efd47"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 1D 0 0 0 2 Rgba32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %22 = OpConstantNull %uint
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_8efd47 = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_uint Function %22
+         %19 = OpLoad %11 %arg_0
+         %17 = OpImageQuerySize %uint %19
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %textureDimensions_8efd47
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %28 = OpLabel
+         %29 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %29
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_8efd47
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureDimensions_8efd47
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/8efd47.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/8efd47.wgsl.expected.wgsl
new file mode 100644
index 0000000..791a3af
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/8efd47.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba32sint, write>;
+
+fn textureDimensions_8efd47() {
+  var res : u32 = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_8efd47();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_8efd47();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_8efd47();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/8f20bf.wgsl b/test/tint/builtins/gen/var/textureDimensions/8f20bf.wgsl
deleted file mode 100644
index f5e7f3a..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/8f20bf.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_cube_array<f32>;
-
-// fn textureDimensions(texture: texture_cube_array<f32>) -> vec2<i32>
-fn textureDimensions_8f20bf() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_8f20bf();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_8f20bf();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_8f20bf();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/8f20bf.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/8f20bf.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 58462cf..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/8f20bf.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-TextureCubeArray<float4> arg_0 : register(t0, space1);
-
-void textureDimensions_8f20bf() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_8f20bf();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_8f20bf();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_8f20bf();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/8f20bf.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/8f20bf.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 58462cf..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/8f20bf.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-TextureCubeArray<float4> arg_0 : register(t0, space1);
-
-void textureDimensions_8f20bf() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_8f20bf();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_8f20bf();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_8f20bf();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/8f20bf.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/8f20bf.wgsl.expected.glsl
deleted file mode 100644
index a01eead..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/8f20bf.wgsl.expected.glsl
+++ /dev/null
@@ -1,75 +0,0 @@
-SKIP: FAILED
-
-#version 310 es
-
-uniform highp samplerCubeArray arg_0_1;
-void textureDimensions_8f20bf() {
-  ivec2 res = textureSize(arg_0_1, 0).xy;
-}
-
-vec4 vertex_main() {
-  textureDimensions_8f20bf();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'samplerCubeArray' : Reserved word. 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision mediump float;
-
-uniform highp samplerCubeArray arg_0_1;
-void textureDimensions_8f20bf() {
-  ivec2 res = textureSize(arg_0_1, 0).xy;
-}
-
-void fragment_main() {
-  textureDimensions_8f20bf();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:4: 'samplerCubeArray' : Reserved word. 
-ERROR: 0:4: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-
-uniform highp samplerCubeArray arg_0_1;
-void textureDimensions_8f20bf() {
-  ivec2 res = textureSize(arg_0_1, 0).xy;
-}
-
-void compute_main() {
-  textureDimensions_8f20bf();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'samplerCubeArray' : Reserved word. 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/8f20bf.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/8f20bf.wgsl.expected.msl
deleted file mode 100644
index 431a454..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/8f20bf.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_8f20bf(texturecube_array<float, access::sample> tint_symbol_1) {
-  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texturecube_array<float, access::sample> tint_symbol_2) {
-  textureDimensions_8f20bf(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texturecube_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texturecube_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_8f20bf(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texturecube_array<float, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_8f20bf(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/8f20bf.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/8f20bf.wgsl.expected.spvasm
deleted file mode 100644
index 952b3d4..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/8f20bf.wgsl.expected.spvasm
+++ /dev/null
@@ -1,79 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 40
-; Schema: 0
-               OpCapability Shader
-               OpCapability SampledCubeArray
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_8f20bf "textureDimensions_8f20bf"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-         %11 = OpTypeImage %float Cube 0 1 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %12 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %v2int = OpTypeVector %int 2
-      %v3int = OpTypeVector %int 3
-      %int_0 = OpConstant %int 0
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %25 = OpConstantNull %v2int
-         %26 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_8f20bf = OpFunction %void None %12
-         %15 = OpLabel
-        %res = OpVariable %_ptr_Function_v2int Function %25
-         %21 = OpLoad %11 %arg_0
-         %19 = OpImageQuerySizeLod %v3int %21 %int_0
-         %16 = OpVectorShuffle %v2int %19 %19 0 1
-               OpStore %res %16
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %26
-         %28 = OpLabel
-         %29 = OpFunctionCall %void %textureDimensions_8f20bf
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %12
-         %31 = OpLabel
-         %32 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %32
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %12
-         %35 = OpLabel
-         %36 = OpFunctionCall %void %textureDimensions_8f20bf
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %12
-         %38 = OpLabel
-         %39 = OpFunctionCall %void %textureDimensions_8f20bf
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/8f20bf.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/8f20bf.wgsl.expected.wgsl
deleted file mode 100644
index 2d3dcb0..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/8f20bf.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_cube_array<f32>;
-
-fn textureDimensions_8f20bf() {
-  var res : vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_8f20bf();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_8f20bf();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_8f20bf();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/8fca0f.wgsl b/test/tint/builtins/gen/var/textureDimensions/8fca0f.wgsl
deleted file mode 100644
index 9492de6..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/8fca0f.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_3d<rgba32float, write>;
-
-// fn textureDimensions(texture: texture_storage_3d<rgba32float, write>) -> vec3<i32>
-fn textureDimensions_8fca0f() {
-  var res: vec3<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_8fca0f();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_8fca0f();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_8fca0f();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/8fca0f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/8fca0f.wgsl.expected.dxc.hlsl
deleted file mode 100644
index ace86e0..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/8fca0f.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture3D<float4> arg_0 : register(u0, space1);
-
-void textureDimensions_8fca0f() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int3 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_8fca0f();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_8fca0f();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_8fca0f();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/8fca0f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/8fca0f.wgsl.expected.fxc.hlsl
deleted file mode 100644
index ace86e0..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/8fca0f.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture3D<float4> arg_0 : register(u0, space1);
-
-void textureDimensions_8fca0f() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int3 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_8fca0f();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_8fca0f();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_8fca0f();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/8fca0f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/8fca0f.wgsl.expected.glsl
deleted file mode 100644
index 255924a..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/8fca0f.wgsl.expected.glsl
+++ /dev/null
@@ -1,52 +0,0 @@
-#version 310 es
-
-layout(rgba32f) uniform highp writeonly image3D arg_0;
-void textureDimensions_8fca0f() {
-  ivec3 res = imageSize(arg_0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_8fca0f();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-layout(rgba32f) uniform highp writeonly image3D arg_0;
-void textureDimensions_8fca0f() {
-  ivec3 res = imageSize(arg_0);
-}
-
-void fragment_main() {
-  textureDimensions_8fca0f();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-layout(rgba32f) uniform highp writeonly image3D arg_0;
-void textureDimensions_8fca0f() {
-  ivec3 res = imageSize(arg_0);
-}
-
-void compute_main() {
-  textureDimensions_8fca0f();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/8fca0f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/8fca0f.wgsl.expected.msl
deleted file mode 100644
index f104902..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/8fca0f.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_8fca0f(texture3d<float, access::write> tint_symbol_1) {
-  int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture3d<float, access::write> tint_symbol_2) {
-  textureDimensions_8fca0f(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture3d<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture3d<float, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_8fca0f(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture3d<float, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_8fca0f(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/8fca0f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/8fca0f.wgsl.expected.spvasm
deleted file mode 100644
index 0f3281e..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/8fca0f.wgsl.expected.spvasm
+++ /dev/null
@@ -1,76 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 37
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_8fca0f "textureDimensions_8fca0f"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-         %11 = OpTypeImage %float 3D 0 0 0 2 Rgba32f
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %12 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %v3int = OpTypeVector %int 3
-%_ptr_Function_v3int = OpTypePointer Function %v3int
-         %22 = OpConstantNull %v3int
-         %23 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_8fca0f = OpFunction %void None %12
-         %15 = OpLabel
-        %res = OpVariable %_ptr_Function_v3int Function %22
-         %19 = OpLoad %11 %arg_0
-         %16 = OpImageQuerySize %v3int %19
-               OpStore %res %16
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %23
-         %25 = OpLabel
-         %26 = OpFunctionCall %void %textureDimensions_8fca0f
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %12
-         %28 = OpLabel
-         %29 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %29
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %12
-         %32 = OpLabel
-         %33 = OpFunctionCall %void %textureDimensions_8fca0f
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %12
-         %35 = OpLabel
-         %36 = OpFunctionCall %void %textureDimensions_8fca0f
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/8fca0f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/8fca0f.wgsl.expected.wgsl
deleted file mode 100644
index 6ef7d1b..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/8fca0f.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba32float, write>;
-
-fn textureDimensions_8fca0f() {
-  var res : vec3<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_8fca0f();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_8fca0f();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_8fca0f();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/902179.wgsl b/test/tint/builtins/gen/var/textureDimensions/902179.wgsl
new file mode 100644
index 0000000..3a8b15e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/902179.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<r32float, write>;
+
+// fn textureDimensions(texture: texture_storage_3d<r32float, write>) -> vec3<u32>
+fn textureDimensions_902179() {
+  var res: vec3<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_902179();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_902179();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_902179();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/902179.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/902179.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1c84269
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/902179.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<float4> arg_0 : register(u0, space1);
+
+void textureDimensions_902179() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_902179();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_902179();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_902179();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/902179.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/902179.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..1c84269
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/902179.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<float4> arg_0 : register(u0, space1);
+
+void textureDimensions_902179() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_902179();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_902179();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_902179();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/902179.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/902179.wgsl.expected.glsl
new file mode 100644
index 0000000..24eeebf
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/902179.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(r32f) uniform highp writeonly image3D arg_0;
+void textureDimensions_902179() {
+  uvec3 res = uvec3(imageSize(arg_0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_902179();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(r32f) uniform highp writeonly image3D arg_0;
+void textureDimensions_902179() {
+  uvec3 res = uvec3(imageSize(arg_0));
+}
+
+void fragment_main() {
+  textureDimensions_902179();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(r32f) uniform highp writeonly image3D arg_0;
+void textureDimensions_902179() {
+  uvec3 res = uvec3(imageSize(arg_0));
+}
+
+void compute_main() {
+  textureDimensions_902179();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/902179.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/902179.wgsl.expected.msl
new file mode 100644
index 0000000..ff7f11b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/902179.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_902179(texture3d<float, access::write> tint_symbol_1) {
+  uint3 res = uint3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::write> tint_symbol_2) {
+  textureDimensions_902179(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_902179(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture3d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_902179(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/902179.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/902179.wgsl.expected.spvasm
new file mode 100644
index 0000000..cdb6d12
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/902179.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_902179 "textureDimensions_902179"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 3D 0 0 0 2 R32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+         %22 = OpConstantNull %v3uint
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_902179 = OpFunction %void None %12
+         %15 = OpLabel
+        %res = OpVariable %_ptr_Function_v3uint Function %22
+         %19 = OpLoad %11 %arg_0
+         %16 = OpImageQuerySize %v3uint %19
+               OpStore %res %16
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %textureDimensions_902179
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %28 = OpLabel
+         %29 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %29
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_902179
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureDimensions_902179
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/902179.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/902179.wgsl.expected.wgsl
new file mode 100644
index 0000000..81da1cc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/902179.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_3d<r32float, write>;
+
+fn textureDimensions_902179() {
+  var res : vec3<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_902179();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_902179();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_902179();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/90340b.wgsl b/test/tint/builtins/gen/var/textureDimensions/90340b.wgsl
deleted file mode 100644
index 86f40ed..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/90340b.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_depth_cube_array;
-
-// fn textureDimensions(texture: texture_depth_cube_array) -> vec2<i32>
-fn textureDimensions_90340b() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_90340b();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_90340b();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_90340b();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/90340b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/90340b.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 26df72f..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/90340b.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-TextureCubeArray arg_0 : register(t0, space1);
-
-void textureDimensions_90340b() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_90340b();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_90340b();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_90340b();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/90340b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/90340b.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 26df72f..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/90340b.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-TextureCubeArray arg_0 : register(t0, space1);
-
-void textureDimensions_90340b() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_90340b();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_90340b();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_90340b();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/90340b.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/90340b.wgsl.expected.glsl
deleted file mode 100644
index 09d10eb..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/90340b.wgsl.expected.glsl
+++ /dev/null
@@ -1,75 +0,0 @@
-SKIP: FAILED
-
-#version 310 es
-
-uniform highp samplerCubeArray arg_0_1;
-void textureDimensions_90340b() {
-  ivec2 res = textureSize(arg_0_1, 0).xy;
-}
-
-vec4 vertex_main() {
-  textureDimensions_90340b();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'samplerCubeArray' : Reserved word. 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision mediump float;
-
-uniform highp samplerCubeArray arg_0_1;
-void textureDimensions_90340b() {
-  ivec2 res = textureSize(arg_0_1, 0).xy;
-}
-
-void fragment_main() {
-  textureDimensions_90340b();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:4: 'samplerCubeArray' : Reserved word. 
-ERROR: 0:4: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-
-uniform highp samplerCubeArray arg_0_1;
-void textureDimensions_90340b() {
-  ivec2 res = textureSize(arg_0_1, 0).xy;
-}
-
-void compute_main() {
-  textureDimensions_90340b();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'samplerCubeArray' : Reserved word. 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/90340b.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/90340b.wgsl.expected.msl
deleted file mode 100644
index f585531..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/90340b.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_90340b(depthcube_array<float, access::sample> tint_symbol_1) {
-  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(depthcube_array<float, access::sample> tint_symbol_2) {
-  textureDimensions_90340b(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(depthcube_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(depthcube_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_90340b(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(depthcube_array<float, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_90340b(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/90340b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/90340b.wgsl.expected.spvasm
deleted file mode 100644
index 5d4d7e7..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/90340b.wgsl.expected.spvasm
+++ /dev/null
@@ -1,79 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 40
-; Schema: 0
-               OpCapability Shader
-               OpCapability SampledCubeArray
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_90340b "textureDimensions_90340b"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-         %11 = OpTypeImage %float Cube 0 1 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %12 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %v2int = OpTypeVector %int 2
-      %v3int = OpTypeVector %int 3
-      %int_0 = OpConstant %int 0
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %25 = OpConstantNull %v2int
-         %26 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_90340b = OpFunction %void None %12
-         %15 = OpLabel
-        %res = OpVariable %_ptr_Function_v2int Function %25
-         %21 = OpLoad %11 %arg_0
-         %19 = OpImageQuerySizeLod %v3int %21 %int_0
-         %16 = OpVectorShuffle %v2int %19 %19 0 1
-               OpStore %res %16
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %26
-         %28 = OpLabel
-         %29 = OpFunctionCall %void %textureDimensions_90340b
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %12
-         %31 = OpLabel
-         %32 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %32
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %12
-         %35 = OpLabel
-         %36 = OpFunctionCall %void %textureDimensions_90340b
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %12
-         %38 = OpLabel
-         %39 = OpFunctionCall %void %textureDimensions_90340b
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/90340b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/90340b.wgsl.expected.wgsl
deleted file mode 100644
index c70e0d3..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/90340b.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_depth_cube_array;
-
-fn textureDimensions_90340b() {
-  var res : vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_90340b();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_90340b();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_90340b();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9042ab.wgsl b/test/tint/builtins/gen/var/textureDimensions/9042ab.wgsl
deleted file mode 100644
index 1f6eb1c..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/9042ab.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32uint, write>;
-
-// fn textureDimensions(texture: texture_storage_2d_array<rg32uint, write>) -> vec2<i32>
-fn textureDimensions_9042ab() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_9042ab();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_9042ab();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_9042ab();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9042ab.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/9042ab.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 95dc105..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/9042ab.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2DArray<uint4> arg_0 : register(u0, space1);
-
-void textureDimensions_9042ab() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_9042ab();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_9042ab();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_9042ab();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9042ab.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/9042ab.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 95dc105..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/9042ab.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2DArray<uint4> arg_0 : register(u0, space1);
-
-void textureDimensions_9042ab() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_9042ab();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_9042ab();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_9042ab();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9042ab.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/9042ab.wgsl.expected.glsl
deleted file mode 100644
index 1fb6520..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/9042ab.wgsl.expected.glsl
+++ /dev/null
@@ -1,75 +0,0 @@
-SKIP: FAILED
-
-#version 310 es
-
-layout(rg32ui) uniform highp writeonly uimage2DArray arg_0;
-void textureDimensions_9042ab() {
-  ivec2 res = imageSize(arg_0).xy;
-}
-
-vec4 vertex_main() {
-  textureDimensions_9042ab();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'image load-store format' : not supported with this profile: es
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision mediump float;
-
-layout(rg32ui) uniform highp writeonly uimage2DArray arg_0;
-void textureDimensions_9042ab() {
-  ivec2 res = imageSize(arg_0).xy;
-}
-
-void fragment_main() {
-  textureDimensions_9042ab();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:4: 'image load-store format' : not supported with this profile: es
-ERROR: 0:4: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-
-layout(rg32ui) uniform highp writeonly uimage2DArray arg_0;
-void textureDimensions_9042ab() {
-  ivec2 res = imageSize(arg_0).xy;
-}
-
-void compute_main() {
-  textureDimensions_9042ab();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'image load-store format' : not supported with this profile: es
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/9042ab.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/9042ab.wgsl.expected.msl
deleted file mode 100644
index 5f29287..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/9042ab.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_9042ab(texture2d_array<uint, access::write> tint_symbol_1) {
-  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture2d_array<uint, access::write> tint_symbol_2) {
-  textureDimensions_9042ab(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture2d_array<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture2d_array<uint, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_9042ab(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture2d_array<uint, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_9042ab(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/9042ab.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/9042ab.wgsl.expected.spvasm
deleted file mode 100644
index d0099a0..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/9042ab.wgsl.expected.spvasm
+++ /dev/null
@@ -1,80 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 40
-; Schema: 0
-               OpCapability Shader
-               OpCapability StorageImageExtendedFormats
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_9042ab "textureDimensions_9042ab"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-       %uint = OpTypeInt 32 0
-         %11 = OpTypeImage %uint 2D 0 1 0 2 Rg32ui
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %v2int = OpTypeVector %int 2
-      %v3int = OpTypeVector %int 3
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %25 = OpConstantNull %v2int
-         %26 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_9042ab = OpFunction %void None %13
-         %16 = OpLabel
-        %res = OpVariable %_ptr_Function_v2int Function %25
-         %22 = OpLoad %11 %arg_0
-         %20 = OpImageQuerySize %v3int %22
-         %17 = OpVectorShuffle %v2int %20 %20 0 1
-               OpStore %res %17
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %26
-         %28 = OpLabel
-         %29 = OpFunctionCall %void %textureDimensions_9042ab
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %31 = OpLabel
-         %32 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %32
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %35 = OpLabel
-         %36 = OpFunctionCall %void %textureDimensions_9042ab
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %38 = OpLabel
-         %39 = OpFunctionCall %void %textureDimensions_9042ab
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/9042ab.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/9042ab.wgsl.expected.wgsl
deleted file mode 100644
index 1602fd8..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/9042ab.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32uint, write>;
-
-fn textureDimensions_9042ab() {
-  var res : vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_9042ab();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_9042ab();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_9042ab();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/90dd74.wgsl b/test/tint/builtins/gen/var/textureDimensions/90dd74.wgsl
new file mode 100644
index 0000000..fde73cb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/90dd74.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16sint, write>;
+
+// fn textureDimensions(texture: texture_storage_2d_array<rgba16sint, write>) -> vec2<u32>
+fn textureDimensions_90dd74() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_90dd74();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_90dd74();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_90dd74();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/90dd74.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/90dd74.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..6e10196
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/90dd74.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureDimensions_90dd74() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_90dd74();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_90dd74();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_90dd74();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/90dd74.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/90dd74.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6e10196
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/90dd74.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureDimensions_90dd74() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_90dd74();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_90dd74();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_90dd74();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/90dd74.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/90dd74.wgsl.expected.glsl
new file mode 100644
index 0000000..4e0747d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/90dd74.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba16i) uniform highp writeonly iimage2DArray arg_0;
+void textureDimensions_90dd74() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+}
+
+vec4 vertex_main() {
+  textureDimensions_90dd74();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba16i) uniform highp writeonly iimage2DArray arg_0;
+void textureDimensions_90dd74() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+}
+
+void fragment_main() {
+  textureDimensions_90dd74();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba16i) uniform highp writeonly iimage2DArray arg_0;
+void textureDimensions_90dd74() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+}
+
+void compute_main() {
+  textureDimensions_90dd74();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/90dd74.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/90dd74.wgsl.expected.msl
new file mode 100644
index 0000000..8439e12
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/90dd74.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_90dd74(texture2d_array<int, access::write> tint_symbol_1) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::write> tint_symbol_2) {
+  textureDimensions_90dd74(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_90dd74(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_90dd74(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/90dd74.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/90dd74.wgsl.expected.spvasm
new file mode 100644
index 0000000..0fe6302
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/90dd74.wgsl.expected.spvasm
@@ -0,0 +1,79 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 40
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_90dd74 "textureDimensions_90dd74"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 Rgba16i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %25 = OpConstantNull %v2uint
+         %26 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_90dd74 = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %25
+         %22 = OpLoad %11 %arg_0
+         %20 = OpImageQuerySize %v3uint %22
+         %17 = OpVectorShuffle %v2uint %20 %20 0 1
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %26
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %textureDimensions_90dd74
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %31 = OpLabel
+         %32 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %32
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureDimensions_90dd74
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureDimensions_90dd74
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/90dd74.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/90dd74.wgsl.expected.wgsl
new file mode 100644
index 0000000..d5471c2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/90dd74.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16sint, write>;
+
+fn textureDimensions_90dd74() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_90dd74();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_90dd74();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_90dd74();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/920006.wgsl b/test/tint/builtins/gen/var/textureDimensions/920006.wgsl
new file mode 100644
index 0000000..1abb76d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/920006.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_1d<u32>;
+
+// fn textureDimensions(texture: texture_1d<u32>, level: i32) -> u32
+fn textureDimensions_920006() {
+  var arg_1 = 1i;
+  var res: u32 = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_920006();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_920006();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_920006();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/920006.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/920006.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9349790
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/920006.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_920006() {
+  int arg_1 = 1;
+  int2 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y);
+  uint res = tint_tmp.x;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_920006();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_920006();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_920006();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/920006.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/920006.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9349790
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/920006.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_920006() {
+  int arg_1 = 1;
+  int2 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y);
+  uint res = tint_tmp.x;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_920006();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_920006();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_920006();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/920006.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/920006.wgsl.expected.glsl
new file mode 100644
index 0000000..270dde9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/920006.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp usampler1D arg_0_1;
+void textureDimensions_920006() {
+  int arg_1 = 1;
+  uint res = uint(textureSize(arg_0_1, arg_1));
+}
+
+vec4 vertex_main() {
+  textureDimensions_920006();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'usampler1D' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp usampler1D arg_0_1;
+void textureDimensions_920006() {
+  int arg_1 = 1;
+  uint res = uint(textureSize(arg_0_1, arg_1));
+}
+
+void fragment_main() {
+  textureDimensions_920006();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'usampler1D' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp usampler1D arg_0_1;
+void textureDimensions_920006() {
+  int arg_1 = 1;
+  uint res = uint(textureSize(arg_0_1, arg_1));
+}
+
+void compute_main() {
+  textureDimensions_920006();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'usampler1D' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/920006.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/920006.wgsl.expected.msl
new file mode 100644
index 0000000..3cdcaca
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/920006.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_920006(texture1d<uint, access::sample> tint_symbol_1) {
+  int arg_1 = 1;
+  uint res = tint_symbol_1.get_width(0);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<uint, access::sample> tint_symbol_2) {
+  textureDimensions_920006(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_920006(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_920006(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/920006.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/920006.wgsl.expected.spvasm
new file mode 100644
index 0000000..54be5e9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/920006.wgsl.expected.spvasm
@@ -0,0 +1,83 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 42
+; Schema: 0
+               OpCapability Shader
+               OpCapability Sampled1D
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_920006 "textureDimensions_920006"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 1D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_int = OpTypePointer Function %int
+         %21 = OpConstantNull %int
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %27 = OpConstantNull %uint
+         %28 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_920006 = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_int Function %21
+        %res = OpVariable %_ptr_Function_uint Function %27
+               OpStore %arg_1 %int_1
+         %23 = OpLoad %11 %arg_0
+         %24 = OpLoad %int %arg_1
+         %22 = OpImageQuerySizeLod %uint %23 %24
+               OpStore %res %22
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %28
+         %30 = OpLabel
+         %31 = OpFunctionCall %void %textureDimensions_920006
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %33 = OpLabel
+         %34 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %34
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureDimensions_920006
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureDimensions_920006
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/920006.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/920006.wgsl.expected.wgsl
new file mode 100644
index 0000000..9ba89cf
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/920006.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_1d<u32>;
+
+fn textureDimensions_920006() {
+  var arg_1 = 1i;
+  var res : u32 = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_920006();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_920006();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_920006();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/92552e.wgsl b/test/tint/builtins/gen/var/textureDimensions/92552e.wgsl
new file mode 100644
index 0000000..d4677e2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/92552e.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba8sint, write>;
+
+// fn textureDimensions(texture: texture_storage_1d<rgba8sint, write>) -> u32
+fn textureDimensions_92552e() {
+  var res: u32 = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_92552e();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_92552e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_92552e();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/92552e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/92552e.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..6afab39
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/92552e.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<int4> arg_0 : register(u0, space1);
+
+void textureDimensions_92552e() {
+  int tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_92552e();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_92552e();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_92552e();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/92552e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/92552e.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6afab39
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/92552e.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<int4> arg_0 : register(u0, space1);
+
+void textureDimensions_92552e() {
+  int tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_92552e();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_92552e();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_92552e();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/92552e.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/92552e.wgsl.expected.glsl
new file mode 100644
index 0000000..aea8be7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/92552e.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8i) uniform highp writeonly iimage1D arg_0;
+void textureDimensions_92552e() {
+  uint res = uint(imageSize(arg_0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_92552e();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'iimage1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rgba8i) uniform highp writeonly iimage1D arg_0;
+void textureDimensions_92552e() {
+  uint res = uint(imageSize(arg_0));
+}
+
+void fragment_main() {
+  textureDimensions_92552e();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'iimage1D' : Reserved word. 
+WARNING: 0:4: 'layout' : useless application of layout qualifier 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8i) uniform highp writeonly iimage1D arg_0;
+void textureDimensions_92552e() {
+  uint res = uint(imageSize(arg_0));
+}
+
+void compute_main() {
+  textureDimensions_92552e();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'iimage1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/92552e.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/92552e.wgsl.expected.msl
new file mode 100644
index 0000000..b291fc2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/92552e.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_92552e(texture1d<int, access::write> tint_symbol_1) {
+  uint res = tint_symbol_1.get_width(0);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<int, access::write> tint_symbol_2) {
+  textureDimensions_92552e(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_92552e(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_92552e(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/92552e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/92552e.wgsl.expected.spvasm
new file mode 100644
index 0000000..900be97
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/92552e.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_92552e "textureDimensions_92552e"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 1D 0 0 0 2 Rgba8i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %22 = OpConstantNull %uint
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_92552e = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_uint Function %22
+         %19 = OpLoad %11 %arg_0
+         %17 = OpImageQuerySize %uint %19
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %textureDimensions_92552e
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %28 = OpLabel
+         %29 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %29
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_92552e
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureDimensions_92552e
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/92552e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/92552e.wgsl.expected.wgsl
new file mode 100644
index 0000000..d970314
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/92552e.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba8sint, write>;
+
+fn textureDimensions_92552e() {
+  var res : u32 = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_92552e();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_92552e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_92552e();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9393b0.wgsl b/test/tint/builtins/gen/var/textureDimensions/9393b0.wgsl
deleted file mode 100644
index d7a6c66..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/9393b0.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_depth_cube;
-
-// fn textureDimensions(texture: texture_depth_cube, level: i32) -> vec2<i32>
-fn textureDimensions_9393b0() {
-  var arg_1 = 1i;
-  var res: vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_9393b0();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_9393b0();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_9393b0();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9393b0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/9393b0.wgsl.expected.dxc.hlsl
deleted file mode 100644
index ec3d721..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/9393b0.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-TextureCube arg_0 : register(t0, space1);
-
-void textureDimensions_9393b0() {
-  int arg_1 = 1;
-  int3 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_9393b0();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_9393b0();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_9393b0();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9393b0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/9393b0.wgsl.expected.fxc.hlsl
deleted file mode 100644
index ec3d721..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/9393b0.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-TextureCube arg_0 : register(t0, space1);
-
-void textureDimensions_9393b0() {
-  int arg_1 = 1;
-  int3 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_9393b0();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_9393b0();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_9393b0();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9393b0.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/9393b0.wgsl.expected.glsl
deleted file mode 100644
index 5994404..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/9393b0.wgsl.expected.glsl
+++ /dev/null
@@ -1,55 +0,0 @@
-#version 310 es
-
-uniform highp samplerCube arg_0_1;
-void textureDimensions_9393b0() {
-  int arg_1 = 1;
-  ivec2 res = textureSize(arg_0_1, arg_1);
-}
-
-vec4 vertex_main() {
-  textureDimensions_9393b0();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-uniform highp samplerCube arg_0_1;
-void textureDimensions_9393b0() {
-  int arg_1 = 1;
-  ivec2 res = textureSize(arg_0_1, arg_1);
-}
-
-void fragment_main() {
-  textureDimensions_9393b0();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-uniform highp samplerCube arg_0_1;
-void textureDimensions_9393b0() {
-  int arg_1 = 1;
-  ivec2 res = textureSize(arg_0_1, arg_1);
-}
-
-void compute_main() {
-  textureDimensions_9393b0();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9393b0.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/9393b0.wgsl.expected.msl
deleted file mode 100644
index 6b68de3..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/9393b0.wgsl.expected.msl
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_9393b0(depthcube<float, access::sample> tint_symbol_1) {
-  int arg_1 = 1;
-  int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(depthcube<float, access::sample> tint_symbol_2) {
-  textureDimensions_9393b0(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(depthcube<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(depthcube<float, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_9393b0(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(depthcube<float, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_9393b0(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/9393b0.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/9393b0.wgsl.expected.spvasm
deleted file mode 100644
index 900814b..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/9393b0.wgsl.expected.spvasm
+++ /dev/null
@@ -1,82 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 42
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_9393b0 "textureDimensions_9393b0"
-               OpName %arg_1 "arg_1"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-         %11 = OpTypeImage %float Cube 0 0 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %12 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %int_1 = OpConstant %int 1
-%_ptr_Function_int = OpTypePointer Function %int
-         %20 = OpConstantNull %int
-      %v2int = OpTypeVector %int 2
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %27 = OpConstantNull %v2int
-         %28 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_9393b0 = OpFunction %void None %12
-         %15 = OpLabel
-      %arg_1 = OpVariable %_ptr_Function_int Function %20
-        %res = OpVariable %_ptr_Function_v2int Function %27
-               OpStore %arg_1 %int_1
-         %23 = OpLoad %11 %arg_0
-         %24 = OpLoad %int %arg_1
-         %21 = OpImageQuerySizeLod %v2int %23 %24
-               OpStore %res %21
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %28
-         %30 = OpLabel
-         %31 = OpFunctionCall %void %textureDimensions_9393b0
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %12
-         %33 = OpLabel
-         %34 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %34
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %12
-         %37 = OpLabel
-         %38 = OpFunctionCall %void %textureDimensions_9393b0
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %12
-         %40 = OpLabel
-         %41 = OpFunctionCall %void %textureDimensions_9393b0
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/9393b0.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/9393b0.wgsl.expected.wgsl
deleted file mode 100644
index e3163f2..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/9393b0.wgsl.expected.wgsl
+++ /dev/null
@@ -1,22 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_depth_cube;
-
-fn textureDimensions_9393b0() {
-  var arg_1 = 1i;
-  var res : vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_9393b0();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_9393b0();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_9393b0();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/939fdb.wgsl b/test/tint/builtins/gen/var/textureDimensions/939fdb.wgsl
deleted file mode 100644
index 6914338..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/939fdb.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_depth_2d;
-
-// fn textureDimensions(texture: texture_depth_2d) -> vec2<i32>
-fn textureDimensions_939fdb() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_939fdb();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_939fdb();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_939fdb();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/939fdb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/939fdb.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 1edab80..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/939fdb.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-Texture2D arg_0 : register(t0, space1);
-
-void textureDimensions_939fdb() {
-  int2 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
-  int2 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_939fdb();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_939fdb();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_939fdb();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/939fdb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/939fdb.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 1edab80..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/939fdb.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-Texture2D arg_0 : register(t0, space1);
-
-void textureDimensions_939fdb() {
-  int2 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
-  int2 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_939fdb();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_939fdb();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_939fdb();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/939fdb.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/939fdb.wgsl.expected.glsl
deleted file mode 100644
index 380941e..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/939fdb.wgsl.expected.glsl
+++ /dev/null
@@ -1,52 +0,0 @@
-#version 310 es
-
-uniform highp sampler2D arg_0_1;
-void textureDimensions_939fdb() {
-  ivec2 res = textureSize(arg_0_1, 0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_939fdb();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-uniform highp sampler2D arg_0_1;
-void textureDimensions_939fdb() {
-  ivec2 res = textureSize(arg_0_1, 0);
-}
-
-void fragment_main() {
-  textureDimensions_939fdb();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-uniform highp sampler2D arg_0_1;
-void textureDimensions_939fdb() {
-  ivec2 res = textureSize(arg_0_1, 0);
-}
-
-void compute_main() {
-  textureDimensions_939fdb();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/939fdb.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/939fdb.wgsl.expected.msl
deleted file mode 100644
index a6283fb..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/939fdb.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_939fdb(depth2d<float, access::sample> tint_symbol_1) {
-  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(depth2d<float, access::sample> tint_symbol_2) {
-  textureDimensions_939fdb(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(depth2d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(depth2d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_939fdb(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(depth2d<float, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_939fdb(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/939fdb.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/939fdb.wgsl.expected.spvasm
deleted file mode 100644
index 7e41c36..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/939fdb.wgsl.expected.spvasm
+++ /dev/null
@@ -1,76 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 38
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_939fdb "textureDimensions_939fdb"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-         %11 = OpTypeImage %float 2D 0 0 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %12 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %v2int = OpTypeVector %int 2
-      %int_0 = OpConstant %int 0
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %23 = OpConstantNull %v2int
-         %24 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_939fdb = OpFunction %void None %12
-         %15 = OpLabel
-        %res = OpVariable %_ptr_Function_v2int Function %23
-         %19 = OpLoad %11 %arg_0
-         %16 = OpImageQuerySizeLod %v2int %19 %int_0
-               OpStore %res %16
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %24
-         %26 = OpLabel
-         %27 = OpFunctionCall %void %textureDimensions_939fdb
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %12
-         %29 = OpLabel
-         %30 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %30
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %12
-         %33 = OpLabel
-         %34 = OpFunctionCall %void %textureDimensions_939fdb
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %12
-         %36 = OpLabel
-         %37 = OpFunctionCall %void %textureDimensions_939fdb
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/939fdb.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/939fdb.wgsl.expected.wgsl
deleted file mode 100644
index eda2bcb..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/939fdb.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_depth_2d;
-
-fn textureDimensions_939fdb() {
-  var res : vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_939fdb();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_939fdb();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_939fdb();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl b/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl
deleted file mode 100644
index 55c8637..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2022 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_depth_2d;
-
-// fn textureDimensions(texture: texture_depth_2d, level: u32) -> vec2<i32>
-fn textureDimensions_941d6e() {
-  var arg_1 = 1u;
-  var res: vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_941d6e();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_941d6e();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_941d6e();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 3288317..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-Texture2D arg_0 : register(t0, space1);
-
-void textureDimensions_941d6e() {
-  uint arg_1 = 1u;
-  int3 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_941d6e();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_941d6e();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_941d6e();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 3288317..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-Texture2D arg_0 : register(t0, space1);
-
-void textureDimensions_941d6e() {
-  uint arg_1 = 1u;
-  int3 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_941d6e();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_941d6e();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_941d6e();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl.expected.glsl
deleted file mode 100644
index 596c594..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl.expected.glsl
+++ /dev/null
@@ -1,55 +0,0 @@
-#version 310 es
-
-uniform highp sampler2D arg_0_1;
-void textureDimensions_941d6e() {
-  uint arg_1 = 1u;
-  ivec2 res = textureSize(arg_0_1, int(arg_1));
-}
-
-vec4 vertex_main() {
-  textureDimensions_941d6e();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-uniform highp sampler2D arg_0_1;
-void textureDimensions_941d6e() {
-  uint arg_1 = 1u;
-  ivec2 res = textureSize(arg_0_1, int(arg_1));
-}
-
-void fragment_main() {
-  textureDimensions_941d6e();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-uniform highp sampler2D arg_0_1;
-void textureDimensions_941d6e() {
-  uint arg_1 = 1u;
-  ivec2 res = textureSize(arg_0_1, int(arg_1));
-}
-
-void compute_main() {
-  textureDimensions_941d6e();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl.expected.msl
deleted file mode 100644
index 23a2e59..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl.expected.msl
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_941d6e(depth2d<float, access::sample> tint_symbol_1) {
-  uint arg_1 = 1u;
-  int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(depth2d<float, access::sample> tint_symbol_2) {
-  textureDimensions_941d6e(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(depth2d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(depth2d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_941d6e(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(depth2d<float, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_941d6e(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl.expected.spvasm
deleted file mode 100644
index 3742022..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl.expected.spvasm
+++ /dev/null
@@ -1,83 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 43
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_941d6e "textureDimensions_941d6e"
-               OpName %arg_1 "arg_1"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-         %11 = OpTypeImage %float 2D 0 0 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %12 = OpTypeFunction %void
-       %uint = OpTypeInt 32 0
-     %uint_1 = OpConstant %uint 1
-%_ptr_Function_uint = OpTypePointer Function %uint
-         %20 = OpConstantNull %uint
-        %int = OpTypeInt 32 1
-      %v2int = OpTypeVector %int 2
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %28 = OpConstantNull %v2int
-         %29 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_941d6e = OpFunction %void None %12
-         %15 = OpLabel
-      %arg_1 = OpVariable %_ptr_Function_uint Function %20
-        %res = OpVariable %_ptr_Function_v2int Function %28
-               OpStore %arg_1 %uint_1
-         %24 = OpLoad %11 %arg_0
-         %25 = OpLoad %uint %arg_1
-         %21 = OpImageQuerySizeLod %v2int %24 %25
-               OpStore %res %21
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %29
-         %31 = OpLabel
-         %32 = OpFunctionCall %void %textureDimensions_941d6e
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %12
-         %34 = OpLabel
-         %35 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %35
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %12
-         %38 = OpLabel
-         %39 = OpFunctionCall %void %textureDimensions_941d6e
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %12
-         %41 = OpLabel
-         %42 = OpFunctionCall %void %textureDimensions_941d6e
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl.expected.wgsl
deleted file mode 100644
index 28c022e..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/941d6e.wgsl.expected.wgsl
+++ /dev/null
@@ -1,22 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_depth_2d;
-
-fn textureDimensions_941d6e() {
-  var arg_1 = 1u;
-  var res : vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_941d6e();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_941d6e();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_941d6e();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9573f3.wgsl b/test/tint/builtins/gen/var/textureDimensions/9573f3.wgsl
new file mode 100644
index 0000000..917ddec
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/9573f3.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rg32uint, write>;
+
+// fn textureDimensions(texture: texture_storage_2d<rg32uint, write>) -> vec2<u32>
+fn textureDimensions_9573f3() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_9573f3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_9573f3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_9573f3();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9573f3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/9573f3.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..4d8998d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/9573f3.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<uint4> arg_0 : register(u0, space1);
+
+void textureDimensions_9573f3() {
+  int2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_9573f3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_9573f3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_9573f3();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9573f3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/9573f3.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..4d8998d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/9573f3.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<uint4> arg_0 : register(u0, space1);
+
+void textureDimensions_9573f3() {
+  int2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_9573f3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_9573f3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_9573f3();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9573f3.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/9573f3.wgsl.expected.glsl
new file mode 100644
index 0000000..fa06ee3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/9573f3.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32ui) uniform highp writeonly uimage2D arg_0;
+void textureDimensions_9573f3() {
+  uvec2 res = uvec2(imageSize(arg_0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_9573f3();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rg32ui) uniform highp writeonly uimage2D arg_0;
+void textureDimensions_9573f3() {
+  uvec2 res = uvec2(imageSize(arg_0));
+}
+
+void fragment_main() {
+  textureDimensions_9573f3();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32ui) uniform highp writeonly uimage2D arg_0;
+void textureDimensions_9573f3() {
+  uvec2 res = uvec2(imageSize(arg_0));
+}
+
+void compute_main() {
+  textureDimensions_9573f3();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/9573f3.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/9573f3.wgsl.expected.msl
new file mode 100644
index 0000000..f0fa2a7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/9573f3.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_9573f3(texture2d<uint, access::write> tint_symbol_1) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::write> tint_symbol_2) {
+  textureDimensions_9573f3(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_9573f3(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_9573f3(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/9573f3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/9573f3.wgsl.expected.spvasm
new file mode 100644
index 0000000..b1f6cc3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/9573f3.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_9573f3 "textureDimensions_9573f3"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 0 0 2 Rg32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %v2uint = OpTypeVector %uint 2
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %22 = OpConstantNull %v2uint
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_9573f3 = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %22
+         %19 = OpLoad %11 %arg_0
+         %17 = OpImageQuerySize %v2uint %19
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %textureDimensions_9573f3
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %28 = OpLabel
+         %29 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %29
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_9573f3
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureDimensions_9573f3
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/9573f3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/9573f3.wgsl.expected.wgsl
new file mode 100644
index 0000000..de5167b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/9573f3.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rg32uint, write>;
+
+fn textureDimensions_9573f3() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_9573f3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_9573f3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_9573f3();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl b/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl
deleted file mode 100644
index f13a2e0..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2022 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_cube<f32>;
-
-// fn textureDimensions(texture: texture_cube<f32>, level: u32) -> vec2<i32>
-fn textureDimensions_95b2db() {
-  var arg_1 = 1u;
-  var res: vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_95b2db();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_95b2db();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_95b2db();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 08889aa..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-TextureCube<float4> arg_0 : register(t0, space1);
-
-void textureDimensions_95b2db() {
-  uint arg_1 = 1u;
-  int3 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_95b2db();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_95b2db();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_95b2db();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 08889aa..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-TextureCube<float4> arg_0 : register(t0, space1);
-
-void textureDimensions_95b2db() {
-  uint arg_1 = 1u;
-  int3 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_95b2db();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_95b2db();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_95b2db();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl.expected.glsl
deleted file mode 100644
index 6fe419a..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl.expected.glsl
+++ /dev/null
@@ -1,55 +0,0 @@
-#version 310 es
-
-uniform highp samplerCube arg_0_1;
-void textureDimensions_95b2db() {
-  uint arg_1 = 1u;
-  ivec2 res = textureSize(arg_0_1, int(arg_1));
-}
-
-vec4 vertex_main() {
-  textureDimensions_95b2db();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-uniform highp samplerCube arg_0_1;
-void textureDimensions_95b2db() {
-  uint arg_1 = 1u;
-  ivec2 res = textureSize(arg_0_1, int(arg_1));
-}
-
-void fragment_main() {
-  textureDimensions_95b2db();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-uniform highp samplerCube arg_0_1;
-void textureDimensions_95b2db() {
-  uint arg_1 = 1u;
-  ivec2 res = textureSize(arg_0_1, int(arg_1));
-}
-
-void compute_main() {
-  textureDimensions_95b2db();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl.expected.msl
deleted file mode 100644
index da2b344..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl.expected.msl
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_95b2db(texturecube<float, access::sample> tint_symbol_1) {
-  uint arg_1 = 1u;
-  int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texturecube<float, access::sample> tint_symbol_2) {
-  textureDimensions_95b2db(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texturecube<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texturecube<float, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_95b2db(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texturecube<float, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_95b2db(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl.expected.spvasm
deleted file mode 100644
index bd03b31..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl.expected.spvasm
+++ /dev/null
@@ -1,83 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 43
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_95b2db "textureDimensions_95b2db"
-               OpName %arg_1 "arg_1"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-         %11 = OpTypeImage %float Cube 0 0 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %12 = OpTypeFunction %void
-       %uint = OpTypeInt 32 0
-     %uint_1 = OpConstant %uint 1
-%_ptr_Function_uint = OpTypePointer Function %uint
-         %20 = OpConstantNull %uint
-        %int = OpTypeInt 32 1
-      %v2int = OpTypeVector %int 2
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %28 = OpConstantNull %v2int
-         %29 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_95b2db = OpFunction %void None %12
-         %15 = OpLabel
-      %arg_1 = OpVariable %_ptr_Function_uint Function %20
-        %res = OpVariable %_ptr_Function_v2int Function %28
-               OpStore %arg_1 %uint_1
-         %24 = OpLoad %11 %arg_0
-         %25 = OpLoad %uint %arg_1
-         %21 = OpImageQuerySizeLod %v2int %24 %25
-               OpStore %res %21
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %29
-         %31 = OpLabel
-         %32 = OpFunctionCall %void %textureDimensions_95b2db
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %12
-         %34 = OpLabel
-         %35 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %35
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %12
-         %38 = OpLabel
-         %39 = OpFunctionCall %void %textureDimensions_95b2db
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %12
-         %41 = OpLabel
-         %42 = OpFunctionCall %void %textureDimensions_95b2db
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl.expected.wgsl
deleted file mode 100644
index 401bfba..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/95b2db.wgsl.expected.wgsl
+++ /dev/null
@@ -1,22 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_cube<f32>;
-
-fn textureDimensions_95b2db() {
-  var arg_1 = 1u;
-  var res : vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_95b2db();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_95b2db();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_95b2db();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/962dcd.wgsl b/test/tint/builtins/gen/var/textureDimensions/962dcd.wgsl
deleted file mode 100644
index af253df..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/962dcd.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_cube<i32>;
-
-// fn textureDimensions(texture: texture_cube<i32>) -> vec2<i32>
-fn textureDimensions_962dcd() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_962dcd();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_962dcd();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_962dcd();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/962dcd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/962dcd.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 7f1c1eb..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/962dcd.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-TextureCube<int4> arg_0 : register(t0, space1);
-
-void textureDimensions_962dcd() {
-  int2 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
-  int2 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_962dcd();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_962dcd();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_962dcd();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/962dcd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/962dcd.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 7f1c1eb..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/962dcd.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-TextureCube<int4> arg_0 : register(t0, space1);
-
-void textureDimensions_962dcd() {
-  int2 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
-  int2 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_962dcd();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_962dcd();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_962dcd();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/962dcd.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/962dcd.wgsl.expected.glsl
deleted file mode 100644
index ded4e42..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/962dcd.wgsl.expected.glsl
+++ /dev/null
@@ -1,52 +0,0 @@
-#version 310 es
-
-uniform highp isamplerCube arg_0_1;
-void textureDimensions_962dcd() {
-  ivec2 res = textureSize(arg_0_1, 0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_962dcd();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-uniform highp isamplerCube arg_0_1;
-void textureDimensions_962dcd() {
-  ivec2 res = textureSize(arg_0_1, 0);
-}
-
-void fragment_main() {
-  textureDimensions_962dcd();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-uniform highp isamplerCube arg_0_1;
-void textureDimensions_962dcd() {
-  ivec2 res = textureSize(arg_0_1, 0);
-}
-
-void compute_main() {
-  textureDimensions_962dcd();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/962dcd.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/962dcd.wgsl.expected.msl
deleted file mode 100644
index 052154f..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/962dcd.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_962dcd(texturecube<int, access::sample> tint_symbol_1) {
-  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texturecube<int, access::sample> tint_symbol_2) {
-  textureDimensions_962dcd(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texturecube<int, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texturecube<int, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_962dcd(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texturecube<int, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_962dcd(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/962dcd.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/962dcd.wgsl.expected.spvasm
deleted file mode 100644
index ceac95f..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/962dcd.wgsl.expected.spvasm
+++ /dev/null
@@ -1,76 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 38
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_962dcd "textureDimensions_962dcd"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-        %int = OpTypeInt 32 1
-         %11 = OpTypeImage %int Cube 0 0 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-      %v2int = OpTypeVector %int 2
-      %int_0 = OpConstant %int 0
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %23 = OpConstantNull %v2int
-         %24 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_962dcd = OpFunction %void None %13
-         %16 = OpLabel
-        %res = OpVariable %_ptr_Function_v2int Function %23
-         %19 = OpLoad %11 %arg_0
-         %17 = OpImageQuerySizeLod %v2int %19 %int_0
-               OpStore %res %17
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %24
-         %26 = OpLabel
-         %27 = OpFunctionCall %void %textureDimensions_962dcd
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %29 = OpLabel
-         %30 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %30
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %33 = OpLabel
-         %34 = OpFunctionCall %void %textureDimensions_962dcd
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %36 = OpLabel
-         %37 = OpFunctionCall %void %textureDimensions_962dcd
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/962dcd.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/962dcd.wgsl.expected.wgsl
deleted file mode 100644
index bd3ca7a..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/962dcd.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_cube<i32>;
-
-fn textureDimensions_962dcd() {
-  var res : vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_962dcd();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_962dcd();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_962dcd();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/965645.wgsl b/test/tint/builtins/gen/var/textureDimensions/965645.wgsl
new file mode 100644
index 0000000..a09022b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/965645.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_1d<u32>;
+
+// fn textureDimensions(texture: texture_1d<u32>) -> u32
+fn textureDimensions_965645() {
+  var res: u32 = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_965645();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_965645();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_965645();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/965645.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/965645.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..285b9f8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/965645.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_965645() {
+  int tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_965645();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_965645();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_965645();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/965645.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/965645.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..285b9f8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/965645.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_965645() {
+  int tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_965645();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_965645();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_965645();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/965645.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/965645.wgsl.expected.glsl
new file mode 100644
index 0000000..1aaef12
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/965645.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp usampler1D arg_0_1;
+void textureDimensions_965645() {
+  uint res = uint(textureSize(arg_0_1, 0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_965645();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'usampler1D' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp usampler1D arg_0_1;
+void textureDimensions_965645() {
+  uint res = uint(textureSize(arg_0_1, 0));
+}
+
+void fragment_main() {
+  textureDimensions_965645();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'usampler1D' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp usampler1D arg_0_1;
+void textureDimensions_965645() {
+  uint res = uint(textureSize(arg_0_1, 0));
+}
+
+void compute_main() {
+  textureDimensions_965645();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'usampler1D' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/965645.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/965645.wgsl.expected.msl
new file mode 100644
index 0000000..6d38430
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/965645.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_965645(texture1d<uint, access::sample> tint_symbol_1) {
+  uint res = tint_symbol_1.get_width(0);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<uint, access::sample> tint_symbol_2) {
+  textureDimensions_965645(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_965645(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_965645(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/965645.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/965645.wgsl.expected.spvasm
new file mode 100644
index 0000000..9e8f9a4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/965645.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; Schema: 0
+               OpCapability Shader
+               OpCapability Sampled1D
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_965645 "textureDimensions_965645"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 1D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %int_0 = OpConstant %int 0
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %23 = OpConstantNull %uint
+         %24 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_965645 = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_uint Function %23
+         %18 = OpLoad %11 %arg_0
+         %17 = OpImageQuerySizeLod %uint %18 %int_0
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %textureDimensions_965645
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %29 = OpLabel
+         %30 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %30
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureDimensions_965645
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureDimensions_965645
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/965645.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/965645.wgsl.expected.wgsl
new file mode 100644
index 0000000..45ddf97
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/965645.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_1d<u32>;
+
+fn textureDimensions_965645() {
+  var res : u32 = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_965645();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_965645();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_965645();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/98b2d3.wgsl b/test/tint/builtins/gen/var/textureDimensions/98b2d3.wgsl
new file mode 100644
index 0000000..0f82afb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/98b2d3.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube_array<i32>;
+
+// fn textureDimensions(texture: texture_cube_array<i32>) -> vec2<u32>
+fn textureDimensions_98b2d3() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_98b2d3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_98b2d3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_98b2d3();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/98b2d3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/98b2d3.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..70d774f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/98b2d3.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+TextureCubeArray<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_98b2d3() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_98b2d3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_98b2d3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_98b2d3();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/98b2d3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/98b2d3.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..70d774f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/98b2d3.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+TextureCubeArray<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_98b2d3() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_98b2d3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_98b2d3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_98b2d3();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/98b2d3.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/98b2d3.wgsl.expected.glsl
new file mode 100644
index 0000000..7b14e6c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/98b2d3.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp isamplerCubeArray arg_0_1;
+void textureDimensions_98b2d3() {
+  uvec2 res = uvec2(textureSize(arg_0_1, 0).xy);
+}
+
+vec4 vertex_main() {
+  textureDimensions_98b2d3();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'isamplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp isamplerCubeArray arg_0_1;
+void textureDimensions_98b2d3() {
+  uvec2 res = uvec2(textureSize(arg_0_1, 0).xy);
+}
+
+void fragment_main() {
+  textureDimensions_98b2d3();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'isamplerCubeArray' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp isamplerCubeArray arg_0_1;
+void textureDimensions_98b2d3() {
+  uvec2 res = uvec2(textureSize(arg_0_1, 0).xy);
+}
+
+void compute_main() {
+  textureDimensions_98b2d3();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'isamplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/98b2d3.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/98b2d3.wgsl.expected.msl
new file mode 100644
index 0000000..dc4a496
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/98b2d3.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_98b2d3(texturecube_array<int, access::sample> tint_symbol_1) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube_array<int, access::sample> tint_symbol_2) {
+  textureDimensions_98b2d3(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube_array<int, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texturecube_array<int, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_98b2d3(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texturecube_array<int, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_98b2d3(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/98b2d3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/98b2d3.wgsl.expected.spvasm
new file mode 100644
index 0000000..d511aaa
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/98b2d3.wgsl.expected.spvasm
@@ -0,0 +1,80 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; Schema: 0
+               OpCapability Shader
+               OpCapability SampledCubeArray
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_98b2d3 "textureDimensions_98b2d3"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %v3uint = OpTypeVector %uint 3
+      %int_0 = OpConstant %int 0
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %26 = OpConstantNull %v2uint
+         %27 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_98b2d3 = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %26
+         %22 = OpLoad %11 %arg_0
+         %20 = OpImageQuerySizeLod %v3uint %22 %int_0
+         %17 = OpVectorShuffle %v2uint %20 %20 0 1
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureDimensions_98b2d3
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %32 = OpLabel
+         %33 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %33
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureDimensions_98b2d3
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureDimensions_98b2d3
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/98b2d3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/98b2d3.wgsl.expected.wgsl
new file mode 100644
index 0000000..8609f45
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/98b2d3.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_cube_array<i32>;
+
+fn textureDimensions_98b2d3() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_98b2d3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_98b2d3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_98b2d3();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/991ea9.wgsl b/test/tint/builtins/gen/var/textureDimensions/991ea9.wgsl
new file mode 100644
index 0000000..2963a10
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/991ea9.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d;
+
+// fn textureDimensions(texture: texture_depth_2d, level: u32) -> vec2<u32>
+fn textureDimensions_991ea9() {
+  var arg_1 = 1u;
+  var res: vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_991ea9();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_991ea9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_991ea9();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/991ea9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/991ea9.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..85bfca1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/991ea9.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D arg_0 : register(t0, space1);
+
+void textureDimensions_991ea9() {
+  uint arg_1 = 1u;
+  int3 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_991ea9();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_991ea9();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_991ea9();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/991ea9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/991ea9.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..85bfca1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/991ea9.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D arg_0 : register(t0, space1);
+
+void textureDimensions_991ea9() {
+  uint arg_1 = 1u;
+  int3 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_991ea9();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_991ea9();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_991ea9();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/991ea9.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/991ea9.wgsl.expected.glsl
new file mode 100644
index 0000000..b58daaf
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/991ea9.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp sampler2D arg_0_1;
+void textureDimensions_991ea9() {
+  uint arg_1 = 1u;
+  uvec2 res = uvec2(textureSize(arg_0_1, int(arg_1)));
+}
+
+vec4 vertex_main() {
+  textureDimensions_991ea9();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2D arg_0_1;
+void textureDimensions_991ea9() {
+  uint arg_1 = 1u;
+  uvec2 res = uvec2(textureSize(arg_0_1, int(arg_1)));
+}
+
+void fragment_main() {
+  textureDimensions_991ea9();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2D arg_0_1;
+void textureDimensions_991ea9() {
+  uint arg_1 = 1u;
+  uvec2 res = uvec2(textureSize(arg_0_1, int(arg_1)));
+}
+
+void compute_main() {
+  textureDimensions_991ea9();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/991ea9.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/991ea9.wgsl.expected.msl
new file mode 100644
index 0000000..59d9a04
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/991ea9.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_991ea9(depth2d<float, access::sample> tint_symbol_1) {
+  uint arg_1 = 1u;
+  uint2 res = uint2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d<float, access::sample> tint_symbol_2) {
+  textureDimensions_991ea9(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depth2d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_991ea9(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(depth2d<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_991ea9(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/991ea9.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/991ea9.wgsl.expected.spvasm
new file mode 100644
index 0000000..626c84d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/991ea9.wgsl.expected.spvasm
@@ -0,0 +1,82 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 42
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_991ea9 "textureDimensions_991ea9"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %20 = OpConstantNull %uint
+     %v2uint = OpTypeVector %uint 2
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %27 = OpConstantNull %v2uint
+         %28 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_991ea9 = OpFunction %void None %12
+         %15 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %20
+        %res = OpVariable %_ptr_Function_v2uint Function %27
+               OpStore %arg_1 %uint_1
+         %23 = OpLoad %11 %arg_0
+         %24 = OpLoad %uint %arg_1
+         %21 = OpImageQuerySizeLod %v2uint %23 %24
+               OpStore %res %21
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %28
+         %30 = OpLabel
+         %31 = OpFunctionCall %void %textureDimensions_991ea9
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %33 = OpLabel
+         %34 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %34
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureDimensions_991ea9
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureDimensions_991ea9
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/991ea9.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/991ea9.wgsl.expected.wgsl
new file mode 100644
index 0000000..d86d15c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/991ea9.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d;
+
+fn textureDimensions_991ea9() {
+  var arg_1 = 1u;
+  var res : vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_991ea9();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_991ea9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_991ea9();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9abfe5.wgsl b/test/tint/builtins/gen/var/textureDimensions/9abfe5.wgsl
deleted file mode 100644
index de90222..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/9abfe5.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32float, write>;
-
-// fn textureDimensions(texture: texture_storage_2d_array<rgba32float, write>) -> vec2<i32>
-fn textureDimensions_9abfe5() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_9abfe5();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_9abfe5();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_9abfe5();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9abfe5.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/9abfe5.wgsl.expected.dxc.hlsl
deleted file mode 100644
index d97dcf7..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/9abfe5.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2DArray<float4> arg_0 : register(u0, space1);
-
-void textureDimensions_9abfe5() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_9abfe5();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_9abfe5();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_9abfe5();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9abfe5.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/9abfe5.wgsl.expected.fxc.hlsl
deleted file mode 100644
index d97dcf7..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/9abfe5.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2DArray<float4> arg_0 : register(u0, space1);
-
-void textureDimensions_9abfe5() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_9abfe5();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_9abfe5();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_9abfe5();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9abfe5.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/9abfe5.wgsl.expected.glsl
deleted file mode 100644
index 0de8c91..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/9abfe5.wgsl.expected.glsl
+++ /dev/null
@@ -1,52 +0,0 @@
-#version 310 es
-
-layout(rgba32f) uniform highp writeonly image2DArray arg_0;
-void textureDimensions_9abfe5() {
-  ivec2 res = imageSize(arg_0).xy;
-}
-
-vec4 vertex_main() {
-  textureDimensions_9abfe5();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-layout(rgba32f) uniform highp writeonly image2DArray arg_0;
-void textureDimensions_9abfe5() {
-  ivec2 res = imageSize(arg_0).xy;
-}
-
-void fragment_main() {
-  textureDimensions_9abfe5();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-layout(rgba32f) uniform highp writeonly image2DArray arg_0;
-void textureDimensions_9abfe5() {
-  ivec2 res = imageSize(arg_0).xy;
-}
-
-void compute_main() {
-  textureDimensions_9abfe5();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9abfe5.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/9abfe5.wgsl.expected.msl
deleted file mode 100644
index cc19962..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/9abfe5.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_9abfe5(texture2d_array<float, access::write> tint_symbol_1) {
-  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
-  textureDimensions_9abfe5(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture2d_array<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture2d_array<float, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_9abfe5(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture2d_array<float, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_9abfe5(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/9abfe5.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/9abfe5.wgsl.expected.spvasm
deleted file mode 100644
index 6a733e8..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/9abfe5.wgsl.expected.spvasm
+++ /dev/null
@@ -1,78 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 39
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_9abfe5 "textureDimensions_9abfe5"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba32f
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %12 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %v2int = OpTypeVector %int 2
-      %v3int = OpTypeVector %int 3
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %24 = OpConstantNull %v2int
-         %25 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_9abfe5 = OpFunction %void None %12
-         %15 = OpLabel
-        %res = OpVariable %_ptr_Function_v2int Function %24
-         %21 = OpLoad %11 %arg_0
-         %19 = OpImageQuerySize %v3int %21
-         %16 = OpVectorShuffle %v2int %19 %19 0 1
-               OpStore %res %16
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %25
-         %27 = OpLabel
-         %28 = OpFunctionCall %void %textureDimensions_9abfe5
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %12
-         %30 = OpLabel
-         %31 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %31
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %12
-         %34 = OpLabel
-         %35 = OpFunctionCall %void %textureDimensions_9abfe5
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %12
-         %37 = OpLabel
-         %38 = OpFunctionCall %void %textureDimensions_9abfe5
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/9abfe5.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/9abfe5.wgsl.expected.wgsl
deleted file mode 100644
index 5845daa..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/9abfe5.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32float, write>;
-
-fn textureDimensions_9abfe5() {
-  var res : vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_9abfe5();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_9abfe5();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_9abfe5();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9b223b.wgsl b/test/tint/builtins/gen/var/textureDimensions/9b223b.wgsl
new file mode 100644
index 0000000..25108ad
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/9b223b.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube<f32>;
+
+// fn textureDimensions(texture: texture_cube<f32>) -> vec2<u32>
+fn textureDimensions_9b223b() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_9b223b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_9b223b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_9b223b();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9b223b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/9b223b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..50846b9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/9b223b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+TextureCube<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_9b223b() {
+  int2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_9b223b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_9b223b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_9b223b();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9b223b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/9b223b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..50846b9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/9b223b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+TextureCube<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_9b223b() {
+  int2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_9b223b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_9b223b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_9b223b();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9b223b.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/9b223b.wgsl.expected.glsl
new file mode 100644
index 0000000..c748051
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/9b223b.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp samplerCube arg_0_1;
+void textureDimensions_9b223b() {
+  uvec2 res = uvec2(textureSize(arg_0_1, 0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_9b223b();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCube arg_0_1;
+void textureDimensions_9b223b() {
+  uvec2 res = uvec2(textureSize(arg_0_1, 0));
+}
+
+void fragment_main() {
+  textureDimensions_9b223b();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp samplerCube arg_0_1;
+void textureDimensions_9b223b() {
+  uvec2 res = uvec2(textureSize(arg_0_1, 0));
+}
+
+void compute_main() {
+  textureDimensions_9b223b();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9b223b.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/9b223b.wgsl.expected.msl
new file mode 100644
index 0000000..ce95387
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/9b223b.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_9b223b(texturecube<float, access::sample> tint_symbol_1) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube<float, access::sample> tint_symbol_2) {
+  textureDimensions_9b223b(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texturecube<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_9b223b(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texturecube<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_9b223b(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/9b223b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/9b223b.wgsl.expected.spvasm
new file mode 100644
index 0000000..b7a28e0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/9b223b.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_9b223b "textureDimensions_9b223b"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float Cube 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+        %int = OpTypeInt 32 1
+      %int_0 = OpConstant %int 0
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %24 = OpConstantNull %v2uint
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_9b223b = OpFunction %void None %12
+         %15 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %24
+         %19 = OpLoad %11 %arg_0
+         %16 = OpImageQuerySizeLod %v2uint %19 %int_0
+               OpStore %res %16
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %textureDimensions_9b223b
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureDimensions_9b223b
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureDimensions_9b223b
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/9b223b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/9b223b.wgsl.expected.wgsl
new file mode 100644
index 0000000..72fbba9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/9b223b.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_cube<f32>;
+
+fn textureDimensions_9b223b() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_9b223b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_9b223b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_9b223b();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9baf27.wgsl b/test/tint/builtins/gen/var/textureDimensions/9baf27.wgsl
new file mode 100644
index 0000000..f172f38
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/9baf27.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube<u32>;
+
+// fn textureDimensions(texture: texture_cube<u32>, level: u32) -> vec2<u32>
+fn textureDimensions_9baf27() {
+  var arg_1 = 1u;
+  var res: vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_9baf27();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_9baf27();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_9baf27();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9baf27.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/9baf27.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..279596e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/9baf27.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+TextureCube<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_9baf27() {
+  uint arg_1 = 1u;
+  int3 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_9baf27();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_9baf27();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_9baf27();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9baf27.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/9baf27.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..279596e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/9baf27.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+TextureCube<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_9baf27() {
+  uint arg_1 = 1u;
+  int3 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_9baf27();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_9baf27();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_9baf27();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9baf27.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/9baf27.wgsl.expected.glsl
new file mode 100644
index 0000000..153994d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/9baf27.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp usamplerCube arg_0_1;
+void textureDimensions_9baf27() {
+  uint arg_1 = 1u;
+  uvec2 res = uvec2(textureSize(arg_0_1, int(arg_1)));
+}
+
+vec4 vertex_main() {
+  textureDimensions_9baf27();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usamplerCube arg_0_1;
+void textureDimensions_9baf27() {
+  uint arg_1 = 1u;
+  uvec2 res = uvec2(textureSize(arg_0_1, int(arg_1)));
+}
+
+void fragment_main() {
+  textureDimensions_9baf27();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp usamplerCube arg_0_1;
+void textureDimensions_9baf27() {
+  uint arg_1 = 1u;
+  uvec2 res = uvec2(textureSize(arg_0_1, int(arg_1)));
+}
+
+void compute_main() {
+  textureDimensions_9baf27();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9baf27.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/9baf27.wgsl.expected.msl
new file mode 100644
index 0000000..4b4fbfe
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/9baf27.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_9baf27(texturecube<uint, access::sample> tint_symbol_1) {
+  uint arg_1 = 1u;
+  uint2 res = uint2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube<uint, access::sample> tint_symbol_2) {
+  textureDimensions_9baf27(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texturecube<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_9baf27(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texturecube<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_9baf27(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/9baf27.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/9baf27.wgsl.expected.spvasm
new file mode 100644
index 0000000..718fea8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/9baf27.wgsl.expected.spvasm
@@ -0,0 +1,82 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 42
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_9baf27 "textureDimensions_9baf27"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint Cube 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %20 = OpConstantNull %uint
+     %v2uint = OpTypeVector %uint 2
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %27 = OpConstantNull %v2uint
+         %28 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_9baf27 = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %20
+        %res = OpVariable %_ptr_Function_v2uint Function %27
+               OpStore %arg_1 %uint_1
+         %23 = OpLoad %11 %arg_0
+         %24 = OpLoad %uint %arg_1
+         %21 = OpImageQuerySizeLod %v2uint %23 %24
+               OpStore %res %21
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %28
+         %30 = OpLabel
+         %31 = OpFunctionCall %void %textureDimensions_9baf27
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %33 = OpLabel
+         %34 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %34
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureDimensions_9baf27
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureDimensions_9baf27
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/9baf27.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/9baf27.wgsl.expected.wgsl
new file mode 100644
index 0000000..f3c81b5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/9baf27.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_cube<u32>;
+
+fn textureDimensions_9baf27() {
+  var arg_1 = 1u;
+  var res : vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_9baf27();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_9baf27();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_9baf27();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9c7a00.wgsl b/test/tint/builtins/gen/var/textureDimensions/9c7a00.wgsl
new file mode 100644
index 0000000..4986938
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/9c7a00.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_1d<u32>;
+
+// fn textureDimensions(texture: texture_1d<u32>, level: u32) -> u32
+fn textureDimensions_9c7a00() {
+  var arg_1 = 1u;
+  var res: u32 = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_9c7a00();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_9c7a00();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_9c7a00();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9c7a00.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/9c7a00.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..6ba0f2b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/9c7a00.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_9c7a00() {
+  uint arg_1 = 1u;
+  int2 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y);
+  uint res = tint_tmp.x;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_9c7a00();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_9c7a00();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_9c7a00();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9c7a00.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/9c7a00.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6ba0f2b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/9c7a00.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_9c7a00() {
+  uint arg_1 = 1u;
+  int2 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y);
+  uint res = tint_tmp.x;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_9c7a00();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_9c7a00();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_9c7a00();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9c7a00.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/9c7a00.wgsl.expected.glsl
new file mode 100644
index 0000000..eb83b7a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/9c7a00.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp usampler1D arg_0_1;
+void textureDimensions_9c7a00() {
+  uint arg_1 = 1u;
+  uint res = uint(textureSize(arg_0_1, int(arg_1)));
+}
+
+vec4 vertex_main() {
+  textureDimensions_9c7a00();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'usampler1D' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp usampler1D arg_0_1;
+void textureDimensions_9c7a00() {
+  uint arg_1 = 1u;
+  uint res = uint(textureSize(arg_0_1, int(arg_1)));
+}
+
+void fragment_main() {
+  textureDimensions_9c7a00();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'usampler1D' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp usampler1D arg_0_1;
+void textureDimensions_9c7a00() {
+  uint arg_1 = 1u;
+  uint res = uint(textureSize(arg_0_1, int(arg_1)));
+}
+
+void compute_main() {
+  textureDimensions_9c7a00();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'usampler1D' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/9c7a00.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/9c7a00.wgsl.expected.msl
new file mode 100644
index 0000000..a066b99
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/9c7a00.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_9c7a00(texture1d<uint, access::sample> tint_symbol_1) {
+  uint arg_1 = 1u;
+  uint res = tint_symbol_1.get_width(0);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<uint, access::sample> tint_symbol_2) {
+  textureDimensions_9c7a00(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_9c7a00(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_9c7a00(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/9c7a00.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/9c7a00.wgsl.expected.spvasm
new file mode 100644
index 0000000..5f27e11
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/9c7a00.wgsl.expected.spvasm
@@ -0,0 +1,80 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; Schema: 0
+               OpCapability Shader
+               OpCapability Sampled1D
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_9c7a00 "textureDimensions_9c7a00"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 1D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %20 = OpConstantNull %uint
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_9c7a00 = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %20
+        %res = OpVariable %_ptr_Function_uint Function %20
+               OpStore %arg_1 %uint_1
+         %22 = OpLoad %11 %arg_0
+         %23 = OpLoad %uint %arg_1
+         %21 = OpImageQuerySizeLod %uint %22 %23
+               OpStore %res %21
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %textureDimensions_9c7a00
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureDimensions_9c7a00
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureDimensions_9c7a00
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/9c7a00.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/9c7a00.wgsl.expected.wgsl
new file mode 100644
index 0000000..ee8497f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/9c7a00.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_1d<u32>;
+
+fn textureDimensions_9c7a00() {
+  var arg_1 = 1u;
+  var res : u32 = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_9c7a00();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_9c7a00();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_9c7a00();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9c9c57.wgsl b/test/tint/builtins/gen/var/textureDimensions/9c9c57.wgsl
deleted file mode 100644
index eab7d9c..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/9c9c57.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_2d_array<i32>;
-
-// fn textureDimensions(texture: texture_2d_array<i32>, level: i32) -> vec2<i32>
-fn textureDimensions_9c9c57() {
-  var arg_1 = 1i;
-  var res: vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_9c9c57();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_9c9c57();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_9c9c57();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9c9c57.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/9c9c57.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 90d1b04..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/9c9c57.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-Texture2DArray<int4> arg_0 : register(t0, space1);
-
-void textureDimensions_9c9c57() {
-  int arg_1 = 1;
-  int4 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_9c9c57();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_9c9c57();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_9c9c57();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9c9c57.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/9c9c57.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 90d1b04..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/9c9c57.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-Texture2DArray<int4> arg_0 : register(t0, space1);
-
-void textureDimensions_9c9c57() {
-  int arg_1 = 1;
-  int4 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_9c9c57();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_9c9c57();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_9c9c57();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9c9c57.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/9c9c57.wgsl.expected.glsl
deleted file mode 100644
index f650421..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/9c9c57.wgsl.expected.glsl
+++ /dev/null
@@ -1,55 +0,0 @@
-#version 310 es
-
-uniform highp isampler2DArray arg_0_1;
-void textureDimensions_9c9c57() {
-  int arg_1 = 1;
-  ivec2 res = textureSize(arg_0_1, arg_1).xy;
-}
-
-vec4 vertex_main() {
-  textureDimensions_9c9c57();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-uniform highp isampler2DArray arg_0_1;
-void textureDimensions_9c9c57() {
-  int arg_1 = 1;
-  ivec2 res = textureSize(arg_0_1, arg_1).xy;
-}
-
-void fragment_main() {
-  textureDimensions_9c9c57();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-uniform highp isampler2DArray arg_0_1;
-void textureDimensions_9c9c57() {
-  int arg_1 = 1;
-  ivec2 res = textureSize(arg_0_1, arg_1).xy;
-}
-
-void compute_main() {
-  textureDimensions_9c9c57();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9c9c57.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/9c9c57.wgsl.expected.msl
deleted file mode 100644
index 2b13342..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/9c9c57.wgsl.expected.msl
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_9c9c57(texture2d_array<int, access::sample> tint_symbol_1) {
-  int arg_1 = 1;
-  int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture2d_array<int, access::sample> tint_symbol_2) {
-  textureDimensions_9c9c57(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture2d_array<int, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture2d_array<int, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_9c9c57(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture2d_array<int, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_9c9c57(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/9c9c57.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/9c9c57.wgsl.expected.spvasm
deleted file mode 100644
index 9cb7670..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/9c9c57.wgsl.expected.spvasm
+++ /dev/null
@@ -1,84 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 44
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_9c9c57 "textureDimensions_9c9c57"
-               OpName %arg_1 "arg_1"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-        %int = OpTypeInt 32 1
-         %11 = OpTypeImage %int 2D 0 1 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-      %int_1 = OpConstant %int 1
-%_ptr_Function_int = OpTypePointer Function %int
-         %20 = OpConstantNull %int
-      %v2int = OpTypeVector %int 2
-      %v3int = OpTypeVector %int 3
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %29 = OpConstantNull %v2int
-         %30 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_9c9c57 = OpFunction %void None %13
-         %16 = OpLabel
-      %arg_1 = OpVariable %_ptr_Function_int Function %20
-        %res = OpVariable %_ptr_Function_v2int Function %29
-               OpStore %arg_1 %int_1
-         %25 = OpLoad %11 %arg_0
-         %26 = OpLoad %int %arg_1
-         %23 = OpImageQuerySizeLod %v3int %25 %26
-         %21 = OpVectorShuffle %v2int %23 %23 0 1
-               OpStore %res %21
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %30
-         %32 = OpLabel
-         %33 = OpFunctionCall %void %textureDimensions_9c9c57
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %35 = OpLabel
-         %36 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %36
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %39 = OpLabel
-         %40 = OpFunctionCall %void %textureDimensions_9c9c57
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %42 = OpLabel
-         %43 = OpFunctionCall %void %textureDimensions_9c9c57
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/9c9c57.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/9c9c57.wgsl.expected.wgsl
deleted file mode 100644
index 0101acd..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/9c9c57.wgsl.expected.wgsl
+++ /dev/null
@@ -1,22 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_2d_array<i32>;
-
-fn textureDimensions_9c9c57() {
-  var arg_1 = 1i;
-  var res : vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_9c9c57();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_9c9c57();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_9c9c57();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9cd4ca.wgsl b/test/tint/builtins/gen/var/textureDimensions/9cd4ca.wgsl
new file mode 100644
index 0000000..505d9a2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/9cd4ca.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube<u32>;
+
+// fn textureDimensions(texture: texture_cube<u32>, level: i32) -> vec2<u32>
+fn textureDimensions_9cd4ca() {
+  var arg_1 = 1i;
+  var res: vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_9cd4ca();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_9cd4ca();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_9cd4ca();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9cd4ca.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/9cd4ca.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..2d25d71
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/9cd4ca.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+TextureCube<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_9cd4ca() {
+  int arg_1 = 1;
+  int3 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_9cd4ca();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_9cd4ca();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_9cd4ca();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9cd4ca.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/9cd4ca.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..2d25d71
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/9cd4ca.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+TextureCube<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_9cd4ca() {
+  int arg_1 = 1;
+  int3 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_9cd4ca();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_9cd4ca();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_9cd4ca();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9cd4ca.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/9cd4ca.wgsl.expected.glsl
new file mode 100644
index 0000000..31c447e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/9cd4ca.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp usamplerCube arg_0_1;
+void textureDimensions_9cd4ca() {
+  int arg_1 = 1;
+  uvec2 res = uvec2(textureSize(arg_0_1, arg_1));
+}
+
+vec4 vertex_main() {
+  textureDimensions_9cd4ca();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usamplerCube arg_0_1;
+void textureDimensions_9cd4ca() {
+  int arg_1 = 1;
+  uvec2 res = uvec2(textureSize(arg_0_1, arg_1));
+}
+
+void fragment_main() {
+  textureDimensions_9cd4ca();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp usamplerCube arg_0_1;
+void textureDimensions_9cd4ca() {
+  int arg_1 = 1;
+  uvec2 res = uvec2(textureSize(arg_0_1, arg_1));
+}
+
+void compute_main() {
+  textureDimensions_9cd4ca();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9cd4ca.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/9cd4ca.wgsl.expected.msl
new file mode 100644
index 0000000..4b7c457
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/9cd4ca.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_9cd4ca(texturecube<uint, access::sample> tint_symbol_1) {
+  int arg_1 = 1;
+  uint2 res = uint2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube<uint, access::sample> tint_symbol_2) {
+  textureDimensions_9cd4ca(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texturecube<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_9cd4ca(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texturecube<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_9cd4ca(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/9cd4ca.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/9cd4ca.wgsl.expected.spvasm
new file mode 100644
index 0000000..77e0964
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/9cd4ca.wgsl.expected.spvasm
@@ -0,0 +1,83 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_9cd4ca "textureDimensions_9cd4ca"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint Cube 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_int = OpTypePointer Function %int
+         %21 = OpConstantNull %int
+     %v2uint = OpTypeVector %uint 2
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %28 = OpConstantNull %v2uint
+         %29 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_9cd4ca = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_int Function %21
+        %res = OpVariable %_ptr_Function_v2uint Function %28
+               OpStore %arg_1 %int_1
+         %24 = OpLoad %11 %arg_0
+         %25 = OpLoad %int %arg_1
+         %22 = OpImageQuerySizeLod %v2uint %24 %25
+               OpStore %res %22
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureDimensions_9cd4ca
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %34 = OpLabel
+         %35 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %35
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureDimensions_9cd4ca
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureDimensions_9cd4ca
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/9cd4ca.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/9cd4ca.wgsl.expected.wgsl
new file mode 100644
index 0000000..9d80b64
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/9cd4ca.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_cube<u32>;
+
+fn textureDimensions_9cd4ca() {
+  var arg_1 = 1i;
+  var res : vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_9cd4ca();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_9cd4ca();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_9cd4ca();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9cd8ad.wgsl b/test/tint/builtins/gen/var/textureDimensions/9cd8ad.wgsl
new file mode 100644
index 0000000..309ffe2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/9cd8ad.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rg32float, write>;
+
+// fn textureDimensions(texture: texture_storage_3d<rg32float, write>) -> vec3<u32>
+fn textureDimensions_9cd8ad() {
+  var res: vec3<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_9cd8ad();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_9cd8ad();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_9cd8ad();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9cd8ad.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/9cd8ad.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..15a1e11
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/9cd8ad.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<float4> arg_0 : register(u0, space1);
+
+void textureDimensions_9cd8ad() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_9cd8ad();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_9cd8ad();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_9cd8ad();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9cd8ad.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/9cd8ad.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..15a1e11
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/9cd8ad.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<float4> arg_0 : register(u0, space1);
+
+void textureDimensions_9cd8ad() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_9cd8ad();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_9cd8ad();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_9cd8ad();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9cd8ad.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/9cd8ad.wgsl.expected.glsl
new file mode 100644
index 0000000..abddd70
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/9cd8ad.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32f) uniform highp writeonly image3D arg_0;
+void textureDimensions_9cd8ad() {
+  uvec3 res = uvec3(imageSize(arg_0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_9cd8ad();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rg32f) uniform highp writeonly image3D arg_0;
+void textureDimensions_9cd8ad() {
+  uvec3 res = uvec3(imageSize(arg_0));
+}
+
+void fragment_main() {
+  textureDimensions_9cd8ad();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32f) uniform highp writeonly image3D arg_0;
+void textureDimensions_9cd8ad() {
+  uvec3 res = uvec3(imageSize(arg_0));
+}
+
+void compute_main() {
+  textureDimensions_9cd8ad();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/9cd8ad.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/9cd8ad.wgsl.expected.msl
new file mode 100644
index 0000000..23fcbf6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/9cd8ad.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_9cd8ad(texture3d<float, access::write> tint_symbol_1) {
+  uint3 res = uint3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::write> tint_symbol_2) {
+  textureDimensions_9cd8ad(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_9cd8ad(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture3d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_9cd8ad(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/9cd8ad.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/9cd8ad.wgsl.expected.spvasm
new file mode 100644
index 0000000..0155eb4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/9cd8ad.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_9cd8ad "textureDimensions_9cd8ad"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 3D 0 0 0 2 Rg32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+         %22 = OpConstantNull %v3uint
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_9cd8ad = OpFunction %void None %12
+         %15 = OpLabel
+        %res = OpVariable %_ptr_Function_v3uint Function %22
+         %19 = OpLoad %11 %arg_0
+         %16 = OpImageQuerySize %v3uint %19
+               OpStore %res %16
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %textureDimensions_9cd8ad
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %28 = OpLabel
+         %29 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %29
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_9cd8ad
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureDimensions_9cd8ad
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/9cd8ad.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/9cd8ad.wgsl.expected.wgsl
new file mode 100644
index 0000000..7ac9caf
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/9cd8ad.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rg32float, write>;
+
+fn textureDimensions_9cd8ad() {
+  var res : vec3<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_9cd8ad();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_9cd8ad();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_9cd8ad();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9da9e2.wgsl b/test/tint/builtins/gen/var/textureDimensions/9da9e2.wgsl
deleted file mode 100644
index bd2527e..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/9da9e2.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_1d<rgba8sint, write>;
-
-// fn textureDimensions(texture: texture_storage_1d<rgba8sint, write>) -> i32
-fn textureDimensions_9da9e2() {
-  var res: i32 = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_9da9e2();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_9da9e2();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_9da9e2();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9da9e2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/9da9e2.wgsl.expected.dxc.hlsl
deleted file mode 100644
index f500491b..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/9da9e2.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture1D<int4> arg_0 : register(u0, space1);
-
-void textureDimensions_9da9e2() {
-  int tint_tmp;
-  arg_0.GetDimensions(tint_tmp);
-  int res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_9da9e2();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_9da9e2();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_9da9e2();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9da9e2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/9da9e2.wgsl.expected.fxc.hlsl
deleted file mode 100644
index f500491b..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/9da9e2.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture1D<int4> arg_0 : register(u0, space1);
-
-void textureDimensions_9da9e2() {
-  int tint_tmp;
-  arg_0.GetDimensions(tint_tmp);
-  int res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_9da9e2();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_9da9e2();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_9da9e2();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9da9e2.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/9da9e2.wgsl.expected.glsl
deleted file mode 100644
index 5773b40..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/9da9e2.wgsl.expected.glsl
+++ /dev/null
@@ -1,78 +0,0 @@
-SKIP: FAILED
-
-#version 310 es
-
-layout(rgba8i) uniform highp writeonly iimage1D arg_0;
-void textureDimensions_9da9e2() {
-  int res = imageSize(arg_0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_9da9e2();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'iimage1D' : Reserved word. 
-WARNING: 0:3: 'layout' : useless application of layout qualifier 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision mediump float;
-
-layout(rgba8i) uniform highp writeonly iimage1D arg_0;
-void textureDimensions_9da9e2() {
-  int res = imageSize(arg_0);
-}
-
-void fragment_main() {
-  textureDimensions_9da9e2();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:4: 'iimage1D' : Reserved word. 
-WARNING: 0:4: 'layout' : useless application of layout qualifier 
-ERROR: 0:4: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-
-layout(rgba8i) uniform highp writeonly iimage1D arg_0;
-void textureDimensions_9da9e2() {
-  int res = imageSize(arg_0);
-}
-
-void compute_main() {
-  textureDimensions_9da9e2();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'iimage1D' : Reserved word. 
-WARNING: 0:3: 'layout' : useless application of layout qualifier 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/9da9e2.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/9da9e2.wgsl.expected.msl
deleted file mode 100644
index ea085fa..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/9da9e2.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_9da9e2(texture1d<int, access::write> tint_symbol_1) {
-  int res = int(tint_symbol_1.get_width(0));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture1d<int, access::write> tint_symbol_2) {
-  textureDimensions_9da9e2(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture1d<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture1d<int, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_9da9e2(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture1d<int, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_9da9e2(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/9da9e2.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/9da9e2.wgsl.expected.spvasm
deleted file mode 100644
index edaecfe..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/9da9e2.wgsl.expected.spvasm
+++ /dev/null
@@ -1,76 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 36
-; Schema: 0
-               OpCapability Shader
-               OpCapability Image1D
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_9da9e2 "textureDimensions_9da9e2"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-        %int = OpTypeInt 32 1
-         %11 = OpTypeImage %int 1D 0 0 0 2 Rgba8i
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-%_ptr_Function_int = OpTypePointer Function %int
-         %21 = OpConstantNull %int
-         %22 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_9da9e2 = OpFunction %void None %13
-         %16 = OpLabel
-        %res = OpVariable %_ptr_Function_int Function %21
-         %18 = OpLoad %11 %arg_0
-         %17 = OpImageQuerySize %int %18
-               OpStore %res %17
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %22
-         %24 = OpLabel
-         %25 = OpFunctionCall %void %textureDimensions_9da9e2
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %27 = OpLabel
-         %28 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %28
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %31 = OpLabel
-         %32 = OpFunctionCall %void %textureDimensions_9da9e2
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %34 = OpLabel
-         %35 = OpFunctionCall %void %textureDimensions_9da9e2
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/9da9e2.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/9da9e2.wgsl.expected.wgsl
deleted file mode 100644
index 73cfaf1..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/9da9e2.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba8sint, write>;
-
-fn textureDimensions_9da9e2() {
-  var res : i32 = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_9da9e2();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_9da9e2();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_9da9e2();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9e0794.wgsl b/test/tint/builtins/gen/var/textureDimensions/9e0794.wgsl
new file mode 100644
index 0000000..5e05bba
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/9e0794.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<u32>;
+
+// fn textureDimensions(texture: texture_2d_array<u32>, level: i32) -> vec2<u32>
+fn textureDimensions_9e0794() {
+  var arg_1 = 1i;
+  var res: vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_9e0794();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_9e0794();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_9e0794();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9e0794.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/9e0794.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..c8a7643
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/9e0794.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_9e0794() {
+  int arg_1 = 1;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_9e0794();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_9e0794();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_9e0794();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9e0794.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/9e0794.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c8a7643
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/9e0794.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_9e0794() {
+  int arg_1 = 1;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_9e0794();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_9e0794();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_9e0794();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9e0794.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/9e0794.wgsl.expected.glsl
new file mode 100644
index 0000000..9c1fbf5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/9e0794.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp usampler2DArray arg_0_1;
+void textureDimensions_9e0794() {
+  int arg_1 = 1;
+  uvec2 res = uvec2(textureSize(arg_0_1, arg_1).xy);
+}
+
+vec4 vertex_main() {
+  textureDimensions_9e0794();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usampler2DArray arg_0_1;
+void textureDimensions_9e0794() {
+  int arg_1 = 1;
+  uvec2 res = uvec2(textureSize(arg_0_1, arg_1).xy);
+}
+
+void fragment_main() {
+  textureDimensions_9e0794();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp usampler2DArray arg_0_1;
+void textureDimensions_9e0794() {
+  int arg_1 = 1;
+  uvec2 res = uvec2(textureSize(arg_0_1, arg_1).xy);
+}
+
+void compute_main() {
+  textureDimensions_9e0794();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9e0794.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/9e0794.wgsl.expected.msl
new file mode 100644
index 0000000..eb3ef43
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/9e0794.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_9e0794(texture2d_array<uint, access::sample> tint_symbol_1) {
+  int arg_1 = 1;
+  uint2 res = uint2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<uint, access::sample> tint_symbol_2) {
+  textureDimensions_9e0794(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_9e0794(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_9e0794(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/9e0794.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/9e0794.wgsl.expected.spvasm
new file mode 100644
index 0000000..2d2189a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/9e0794.wgsl.expected.spvasm
@@ -0,0 +1,85 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_9e0794 "textureDimensions_9e0794"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_int = OpTypePointer Function %int
+         %21 = OpConstantNull %int
+     %v2uint = OpTypeVector %uint 2
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %30 = OpConstantNull %v2uint
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_9e0794 = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_int Function %21
+        %res = OpVariable %_ptr_Function_v2uint Function %30
+               OpStore %arg_1 %int_1
+         %26 = OpLoad %11 %arg_0
+         %27 = OpLoad %int %arg_1
+         %24 = OpImageQuerySizeLod %v3uint %26 %27
+         %22 = OpVectorShuffle %v2uint %24 %24 0 1
+               OpStore %res %22
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureDimensions_9e0794
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureDimensions_9e0794
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureDimensions_9e0794
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/9e0794.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/9e0794.wgsl.expected.wgsl
new file mode 100644
index 0000000..71827db
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/9e0794.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<u32>;
+
+fn textureDimensions_9e0794() {
+  var arg_1 = 1i;
+  var res : vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_9e0794();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_9e0794();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_9e0794();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9eb8d8.wgsl b/test/tint/builtins/gen/var/textureDimensions/9eb8d8.wgsl
deleted file mode 100644
index c1f41d3..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/9eb8d8.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d<r32uint, write>;
-
-// fn textureDimensions(texture: texture_storage_2d<r32uint, write>) -> vec2<i32>
-fn textureDimensions_9eb8d8() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_9eb8d8();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_9eb8d8();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_9eb8d8();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9eb8d8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/9eb8d8.wgsl.expected.dxc.hlsl
deleted file mode 100644
index cf18843..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/9eb8d8.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2D<uint4> arg_0 : register(u0, space1);
-
-void textureDimensions_9eb8d8() {
-  int2 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
-  int2 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_9eb8d8();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_9eb8d8();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_9eb8d8();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9eb8d8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/9eb8d8.wgsl.expected.fxc.hlsl
deleted file mode 100644
index cf18843..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/9eb8d8.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2D<uint4> arg_0 : register(u0, space1);
-
-void textureDimensions_9eb8d8() {
-  int2 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
-  int2 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_9eb8d8();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_9eb8d8();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_9eb8d8();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9eb8d8.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/9eb8d8.wgsl.expected.glsl
deleted file mode 100644
index 6185ef1..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/9eb8d8.wgsl.expected.glsl
+++ /dev/null
@@ -1,52 +0,0 @@
-#version 310 es
-
-layout(r32ui) uniform highp writeonly uimage2D arg_0;
-void textureDimensions_9eb8d8() {
-  ivec2 res = imageSize(arg_0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_9eb8d8();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-layout(r32ui) uniform highp writeonly uimage2D arg_0;
-void textureDimensions_9eb8d8() {
-  ivec2 res = imageSize(arg_0);
-}
-
-void fragment_main() {
-  textureDimensions_9eb8d8();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-layout(r32ui) uniform highp writeonly uimage2D arg_0;
-void textureDimensions_9eb8d8() {
-  ivec2 res = imageSize(arg_0);
-}
-
-void compute_main() {
-  textureDimensions_9eb8d8();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9eb8d8.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/9eb8d8.wgsl.expected.msl
deleted file mode 100644
index 140c2af..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/9eb8d8.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_9eb8d8(texture2d<uint, access::write> tint_symbol_1) {
-  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture2d<uint, access::write> tint_symbol_2) {
-  textureDimensions_9eb8d8(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture2d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture2d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_9eb8d8(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture2d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_9eb8d8(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/9eb8d8.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/9eb8d8.wgsl.expected.spvasm
deleted file mode 100644
index b450c7b..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/9eb8d8.wgsl.expected.spvasm
+++ /dev/null
@@ -1,77 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 38
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_9eb8d8 "textureDimensions_9eb8d8"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-       %uint = OpTypeInt 32 0
-         %11 = OpTypeImage %uint 2D 0 0 0 2 R32ui
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %v2int = OpTypeVector %int 2
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %23 = OpConstantNull %v2int
-         %24 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_9eb8d8 = OpFunction %void None %13
-         %16 = OpLabel
-        %res = OpVariable %_ptr_Function_v2int Function %23
-         %20 = OpLoad %11 %arg_0
-         %17 = OpImageQuerySize %v2int %20
-               OpStore %res %17
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %24
-         %26 = OpLabel
-         %27 = OpFunctionCall %void %textureDimensions_9eb8d8
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %29 = OpLabel
-         %30 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %30
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %33 = OpLabel
-         %34 = OpFunctionCall %void %textureDimensions_9eb8d8
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %36 = OpLabel
-         %37 = OpFunctionCall %void %textureDimensions_9eb8d8
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/9eb8d8.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/9eb8d8.wgsl.expected.wgsl
deleted file mode 100644
index fc40eab..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/9eb8d8.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_2d<r32uint, write>;
-
-fn textureDimensions_9eb8d8() {
-  var res : vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_9eb8d8();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_9eb8d8();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_9eb8d8();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9f8e46.wgsl b/test/tint/builtins/gen/var/textureDimensions/9f8e46.wgsl
deleted file mode 100644
index 2234617..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/9f8e46.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_2d<f32>;
-
-// fn textureDimensions(texture: texture_2d<f32>) -> vec2<i32>
-fn textureDimensions_9f8e46() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_9f8e46();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_9f8e46();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_9f8e46();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9f8e46.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/9f8e46.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 384fdc3..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/9f8e46.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-Texture2D<float4> arg_0 : register(t0, space1);
-
-void textureDimensions_9f8e46() {
-  int2 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
-  int2 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_9f8e46();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_9f8e46();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_9f8e46();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9f8e46.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/9f8e46.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 384fdc3..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/9f8e46.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-Texture2D<float4> arg_0 : register(t0, space1);
-
-void textureDimensions_9f8e46() {
-  int2 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
-  int2 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_9f8e46();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_9f8e46();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_9f8e46();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9f8e46.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/9f8e46.wgsl.expected.glsl
deleted file mode 100644
index a292ec4..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/9f8e46.wgsl.expected.glsl
+++ /dev/null
@@ -1,52 +0,0 @@
-#version 310 es
-
-uniform highp sampler2D arg_0_1;
-void textureDimensions_9f8e46() {
-  ivec2 res = textureSize(arg_0_1, 0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_9f8e46();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-uniform highp sampler2D arg_0_1;
-void textureDimensions_9f8e46() {
-  ivec2 res = textureSize(arg_0_1, 0);
-}
-
-void fragment_main() {
-  textureDimensions_9f8e46();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-uniform highp sampler2D arg_0_1;
-void textureDimensions_9f8e46() {
-  ivec2 res = textureSize(arg_0_1, 0);
-}
-
-void compute_main() {
-  textureDimensions_9f8e46();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9f8e46.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/9f8e46.wgsl.expected.msl
deleted file mode 100644
index b7097a2..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/9f8e46.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_9f8e46(texture2d<float, access::sample> tint_symbol_1) {
-  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture2d<float, access::sample> tint_symbol_2) {
-  textureDimensions_9f8e46(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture2d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture2d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_9f8e46(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture2d<float, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_9f8e46(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/9f8e46.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/9f8e46.wgsl.expected.spvasm
deleted file mode 100644
index 9fabd6e..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/9f8e46.wgsl.expected.spvasm
+++ /dev/null
@@ -1,76 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 38
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_9f8e46 "textureDimensions_9f8e46"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-         %11 = OpTypeImage %float 2D 0 0 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %12 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %v2int = OpTypeVector %int 2
-      %int_0 = OpConstant %int 0
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %23 = OpConstantNull %v2int
-         %24 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_9f8e46 = OpFunction %void None %12
-         %15 = OpLabel
-        %res = OpVariable %_ptr_Function_v2int Function %23
-         %19 = OpLoad %11 %arg_0
-         %16 = OpImageQuerySizeLod %v2int %19 %int_0
-               OpStore %res %16
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %24
-         %26 = OpLabel
-         %27 = OpFunctionCall %void %textureDimensions_9f8e46
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %12
-         %29 = OpLabel
-         %30 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %30
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %12
-         %33 = OpLabel
-         %34 = OpFunctionCall %void %textureDimensions_9f8e46
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %12
-         %36 = OpLabel
-         %37 = OpFunctionCall %void %textureDimensions_9f8e46
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/9f8e46.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/9f8e46.wgsl.expected.wgsl
deleted file mode 100644
index 3d3ef83..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/9f8e46.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_2d<f32>;
-
-fn textureDimensions_9f8e46() {
-  var res : vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_9f8e46();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_9f8e46();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_9f8e46();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9fcc3b.wgsl b/test/tint/builtins/gen/var/textureDimensions/9fcc3b.wgsl
new file mode 100644
index 0000000..9f69ac6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/9fcc3b.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_cube_array;
+
+// fn textureDimensions(texture: texture_depth_cube_array) -> vec2<u32>
+fn textureDimensions_9fcc3b() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_9fcc3b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_9fcc3b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_9fcc3b();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9fcc3b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/9fcc3b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5252d8b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/9fcc3b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+TextureCubeArray arg_0 : register(t0, space1);
+
+void textureDimensions_9fcc3b() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_9fcc3b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_9fcc3b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_9fcc3b();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9fcc3b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/9fcc3b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5252d8b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/9fcc3b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+TextureCubeArray arg_0 : register(t0, space1);
+
+void textureDimensions_9fcc3b() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_9fcc3b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_9fcc3b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_9fcc3b();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/9fcc3b.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/9fcc3b.wgsl.expected.glsl
new file mode 100644
index 0000000..ff61b88
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/9fcc3b.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp samplerCubeArray arg_0_1;
+void textureDimensions_9fcc3b() {
+  uvec2 res = uvec2(textureSize(arg_0_1, 0).xy);
+}
+
+vec4 vertex_main() {
+  textureDimensions_9fcc3b();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeArray arg_0_1;
+void textureDimensions_9fcc3b() {
+  uvec2 res = uvec2(textureSize(arg_0_1, 0).xy);
+}
+
+void fragment_main() {
+  textureDimensions_9fcc3b();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'samplerCubeArray' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp samplerCubeArray arg_0_1;
+void textureDimensions_9fcc3b() {
+  uvec2 res = uvec2(textureSize(arg_0_1, 0).xy);
+}
+
+void compute_main() {
+  textureDimensions_9fcc3b();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/9fcc3b.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/9fcc3b.wgsl.expected.msl
new file mode 100644
index 0000000..ddabf3b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/9fcc3b.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_9fcc3b(depthcube_array<float, access::sample> tint_symbol_1) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(depthcube_array<float, access::sample> tint_symbol_2) {
+  textureDimensions_9fcc3b(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depthcube_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depthcube_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_9fcc3b(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(depthcube_array<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_9fcc3b(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/9fcc3b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/9fcc3b.wgsl.expected.spvasm
new file mode 100644
index 0000000..a57305e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/9fcc3b.wgsl.expected.spvasm
@@ -0,0 +1,80 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; Schema: 0
+               OpCapability Shader
+               OpCapability SampledCubeArray
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_9fcc3b "textureDimensions_9fcc3b"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %v3uint = OpTypeVector %uint 3
+        %int = OpTypeInt 32 1
+      %int_0 = OpConstant %int 0
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %26 = OpConstantNull %v2uint
+         %27 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_9fcc3b = OpFunction %void None %12
+         %15 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %26
+         %21 = OpLoad %11 %arg_0
+         %19 = OpImageQuerySizeLod %v3uint %21 %int_0
+         %16 = OpVectorShuffle %v2uint %19 %19 0 1
+               OpStore %res %16
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureDimensions_9fcc3b
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %32 = OpLabel
+         %33 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %33
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureDimensions_9fcc3b
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureDimensions_9fcc3b
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/9fcc3b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/9fcc3b.wgsl.expected.wgsl
new file mode 100644
index 0000000..14dbcf2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/9fcc3b.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_depth_cube_array;
+
+fn textureDimensions_9fcc3b() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_9fcc3b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_9fcc3b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_9fcc3b();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/a01845.wgsl b/test/tint/builtins/gen/var/textureDimensions/a01845.wgsl
deleted file mode 100644
index 4662698..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/a01845.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_depth_cube_array;
-
-// fn textureDimensions(texture: texture_depth_cube_array, level: i32) -> vec2<i32>
-fn textureDimensions_a01845() {
-  var arg_1 = 1i;
-  var res: vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_a01845();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_a01845();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_a01845();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/a01845.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/a01845.wgsl.expected.dxc.hlsl
deleted file mode 100644
index d443dbe..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/a01845.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-TextureCubeArray arg_0 : register(t0, space1);
-
-void textureDimensions_a01845() {
-  int arg_1 = 1;
-  int4 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_a01845();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_a01845();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_a01845();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/a01845.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/a01845.wgsl.expected.fxc.hlsl
deleted file mode 100644
index d443dbe..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/a01845.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-TextureCubeArray arg_0 : register(t0, space1);
-
-void textureDimensions_a01845() {
-  int arg_1 = 1;
-  int4 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_a01845();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_a01845();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_a01845();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/a01845.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/a01845.wgsl.expected.glsl
deleted file mode 100644
index 283779e..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/a01845.wgsl.expected.glsl
+++ /dev/null
@@ -1,78 +0,0 @@
-SKIP: FAILED
-
-#version 310 es
-
-uniform highp samplerCubeArray arg_0_1;
-void textureDimensions_a01845() {
-  int arg_1 = 0;
-  ivec2 res = textureSize(arg_0_1, arg_1).xy;
-}
-
-vec4 vertex_main() {
-  textureDimensions_a01845();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'samplerCubeArray' : Reserved word. 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision mediump float;
-
-uniform highp samplerCubeArray arg_0_1;
-void textureDimensions_a01845() {
-  int arg_1 = 0;
-  ivec2 res = textureSize(arg_0_1, arg_1).xy;
-}
-
-void fragment_main() {
-  textureDimensions_a01845();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:4: 'samplerCubeArray' : Reserved word. 
-ERROR: 0:4: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-
-uniform highp samplerCubeArray arg_0_1;
-void textureDimensions_a01845() {
-  int arg_1 = 0;
-  ivec2 res = textureSize(arg_0_1, arg_1).xy;
-}
-
-void compute_main() {
-  textureDimensions_a01845();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'samplerCubeArray' : Reserved word. 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/a01845.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/a01845.wgsl.expected.msl
deleted file mode 100644
index 3560c47..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/a01845.wgsl.expected.msl
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_a01845(depthcube_array<float, access::sample> tint_symbol_1) {
-  int arg_1 = 1;
-  int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(depthcube_array<float, access::sample> tint_symbol_2) {
-  textureDimensions_a01845(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(depthcube_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(depthcube_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_a01845(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(depthcube_array<float, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_a01845(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/a01845.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/a01845.wgsl.expected.spvasm
deleted file mode 100644
index 5fbb8a8..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/a01845.wgsl.expected.spvasm
+++ /dev/null
@@ -1,85 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 44
-; Schema: 0
-               OpCapability Shader
-               OpCapability SampledCubeArray
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_a01845 "textureDimensions_a01845"
-               OpName %arg_1 "arg_1"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-         %11 = OpTypeImage %float Cube 0 1 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %12 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %int_1 = OpConstant %int 1
-%_ptr_Function_int = OpTypePointer Function %int
-         %20 = OpConstantNull %int
-      %v2int = OpTypeVector %int 2
-      %v3int = OpTypeVector %int 3
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %29 = OpConstantNull %v2int
-         %30 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_a01845 = OpFunction %void None %12
-         %15 = OpLabel
-      %arg_1 = OpVariable %_ptr_Function_int Function %20
-        %res = OpVariable %_ptr_Function_v2int Function %29
-               OpStore %arg_1 %int_1
-         %25 = OpLoad %11 %arg_0
-         %26 = OpLoad %int %arg_1
-         %23 = OpImageQuerySizeLod %v3int %25 %26
-         %21 = OpVectorShuffle %v2int %23 %23 0 1
-               OpStore %res %21
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %30
-         %32 = OpLabel
-         %33 = OpFunctionCall %void %textureDimensions_a01845
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %12
-         %35 = OpLabel
-         %36 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %36
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %12
-         %39 = OpLabel
-         %40 = OpFunctionCall %void %textureDimensions_a01845
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %12
-         %42 = OpLabel
-         %43 = OpFunctionCall %void %textureDimensions_a01845
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/a01845.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/a01845.wgsl.expected.wgsl
deleted file mode 100644
index 951440b..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/a01845.wgsl.expected.wgsl
+++ /dev/null
@@ -1,22 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_depth_cube_array;
-
-fn textureDimensions_a01845() {
-  var arg_1 = 1i;
-  var res : vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_a01845();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_a01845();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_a01845();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/a1598a.wgsl b/test/tint/builtins/gen/var/textureDimensions/a1598a.wgsl
new file mode 100644
index 0000000..76171f5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/a1598a.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube_array<u32>;
+
+// fn textureDimensions(texture: texture_cube_array<u32>) -> vec2<u32>
+fn textureDimensions_a1598a() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_a1598a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_a1598a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_a1598a();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/a1598a.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/a1598a.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..ed94e77
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/a1598a.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+TextureCubeArray<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_a1598a() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_a1598a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_a1598a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_a1598a();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/a1598a.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/a1598a.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..ed94e77
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/a1598a.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+TextureCubeArray<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_a1598a() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_a1598a();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_a1598a();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_a1598a();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/a1598a.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/a1598a.wgsl.expected.glsl
new file mode 100644
index 0000000..010039d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/a1598a.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp usamplerCubeArray arg_0_1;
+void textureDimensions_a1598a() {
+  uvec2 res = uvec2(textureSize(arg_0_1, 0).xy);
+}
+
+vec4 vertex_main() {
+  textureDimensions_a1598a();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'usamplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp usamplerCubeArray arg_0_1;
+void textureDimensions_a1598a() {
+  uvec2 res = uvec2(textureSize(arg_0_1, 0).xy);
+}
+
+void fragment_main() {
+  textureDimensions_a1598a();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'usamplerCubeArray' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp usamplerCubeArray arg_0_1;
+void textureDimensions_a1598a() {
+  uvec2 res = uvec2(textureSize(arg_0_1, 0).xy);
+}
+
+void compute_main() {
+  textureDimensions_a1598a();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'usamplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/a1598a.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/a1598a.wgsl.expected.msl
new file mode 100644
index 0000000..f8e8256
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/a1598a.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_a1598a(texturecube_array<uint, access::sample> tint_symbol_1) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube_array<uint, access::sample> tint_symbol_2) {
+  textureDimensions_a1598a(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube_array<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texturecube_array<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_a1598a(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texturecube_array<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_a1598a(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/a1598a.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/a1598a.wgsl.expected.spvasm
new file mode 100644
index 0000000..a28204c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/a1598a.wgsl.expected.spvasm
@@ -0,0 +1,80 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; Schema: 0
+               OpCapability Shader
+               OpCapability SampledCubeArray
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_a1598a "textureDimensions_a1598a"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %v2uint = OpTypeVector %uint 2
+     %v3uint = OpTypeVector %uint 3
+        %int = OpTypeInt 32 1
+      %int_0 = OpConstant %int 0
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %26 = OpConstantNull %v2uint
+         %27 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_a1598a = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %26
+         %21 = OpLoad %11 %arg_0
+         %19 = OpImageQuerySizeLod %v3uint %21 %int_0
+         %17 = OpVectorShuffle %v2uint %19 %19 0 1
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureDimensions_a1598a
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %32 = OpLabel
+         %33 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %33
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureDimensions_a1598a
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureDimensions_a1598a
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/a1598a.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/a1598a.wgsl.expected.wgsl
new file mode 100644
index 0000000..f6f7047
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/a1598a.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_cube_array<u32>;
+
+fn textureDimensions_a1598a() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_a1598a();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_a1598a();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_a1598a();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/a2ba5e.wgsl b/test/tint/builtins/gen/var/textureDimensions/a2ba5e.wgsl
new file mode 100644
index 0000000..a3e7f10
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/a2ba5e.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube<i32>;
+
+// fn textureDimensions(texture: texture_cube<i32>, level: i32) -> vec2<u32>
+fn textureDimensions_a2ba5e() {
+  var arg_1 = 1i;
+  var res: vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_a2ba5e();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_a2ba5e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_a2ba5e();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/a2ba5e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/a2ba5e.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5597e84
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/a2ba5e.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+TextureCube<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_a2ba5e() {
+  int arg_1 = 1;
+  int3 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_a2ba5e();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_a2ba5e();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_a2ba5e();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/a2ba5e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/a2ba5e.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5597e84
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/a2ba5e.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+TextureCube<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_a2ba5e() {
+  int arg_1 = 1;
+  int3 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_a2ba5e();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_a2ba5e();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_a2ba5e();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/a2ba5e.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/a2ba5e.wgsl.expected.glsl
new file mode 100644
index 0000000..728ca98
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/a2ba5e.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp isamplerCube arg_0_1;
+void textureDimensions_a2ba5e() {
+  int arg_1 = 1;
+  uvec2 res = uvec2(textureSize(arg_0_1, arg_1));
+}
+
+vec4 vertex_main() {
+  textureDimensions_a2ba5e();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isamplerCube arg_0_1;
+void textureDimensions_a2ba5e() {
+  int arg_1 = 1;
+  uvec2 res = uvec2(textureSize(arg_0_1, arg_1));
+}
+
+void fragment_main() {
+  textureDimensions_a2ba5e();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp isamplerCube arg_0_1;
+void textureDimensions_a2ba5e() {
+  int arg_1 = 1;
+  uvec2 res = uvec2(textureSize(arg_0_1, arg_1));
+}
+
+void compute_main() {
+  textureDimensions_a2ba5e();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/a2ba5e.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/a2ba5e.wgsl.expected.msl
new file mode 100644
index 0000000..8a4ba3c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/a2ba5e.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_a2ba5e(texturecube<int, access::sample> tint_symbol_1) {
+  int arg_1 = 1;
+  uint2 res = uint2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube<int, access::sample> tint_symbol_2) {
+  textureDimensions_a2ba5e(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube<int, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texturecube<int, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_a2ba5e(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texturecube<int, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_a2ba5e(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/a2ba5e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/a2ba5e.wgsl.expected.spvasm
new file mode 100644
index 0000000..5d4ec7c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/a2ba5e.wgsl.expected.spvasm
@@ -0,0 +1,83 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_a2ba5e "textureDimensions_a2ba5e"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int Cube 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+      %int_1 = OpConstant %int 1
+%_ptr_Function_int = OpTypePointer Function %int
+         %20 = OpConstantNull %int
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %28 = OpConstantNull %v2uint
+         %29 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_a2ba5e = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_int Function %20
+        %res = OpVariable %_ptr_Function_v2uint Function %28
+               OpStore %arg_1 %int_1
+         %24 = OpLoad %11 %arg_0
+         %25 = OpLoad %int %arg_1
+         %21 = OpImageQuerySizeLod %v2uint %24 %25
+               OpStore %res %21
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureDimensions_a2ba5e
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %34 = OpLabel
+         %35 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %35
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureDimensions_a2ba5e
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureDimensions_a2ba5e
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/a2ba5e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/a2ba5e.wgsl.expected.wgsl
new file mode 100644
index 0000000..bd6c4ec
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/a2ba5e.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_cube<i32>;
+
+fn textureDimensions_a2ba5e() {
+  var arg_1 = 1i;
+  var res : vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_a2ba5e();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_a2ba5e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_a2ba5e();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/a48049.wgsl b/test/tint/builtins/gen/var/textureDimensions/a48049.wgsl
new file mode 100644
index 0000000..0fba30d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/a48049.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d<i32>;
+
+// fn textureDimensions(texture: texture_2d<i32>, level: u32) -> vec2<u32>
+fn textureDimensions_a48049() {
+  var arg_1 = 1u;
+  var res: vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_a48049();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_a48049();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_a48049();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/a48049.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/a48049.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5f5cc2b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/a48049.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_a48049() {
+  uint arg_1 = 1u;
+  int3 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_a48049();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_a48049();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_a48049();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/a48049.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/a48049.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5f5cc2b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/a48049.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_a48049() {
+  uint arg_1 = 1u;
+  int3 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_a48049();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_a48049();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_a48049();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/a48049.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/a48049.wgsl.expected.glsl
new file mode 100644
index 0000000..5c885a3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/a48049.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp isampler2D arg_0_1;
+void textureDimensions_a48049() {
+  uint arg_1 = 1u;
+  uvec2 res = uvec2(textureSize(arg_0_1, int(arg_1)));
+}
+
+vec4 vertex_main() {
+  textureDimensions_a48049();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isampler2D arg_0_1;
+void textureDimensions_a48049() {
+  uint arg_1 = 1u;
+  uvec2 res = uvec2(textureSize(arg_0_1, int(arg_1)));
+}
+
+void fragment_main() {
+  textureDimensions_a48049();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp isampler2D arg_0_1;
+void textureDimensions_a48049() {
+  uint arg_1 = 1u;
+  uvec2 res = uvec2(textureSize(arg_0_1, int(arg_1)));
+}
+
+void compute_main() {
+  textureDimensions_a48049();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/a48049.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/a48049.wgsl.expected.msl
new file mode 100644
index 0000000..ee430c6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/a48049.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_a48049(texture2d<int, access::sample> tint_symbol_1) {
+  uint arg_1 = 1u;
+  uint2 res = uint2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::sample> tint_symbol_2) {
+  textureDimensions_a48049(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<int, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_a48049(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<int, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_a48049(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/a48049.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/a48049.wgsl.expected.spvasm
new file mode 100644
index 0000000..7fc4948
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/a48049.wgsl.expected.spvasm
@@ -0,0 +1,83 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_a48049 "textureDimensions_a48049"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %21 = OpConstantNull %uint
+     %v2uint = OpTypeVector %uint 2
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %28 = OpConstantNull %v2uint
+         %29 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_a48049 = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %21
+        %res = OpVariable %_ptr_Function_v2uint Function %28
+               OpStore %arg_1 %uint_1
+         %24 = OpLoad %11 %arg_0
+         %25 = OpLoad %uint %arg_1
+         %22 = OpImageQuerySizeLod %v2uint %24 %25
+               OpStore %res %22
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureDimensions_a48049
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %34 = OpLabel
+         %35 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %35
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureDimensions_a48049
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureDimensions_a48049
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/a48049.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/a48049.wgsl.expected.wgsl
new file mode 100644
index 0000000..2600680
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/a48049.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_2d<i32>;
+
+fn textureDimensions_a48049() {
+  var arg_1 = 1u;
+  var res : vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_a48049();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_a48049();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_a48049();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/a4cd56.wgsl b/test/tint/builtins/gen/var/textureDimensions/a4cd56.wgsl
new file mode 100644
index 0000000..5628cd5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/a4cd56.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d_array;
+
+// fn textureDimensions(texture: texture_depth_2d_array) -> vec2<u32>
+fn textureDimensions_a4cd56() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_a4cd56();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_a4cd56();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_a4cd56();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/a4cd56.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/a4cd56.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f8f2b16
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/a4cd56.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray arg_0 : register(t0, space1);
+
+void textureDimensions_a4cd56() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_a4cd56();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_a4cd56();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_a4cd56();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/a4cd56.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/a4cd56.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..f8f2b16
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/a4cd56.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DArray arg_0 : register(t0, space1);
+
+void textureDimensions_a4cd56() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_a4cd56();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_a4cd56();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_a4cd56();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/a4cd56.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/a4cd56.wgsl.expected.glsl
new file mode 100644
index 0000000..759cda6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/a4cd56.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp sampler2DArray arg_0_1;
+void textureDimensions_a4cd56() {
+  uvec2 res = uvec2(textureSize(arg_0_1, 0).xy);
+}
+
+vec4 vertex_main() {
+  textureDimensions_a4cd56();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_0_1;
+void textureDimensions_a4cd56() {
+  uvec2 res = uvec2(textureSize(arg_0_1, 0).xy);
+}
+
+void fragment_main() {
+  textureDimensions_a4cd56();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2DArray arg_0_1;
+void textureDimensions_a4cd56() {
+  uvec2 res = uvec2(textureSize(arg_0_1, 0).xy);
+}
+
+void compute_main() {
+  textureDimensions_a4cd56();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/a4cd56.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/a4cd56.wgsl.expected.msl
new file mode 100644
index 0000000..9022f6d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/a4cd56.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_a4cd56(depth2d_array<float, access::sample> tint_symbol_1) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d_array<float, access::sample> tint_symbol_2) {
+  textureDimensions_a4cd56(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_a4cd56(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(depth2d_array<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_a4cd56(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/a4cd56.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/a4cd56.wgsl.expected.spvasm
new file mode 100644
index 0000000..d7caf97
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/a4cd56.wgsl.expected.spvasm
@@ -0,0 +1,79 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 41
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_a4cd56 "textureDimensions_a4cd56"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %v3uint = OpTypeVector %uint 3
+        %int = OpTypeInt 32 1
+      %int_0 = OpConstant %int 0
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %26 = OpConstantNull %v2uint
+         %27 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_a4cd56 = OpFunction %void None %12
+         %15 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %26
+         %21 = OpLoad %11 %arg_0
+         %19 = OpImageQuerySizeLod %v3uint %21 %int_0
+         %16 = OpVectorShuffle %v2uint %19 %19 0 1
+               OpStore %res %16
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %27
+         %29 = OpLabel
+         %30 = OpFunctionCall %void %textureDimensions_a4cd56
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %32 = OpLabel
+         %33 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %33
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureDimensions_a4cd56
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureDimensions_a4cd56
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/a4cd56.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/a4cd56.wgsl.expected.wgsl
new file mode 100644
index 0000000..50f2c77
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/a4cd56.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
+
+fn textureDimensions_a4cd56() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_a4cd56();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_a4cd56();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_a4cd56();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/a7d565.wgsl b/test/tint/builtins/gen/var/textureDimensions/a7d565.wgsl
deleted file mode 100644
index c2d1409..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/a7d565.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_1d<u32>;
-
-// fn textureDimensions(texture: texture_1d<u32>) -> i32
-fn textureDimensions_a7d565() {
-  var res: i32 = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_a7d565();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_a7d565();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_a7d565();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/a7d565.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/a7d565.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 949e8b1..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/a7d565.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-Texture1D<uint4> arg_0 : register(t0, space1);
-
-void textureDimensions_a7d565() {
-  int tint_tmp;
-  arg_0.GetDimensions(tint_tmp);
-  int res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_a7d565();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_a7d565();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_a7d565();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/a7d565.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/a7d565.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 949e8b1..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/a7d565.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-Texture1D<uint4> arg_0 : register(t0, space1);
-
-void textureDimensions_a7d565() {
-  int tint_tmp;
-  arg_0.GetDimensions(tint_tmp);
-  int res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_a7d565();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_a7d565();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_a7d565();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/a7d565.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/a7d565.wgsl.expected.glsl
deleted file mode 100644
index 24152c7..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/a7d565.wgsl.expected.glsl
+++ /dev/null
@@ -1,75 +0,0 @@
-SKIP: FAILED
-
-#version 310 es
-
-uniform highp usampler1D arg_0_1;
-void textureDimensions_a7d565() {
-  int res = textureSize(arg_0_1, 0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_a7d565();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'usampler1D' : Reserved word. 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision mediump float;
-
-uniform highp usampler1D arg_0_1;
-void textureDimensions_a7d565() {
-  int res = textureSize(arg_0_1, 0);
-}
-
-void fragment_main() {
-  textureDimensions_a7d565();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:4: 'usampler1D' : Reserved word. 
-ERROR: 0:4: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-
-uniform highp usampler1D arg_0_1;
-void textureDimensions_a7d565() {
-  int res = textureSize(arg_0_1, 0);
-}
-
-void compute_main() {
-  textureDimensions_a7d565();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'usampler1D' : Reserved word. 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/a7d565.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/a7d565.wgsl.expected.msl
deleted file mode 100644
index aef8670..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/a7d565.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_a7d565(texture1d<uint, access::sample> tint_symbol_1) {
-  int res = int(tint_symbol_1.get_width(0));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture1d<uint, access::sample> tint_symbol_2) {
-  textureDimensions_a7d565(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture1d<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture1d<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_a7d565(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture1d<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_a7d565(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/a7d565.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/a7d565.wgsl.expected.spvasm
deleted file mode 100644
index 1694f88..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/a7d565.wgsl.expected.spvasm
+++ /dev/null
@@ -1,77 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 38
-; Schema: 0
-               OpCapability Shader
-               OpCapability Sampled1D
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_a7d565 "textureDimensions_a7d565"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-       %uint = OpTypeInt 32 0
-         %11 = OpTypeImage %uint 1D 0 0 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %int_0 = OpConstant %int 0
-%_ptr_Function_int = OpTypePointer Function %int
-         %23 = OpConstantNull %int
-         %24 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_a7d565 = OpFunction %void None %13
-         %16 = OpLabel
-        %res = OpVariable %_ptr_Function_int Function %23
-         %19 = OpLoad %11 %arg_0
-         %17 = OpImageQuerySizeLod %int %19 %int_0
-               OpStore %res %17
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %24
-         %26 = OpLabel
-         %27 = OpFunctionCall %void %textureDimensions_a7d565
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %29 = OpLabel
-         %30 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %30
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %33 = OpLabel
-         %34 = OpFunctionCall %void %textureDimensions_a7d565
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %36 = OpLabel
-         %37 = OpFunctionCall %void %textureDimensions_a7d565
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/a7d565.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/a7d565.wgsl.expected.wgsl
deleted file mode 100644
index 76183ec..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/a7d565.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_1d<u32>;
-
-fn textureDimensions_a7d565() {
-  var res : i32 = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_a7d565();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_a7d565();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_a7d565();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/a863f2.wgsl b/test/tint/builtins/gen/var/textureDimensions/a863f2.wgsl
deleted file mode 100644
index 4dbf2ed..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/a863f2.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_1d<r32float, write>;
-
-// fn textureDimensions(texture: texture_storage_1d<r32float, write>) -> i32
-fn textureDimensions_a863f2() {
-  var res: i32 = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_a863f2();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_a863f2();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_a863f2();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/a863f2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/a863f2.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 212bbca..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/a863f2.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture1D<float4> arg_0 : register(u0, space1);
-
-void textureDimensions_a863f2() {
-  int tint_tmp;
-  arg_0.GetDimensions(tint_tmp);
-  int res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_a863f2();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_a863f2();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_a863f2();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/a863f2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/a863f2.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 212bbca..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/a863f2.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture1D<float4> arg_0 : register(u0, space1);
-
-void textureDimensions_a863f2() {
-  int tint_tmp;
-  arg_0.GetDimensions(tint_tmp);
-  int res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_a863f2();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_a863f2();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_a863f2();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/a863f2.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/a863f2.wgsl.expected.glsl
deleted file mode 100644
index b157dd9..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/a863f2.wgsl.expected.glsl
+++ /dev/null
@@ -1,78 +0,0 @@
-SKIP: FAILED
-
-#version 310 es
-
-layout(r32f) uniform highp writeonly image1D arg_0;
-void textureDimensions_a863f2() {
-  int res = imageSize(arg_0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_a863f2();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'image1D' : Reserved word. 
-WARNING: 0:3: 'layout' : useless application of layout qualifier 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision mediump float;
-
-layout(r32f) uniform highp writeonly image1D arg_0;
-void textureDimensions_a863f2() {
-  int res = imageSize(arg_0);
-}
-
-void fragment_main() {
-  textureDimensions_a863f2();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:4: 'image1D' : Reserved word. 
-WARNING: 0:4: 'layout' : useless application of layout qualifier 
-ERROR: 0:4: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-
-layout(r32f) uniform highp writeonly image1D arg_0;
-void textureDimensions_a863f2() {
-  int res = imageSize(arg_0);
-}
-
-void compute_main() {
-  textureDimensions_a863f2();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'image1D' : Reserved word. 
-WARNING: 0:3: 'layout' : useless application of layout qualifier 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/a863f2.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/a863f2.wgsl.expected.msl
deleted file mode 100644
index 583342b..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/a863f2.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_a863f2(texture1d<float, access::write> tint_symbol_1) {
-  int res = int(tint_symbol_1.get_width(0));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture1d<float, access::write> tint_symbol_2) {
-  textureDimensions_a863f2(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture1d<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture1d<float, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_a863f2(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture1d<float, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_a863f2(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/a863f2.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/a863f2.wgsl.expected.spvasm
deleted file mode 100644
index 9e5a66a..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/a863f2.wgsl.expected.spvasm
+++ /dev/null
@@ -1,76 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 36
-; Schema: 0
-               OpCapability Shader
-               OpCapability Image1D
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_a863f2 "textureDimensions_a863f2"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-         %11 = OpTypeImage %float 1D 0 0 0 2 R32f
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %12 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-%_ptr_Function_int = OpTypePointer Function %int
-         %21 = OpConstantNull %int
-         %22 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_a863f2 = OpFunction %void None %12
-         %15 = OpLabel
-        %res = OpVariable %_ptr_Function_int Function %21
-         %18 = OpLoad %11 %arg_0
-         %16 = OpImageQuerySize %int %18
-               OpStore %res %16
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %22
-         %24 = OpLabel
-         %25 = OpFunctionCall %void %textureDimensions_a863f2
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %12
-         %27 = OpLabel
-         %28 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %28
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %12
-         %31 = OpLabel
-         %32 = OpFunctionCall %void %textureDimensions_a863f2
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %12
-         %34 = OpLabel
-         %35 = OpFunctionCall %void %textureDimensions_a863f2
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/a863f2.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/a863f2.wgsl.expected.wgsl
deleted file mode 100644
index d3e7e38..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/a863f2.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_1d<r32float, write>;
-
-fn textureDimensions_a863f2() {
-  var res : i32 = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_a863f2();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_a863f2();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_a863f2();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/a9c9c1.wgsl b/test/tint/builtins/gen/var/textureDimensions/a9c9c1.wgsl
deleted file mode 100644
index 46d1cf7..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/a9c9c1.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_cube<f32>;
-
-// fn textureDimensions(texture: texture_cube<f32>, level: i32) -> vec2<i32>
-fn textureDimensions_a9c9c1() {
-  var arg_1 = 1i;
-  var res: vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_a9c9c1();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_a9c9c1();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_a9c9c1();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/a9c9c1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/a9c9c1.wgsl.expected.dxc.hlsl
deleted file mode 100644
index a5b99e0..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/a9c9c1.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-TextureCube<float4> arg_0 : register(t0, space1);
-
-void textureDimensions_a9c9c1() {
-  int arg_1 = 1;
-  int3 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_a9c9c1();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_a9c9c1();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_a9c9c1();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/a9c9c1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/a9c9c1.wgsl.expected.fxc.hlsl
deleted file mode 100644
index a5b99e0..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/a9c9c1.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-TextureCube<float4> arg_0 : register(t0, space1);
-
-void textureDimensions_a9c9c1() {
-  int arg_1 = 1;
-  int3 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_a9c9c1();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_a9c9c1();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_a9c9c1();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/a9c9c1.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/a9c9c1.wgsl.expected.glsl
deleted file mode 100644
index 41a56e3..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/a9c9c1.wgsl.expected.glsl
+++ /dev/null
@@ -1,55 +0,0 @@
-#version 310 es
-
-uniform highp samplerCube arg_0_1;
-void textureDimensions_a9c9c1() {
-  int arg_1 = 1;
-  ivec2 res = textureSize(arg_0_1, arg_1);
-}
-
-vec4 vertex_main() {
-  textureDimensions_a9c9c1();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-uniform highp samplerCube arg_0_1;
-void textureDimensions_a9c9c1() {
-  int arg_1 = 1;
-  ivec2 res = textureSize(arg_0_1, arg_1);
-}
-
-void fragment_main() {
-  textureDimensions_a9c9c1();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-uniform highp samplerCube arg_0_1;
-void textureDimensions_a9c9c1() {
-  int arg_1 = 1;
-  ivec2 res = textureSize(arg_0_1, arg_1);
-}
-
-void compute_main() {
-  textureDimensions_a9c9c1();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/a9c9c1.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/a9c9c1.wgsl.expected.msl
deleted file mode 100644
index f6dc5fd..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/a9c9c1.wgsl.expected.msl
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_a9c9c1(texturecube<float, access::sample> tint_symbol_1) {
-  int arg_1 = 1;
-  int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texturecube<float, access::sample> tint_symbol_2) {
-  textureDimensions_a9c9c1(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texturecube<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texturecube<float, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_a9c9c1(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texturecube<float, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_a9c9c1(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/a9c9c1.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/a9c9c1.wgsl.expected.spvasm
deleted file mode 100644
index 9f867d9..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/a9c9c1.wgsl.expected.spvasm
+++ /dev/null
@@ -1,82 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 42
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_a9c9c1 "textureDimensions_a9c9c1"
-               OpName %arg_1 "arg_1"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-         %11 = OpTypeImage %float Cube 0 0 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %12 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %int_1 = OpConstant %int 1
-%_ptr_Function_int = OpTypePointer Function %int
-         %20 = OpConstantNull %int
-      %v2int = OpTypeVector %int 2
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %27 = OpConstantNull %v2int
-         %28 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_a9c9c1 = OpFunction %void None %12
-         %15 = OpLabel
-      %arg_1 = OpVariable %_ptr_Function_int Function %20
-        %res = OpVariable %_ptr_Function_v2int Function %27
-               OpStore %arg_1 %int_1
-         %23 = OpLoad %11 %arg_0
-         %24 = OpLoad %int %arg_1
-         %21 = OpImageQuerySizeLod %v2int %23 %24
-               OpStore %res %21
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %28
-         %30 = OpLabel
-         %31 = OpFunctionCall %void %textureDimensions_a9c9c1
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %12
-         %33 = OpLabel
-         %34 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %34
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %12
-         %37 = OpLabel
-         %38 = OpFunctionCall %void %textureDimensions_a9c9c1
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %12
-         %40 = OpLabel
-         %41 = OpFunctionCall %void %textureDimensions_a9c9c1
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/a9c9c1.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/a9c9c1.wgsl.expected.wgsl
deleted file mode 100644
index f458435..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/a9c9c1.wgsl.expected.wgsl
+++ /dev/null
@@ -1,22 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_cube<f32>;
-
-fn textureDimensions_a9c9c1() {
-  var arg_1 = 1i;
-  var res : vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_a9c9c1();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_a9c9c1();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_a9c9c1();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/aa4353.wgsl b/test/tint/builtins/gen/var/textureDimensions/aa4353.wgsl
new file mode 100644
index 0000000..8b47484
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/aa4353.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba32sint, write>;
+
+// fn textureDimensions(texture: texture_storage_2d<rgba32sint, write>) -> vec2<u32>
+fn textureDimensions_aa4353() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_aa4353();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_aa4353();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_aa4353();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/aa4353.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/aa4353.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..3d24ddb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/aa4353.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<int4> arg_0 : register(u0, space1);
+
+void textureDimensions_aa4353() {
+  int2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_aa4353();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_aa4353();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_aa4353();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/aa4353.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/aa4353.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..3d24ddb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/aa4353.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<int4> arg_0 : register(u0, space1);
+
+void textureDimensions_aa4353() {
+  int2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_aa4353();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_aa4353();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_aa4353();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/aa4353.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/aa4353.wgsl.expected.glsl
new file mode 100644
index 0000000..4a25902
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/aa4353.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba32i) uniform highp writeonly iimage2D arg_0;
+void textureDimensions_aa4353() {
+  uvec2 res = uvec2(imageSize(arg_0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_aa4353();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba32i) uniform highp writeonly iimage2D arg_0;
+void textureDimensions_aa4353() {
+  uvec2 res = uvec2(imageSize(arg_0));
+}
+
+void fragment_main() {
+  textureDimensions_aa4353();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba32i) uniform highp writeonly iimage2D arg_0;
+void textureDimensions_aa4353() {
+  uvec2 res = uvec2(imageSize(arg_0));
+}
+
+void compute_main() {
+  textureDimensions_aa4353();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/aa4353.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/aa4353.wgsl.expected.msl
new file mode 100644
index 0000000..7845df7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/aa4353.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_aa4353(texture2d<int, access::write> tint_symbol_1) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::write> tint_symbol_2) {
+  textureDimensions_aa4353(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_aa4353(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_aa4353(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/aa4353.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/aa4353.wgsl.expected.spvasm
new file mode 100644
index 0000000..3a9900d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/aa4353.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_aa4353 "textureDimensions_aa4353"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 0 0 2 Rgba32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %23 = OpConstantNull %v2uint
+         %24 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_aa4353 = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %23
+         %20 = OpLoad %11 %arg_0
+         %17 = OpImageQuerySize %v2uint %20
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %textureDimensions_aa4353
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %29 = OpLabel
+         %30 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %30
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureDimensions_aa4353
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureDimensions_aa4353
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/aa4353.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/aa4353.wgsl.expected.wgsl
new file mode 100644
index 0000000..7aa80e1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/aa4353.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba32sint, write>;
+
+fn textureDimensions_aa4353() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_aa4353();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_aa4353();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_aa4353();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/aac604.wgsl b/test/tint/builtins/gen/var/textureDimensions/aac604.wgsl
new file mode 100644
index 0000000..e17af18
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/aac604.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_1d<f32>;
+
+// fn textureDimensions(texture: texture_1d<f32>, level: u32) -> u32
+fn textureDimensions_aac604() {
+  var arg_1 = 1u;
+  var res: u32 = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_aac604();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_aac604();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_aac604();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/aac604.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/aac604.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..16df6f4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/aac604.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_aac604() {
+  uint arg_1 = 1u;
+  int2 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y);
+  uint res = tint_tmp.x;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_aac604();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_aac604();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_aac604();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/aac604.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/aac604.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..16df6f4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/aac604.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_aac604() {
+  uint arg_1 = 1u;
+  int2 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y);
+  uint res = tint_tmp.x;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_aac604();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_aac604();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_aac604();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/aac604.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/aac604.wgsl.expected.glsl
new file mode 100644
index 0000000..e83045c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/aac604.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp sampler1D arg_0_1;
+void textureDimensions_aac604() {
+  uint arg_1 = 1u;
+  uint res = uint(textureSize(arg_0_1, int(arg_1)));
+}
+
+vec4 vertex_main() {
+  textureDimensions_aac604();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'sampler1D' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp sampler1D arg_0_1;
+void textureDimensions_aac604() {
+  uint arg_1 = 1u;
+  uint res = uint(textureSize(arg_0_1, int(arg_1)));
+}
+
+void fragment_main() {
+  textureDimensions_aac604();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'sampler1D' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp sampler1D arg_0_1;
+void textureDimensions_aac604() {
+  uint arg_1 = 1u;
+  uint res = uint(textureSize(arg_0_1, int(arg_1)));
+}
+
+void compute_main() {
+  textureDimensions_aac604();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'sampler1D' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/aac604.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/aac604.wgsl.expected.msl
new file mode 100644
index 0000000..4eed4a3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/aac604.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_aac604(texture1d<float, access::sample> tint_symbol_1) {
+  uint arg_1 = 1u;
+  uint res = tint_symbol_1.get_width(0);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::sample> tint_symbol_2) {
+  textureDimensions_aac604(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_aac604(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_aac604(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/aac604.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/aac604.wgsl.expected.spvasm
new file mode 100644
index 0000000..a609c78
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/aac604.wgsl.expected.spvasm
@@ -0,0 +1,80 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; Schema: 0
+               OpCapability Shader
+               OpCapability Sampled1D
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_aac604 "textureDimensions_aac604"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 1D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %20 = OpConstantNull %uint
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_aac604 = OpFunction %void None %12
+         %15 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %20
+        %res = OpVariable %_ptr_Function_uint Function %20
+               OpStore %arg_1 %uint_1
+         %22 = OpLoad %11 %arg_0
+         %23 = OpLoad %uint %arg_1
+         %21 = OpImageQuerySizeLod %uint %22 %23
+               OpStore %res %21
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %textureDimensions_aac604
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureDimensions_aac604
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureDimensions_aac604
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/aac604.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/aac604.wgsl.expected.wgsl
new file mode 100644
index 0000000..528fe11
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/aac604.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_1d<f32>;
+
+fn textureDimensions_aac604() {
+  var arg_1 = 1u;
+  var res : u32 = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_aac604();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_aac604();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_aac604();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/ad7d3b.wgsl b/test/tint/builtins/gen/var/textureDimensions/ad7d3b.wgsl
new file mode 100644
index 0000000..39b6f4a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/ad7d3b.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba8uint, write>;
+
+// fn textureDimensions(texture: texture_storage_1d<rgba8uint, write>) -> u32
+fn textureDimensions_ad7d3b() {
+  var res: u32 = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_ad7d3b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_ad7d3b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_ad7d3b();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/ad7d3b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/ad7d3b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..c052ebe
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/ad7d3b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<uint4> arg_0 : register(u0, space1);
+
+void textureDimensions_ad7d3b() {
+  int tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_ad7d3b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_ad7d3b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_ad7d3b();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/ad7d3b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/ad7d3b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c052ebe
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/ad7d3b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<uint4> arg_0 : register(u0, space1);
+
+void textureDimensions_ad7d3b() {
+  int tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_ad7d3b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_ad7d3b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_ad7d3b();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/ad7d3b.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/ad7d3b.wgsl.expected.glsl
new file mode 100644
index 0000000..37dc452
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/ad7d3b.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8ui) uniform highp writeonly uimage1D arg_0;
+void textureDimensions_ad7d3b() {
+  uint res = uint(imageSize(arg_0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_ad7d3b();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'uimage1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rgba8ui) uniform highp writeonly uimage1D arg_0;
+void textureDimensions_ad7d3b() {
+  uint res = uint(imageSize(arg_0));
+}
+
+void fragment_main() {
+  textureDimensions_ad7d3b();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'uimage1D' : Reserved word. 
+WARNING: 0:4: 'layout' : useless application of layout qualifier 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8ui) uniform highp writeonly uimage1D arg_0;
+void textureDimensions_ad7d3b() {
+  uint res = uint(imageSize(arg_0));
+}
+
+void compute_main() {
+  textureDimensions_ad7d3b();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'uimage1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/ad7d3b.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/ad7d3b.wgsl.expected.msl
new file mode 100644
index 0000000..5ebfda2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/ad7d3b.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_ad7d3b(texture1d<uint, access::write> tint_symbol_1) {
+  uint res = tint_symbol_1.get_width(0);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<uint, access::write> tint_symbol_2) {
+  textureDimensions_ad7d3b(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_ad7d3b(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_ad7d3b(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/ad7d3b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/ad7d3b.wgsl.expected.spvasm
new file mode 100644
index 0000000..f349ad4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/ad7d3b.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_ad7d3b "textureDimensions_ad7d3b"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 1D 0 0 0 2 Rgba8ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %21 = OpConstantNull %uint
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_ad7d3b = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_uint Function %21
+         %18 = OpLoad %11 %arg_0
+         %17 = OpImageQuerySize %uint %18
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %textureDimensions_ad7d3b
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %27 = OpLabel
+         %28 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %28
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureDimensions_ad7d3b
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureDimensions_ad7d3b
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/ad7d3b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/ad7d3b.wgsl.expected.wgsl
new file mode 100644
index 0000000..f3d84ab
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/ad7d3b.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba8uint, write>;
+
+fn textureDimensions_ad7d3b() {
+  var res : u32 = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_ad7d3b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_ad7d3b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_ad7d3b();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/af46ab.wgsl b/test/tint/builtins/gen/var/textureDimensions/af46ab.wgsl
new file mode 100644
index 0000000..ab3e076
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/af46ab.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32sint, write>;
+
+// fn textureDimensions(texture: texture_storage_2d_array<rg32sint, write>) -> vec2<u32>
+fn textureDimensions_af46ab() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_af46ab();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_af46ab();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_af46ab();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/af46ab.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/af46ab.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..7b91231
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/af46ab.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureDimensions_af46ab() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_af46ab();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_af46ab();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_af46ab();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/af46ab.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/af46ab.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..7b91231
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/af46ab.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureDimensions_af46ab() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_af46ab();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_af46ab();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_af46ab();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/af46ab.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/af46ab.wgsl.expected.glsl
new file mode 100644
index 0000000..858e3b6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/af46ab.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32i) uniform highp writeonly iimage2DArray arg_0;
+void textureDimensions_af46ab() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+}
+
+vec4 vertex_main() {
+  textureDimensions_af46ab();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rg32i) uniform highp writeonly iimage2DArray arg_0;
+void textureDimensions_af46ab() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+}
+
+void fragment_main() {
+  textureDimensions_af46ab();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32i) uniform highp writeonly iimage2DArray arg_0;
+void textureDimensions_af46ab() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+}
+
+void compute_main() {
+  textureDimensions_af46ab();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/af46ab.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/af46ab.wgsl.expected.msl
new file mode 100644
index 0000000..bea9ef2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/af46ab.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_af46ab(texture2d_array<int, access::write> tint_symbol_1) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::write> tint_symbol_2) {
+  textureDimensions_af46ab(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_af46ab(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_af46ab(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/af46ab.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/af46ab.wgsl.expected.spvasm
new file mode 100644
index 0000000..fa916ed
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/af46ab.wgsl.expected.spvasm
@@ -0,0 +1,80 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 40
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_af46ab "textureDimensions_af46ab"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 Rg32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %25 = OpConstantNull %v2uint
+         %26 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_af46ab = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %25
+         %22 = OpLoad %11 %arg_0
+         %20 = OpImageQuerySize %v3uint %22
+         %17 = OpVectorShuffle %v2uint %20 %20 0 1
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %26
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %textureDimensions_af46ab
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %31 = OpLabel
+         %32 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %32
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureDimensions_af46ab
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureDimensions_af46ab
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/af46ab.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/af46ab.wgsl.expected.wgsl
new file mode 100644
index 0000000..33b86af
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/af46ab.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32sint, write>;
+
+fn textureDimensions_af46ab() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_af46ab();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_af46ab();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_af46ab();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/b0e16d.wgsl b/test/tint/builtins/gen/var/textureDimensions/b0e16d.wgsl
deleted file mode 100644
index 7e57b46..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/b0e16d.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_2d<i32>;
-
-// fn textureDimensions(texture: texture_2d<i32>, level: i32) -> vec2<i32>
-fn textureDimensions_b0e16d() {
-  var arg_1 = 1i;
-  var res: vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_b0e16d();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_b0e16d();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_b0e16d();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/b0e16d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/b0e16d.wgsl.expected.dxc.hlsl
deleted file mode 100644
index ed93856..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/b0e16d.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-Texture2D<int4> arg_0 : register(t0, space1);
-
-void textureDimensions_b0e16d() {
-  int arg_1 = 1;
-  int3 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_b0e16d();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_b0e16d();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_b0e16d();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/b0e16d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/b0e16d.wgsl.expected.fxc.hlsl
deleted file mode 100644
index ed93856..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/b0e16d.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-Texture2D<int4> arg_0 : register(t0, space1);
-
-void textureDimensions_b0e16d() {
-  int arg_1 = 1;
-  int3 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_b0e16d();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_b0e16d();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_b0e16d();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/b0e16d.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/b0e16d.wgsl.expected.glsl
deleted file mode 100644
index 69ff6fb..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/b0e16d.wgsl.expected.glsl
+++ /dev/null
@@ -1,55 +0,0 @@
-#version 310 es
-
-uniform highp isampler2D arg_0_1;
-void textureDimensions_b0e16d() {
-  int arg_1 = 1;
-  ivec2 res = textureSize(arg_0_1, arg_1);
-}
-
-vec4 vertex_main() {
-  textureDimensions_b0e16d();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-uniform highp isampler2D arg_0_1;
-void textureDimensions_b0e16d() {
-  int arg_1 = 1;
-  ivec2 res = textureSize(arg_0_1, arg_1);
-}
-
-void fragment_main() {
-  textureDimensions_b0e16d();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-uniform highp isampler2D arg_0_1;
-void textureDimensions_b0e16d() {
-  int arg_1 = 1;
-  ivec2 res = textureSize(arg_0_1, arg_1);
-}
-
-void compute_main() {
-  textureDimensions_b0e16d();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/b0e16d.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/b0e16d.wgsl.expected.msl
deleted file mode 100644
index 2f37e8d..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/b0e16d.wgsl.expected.msl
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_b0e16d(texture2d<int, access::sample> tint_symbol_1) {
-  int arg_1 = 1;
-  int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture2d<int, access::sample> tint_symbol_2) {
-  textureDimensions_b0e16d(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture2d<int, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture2d<int, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_b0e16d(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture2d<int, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_b0e16d(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/b0e16d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/b0e16d.wgsl.expected.spvasm
deleted file mode 100644
index 05bc7bf..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/b0e16d.wgsl.expected.spvasm
+++ /dev/null
@@ -1,82 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 42
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_b0e16d "textureDimensions_b0e16d"
-               OpName %arg_1 "arg_1"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-        %int = OpTypeInt 32 1
-         %11 = OpTypeImage %int 2D 0 0 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-      %int_1 = OpConstant %int 1
-%_ptr_Function_int = OpTypePointer Function %int
-         %20 = OpConstantNull %int
-      %v2int = OpTypeVector %int 2
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %27 = OpConstantNull %v2int
-         %28 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_b0e16d = OpFunction %void None %13
-         %16 = OpLabel
-      %arg_1 = OpVariable %_ptr_Function_int Function %20
-        %res = OpVariable %_ptr_Function_v2int Function %27
-               OpStore %arg_1 %int_1
-         %23 = OpLoad %11 %arg_0
-         %24 = OpLoad %int %arg_1
-         %21 = OpImageQuerySizeLod %v2int %23 %24
-               OpStore %res %21
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %28
-         %30 = OpLabel
-         %31 = OpFunctionCall %void %textureDimensions_b0e16d
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %33 = OpLabel
-         %34 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %34
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %37 = OpLabel
-         %38 = OpFunctionCall %void %textureDimensions_b0e16d
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %40 = OpLabel
-         %41 = OpFunctionCall %void %textureDimensions_b0e16d
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/b0e16d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/b0e16d.wgsl.expected.wgsl
deleted file mode 100644
index 8497bdb..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/b0e16d.wgsl.expected.wgsl
+++ /dev/null
@@ -1,22 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_2d<i32>;
-
-fn textureDimensions_b0e16d() {
-  var arg_1 = 1i;
-  var res : vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_b0e16d();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_b0e16d();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_b0e16d();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/b3ab5e.wgsl b/test/tint/builtins/gen/var/textureDimensions/b3ab5e.wgsl
new file mode 100644
index 0000000..11a6ddb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/b3ab5e.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube_array<f32>;
+
+// fn textureDimensions(texture: texture_cube_array<f32>, level: i32) -> vec2<u32>
+fn textureDimensions_b3ab5e() {
+  var arg_1 = 1i;
+  var res: vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_b3ab5e();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_b3ab5e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_b3ab5e();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/b3ab5e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/b3ab5e.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..7038fc7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/b3ab5e.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+TextureCubeArray<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_b3ab5e() {
+  int arg_1 = 1;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_b3ab5e();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_b3ab5e();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_b3ab5e();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/b3ab5e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/b3ab5e.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..7038fc7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/b3ab5e.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+TextureCubeArray<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_b3ab5e() {
+  int arg_1 = 1;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_b3ab5e();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_b3ab5e();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_b3ab5e();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/b3ab5e.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/b3ab5e.wgsl.expected.glsl
new file mode 100644
index 0000000..5b81b60
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/b3ab5e.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp samplerCubeArray arg_0_1;
+void textureDimensions_b3ab5e() {
+  int arg_1 = 1;
+  uvec2 res = uvec2(textureSize(arg_0_1, arg_1).xy);
+}
+
+vec4 vertex_main() {
+  textureDimensions_b3ab5e();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeArray arg_0_1;
+void textureDimensions_b3ab5e() {
+  int arg_1 = 1;
+  uvec2 res = uvec2(textureSize(arg_0_1, arg_1).xy);
+}
+
+void fragment_main() {
+  textureDimensions_b3ab5e();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'samplerCubeArray' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp samplerCubeArray arg_0_1;
+void textureDimensions_b3ab5e() {
+  int arg_1 = 1;
+  uvec2 res = uvec2(textureSize(arg_0_1, arg_1).xy);
+}
+
+void compute_main() {
+  textureDimensions_b3ab5e();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/b3ab5e.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/b3ab5e.wgsl.expected.msl
new file mode 100644
index 0000000..7409bb7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/b3ab5e.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_b3ab5e(texturecube_array<float, access::sample> tint_symbol_1) {
+  int arg_1 = 1;
+  uint2 res = uint2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube_array<float, access::sample> tint_symbol_2) {
+  textureDimensions_b3ab5e(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texturecube_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_b3ab5e(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texturecube_array<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_b3ab5e(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/b3ab5e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/b3ab5e.wgsl.expected.spvasm
new file mode 100644
index 0000000..f3b642e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/b3ab5e.wgsl.expected.spvasm
@@ -0,0 +1,86 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpCapability SampledCubeArray
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_b3ab5e "textureDimensions_b3ab5e"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_int = OpTypePointer Function %int
+         %20 = OpConstantNull %int
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %30 = OpConstantNull %v2uint
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_b3ab5e = OpFunction %void None %12
+         %15 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_int Function %20
+        %res = OpVariable %_ptr_Function_v2uint Function %30
+               OpStore %arg_1 %int_1
+         %26 = OpLoad %11 %arg_0
+         %27 = OpLoad %int %arg_1
+         %24 = OpImageQuerySizeLod %v3uint %26 %27
+         %21 = OpVectorShuffle %v2uint %24 %24 0 1
+               OpStore %res %21
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureDimensions_b3ab5e
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureDimensions_b3ab5e
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureDimensions_b3ab5e
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/b3ab5e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/b3ab5e.wgsl.expected.wgsl
new file mode 100644
index 0000000..d5dd059
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/b3ab5e.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_cube_array<f32>;
+
+fn textureDimensions_b3ab5e() {
+  var arg_1 = 1i;
+  var res : vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_b3ab5e();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_b3ab5e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_b3ab5e();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/b3c954.wgsl b/test/tint/builtins/gen/var/textureDimensions/b3c954.wgsl
deleted file mode 100644
index 36a593a..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/b3c954.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_cube<u32>;
-
-// fn textureDimensions(texture: texture_cube<u32>) -> vec2<i32>
-fn textureDimensions_b3c954() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_b3c954();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_b3c954();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_b3c954();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/b3c954.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/b3c954.wgsl.expected.dxc.hlsl
deleted file mode 100644
index f0d031d..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/b3c954.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-TextureCube<uint4> arg_0 : register(t0, space1);
-
-void textureDimensions_b3c954() {
-  int2 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
-  int2 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_b3c954();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_b3c954();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_b3c954();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/b3c954.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/b3c954.wgsl.expected.fxc.hlsl
deleted file mode 100644
index f0d031d..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/b3c954.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-TextureCube<uint4> arg_0 : register(t0, space1);
-
-void textureDimensions_b3c954() {
-  int2 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
-  int2 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_b3c954();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_b3c954();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_b3c954();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/b3c954.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/b3c954.wgsl.expected.glsl
deleted file mode 100644
index 855349f..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/b3c954.wgsl.expected.glsl
+++ /dev/null
@@ -1,52 +0,0 @@
-#version 310 es
-
-uniform highp usamplerCube arg_0_1;
-void textureDimensions_b3c954() {
-  ivec2 res = textureSize(arg_0_1, 0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_b3c954();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-uniform highp usamplerCube arg_0_1;
-void textureDimensions_b3c954() {
-  ivec2 res = textureSize(arg_0_1, 0);
-}
-
-void fragment_main() {
-  textureDimensions_b3c954();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-uniform highp usamplerCube arg_0_1;
-void textureDimensions_b3c954() {
-  ivec2 res = textureSize(arg_0_1, 0);
-}
-
-void compute_main() {
-  textureDimensions_b3c954();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/b3c954.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/b3c954.wgsl.expected.msl
deleted file mode 100644
index 33fc09a..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/b3c954.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_b3c954(texturecube<uint, access::sample> tint_symbol_1) {
-  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texturecube<uint, access::sample> tint_symbol_2) {
-  textureDimensions_b3c954(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texturecube<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texturecube<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_b3c954(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texturecube<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_b3c954(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/b3c954.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/b3c954.wgsl.expected.spvasm
deleted file mode 100644
index f8a392c..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/b3c954.wgsl.expected.spvasm
+++ /dev/null
@@ -1,77 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 39
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_b3c954 "textureDimensions_b3c954"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-       %uint = OpTypeInt 32 0
-         %11 = OpTypeImage %uint Cube 0 0 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %v2int = OpTypeVector %int 2
-      %int_0 = OpConstant %int 0
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %24 = OpConstantNull %v2int
-         %25 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_b3c954 = OpFunction %void None %13
-         %16 = OpLabel
-        %res = OpVariable %_ptr_Function_v2int Function %24
-         %20 = OpLoad %11 %arg_0
-         %17 = OpImageQuerySizeLod %v2int %20 %int_0
-               OpStore %res %17
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %25
-         %27 = OpLabel
-         %28 = OpFunctionCall %void %textureDimensions_b3c954
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %30 = OpLabel
-         %31 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %31
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %34 = OpLabel
-         %35 = OpFunctionCall %void %textureDimensions_b3c954
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %37 = OpLabel
-         %38 = OpFunctionCall %void %textureDimensions_b3c954
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/b3c954.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/b3c954.wgsl.expected.wgsl
deleted file mode 100644
index 8c36407..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/b3c954.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_cube<u32>;
-
-fn textureDimensions_b3c954() {
-  var res : vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_b3c954();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_b3c954();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_b3c954();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/b3e407.wgsl b/test/tint/builtins/gen/var/textureDimensions/b3e407.wgsl
deleted file mode 100644
index f65e507..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/b3e407.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_1d<f32>;
-
-// fn textureDimensions(texture: texture_1d<f32>, level: i32) -> i32
-fn textureDimensions_b3e407() {
-  var arg_1 = 1i;
-  var res: i32 = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_b3e407();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_b3e407();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_b3e407();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/b3e407.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/b3e407.wgsl.expected.dxc.hlsl
deleted file mode 100644
index c37a40c..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/b3e407.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-Texture1D<float4> arg_0 : register(t0, space1);
-
-void textureDimensions_b3e407() {
-  int arg_1 = 1;
-  int2 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y);
-  int res = tint_tmp.x;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_b3e407();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_b3e407();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_b3e407();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/b3e407.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/b3e407.wgsl.expected.fxc.hlsl
deleted file mode 100644
index c37a40c..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/b3e407.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-Texture1D<float4> arg_0 : register(t0, space1);
-
-void textureDimensions_b3e407() {
-  int arg_1 = 1;
-  int2 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y);
-  int res = tint_tmp.x;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_b3e407();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_b3e407();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_b3e407();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/b3e407.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/b3e407.wgsl.expected.glsl
deleted file mode 100644
index 0191881..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/b3e407.wgsl.expected.glsl
+++ /dev/null
@@ -1,78 +0,0 @@
-SKIP: FAILED
-
-#version 310 es
-
-uniform highp sampler1D arg_0_1;
-void textureDimensions_b3e407() {
-  int arg_1 = 0;
-  int res = textureSize(arg_0_1, arg_1);
-}
-
-vec4 vertex_main() {
-  textureDimensions_b3e407();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'sampler1D' : Reserved word. 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision mediump float;
-
-uniform highp sampler1D arg_0_1;
-void textureDimensions_b3e407() {
-  int arg_1 = 0;
-  int res = textureSize(arg_0_1, arg_1);
-}
-
-void fragment_main() {
-  textureDimensions_b3e407();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:4: 'sampler1D' : Reserved word. 
-ERROR: 0:4: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-
-uniform highp sampler1D arg_0_1;
-void textureDimensions_b3e407() {
-  int arg_1 = 0;
-  int res = textureSize(arg_0_1, arg_1);
-}
-
-void compute_main() {
-  textureDimensions_b3e407();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'sampler1D' : Reserved word. 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/b3e407.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/b3e407.wgsl.expected.msl
deleted file mode 100644
index 816e795..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/b3e407.wgsl.expected.msl
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_b3e407(texture1d<float, access::sample> tint_symbol_1) {
-  int arg_1 = 1;
-  int res = int(tint_symbol_1.get_width(0));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture1d<float, access::sample> tint_symbol_2) {
-  textureDimensions_b3e407(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture1d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture1d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_b3e407(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture1d<float, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_b3e407(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/b3e407.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/b3e407.wgsl.expected.spvasm
deleted file mode 100644
index ae214b8..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/b3e407.wgsl.expected.spvasm
+++ /dev/null
@@ -1,80 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 39
-; Schema: 0
-               OpCapability Shader
-               OpCapability Sampled1D
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_b3e407 "textureDimensions_b3e407"
-               OpName %arg_1 "arg_1"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-         %11 = OpTypeImage %float 1D 0 0 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %12 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %int_1 = OpConstant %int 1
-%_ptr_Function_int = OpTypePointer Function %int
-         %20 = OpConstantNull %int
-         %25 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_b3e407 = OpFunction %void None %12
-         %15 = OpLabel
-      %arg_1 = OpVariable %_ptr_Function_int Function %20
-        %res = OpVariable %_ptr_Function_int Function %20
-               OpStore %arg_1 %int_1
-         %22 = OpLoad %11 %arg_0
-         %23 = OpLoad %int %arg_1
-         %21 = OpImageQuerySizeLod %int %22 %23
-               OpStore %res %21
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %25
-         %27 = OpLabel
-         %28 = OpFunctionCall %void %textureDimensions_b3e407
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %12
-         %30 = OpLabel
-         %31 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %31
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %12
-         %34 = OpLabel
-         %35 = OpFunctionCall %void %textureDimensions_b3e407
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %12
-         %37 = OpLabel
-         %38 = OpFunctionCall %void %textureDimensions_b3e407
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/b3e407.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/b3e407.wgsl.expected.wgsl
deleted file mode 100644
index 3d740f9..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/b3e407.wgsl.expected.wgsl
+++ /dev/null
@@ -1,22 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_1d<f32>;
-
-fn textureDimensions_b3e407() {
-  var arg_1 = 1i;
-  var res : i32 = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_b3e407();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_b3e407();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_b3e407();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/b46d97.wgsl b/test/tint/builtins/gen/var/textureDimensions/b46d97.wgsl
new file mode 100644
index 0000000..7554aab
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/b46d97.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_1d<i32>;
+
+// fn textureDimensions(texture: texture_1d<i32>, level: i32) -> u32
+fn textureDimensions_b46d97() {
+  var arg_1 = 1i;
+  var res: u32 = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_b46d97();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_b46d97();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_b46d97();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/b46d97.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/b46d97.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..d2120ba
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/b46d97.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_b46d97() {
+  int arg_1 = 1;
+  int2 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y);
+  uint res = tint_tmp.x;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_b46d97();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_b46d97();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_b46d97();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/b46d97.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/b46d97.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..d2120ba
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/b46d97.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_b46d97() {
+  int arg_1 = 1;
+  int2 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y);
+  uint res = tint_tmp.x;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_b46d97();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_b46d97();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_b46d97();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/b46d97.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/b46d97.wgsl.expected.glsl
new file mode 100644
index 0000000..6a0314a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/b46d97.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp isampler1D arg_0_1;
+void textureDimensions_b46d97() {
+  int arg_1 = 1;
+  uint res = uint(textureSize(arg_0_1, arg_1));
+}
+
+vec4 vertex_main() {
+  textureDimensions_b46d97();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'isampler1D' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp isampler1D arg_0_1;
+void textureDimensions_b46d97() {
+  int arg_1 = 1;
+  uint res = uint(textureSize(arg_0_1, arg_1));
+}
+
+void fragment_main() {
+  textureDimensions_b46d97();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'isampler1D' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp isampler1D arg_0_1;
+void textureDimensions_b46d97() {
+  int arg_1 = 1;
+  uint res = uint(textureSize(arg_0_1, arg_1));
+}
+
+void compute_main() {
+  textureDimensions_b46d97();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'isampler1D' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/b46d97.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/b46d97.wgsl.expected.msl
new file mode 100644
index 0000000..a93ae28
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/b46d97.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_b46d97(texture1d<int, access::sample> tint_symbol_1) {
+  int arg_1 = 1;
+  uint res = tint_symbol_1.get_width(0);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<int, access::sample> tint_symbol_2) {
+  textureDimensions_b46d97(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<int, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<int, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_b46d97(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<int, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_b46d97(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/b46d97.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/b46d97.wgsl.expected.spvasm
new file mode 100644
index 0000000..0fd4314
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/b46d97.wgsl.expected.spvasm
@@ -0,0 +1,83 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 42
+; Schema: 0
+               OpCapability Shader
+               OpCapability Sampled1D
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_b46d97 "textureDimensions_b46d97"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 1D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+      %int_1 = OpConstant %int 1
+%_ptr_Function_int = OpTypePointer Function %int
+         %20 = OpConstantNull %int
+       %uint = OpTypeInt 32 0
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %27 = OpConstantNull %uint
+         %28 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_b46d97 = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_int Function %20
+        %res = OpVariable %_ptr_Function_uint Function %27
+               OpStore %arg_1 %int_1
+         %23 = OpLoad %11 %arg_0
+         %24 = OpLoad %int %arg_1
+         %21 = OpImageQuerySizeLod %uint %23 %24
+               OpStore %res %21
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %28
+         %30 = OpLabel
+         %31 = OpFunctionCall %void %textureDimensions_b46d97
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %33 = OpLabel
+         %34 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %34
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureDimensions_b46d97
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureDimensions_b46d97
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/b46d97.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/b46d97.wgsl.expected.wgsl
new file mode 100644
index 0000000..8fa44e6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/b46d97.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_1d<i32>;
+
+fn textureDimensions_b46d97() {
+  var arg_1 = 1i;
+  var res : u32 = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_b46d97();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_b46d97();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_b46d97();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/b51345.wgsl b/test/tint/builtins/gen/var/textureDimensions/b51345.wgsl
new file mode 100644
index 0000000..705df0b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/b51345.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rg32float, write>;
+
+// fn textureDimensions(texture: texture_storage_1d<rg32float, write>) -> u32
+fn textureDimensions_b51345() {
+  var res: u32 = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_b51345();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_b51345();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_b51345();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/b51345.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/b51345.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..83abb62
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/b51345.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<float4> arg_0 : register(u0, space1);
+
+void textureDimensions_b51345() {
+  int tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_b51345();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_b51345();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_b51345();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/b51345.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/b51345.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..83abb62
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/b51345.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<float4> arg_0 : register(u0, space1);
+
+void textureDimensions_b51345() {
+  int tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_b51345();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_b51345();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_b51345();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/b51345.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/b51345.wgsl.expected.glsl
new file mode 100644
index 0000000..058e7ca
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/b51345.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32f) uniform highp writeonly image1D arg_0;
+void textureDimensions_b51345() {
+  uint res = uint(imageSize(arg_0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_b51345();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rg32f) uniform highp writeonly image1D arg_0;
+void textureDimensions_b51345() {
+  uint res = uint(imageSize(arg_0));
+}
+
+void fragment_main() {
+  textureDimensions_b51345();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32f) uniform highp writeonly image1D arg_0;
+void textureDimensions_b51345() {
+  uint res = uint(imageSize(arg_0));
+}
+
+void compute_main() {
+  textureDimensions_b51345();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/b51345.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/b51345.wgsl.expected.msl
new file mode 100644
index 0000000..d1ee550
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/b51345.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_b51345(texture1d<float, access::write> tint_symbol_1) {
+  uint res = tint_symbol_1.get_width(0);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::write> tint_symbol_2) {
+  textureDimensions_b51345(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_b51345(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_b51345(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/b51345.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/b51345.wgsl.expected.spvasm
new file mode 100644
index 0000000..ba366c8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/b51345.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpCapability StorageImageExtendedFormats
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_b51345 "textureDimensions_b51345"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 1D 0 0 0 2 Rg32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %21 = OpConstantNull %uint
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_b51345 = OpFunction %void None %12
+         %15 = OpLabel
+        %res = OpVariable %_ptr_Function_uint Function %21
+         %18 = OpLoad %11 %arg_0
+         %16 = OpImageQuerySize %uint %18
+               OpStore %res %16
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %textureDimensions_b51345
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %27 = OpLabel
+         %28 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %28
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureDimensions_b51345
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureDimensions_b51345
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/b51345.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/b51345.wgsl.expected.wgsl
new file mode 100644
index 0000000..4da1873
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/b51345.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rg32float, write>;
+
+fn textureDimensions_b51345() {
+  var res : u32 = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_b51345();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_b51345();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_b51345();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/b91240.wgsl b/test/tint/builtins/gen/var/textureDimensions/b91240.wgsl
deleted file mode 100644
index 65a63e4..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/b91240.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d<rgba8snorm, write>;
-
-// fn textureDimensions(texture: texture_storage_2d<rgba8snorm, write>) -> vec2<i32>
-fn textureDimensions_b91240() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_b91240();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_b91240();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_b91240();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/b91240.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/b91240.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 7f3c930..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/b91240.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2D<float4> arg_0 : register(u0, space1);
-
-void textureDimensions_b91240() {
-  int2 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
-  int2 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_b91240();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_b91240();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_b91240();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/b91240.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/b91240.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 7f3c930..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/b91240.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2D<float4> arg_0 : register(u0, space1);
-
-void textureDimensions_b91240() {
-  int2 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
-  int2 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_b91240();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_b91240();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_b91240();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/b91240.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/b91240.wgsl.expected.glsl
deleted file mode 100644
index 3976de3..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/b91240.wgsl.expected.glsl
+++ /dev/null
@@ -1,52 +0,0 @@
-#version 310 es
-
-layout(rgba8_snorm) uniform highp writeonly image2D arg_0;
-void textureDimensions_b91240() {
-  ivec2 res = imageSize(arg_0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_b91240();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-layout(rgba8_snorm) uniform highp writeonly image2D arg_0;
-void textureDimensions_b91240() {
-  ivec2 res = imageSize(arg_0);
-}
-
-void fragment_main() {
-  textureDimensions_b91240();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-layout(rgba8_snorm) uniform highp writeonly image2D arg_0;
-void textureDimensions_b91240() {
-  ivec2 res = imageSize(arg_0);
-}
-
-void compute_main() {
-  textureDimensions_b91240();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/b91240.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/b91240.wgsl.expected.msl
deleted file mode 100644
index ee84ff1..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/b91240.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_b91240(texture2d<float, access::write> tint_symbol_1) {
-  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture2d<float, access::write> tint_symbol_2) {
-  textureDimensions_b91240(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture2d<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture2d<float, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_b91240(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture2d<float, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_b91240(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/b91240.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/b91240.wgsl.expected.spvasm
deleted file mode 100644
index a0757e4..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/b91240.wgsl.expected.spvasm
+++ /dev/null
@@ -1,76 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 37
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_b91240 "textureDimensions_b91240"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-         %11 = OpTypeImage %float 2D 0 0 0 2 Rgba8Snorm
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %12 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %v2int = OpTypeVector %int 2
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %22 = OpConstantNull %v2int
-         %23 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_b91240 = OpFunction %void None %12
-         %15 = OpLabel
-        %res = OpVariable %_ptr_Function_v2int Function %22
-         %19 = OpLoad %11 %arg_0
-         %16 = OpImageQuerySize %v2int %19
-               OpStore %res %16
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %23
-         %25 = OpLabel
-         %26 = OpFunctionCall %void %textureDimensions_b91240
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %12
-         %28 = OpLabel
-         %29 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %29
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %12
-         %32 = OpLabel
-         %33 = OpFunctionCall %void %textureDimensions_b91240
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %12
-         %35 = OpLabel
-         %36 = OpFunctionCall %void %textureDimensions_b91240
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/b91240.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/b91240.wgsl.expected.wgsl
deleted file mode 100644
index 7c88173..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/b91240.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba8snorm, write>;
-
-fn textureDimensions_b91240() {
-  var res : vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_b91240();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_b91240();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_b91240();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/ba1481.wgsl b/test/tint/builtins/gen/var/textureDimensions/ba1481.wgsl
deleted file mode 100644
index e48c478..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/ba1481.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_external;
-
-// fn textureDimensions(texture: texture_external) -> vec2<i32>
-fn textureDimensions_ba1481() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_ba1481();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_ba1481();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_ba1481();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/ba1481.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/ba1481.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 1761c017..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/ba1481.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,38 +0,0 @@
-Texture2D<float4> ext_tex_plane_1 : register(t1, space1);
-cbuffer cbuffer_ext_tex_params : register(b2, space1) {
-  uint4 ext_tex_params[11];
-};
-Texture2D<float4> arg_0 : register(t0, space1);
-
-void textureDimensions_ba1481() {
-  int2 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
-  int2 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_ba1481();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_ba1481();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_ba1481();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/ba1481.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/ba1481.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 1761c017..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/ba1481.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,38 +0,0 @@
-Texture2D<float4> ext_tex_plane_1 : register(t1, space1);
-cbuffer cbuffer_ext_tex_params : register(b2, space1) {
-  uint4 ext_tex_params[11];
-};
-Texture2D<float4> arg_0 : register(t0, space1);
-
-void textureDimensions_ba1481() {
-  int2 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
-  int2 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_ba1481();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_ba1481();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_ba1481();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/ba1481.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/ba1481.wgsl.expected.glsl
deleted file mode 100644
index 7bb878e..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/ba1481.wgsl.expected.glsl
+++ /dev/null
@@ -1,112 +0,0 @@
-#version 310 es
-
-struct GammaTransferParams {
-  float G;
-  float A;
-  float B;
-  float C;
-  float D;
-  float E;
-  float F;
-  uint padding;
-};
-
-layout(binding = 2, std140) uniform ExternalTextureParams_ubo {
-  uint numPlanes;
-  uint doYuvToRgbConversionOnly;
-  mat3x4 yuvToRgbConversionMatrix;
-  GammaTransferParams gammaDecodeParams;
-  GammaTransferParams gammaEncodeParams;
-  mat3 gamutConversionMatrix;
-} ext_tex_params;
-
-uniform highp sampler2D arg_0_1;
-void textureDimensions_ba1481() {
-  ivec2 res = textureSize(arg_0_1, 0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_ba1481();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-struct GammaTransferParams {
-  float G;
-  float A;
-  float B;
-  float C;
-  float D;
-  float E;
-  float F;
-  uint padding;
-};
-
-layout(binding = 2, std140) uniform ExternalTextureParams_ubo {
-  uint numPlanes;
-  uint doYuvToRgbConversionOnly;
-  mat3x4 yuvToRgbConversionMatrix;
-  GammaTransferParams gammaDecodeParams;
-  GammaTransferParams gammaEncodeParams;
-  mat3 gamutConversionMatrix;
-} ext_tex_params;
-
-uniform highp sampler2D arg_0_1;
-void textureDimensions_ba1481() {
-  ivec2 res = textureSize(arg_0_1, 0);
-}
-
-void fragment_main() {
-  textureDimensions_ba1481();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-struct GammaTransferParams {
-  float G;
-  float A;
-  float B;
-  float C;
-  float D;
-  float E;
-  float F;
-  uint padding;
-};
-
-layout(binding = 2, std140) uniform ExternalTextureParams_ubo {
-  uint numPlanes;
-  uint doYuvToRgbConversionOnly;
-  mat3x4 yuvToRgbConversionMatrix;
-  GammaTransferParams gammaDecodeParams;
-  GammaTransferParams gammaEncodeParams;
-  mat3 gamutConversionMatrix;
-} ext_tex_params;
-
-uniform highp sampler2D arg_0_1;
-void textureDimensions_ba1481() {
-  ivec2 res = textureSize(arg_0_1, 0);
-}
-
-void compute_main() {
-  textureDimensions_ba1481();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/ba1481.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/ba1481.wgsl.expected.msl
deleted file mode 100644
index f659868..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/ba1481.wgsl.expected.msl
+++ /dev/null
@@ -1,53 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-struct GammaTransferParams {
-  float G;
-  float A;
-  float B;
-  float C;
-  float D;
-  float E;
-  float F;
-  uint padding;
-};
-
-struct ExternalTextureParams {
-  uint numPlanes;
-  uint doYuvToRgbConversionOnly;
-  float3x4 yuvToRgbConversionMatrix;
-  GammaTransferParams gammaDecodeParams;
-  GammaTransferParams gammaEncodeParams;
-  float3x3 gamutConversionMatrix;
-};
-
-void textureDimensions_ba1481(texture2d<float, access::sample> tint_symbol_1) {
-  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture2d<float, access::sample> tint_symbol_2) {
-  textureDimensions_ba1481(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture2d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture2d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_ba1481(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture2d<float, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_ba1481(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/ba1481.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/ba1481.wgsl.expected.spvasm
deleted file mode 100644
index a7eb76b..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/ba1481.wgsl.expected.spvasm
+++ /dev/null
@@ -1,127 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 47
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %ext_tex_plane_1 "ext_tex_plane_1"
-               OpName %ExternalTextureParams "ExternalTextureParams"
-               OpMemberName %ExternalTextureParams 0 "numPlanes"
-               OpMemberName %ExternalTextureParams 1 "doYuvToRgbConversionOnly"
-               OpMemberName %ExternalTextureParams 2 "yuvToRgbConversionMatrix"
-               OpMemberName %ExternalTextureParams 3 "gammaDecodeParams"
-               OpName %GammaTransferParams "GammaTransferParams"
-               OpMemberName %GammaTransferParams 0 "G"
-               OpMemberName %GammaTransferParams 1 "A"
-               OpMemberName %GammaTransferParams 2 "B"
-               OpMemberName %GammaTransferParams 3 "C"
-               OpMemberName %GammaTransferParams 4 "D"
-               OpMemberName %GammaTransferParams 5 "E"
-               OpMemberName %GammaTransferParams 6 "F"
-               OpMemberName %GammaTransferParams 7 "padding"
-               OpMemberName %ExternalTextureParams 4 "gammaEncodeParams"
-               OpMemberName %ExternalTextureParams 5 "gamutConversionMatrix"
-               OpName %ext_tex_params "ext_tex_params"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_ba1481 "textureDimensions_ba1481"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %ext_tex_plane_1 DescriptorSet 1
-               OpDecorate %ext_tex_plane_1 Binding 1
-               OpDecorate %ExternalTextureParams Block
-               OpMemberDecorate %ExternalTextureParams 0 Offset 0
-               OpMemberDecorate %ExternalTextureParams 1 Offset 4
-               OpMemberDecorate %ExternalTextureParams 2 Offset 16
-               OpMemberDecorate %ExternalTextureParams 2 ColMajor
-               OpMemberDecorate %ExternalTextureParams 2 MatrixStride 16
-               OpMemberDecorate %ExternalTextureParams 3 Offset 64
-               OpMemberDecorate %GammaTransferParams 0 Offset 0
-               OpMemberDecorate %GammaTransferParams 1 Offset 4
-               OpMemberDecorate %GammaTransferParams 2 Offset 8
-               OpMemberDecorate %GammaTransferParams 3 Offset 12
-               OpMemberDecorate %GammaTransferParams 4 Offset 16
-               OpMemberDecorate %GammaTransferParams 5 Offset 20
-               OpMemberDecorate %GammaTransferParams 6 Offset 24
-               OpMemberDecorate %GammaTransferParams 7 Offset 28
-               OpMemberDecorate %ExternalTextureParams 4 Offset 96
-               OpMemberDecorate %ExternalTextureParams 5 Offset 128
-               OpMemberDecorate %ExternalTextureParams 5 ColMajor
-               OpMemberDecorate %ExternalTextureParams 5 MatrixStride 16
-               OpDecorate %ext_tex_params NonWritable
-               OpDecorate %ext_tex_params DescriptorSet 1
-               OpDecorate %ext_tex_params Binding 2
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-         %11 = OpTypeImage %float 2D 0 0 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-%ext_tex_plane_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %uint = OpTypeInt 32 0
-%mat3v4float = OpTypeMatrix %v4float 3
-%GammaTransferParams = OpTypeStruct %float %float %float %float %float %float %float %uint
-    %v3float = OpTypeVector %float 3
-%mat3v3float = OpTypeMatrix %v3float 3
-%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float
-%_ptr_Uniform_ExternalTextureParams = OpTypePointer Uniform %ExternalTextureParams
-%ext_tex_params = OpVariable %_ptr_Uniform_ExternalTextureParams Uniform
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %21 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %v2int = OpTypeVector %int 2
-      %int_0 = OpConstant %int 0
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %32 = OpConstantNull %v2int
-         %33 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_ba1481 = OpFunction %void None %21
-         %24 = OpLabel
-        %res = OpVariable %_ptr_Function_v2int Function %32
-         %28 = OpLoad %11 %arg_0
-         %25 = OpImageQuerySizeLod %v2int %28 %int_0
-               OpStore %res %25
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %33
-         %35 = OpLabel
-         %36 = OpFunctionCall %void %textureDimensions_ba1481
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %21
-         %38 = OpLabel
-         %39 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %39
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %21
-         %42 = OpLabel
-         %43 = OpFunctionCall %void %textureDimensions_ba1481
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %21
-         %45 = OpLabel
-         %46 = OpFunctionCall %void %textureDimensions_ba1481
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/ba1481.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/ba1481.wgsl.expected.wgsl
deleted file mode 100644
index cbc8837..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/ba1481.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_external;
-
-fn textureDimensions_ba1481() {
-  var res : vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_ba1481();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_ba1481();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_ba1481();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/bb3dde.wgsl b/test/tint/builtins/gen/var/textureDimensions/bb3dde.wgsl
deleted file mode 100644
index c251ab6..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/bb3dde.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_3d<rgba32sint, write>;
-
-// fn textureDimensions(texture: texture_storage_3d<rgba32sint, write>) -> vec3<i32>
-fn textureDimensions_bb3dde() {
-  var res: vec3<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_bb3dde();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_bb3dde();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_bb3dde();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/bb3dde.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/bb3dde.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 48b980a..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/bb3dde.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture3D<int4> arg_0 : register(u0, space1);
-
-void textureDimensions_bb3dde() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int3 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_bb3dde();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_bb3dde();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_bb3dde();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/bb3dde.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/bb3dde.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 48b980a..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/bb3dde.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture3D<int4> arg_0 : register(u0, space1);
-
-void textureDimensions_bb3dde() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int3 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_bb3dde();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_bb3dde();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_bb3dde();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/bb3dde.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/bb3dde.wgsl.expected.glsl
deleted file mode 100644
index 8c5f740..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/bb3dde.wgsl.expected.glsl
+++ /dev/null
@@ -1,52 +0,0 @@
-#version 310 es
-
-layout(rgba32i) uniform highp writeonly iimage3D arg_0;
-void textureDimensions_bb3dde() {
-  ivec3 res = imageSize(arg_0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_bb3dde();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-layout(rgba32i) uniform highp writeonly iimage3D arg_0;
-void textureDimensions_bb3dde() {
-  ivec3 res = imageSize(arg_0);
-}
-
-void fragment_main() {
-  textureDimensions_bb3dde();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-layout(rgba32i) uniform highp writeonly iimage3D arg_0;
-void textureDimensions_bb3dde() {
-  ivec3 res = imageSize(arg_0);
-}
-
-void compute_main() {
-  textureDimensions_bb3dde();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/bb3dde.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/bb3dde.wgsl.expected.msl
deleted file mode 100644
index 0f83742..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/bb3dde.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_bb3dde(texture3d<int, access::write> tint_symbol_1) {
-  int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture3d<int, access::write> tint_symbol_2) {
-  textureDimensions_bb3dde(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture3d<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture3d<int, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_bb3dde(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture3d<int, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_bb3dde(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/bb3dde.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/bb3dde.wgsl.expected.spvasm
deleted file mode 100644
index 7d30072..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/bb3dde.wgsl.expected.spvasm
+++ /dev/null
@@ -1,76 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 37
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_bb3dde "textureDimensions_bb3dde"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-        %int = OpTypeInt 32 1
-         %11 = OpTypeImage %int 3D 0 0 0 2 Rgba32i
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-      %v3int = OpTypeVector %int 3
-%_ptr_Function_v3int = OpTypePointer Function %v3int
-         %22 = OpConstantNull %v3int
-         %23 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_bb3dde = OpFunction %void None %13
-         %16 = OpLabel
-        %res = OpVariable %_ptr_Function_v3int Function %22
-         %19 = OpLoad %11 %arg_0
-         %17 = OpImageQuerySize %v3int %19
-               OpStore %res %17
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %23
-         %25 = OpLabel
-         %26 = OpFunctionCall %void %textureDimensions_bb3dde
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %28 = OpLabel
-         %29 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %29
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %32 = OpLabel
-         %33 = OpFunctionCall %void %textureDimensions_bb3dde
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %35 = OpLabel
-         %36 = OpFunctionCall %void %textureDimensions_bb3dde
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/bb3dde.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/bb3dde.wgsl.expected.wgsl
deleted file mode 100644
index bd224fb..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/bb3dde.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba32sint, write>;
-
-fn textureDimensions_bb3dde() {
-  var res : vec3<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_bb3dde();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_bb3dde();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_bb3dde();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/bb95d9.wgsl b/test/tint/builtins/gen/var/textureDimensions/bb95d9.wgsl
new file mode 100644
index 0000000..c30f0fa
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/bb95d9.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_3d<f32>;
+
+// fn textureDimensions(texture: texture_3d<f32>) -> vec3<u32>
+fn textureDimensions_bb95d9() {
+  var res: vec3<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_bb95d9();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_bb95d9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_bb95d9();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/bb95d9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/bb95d9.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..abb88d4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/bb95d9.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_bb95d9() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_bb95d9();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_bb95d9();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_bb95d9();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/bb95d9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/bb95d9.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..abb88d4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/bb95d9.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture3D<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_bb95d9() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_bb95d9();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_bb95d9();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_bb95d9();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/bb95d9.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/bb95d9.wgsl.expected.glsl
new file mode 100644
index 0000000..2222166
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/bb95d9.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp sampler3D arg_0_1;
+void textureDimensions_bb95d9() {
+  uvec3 res = uvec3(textureSize(arg_0_1, 0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_bb95d9();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler3D arg_0_1;
+void textureDimensions_bb95d9() {
+  uvec3 res = uvec3(textureSize(arg_0_1, 0));
+}
+
+void fragment_main() {
+  textureDimensions_bb95d9();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler3D arg_0_1;
+void textureDimensions_bb95d9() {
+  uvec3 res = uvec3(textureSize(arg_0_1, 0));
+}
+
+void compute_main() {
+  textureDimensions_bb95d9();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/bb95d9.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/bb95d9.wgsl.expected.msl
new file mode 100644
index 0000000..7319205
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/bb95d9.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_bb95d9(texture3d<float, access::sample> tint_symbol_1) {
+  uint3 res = uint3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::sample> tint_symbol_2) {
+  textureDimensions_bb95d9(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_bb95d9(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture3d<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_bb95d9(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/bb95d9.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/bb95d9.wgsl.expected.spvasm
new file mode 100644
index 0000000..4529549
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/bb95d9.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_bb95d9 "textureDimensions_bb95d9"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 3D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+        %int = OpTypeInt 32 1
+      %int_0 = OpConstant %int 0
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+         %24 = OpConstantNull %v3uint
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_bb95d9 = OpFunction %void None %12
+         %15 = OpLabel
+        %res = OpVariable %_ptr_Function_v3uint Function %24
+         %19 = OpLoad %11 %arg_0
+         %16 = OpImageQuerySizeLod %v3uint %19 %int_0
+               OpStore %res %16
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %textureDimensions_bb95d9
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureDimensions_bb95d9
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureDimensions_bb95d9
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/bb95d9.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/bb95d9.wgsl.expected.wgsl
new file mode 100644
index 0000000..24fab7a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/bb95d9.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_3d<f32>;
+
+fn textureDimensions_bb95d9() {
+  var res : vec3<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_bb95d9();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_bb95d9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_bb95d9();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/bbe285.wgsl b/test/tint/builtins/gen/var/textureDimensions/bbe285.wgsl
new file mode 100644
index 0000000..14e3679
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/bbe285.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba8sint, write>;
+
+// fn textureDimensions(texture: texture_storage_2d_array<rgba8sint, write>) -> vec2<u32>
+fn textureDimensions_bbe285() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_bbe285();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_bbe285();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_bbe285();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/bbe285.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/bbe285.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..bc18dde
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/bbe285.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureDimensions_bbe285() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_bbe285();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_bbe285();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_bbe285();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/bbe285.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/bbe285.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..bc18dde
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/bbe285.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureDimensions_bbe285() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_bbe285();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_bbe285();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_bbe285();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/bbe285.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/bbe285.wgsl.expected.glsl
new file mode 100644
index 0000000..2464082
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/bbe285.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba8i) uniform highp writeonly iimage2DArray arg_0;
+void textureDimensions_bbe285() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+}
+
+vec4 vertex_main() {
+  textureDimensions_bbe285();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba8i) uniform highp writeonly iimage2DArray arg_0;
+void textureDimensions_bbe285() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+}
+
+void fragment_main() {
+  textureDimensions_bbe285();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba8i) uniform highp writeonly iimage2DArray arg_0;
+void textureDimensions_bbe285() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+}
+
+void compute_main() {
+  textureDimensions_bbe285();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/bbe285.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/bbe285.wgsl.expected.msl
new file mode 100644
index 0000000..35cf418
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/bbe285.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_bbe285(texture2d_array<int, access::write> tint_symbol_1) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::write> tint_symbol_2) {
+  textureDimensions_bbe285(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_bbe285(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_bbe285(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/bbe285.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/bbe285.wgsl.expected.spvasm
new file mode 100644
index 0000000..5613469
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/bbe285.wgsl.expected.spvasm
@@ -0,0 +1,79 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 40
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_bbe285 "textureDimensions_bbe285"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 Rgba8i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %25 = OpConstantNull %v2uint
+         %26 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_bbe285 = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %25
+         %22 = OpLoad %11 %arg_0
+         %20 = OpImageQuerySize %v3uint %22
+         %17 = OpVectorShuffle %v2uint %20 %20 0 1
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %26
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %textureDimensions_bbe285
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %31 = OpLabel
+         %32 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %32
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureDimensions_bbe285
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureDimensions_bbe285
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/bbe285.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/bbe285.wgsl.expected.wgsl
new file mode 100644
index 0000000..b74acdf
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/bbe285.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba8sint, write>;
+
+fn textureDimensions_bbe285() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_bbe285();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_bbe285();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_bbe285();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/bd94c8.wgsl b/test/tint/builtins/gen/var/textureDimensions/bd94c8.wgsl
new file mode 100644
index 0000000..5ae0349
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/bd94c8.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_cube_array;
+
+// fn textureDimensions(texture: texture_depth_cube_array, level: u32) -> vec2<u32>
+fn textureDimensions_bd94c8() {
+  var arg_1 = 1u;
+  var res: vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_bd94c8();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_bd94c8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_bd94c8();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/bd94c8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/bd94c8.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e47cbf9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/bd94c8.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+TextureCubeArray arg_0 : register(t0, space1);
+
+void textureDimensions_bd94c8() {
+  uint arg_1 = 1u;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_bd94c8();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_bd94c8();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_bd94c8();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/bd94c8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/bd94c8.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..e47cbf9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/bd94c8.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+TextureCubeArray arg_0 : register(t0, space1);
+
+void textureDimensions_bd94c8() {
+  uint arg_1 = 1u;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_bd94c8();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_bd94c8();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_bd94c8();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/bd94c8.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/bd94c8.wgsl.expected.glsl
new file mode 100644
index 0000000..307d2cf
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/bd94c8.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp samplerCubeArray arg_0_1;
+void textureDimensions_bd94c8() {
+  uint arg_1 = 1u;
+  uvec2 res = uvec2(textureSize(arg_0_1, int(arg_1)).xy);
+}
+
+vec4 vertex_main() {
+  textureDimensions_bd94c8();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeArray arg_0_1;
+void textureDimensions_bd94c8() {
+  uint arg_1 = 1u;
+  uvec2 res = uvec2(textureSize(arg_0_1, int(arg_1)).xy);
+}
+
+void fragment_main() {
+  textureDimensions_bd94c8();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'samplerCubeArray' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp samplerCubeArray arg_0_1;
+void textureDimensions_bd94c8() {
+  uint arg_1 = 1u;
+  uvec2 res = uvec2(textureSize(arg_0_1, int(arg_1)).xy);
+}
+
+void compute_main() {
+  textureDimensions_bd94c8();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/bd94c8.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/bd94c8.wgsl.expected.msl
new file mode 100644
index 0000000..786ddf8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/bd94c8.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_bd94c8(depthcube_array<float, access::sample> tint_symbol_1) {
+  uint arg_1 = 1u;
+  uint2 res = uint2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(depthcube_array<float, access::sample> tint_symbol_2) {
+  textureDimensions_bd94c8(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depthcube_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depthcube_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_bd94c8(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(depthcube_array<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_bd94c8(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/bd94c8.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/bd94c8.wgsl.expected.spvasm
new file mode 100644
index 0000000..eb9b16d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/bd94c8.wgsl.expected.spvasm
@@ -0,0 +1,85 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+               OpCapability Shader
+               OpCapability SampledCubeArray
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_bd94c8 "textureDimensions_bd94c8"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %20 = OpConstantNull %uint
+     %v2uint = OpTypeVector %uint 2
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %29 = OpConstantNull %v2uint
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_bd94c8 = OpFunction %void None %12
+         %15 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %20
+        %res = OpVariable %_ptr_Function_v2uint Function %29
+               OpStore %arg_1 %uint_1
+         %25 = OpLoad %11 %arg_0
+         %26 = OpLoad %uint %arg_1
+         %23 = OpImageQuerySizeLod %v3uint %25 %26
+         %21 = OpVectorShuffle %v2uint %23 %23 0 1
+               OpStore %res %21
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_bd94c8
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureDimensions_bd94c8
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureDimensions_bd94c8
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/bd94c8.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/bd94c8.wgsl.expected.wgsl
new file mode 100644
index 0000000..c5479d5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/bd94c8.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_depth_cube_array;
+
+fn textureDimensions_bd94c8() {
+  var arg_1 = 1u;
+  var res : vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_bd94c8();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_bd94c8();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_bd94c8();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/c1dbf6.wgsl b/test/tint/builtins/gen/var/textureDimensions/c1dbf6.wgsl
new file mode 100644
index 0000000..3c783c2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/c1dbf6.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba8uint, write>;
+
+// fn textureDimensions(texture: texture_storage_2d<rgba8uint, write>) -> vec2<u32>
+fn textureDimensions_c1dbf6() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_c1dbf6();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_c1dbf6();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_c1dbf6();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/c1dbf6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/c1dbf6.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..ec06df9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/c1dbf6.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<uint4> arg_0 : register(u0, space1);
+
+void textureDimensions_c1dbf6() {
+  int2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_c1dbf6();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_c1dbf6();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_c1dbf6();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/c1dbf6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/c1dbf6.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..ec06df9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/c1dbf6.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<uint4> arg_0 : register(u0, space1);
+
+void textureDimensions_c1dbf6() {
+  int2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_c1dbf6();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_c1dbf6();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_c1dbf6();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/c1dbf6.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/c1dbf6.wgsl.expected.glsl
new file mode 100644
index 0000000..4c2ee10
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/c1dbf6.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba8ui) uniform highp writeonly uimage2D arg_0;
+void textureDimensions_c1dbf6() {
+  uvec2 res = uvec2(imageSize(arg_0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_c1dbf6();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba8ui) uniform highp writeonly uimage2D arg_0;
+void textureDimensions_c1dbf6() {
+  uvec2 res = uvec2(imageSize(arg_0));
+}
+
+void fragment_main() {
+  textureDimensions_c1dbf6();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba8ui) uniform highp writeonly uimage2D arg_0;
+void textureDimensions_c1dbf6() {
+  uvec2 res = uvec2(imageSize(arg_0));
+}
+
+void compute_main() {
+  textureDimensions_c1dbf6();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/c1dbf6.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/c1dbf6.wgsl.expected.msl
new file mode 100644
index 0000000..04722f5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/c1dbf6.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_c1dbf6(texture2d<uint, access::write> tint_symbol_1) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::write> tint_symbol_2) {
+  textureDimensions_c1dbf6(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_c1dbf6(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_c1dbf6(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/c1dbf6.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/c1dbf6.wgsl.expected.spvasm
new file mode 100644
index 0000000..ae9f484
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/c1dbf6.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_c1dbf6 "textureDimensions_c1dbf6"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 0 0 2 Rgba8ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %v2uint = OpTypeVector %uint 2
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %22 = OpConstantNull %v2uint
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_c1dbf6 = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %22
+         %19 = OpLoad %11 %arg_0
+         %17 = OpImageQuerySize %v2uint %19
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %textureDimensions_c1dbf6
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %28 = OpLabel
+         %29 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %29
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_c1dbf6
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureDimensions_c1dbf6
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/c1dbf6.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/c1dbf6.wgsl.expected.wgsl
new file mode 100644
index 0000000..590817f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/c1dbf6.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba8uint, write>;
+
+fn textureDimensions_c1dbf6() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_c1dbf6();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_c1dbf6();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_c1dbf6();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/c2cdd3.wgsl b/test/tint/builtins/gen/var/textureDimensions/c2cdd3.wgsl
new file mode 100644
index 0000000..6feb2e2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/c2cdd3.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_multisampled_2d;
+
+// fn textureDimensions(texture: texture_depth_multisampled_2d) -> vec2<u32>
+fn textureDimensions_c2cdd3() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_c2cdd3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_c2cdd3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_c2cdd3();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/c2cdd3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/c2cdd3.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..45db8ba
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/c2cdd3.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DMS<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_c2cdd3() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_c2cdd3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_c2cdd3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_c2cdd3();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/c2cdd3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/c2cdd3.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..45db8ba
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/c2cdd3.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DMS<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_c2cdd3() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_c2cdd3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_c2cdd3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_c2cdd3();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/c2cdd3.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/c2cdd3.wgsl.expected.glsl
new file mode 100644
index 0000000..ef3ef24
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/c2cdd3.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp sampler2DMS arg_0_1;
+void textureDimensions_c2cdd3() {
+  uvec2 res = uvec2(textureSize(arg_0_1));
+}
+
+vec4 vertex_main() {
+  textureDimensions_c2cdd3();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DMS arg_0_1;
+void textureDimensions_c2cdd3() {
+  uvec2 res = uvec2(textureSize(arg_0_1));
+}
+
+void fragment_main() {
+  textureDimensions_c2cdd3();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2DMS arg_0_1;
+void textureDimensions_c2cdd3() {
+  uvec2 res = uvec2(textureSize(arg_0_1));
+}
+
+void compute_main() {
+  textureDimensions_c2cdd3();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/c2cdd3.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/c2cdd3.wgsl.expected.msl
new file mode 100644
index 0000000..53a8299
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/c2cdd3.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_c2cdd3(depth2d_ms<float, access::read> tint_symbol_1) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d_ms<float, access::read> tint_symbol_2) {
+  textureDimensions_c2cdd3(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d_ms<float, access::read> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depth2d_ms<float, access::read> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_c2cdd3(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(depth2d_ms<float, access::read> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_c2cdd3(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/c2cdd3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/c2cdd3.wgsl.expected.spvasm
new file mode 100644
index 0000000..c107a82
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/c2cdd3.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_c2cdd3 "textureDimensions_c2cdd3"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 1 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %22 = OpConstantNull %v2uint
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_c2cdd3 = OpFunction %void None %12
+         %15 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %22
+         %19 = OpLoad %11 %arg_0
+         %16 = OpImageQuerySize %v2uint %19
+               OpStore %res %16
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %textureDimensions_c2cdd3
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %28 = OpLabel
+         %29 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %29
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_c2cdd3
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureDimensions_c2cdd3
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/c2cdd3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/c2cdd3.wgsl.expected.wgsl
new file mode 100644
index 0000000..503bc4d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/c2cdd3.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_depth_multisampled_2d;
+
+fn textureDimensions_c2cdd3() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_c2cdd3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_c2cdd3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_c2cdd3();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/c30e75.wgsl b/test/tint/builtins/gen/var/textureDimensions/c30e75.wgsl
deleted file mode 100644
index 6465afc..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/c30e75.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d<r32sint, write>;
-
-// fn textureDimensions(texture: texture_storage_2d<r32sint, write>) -> vec2<i32>
-fn textureDimensions_c30e75() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_c30e75();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_c30e75();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_c30e75();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/c30e75.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/c30e75.wgsl.expected.dxc.hlsl
deleted file mode 100644
index e4ae382..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/c30e75.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2D<int4> arg_0 : register(u0, space1);
-
-void textureDimensions_c30e75() {
-  int2 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
-  int2 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_c30e75();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_c30e75();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_c30e75();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/c30e75.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/c30e75.wgsl.expected.fxc.hlsl
deleted file mode 100644
index e4ae382..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/c30e75.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2D<int4> arg_0 : register(u0, space1);
-
-void textureDimensions_c30e75() {
-  int2 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
-  int2 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_c30e75();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_c30e75();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_c30e75();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/c30e75.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/c30e75.wgsl.expected.glsl
deleted file mode 100644
index 06b6108..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/c30e75.wgsl.expected.glsl
+++ /dev/null
@@ -1,52 +0,0 @@
-#version 310 es
-
-layout(r32i) uniform highp writeonly iimage2D arg_0;
-void textureDimensions_c30e75() {
-  ivec2 res = imageSize(arg_0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_c30e75();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-layout(r32i) uniform highp writeonly iimage2D arg_0;
-void textureDimensions_c30e75() {
-  ivec2 res = imageSize(arg_0);
-}
-
-void fragment_main() {
-  textureDimensions_c30e75();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-layout(r32i) uniform highp writeonly iimage2D arg_0;
-void textureDimensions_c30e75() {
-  ivec2 res = imageSize(arg_0);
-}
-
-void compute_main() {
-  textureDimensions_c30e75();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/c30e75.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/c30e75.wgsl.expected.msl
deleted file mode 100644
index 711f4aa..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/c30e75.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_c30e75(texture2d<int, access::write> tint_symbol_1) {
-  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture2d<int, access::write> tint_symbol_2) {
-  textureDimensions_c30e75(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture2d<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture2d<int, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_c30e75(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture2d<int, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_c30e75(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/c30e75.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/c30e75.wgsl.expected.spvasm
deleted file mode 100644
index 05cad7c..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/c30e75.wgsl.expected.spvasm
+++ /dev/null
@@ -1,76 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 37
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_c30e75 "textureDimensions_c30e75"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-        %int = OpTypeInt 32 1
-         %11 = OpTypeImage %int 2D 0 0 0 2 R32i
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-      %v2int = OpTypeVector %int 2
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %22 = OpConstantNull %v2int
-         %23 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_c30e75 = OpFunction %void None %13
-         %16 = OpLabel
-        %res = OpVariable %_ptr_Function_v2int Function %22
-         %19 = OpLoad %11 %arg_0
-         %17 = OpImageQuerySize %v2int %19
-               OpStore %res %17
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %23
-         %25 = OpLabel
-         %26 = OpFunctionCall %void %textureDimensions_c30e75
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %28 = OpLabel
-         %29 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %29
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %32 = OpLabel
-         %33 = OpFunctionCall %void %textureDimensions_c30e75
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %35 = OpLabel
-         %36 = OpFunctionCall %void %textureDimensions_c30e75
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/c30e75.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/c30e75.wgsl.expected.wgsl
deleted file mode 100644
index 121b2c3..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/c30e75.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_2d<r32sint, write>;
-
-fn textureDimensions_c30e75() {
-  var res : vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_c30e75();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_c30e75();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_c30e75();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/c44fc1.wgsl b/test/tint/builtins/gen/var/textureDimensions/c44fc1.wgsl
new file mode 100644
index 0000000..51445e0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/c44fc1.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32sint, write>;
+
+// fn textureDimensions(texture: texture_storage_2d_array<rgba32sint, write>) -> vec2<u32>
+fn textureDimensions_c44fc1() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_c44fc1();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_c44fc1();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_c44fc1();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/c44fc1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/c44fc1.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..26b09c0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/c44fc1.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureDimensions_c44fc1() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_c44fc1();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_c44fc1();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_c44fc1();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/c44fc1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/c44fc1.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..26b09c0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/c44fc1.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2DArray<int4> arg_0 : register(u0, space1);
+
+void textureDimensions_c44fc1() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_c44fc1();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_c44fc1();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_c44fc1();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/c44fc1.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/c44fc1.wgsl.expected.glsl
new file mode 100644
index 0000000..65da687
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/c44fc1.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba32i) uniform highp writeonly iimage2DArray arg_0;
+void textureDimensions_c44fc1() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+}
+
+vec4 vertex_main() {
+  textureDimensions_c44fc1();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba32i) uniform highp writeonly iimage2DArray arg_0;
+void textureDimensions_c44fc1() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+}
+
+void fragment_main() {
+  textureDimensions_c44fc1();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba32i) uniform highp writeonly iimage2DArray arg_0;
+void textureDimensions_c44fc1() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+}
+
+void compute_main() {
+  textureDimensions_c44fc1();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/c44fc1.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/c44fc1.wgsl.expected.msl
new file mode 100644
index 0000000..bf13ca8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/c44fc1.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_c44fc1(texture2d_array<int, access::write> tint_symbol_1) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::write> tint_symbol_2) {
+  textureDimensions_c44fc1(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_c44fc1(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_c44fc1(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/c44fc1.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/c44fc1.wgsl.expected.spvasm
new file mode 100644
index 0000000..de28a79
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/c44fc1.wgsl.expected.spvasm
@@ -0,0 +1,79 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 40
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_c44fc1 "textureDimensions_c44fc1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 2 Rgba32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %25 = OpConstantNull %v2uint
+         %26 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_c44fc1 = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %25
+         %22 = OpLoad %11 %arg_0
+         %20 = OpImageQuerySize %v3uint %22
+         %17 = OpVectorShuffle %v2uint %20 %20 0 1
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %26
+         %28 = OpLabel
+         %29 = OpFunctionCall %void %textureDimensions_c44fc1
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %31 = OpLabel
+         %32 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %32
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureDimensions_c44fc1
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureDimensions_c44fc1
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/c44fc1.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/c44fc1.wgsl.expected.wgsl
new file mode 100644
index 0000000..3e9f662
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/c44fc1.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32sint, write>;
+
+fn textureDimensions_c44fc1() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_c44fc1();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_c44fc1();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_c44fc1();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/c5a36e.wgsl b/test/tint/builtins/gen/var/textureDimensions/c5a36e.wgsl
new file mode 100644
index 0000000..61e4f3b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/c5a36e.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_cube;
+
+// fn textureDimensions(texture: texture_depth_cube) -> vec2<u32>
+fn textureDimensions_c5a36e() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_c5a36e();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_c5a36e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_c5a36e();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/c5a36e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/c5a36e.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..2bfa274
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/c5a36e.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+TextureCube arg_0 : register(t0, space1);
+
+void textureDimensions_c5a36e() {
+  int2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_c5a36e();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_c5a36e();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_c5a36e();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/c5a36e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/c5a36e.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..2bfa274
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/c5a36e.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+TextureCube arg_0 : register(t0, space1);
+
+void textureDimensions_c5a36e() {
+  int2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_c5a36e();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_c5a36e();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_c5a36e();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/c5a36e.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/c5a36e.wgsl.expected.glsl
new file mode 100644
index 0000000..8927ad3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/c5a36e.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp samplerCube arg_0_1;
+void textureDimensions_c5a36e() {
+  uvec2 res = uvec2(textureSize(arg_0_1, 0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_c5a36e();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCube arg_0_1;
+void textureDimensions_c5a36e() {
+  uvec2 res = uvec2(textureSize(arg_0_1, 0));
+}
+
+void fragment_main() {
+  textureDimensions_c5a36e();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp samplerCube arg_0_1;
+void textureDimensions_c5a36e() {
+  uvec2 res = uvec2(textureSize(arg_0_1, 0));
+}
+
+void compute_main() {
+  textureDimensions_c5a36e();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/c5a36e.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/c5a36e.wgsl.expected.msl
new file mode 100644
index 0000000..9d92d1f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/c5a36e.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_c5a36e(depthcube<float, access::sample> tint_symbol_1) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(depthcube<float, access::sample> tint_symbol_2) {
+  textureDimensions_c5a36e(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depthcube<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depthcube<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_c5a36e(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(depthcube<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_c5a36e(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/c5a36e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/c5a36e.wgsl.expected.spvasm
new file mode 100644
index 0000000..0992548
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/c5a36e.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_c5a36e "textureDimensions_c5a36e"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float Cube 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+        %int = OpTypeInt 32 1
+      %int_0 = OpConstant %int 0
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %24 = OpConstantNull %v2uint
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_c5a36e = OpFunction %void None %12
+         %15 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %24
+         %19 = OpLoad %11 %arg_0
+         %16 = OpImageQuerySizeLod %v2uint %19 %int_0
+               OpStore %res %16
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %textureDimensions_c5a36e
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureDimensions_c5a36e
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureDimensions_c5a36e
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/c5a36e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/c5a36e.wgsl.expected.wgsl
new file mode 100644
index 0000000..1f9256a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/c5a36e.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_depth_cube;
+
+fn textureDimensions_c5a36e() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_c5a36e();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_c5a36e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_c5a36e();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/c7943d.wgsl b/test/tint/builtins/gen/var/textureDimensions/c7943d.wgsl
deleted file mode 100644
index 53293aa..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/c7943d.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d<rgba8uint, write>;
-
-// fn textureDimensions(texture: texture_storage_2d<rgba8uint, write>) -> vec2<i32>
-fn textureDimensions_c7943d() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_c7943d();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_c7943d();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_c7943d();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/c7943d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/c7943d.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 4b69252..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/c7943d.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2D<uint4> arg_0 : register(u0, space1);
-
-void textureDimensions_c7943d() {
-  int2 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
-  int2 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_c7943d();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_c7943d();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_c7943d();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/c7943d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/c7943d.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 4b69252..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/c7943d.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2D<uint4> arg_0 : register(u0, space1);
-
-void textureDimensions_c7943d() {
-  int2 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
-  int2 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_c7943d();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_c7943d();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_c7943d();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/c7943d.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/c7943d.wgsl.expected.glsl
deleted file mode 100644
index ec88d6e..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/c7943d.wgsl.expected.glsl
+++ /dev/null
@@ -1,52 +0,0 @@
-#version 310 es
-
-layout(rgba8ui) uniform highp writeonly uimage2D arg_0;
-void textureDimensions_c7943d() {
-  ivec2 res = imageSize(arg_0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_c7943d();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-layout(rgba8ui) uniform highp writeonly uimage2D arg_0;
-void textureDimensions_c7943d() {
-  ivec2 res = imageSize(arg_0);
-}
-
-void fragment_main() {
-  textureDimensions_c7943d();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-layout(rgba8ui) uniform highp writeonly uimage2D arg_0;
-void textureDimensions_c7943d() {
-  ivec2 res = imageSize(arg_0);
-}
-
-void compute_main() {
-  textureDimensions_c7943d();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/c7943d.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/c7943d.wgsl.expected.msl
deleted file mode 100644
index 39c32d1..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/c7943d.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_c7943d(texture2d<uint, access::write> tint_symbol_1) {
-  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture2d<uint, access::write> tint_symbol_2) {
-  textureDimensions_c7943d(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture2d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture2d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_c7943d(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture2d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_c7943d(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/c7943d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/c7943d.wgsl.expected.spvasm
deleted file mode 100644
index 0f1070d..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/c7943d.wgsl.expected.spvasm
+++ /dev/null
@@ -1,77 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 38
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_c7943d "textureDimensions_c7943d"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-       %uint = OpTypeInt 32 0
-         %11 = OpTypeImage %uint 2D 0 0 0 2 Rgba8ui
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %v2int = OpTypeVector %int 2
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %23 = OpConstantNull %v2int
-         %24 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_c7943d = OpFunction %void None %13
-         %16 = OpLabel
-        %res = OpVariable %_ptr_Function_v2int Function %23
-         %20 = OpLoad %11 %arg_0
-         %17 = OpImageQuerySize %v2int %20
-               OpStore %res %17
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %24
-         %26 = OpLabel
-         %27 = OpFunctionCall %void %textureDimensions_c7943d
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %29 = OpLabel
-         %30 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %30
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %33 = OpLabel
-         %34 = OpFunctionCall %void %textureDimensions_c7943d
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %36 = OpLabel
-         %37 = OpFunctionCall %void %textureDimensions_c7943d
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/c7943d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/c7943d.wgsl.expected.wgsl
deleted file mode 100644
index 0d589b5..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/c7943d.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba8uint, write>;
-
-fn textureDimensions_c7943d() {
-  var res : vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_c7943d();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_c7943d();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_c7943d();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/c871f3.wgsl b/test/tint/builtins/gen/var/textureDimensions/c871f3.wgsl
new file mode 100644
index 0000000..21836c0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/c871f3.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_3d<i32>;
+
+// fn textureDimensions(texture: texture_3d<i32>, level: u32) -> vec3<u32>
+fn textureDimensions_c871f3() {
+  var arg_1 = 1u;
+  var res: vec3<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_c871f3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_c871f3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_c871f3();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/c871f3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/c871f3.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..60276c7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/c871f3.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_c871f3() {
+  uint arg_1 = 1u;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  uint3 res = tint_tmp.xyz;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_c871f3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_c871f3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_c871f3();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/c871f3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/c871f3.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..60276c7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/c871f3.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_c871f3() {
+  uint arg_1 = 1u;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  uint3 res = tint_tmp.xyz;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_c871f3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_c871f3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_c871f3();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/c871f3.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/c871f3.wgsl.expected.glsl
new file mode 100644
index 0000000..a3534d6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/c871f3.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp isampler3D arg_0_1;
+void textureDimensions_c871f3() {
+  uint arg_1 = 1u;
+  uvec3 res = uvec3(textureSize(arg_0_1, int(arg_1)));
+}
+
+vec4 vertex_main() {
+  textureDimensions_c871f3();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isampler3D arg_0_1;
+void textureDimensions_c871f3() {
+  uint arg_1 = 1u;
+  uvec3 res = uvec3(textureSize(arg_0_1, int(arg_1)));
+}
+
+void fragment_main() {
+  textureDimensions_c871f3();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp isampler3D arg_0_1;
+void textureDimensions_c871f3() {
+  uint arg_1 = 1u;
+  uvec3 res = uvec3(textureSize(arg_0_1, int(arg_1)));
+}
+
+void compute_main() {
+  textureDimensions_c871f3();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/c871f3.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/c871f3.wgsl.expected.msl
new file mode 100644
index 0000000..e9dd808
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/c871f3.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_c871f3(texture3d<int, access::sample> tint_symbol_1) {
+  uint arg_1 = 1u;
+  uint3 res = uint3(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1), tint_symbol_1.get_depth(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<int, access::sample> tint_symbol_2) {
+  textureDimensions_c871f3(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<int, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<int, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_c871f3(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture3d<int, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_c871f3(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/c871f3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/c871f3.wgsl.expected.spvasm
new file mode 100644
index 0000000..94bb170
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/c871f3.wgsl.expected.spvasm
@@ -0,0 +1,83 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_c871f3 "textureDimensions_c871f3"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 3D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %21 = OpConstantNull %uint
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+         %28 = OpConstantNull %v3uint
+         %29 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_c871f3 = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %21
+        %res = OpVariable %_ptr_Function_v3uint Function %28
+               OpStore %arg_1 %uint_1
+         %24 = OpLoad %11 %arg_0
+         %25 = OpLoad %uint %arg_1
+         %22 = OpImageQuerySizeLod %v3uint %24 %25
+               OpStore %res %22
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureDimensions_c871f3
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %34 = OpLabel
+         %35 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %35
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureDimensions_c871f3
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureDimensions_c871f3
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/c871f3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/c871f3.wgsl.expected.wgsl
new file mode 100644
index 0000000..80c862c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/c871f3.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_3d<i32>;
+
+fn textureDimensions_c871f3() {
+  var arg_1 = 1u;
+  var res : vec3<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_c871f3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_c871f3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_c871f3();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/cad3b7.wgsl b/test/tint/builtins/gen/var/textureDimensions/cad3b7.wgsl
new file mode 100644
index 0000000..0f4624c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/cad3b7.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<r32sint, write>;
+
+// fn textureDimensions(texture: texture_storage_2d<r32sint, write>) -> vec2<u32>
+fn textureDimensions_cad3b7() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_cad3b7();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_cad3b7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_cad3b7();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/cad3b7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/cad3b7.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..b26a056
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/cad3b7.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<int4> arg_0 : register(u0, space1);
+
+void textureDimensions_cad3b7() {
+  int2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_cad3b7();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_cad3b7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_cad3b7();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/cad3b7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/cad3b7.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..b26a056
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/cad3b7.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<int4> arg_0 : register(u0, space1);
+
+void textureDimensions_cad3b7() {
+  int2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_cad3b7();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_cad3b7();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_cad3b7();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/cad3b7.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/cad3b7.wgsl.expected.glsl
new file mode 100644
index 0000000..f133039
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/cad3b7.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(r32i) uniform highp writeonly iimage2D arg_0;
+void textureDimensions_cad3b7() {
+  uvec2 res = uvec2(imageSize(arg_0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_cad3b7();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(r32i) uniform highp writeonly iimage2D arg_0;
+void textureDimensions_cad3b7() {
+  uvec2 res = uvec2(imageSize(arg_0));
+}
+
+void fragment_main() {
+  textureDimensions_cad3b7();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(r32i) uniform highp writeonly iimage2D arg_0;
+void textureDimensions_cad3b7() {
+  uvec2 res = uvec2(imageSize(arg_0));
+}
+
+void compute_main() {
+  textureDimensions_cad3b7();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/cad3b7.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/cad3b7.wgsl.expected.msl
new file mode 100644
index 0000000..1fcfb3f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/cad3b7.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_cad3b7(texture2d<int, access::write> tint_symbol_1) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::write> tint_symbol_2) {
+  textureDimensions_cad3b7(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_cad3b7(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_cad3b7(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/cad3b7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/cad3b7.wgsl.expected.spvasm
new file mode 100644
index 0000000..0f7dfc3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/cad3b7.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_cad3b7 "textureDimensions_cad3b7"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 0 0 2 R32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %23 = OpConstantNull %v2uint
+         %24 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_cad3b7 = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %23
+         %20 = OpLoad %11 %arg_0
+         %17 = OpImageQuerySize %v2uint %20
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %textureDimensions_cad3b7
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %29 = OpLabel
+         %30 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %30
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureDimensions_cad3b7
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureDimensions_cad3b7
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/cad3b7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/cad3b7.wgsl.expected.wgsl
new file mode 100644
index 0000000..24b1443
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/cad3b7.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<r32sint, write>;
+
+fn textureDimensions_cad3b7() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_cad3b7();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_cad3b7();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_cad3b7();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/cc947b.wgsl b/test/tint/builtins/gen/var/textureDimensions/cc947b.wgsl
new file mode 100644
index 0000000..391a94c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/cc947b.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba8snorm, write>;
+
+// fn textureDimensions(texture: texture_storage_3d<rgba8snorm, write>) -> vec3<u32>
+fn textureDimensions_cc947b() {
+  var res: vec3<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_cc947b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_cc947b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_cc947b();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/cc947b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/cc947b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..a29d944
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/cc947b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<float4> arg_0 : register(u0, space1);
+
+void textureDimensions_cc947b() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_cc947b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_cc947b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_cc947b();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/cc947b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/cc947b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..a29d944
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/cc947b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<float4> arg_0 : register(u0, space1);
+
+void textureDimensions_cc947b() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_cc947b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_cc947b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_cc947b();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/cc947b.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/cc947b.wgsl.expected.glsl
new file mode 100644
index 0000000..3340606
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/cc947b.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba8_snorm) uniform highp writeonly image3D arg_0;
+void textureDimensions_cc947b() {
+  uvec3 res = uvec3(imageSize(arg_0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_cc947b();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba8_snorm) uniform highp writeonly image3D arg_0;
+void textureDimensions_cc947b() {
+  uvec3 res = uvec3(imageSize(arg_0));
+}
+
+void fragment_main() {
+  textureDimensions_cc947b();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba8_snorm) uniform highp writeonly image3D arg_0;
+void textureDimensions_cc947b() {
+  uvec3 res = uvec3(imageSize(arg_0));
+}
+
+void compute_main() {
+  textureDimensions_cc947b();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/cc947b.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/cc947b.wgsl.expected.msl
new file mode 100644
index 0000000..4d1cb5d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/cc947b.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_cc947b(texture3d<float, access::write> tint_symbol_1) {
+  uint3 res = uint3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::write> tint_symbol_2) {
+  textureDimensions_cc947b(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_cc947b(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture3d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_cc947b(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/cc947b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/cc947b.wgsl.expected.spvasm
new file mode 100644
index 0000000..a51f315
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/cc947b.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_cc947b "textureDimensions_cc947b"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 3D 0 0 0 2 Rgba8Snorm
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+         %22 = OpConstantNull %v3uint
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_cc947b = OpFunction %void None %12
+         %15 = OpLabel
+        %res = OpVariable %_ptr_Function_v3uint Function %22
+         %19 = OpLoad %11 %arg_0
+         %16 = OpImageQuerySize %v3uint %19
+               OpStore %res %16
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %textureDimensions_cc947b
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %28 = OpLabel
+         %29 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %29
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_cc947b
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureDimensions_cc947b
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/cc947b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/cc947b.wgsl.expected.wgsl
new file mode 100644
index 0000000..c5ca2ec
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/cc947b.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba8snorm, write>;
+
+fn textureDimensions_cc947b() {
+  var res : vec3<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_cc947b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_cc947b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_cc947b();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/cc968c.wgsl b/test/tint/builtins/gen/var/textureDimensions/cc968c.wgsl
deleted file mode 100644
index db888ed..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/cc968c.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_1d<rg32sint, write>;
-
-// fn textureDimensions(texture: texture_storage_1d<rg32sint, write>) -> i32
-fn textureDimensions_cc968c() {
-  var res: i32 = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_cc968c();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_cc968c();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_cc968c();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/cc968c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/cc968c.wgsl.expected.dxc.hlsl
deleted file mode 100644
index e20e81b..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/cc968c.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture1D<int4> arg_0 : register(u0, space1);
-
-void textureDimensions_cc968c() {
-  int tint_tmp;
-  arg_0.GetDimensions(tint_tmp);
-  int res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_cc968c();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_cc968c();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_cc968c();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/cc968c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/cc968c.wgsl.expected.fxc.hlsl
deleted file mode 100644
index e20e81b..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/cc968c.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture1D<int4> arg_0 : register(u0, space1);
-
-void textureDimensions_cc968c() {
-  int tint_tmp;
-  arg_0.GetDimensions(tint_tmp);
-  int res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_cc968c();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_cc968c();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_cc968c();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/cc968c.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/cc968c.wgsl.expected.glsl
deleted file mode 100644
index d7f3bec..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/cc968c.wgsl.expected.glsl
+++ /dev/null
@@ -1,75 +0,0 @@
-SKIP: FAILED
-
-#version 310 es
-
-layout(rg32i) uniform highp writeonly iimage1D arg_0;
-void textureDimensions_cc968c() {
-  int res = imageSize(arg_0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_cc968c();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'image load-store format' : not supported with this profile: es
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision mediump float;
-
-layout(rg32i) uniform highp writeonly iimage1D arg_0;
-void textureDimensions_cc968c() {
-  int res = imageSize(arg_0);
-}
-
-void fragment_main() {
-  textureDimensions_cc968c();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:4: 'image load-store format' : not supported with this profile: es
-ERROR: 0:4: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-
-layout(rg32i) uniform highp writeonly iimage1D arg_0;
-void textureDimensions_cc968c() {
-  int res = imageSize(arg_0);
-}
-
-void compute_main() {
-  textureDimensions_cc968c();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'image load-store format' : not supported with this profile: es
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/cc968c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/cc968c.wgsl.expected.msl
deleted file mode 100644
index 2a4db09..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/cc968c.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_cc968c(texture1d<int, access::write> tint_symbol_1) {
-  int res = int(tint_symbol_1.get_width(0));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture1d<int, access::write> tint_symbol_2) {
-  textureDimensions_cc968c(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture1d<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture1d<int, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_cc968c(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture1d<int, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_cc968c(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/cc968c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/cc968c.wgsl.expected.spvasm
deleted file mode 100644
index 21f2dd1..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/cc968c.wgsl.expected.spvasm
+++ /dev/null
@@ -1,77 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 36
-; Schema: 0
-               OpCapability Shader
-               OpCapability Image1D
-               OpCapability StorageImageExtendedFormats
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_cc968c "textureDimensions_cc968c"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-        %int = OpTypeInt 32 1
-         %11 = OpTypeImage %int 1D 0 0 0 2 Rg32i
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-%_ptr_Function_int = OpTypePointer Function %int
-         %21 = OpConstantNull %int
-         %22 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_cc968c = OpFunction %void None %13
-         %16 = OpLabel
-        %res = OpVariable %_ptr_Function_int Function %21
-         %18 = OpLoad %11 %arg_0
-         %17 = OpImageQuerySize %int %18
-               OpStore %res %17
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %22
-         %24 = OpLabel
-         %25 = OpFunctionCall %void %textureDimensions_cc968c
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %27 = OpLabel
-         %28 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %28
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %31 = OpLabel
-         %32 = OpFunctionCall %void %textureDimensions_cc968c
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %34 = OpLabel
-         %35 = OpFunctionCall %void %textureDimensions_cc968c
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/cc968c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/cc968c.wgsl.expected.wgsl
deleted file mode 100644
index 8caceed..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/cc968c.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_1d<rg32sint, write>;
-
-fn textureDimensions_cc968c() {
-  var res : i32 = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_cc968c();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_cc968c();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_cc968c();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/cccc8f.wgsl b/test/tint/builtins/gen/var/textureDimensions/cccc8f.wgsl
deleted file mode 100644
index ac04914..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/cccc8f.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_1d<rgba8snorm, write>;
-
-// fn textureDimensions(texture: texture_storage_1d<rgba8snorm, write>) -> i32
-fn textureDimensions_cccc8f() {
-  var res: i32 = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_cccc8f();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_cccc8f();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_cccc8f();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/cccc8f.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/cccc8f.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 8030a26..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/cccc8f.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture1D<float4> arg_0 : register(u0, space1);
-
-void textureDimensions_cccc8f() {
-  int tint_tmp;
-  arg_0.GetDimensions(tint_tmp);
-  int res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_cccc8f();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_cccc8f();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_cccc8f();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/cccc8f.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/cccc8f.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 8030a26..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/cccc8f.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture1D<float4> arg_0 : register(u0, space1);
-
-void textureDimensions_cccc8f() {
-  int tint_tmp;
-  arg_0.GetDimensions(tint_tmp);
-  int res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_cccc8f();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_cccc8f();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_cccc8f();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/cccc8f.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/cccc8f.wgsl.expected.glsl
deleted file mode 100644
index 8ea9b9e..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/cccc8f.wgsl.expected.glsl
+++ /dev/null
@@ -1,78 +0,0 @@
-SKIP: FAILED
-
-#version 310 es
-
-layout(rgba8_snorm) uniform highp writeonly image1D arg_0;
-void textureDimensions_cccc8f() {
-  int res = imageSize(arg_0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_cccc8f();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'image1D' : Reserved word. 
-WARNING: 0:3: 'layout' : useless application of layout qualifier 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision mediump float;
-
-layout(rgba8_snorm) uniform highp writeonly image1D arg_0;
-void textureDimensions_cccc8f() {
-  int res = imageSize(arg_0);
-}
-
-void fragment_main() {
-  textureDimensions_cccc8f();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:4: 'image1D' : Reserved word. 
-WARNING: 0:4: 'layout' : useless application of layout qualifier 
-ERROR: 0:4: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-
-layout(rgba8_snorm) uniform highp writeonly image1D arg_0;
-void textureDimensions_cccc8f() {
-  int res = imageSize(arg_0);
-}
-
-void compute_main() {
-  textureDimensions_cccc8f();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'image1D' : Reserved word. 
-WARNING: 0:3: 'layout' : useless application of layout qualifier 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/cccc8f.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/cccc8f.wgsl.expected.msl
deleted file mode 100644
index f03ce0c..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/cccc8f.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_cccc8f(texture1d<float, access::write> tint_symbol_1) {
-  int res = int(tint_symbol_1.get_width(0));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture1d<float, access::write> tint_symbol_2) {
-  textureDimensions_cccc8f(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture1d<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture1d<float, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_cccc8f(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture1d<float, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_cccc8f(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/cccc8f.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/cccc8f.wgsl.expected.spvasm
deleted file mode 100644
index ae7cb8d..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/cccc8f.wgsl.expected.spvasm
+++ /dev/null
@@ -1,76 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 36
-; Schema: 0
-               OpCapability Shader
-               OpCapability Image1D
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_cccc8f "textureDimensions_cccc8f"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-         %11 = OpTypeImage %float 1D 0 0 0 2 Rgba8Snorm
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %12 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-%_ptr_Function_int = OpTypePointer Function %int
-         %21 = OpConstantNull %int
-         %22 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_cccc8f = OpFunction %void None %12
-         %15 = OpLabel
-        %res = OpVariable %_ptr_Function_int Function %21
-         %18 = OpLoad %11 %arg_0
-         %16 = OpImageQuerySize %int %18
-               OpStore %res %16
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %22
-         %24 = OpLabel
-         %25 = OpFunctionCall %void %textureDimensions_cccc8f
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %12
-         %27 = OpLabel
-         %28 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %28
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %12
-         %31 = OpLabel
-         %32 = OpFunctionCall %void %textureDimensions_cccc8f
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %12
-         %34 = OpLabel
-         %35 = OpFunctionCall %void %textureDimensions_cccc8f
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/cccc8f.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/cccc8f.wgsl.expected.wgsl
deleted file mode 100644
index 19570ad..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/cccc8f.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba8snorm, write>;
-
-fn textureDimensions_cccc8f() {
-  var res : i32 = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_cccc8f();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_cccc8f();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_cccc8f();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/cd76a7.wgsl b/test/tint/builtins/gen/var/textureDimensions/cd76a7.wgsl
deleted file mode 100644
index 1bca07e..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/cd76a7.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_3d<rgba8unorm, write>;
-
-// fn textureDimensions(texture: texture_storage_3d<rgba8unorm, write>) -> vec3<i32>
-fn textureDimensions_cd76a7() {
-  var res: vec3<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_cd76a7();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_cd76a7();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_cd76a7();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/cd76a7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/cd76a7.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 107e7e6..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/cd76a7.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture3D<float4> arg_0 : register(u0, space1);
-
-void textureDimensions_cd76a7() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int3 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_cd76a7();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_cd76a7();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_cd76a7();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/cd76a7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/cd76a7.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 107e7e6..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/cd76a7.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture3D<float4> arg_0 : register(u0, space1);
-
-void textureDimensions_cd76a7() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int3 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_cd76a7();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_cd76a7();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_cd76a7();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/cd76a7.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/cd76a7.wgsl.expected.glsl
deleted file mode 100644
index 92b0dae..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/cd76a7.wgsl.expected.glsl
+++ /dev/null
@@ -1,52 +0,0 @@
-#version 310 es
-
-layout(rgba8) uniform highp writeonly image3D arg_0;
-void textureDimensions_cd76a7() {
-  ivec3 res = imageSize(arg_0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_cd76a7();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-layout(rgba8) uniform highp writeonly image3D arg_0;
-void textureDimensions_cd76a7() {
-  ivec3 res = imageSize(arg_0);
-}
-
-void fragment_main() {
-  textureDimensions_cd76a7();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-layout(rgba8) uniform highp writeonly image3D arg_0;
-void textureDimensions_cd76a7() {
-  ivec3 res = imageSize(arg_0);
-}
-
-void compute_main() {
-  textureDimensions_cd76a7();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/cd76a7.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/cd76a7.wgsl.expected.msl
deleted file mode 100644
index 14b141a..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/cd76a7.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_cd76a7(texture3d<float, access::write> tint_symbol_1) {
-  int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture3d<float, access::write> tint_symbol_2) {
-  textureDimensions_cd76a7(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture3d<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture3d<float, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_cd76a7(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture3d<float, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_cd76a7(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/cd76a7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/cd76a7.wgsl.expected.spvasm
deleted file mode 100644
index 6d33337..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/cd76a7.wgsl.expected.spvasm
+++ /dev/null
@@ -1,76 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 37
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_cd76a7 "textureDimensions_cd76a7"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-         %11 = OpTypeImage %float 3D 0 0 0 2 Rgba8
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %12 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %v3int = OpTypeVector %int 3
-%_ptr_Function_v3int = OpTypePointer Function %v3int
-         %22 = OpConstantNull %v3int
-         %23 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_cd76a7 = OpFunction %void None %12
-         %15 = OpLabel
-        %res = OpVariable %_ptr_Function_v3int Function %22
-         %19 = OpLoad %11 %arg_0
-         %16 = OpImageQuerySize %v3int %19
-               OpStore %res %16
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %23
-         %25 = OpLabel
-         %26 = OpFunctionCall %void %textureDimensions_cd76a7
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %12
-         %28 = OpLabel
-         %29 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %29
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %12
-         %32 = OpLabel
-         %33 = OpFunctionCall %void %textureDimensions_cd76a7
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %12
-         %35 = OpLabel
-         %36 = OpFunctionCall %void %textureDimensions_cd76a7
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/cd76a7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/cd76a7.wgsl.expected.wgsl
deleted file mode 100644
index fa3b1a9..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/cd76a7.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba8unorm, write>;
-
-fn textureDimensions_cd76a7() {
-  var res : vec3<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_cd76a7();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_cd76a7();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_cd76a7();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/cdc6c9.wgsl b/test/tint/builtins/gen/var/textureDimensions/cdc6c9.wgsl
new file mode 100644
index 0000000..3fc78f5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/cdc6c9.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_external;
+
+// fn textureDimensions(texture: texture_external) -> vec2<u32>
+fn textureDimensions_cdc6c9() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_cdc6c9();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_cdc6c9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_cdc6c9();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/cdc6c9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/cdc6c9.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..092b79e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/cdc6c9.wgsl.expected.dxc.hlsl
@@ -0,0 +1,38 @@
+Texture2D<float4> ext_tex_plane_1 : register(t1, space1);
+cbuffer cbuffer_ext_tex_params : register(b2, space1) {
+  uint4 ext_tex_params[11];
+};
+Texture2D<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_cdc6c9() {
+  int2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_cdc6c9();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_cdc6c9();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_cdc6c9();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/cdc6c9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/cdc6c9.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..092b79e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/cdc6c9.wgsl.expected.fxc.hlsl
@@ -0,0 +1,38 @@
+Texture2D<float4> ext_tex_plane_1 : register(t1, space1);
+cbuffer cbuffer_ext_tex_params : register(b2, space1) {
+  uint4 ext_tex_params[11];
+};
+Texture2D<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_cdc6c9() {
+  int2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_cdc6c9();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_cdc6c9();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_cdc6c9();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/cdc6c9.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/cdc6c9.wgsl.expected.glsl
new file mode 100644
index 0000000..61f4523
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/cdc6c9.wgsl.expected.glsl
@@ -0,0 +1,112 @@
+#version 310 es
+
+struct GammaTransferParams {
+  float G;
+  float A;
+  float B;
+  float C;
+  float D;
+  float E;
+  float F;
+  uint padding;
+};
+
+layout(binding = 2, std140) uniform ExternalTextureParams_ubo {
+  uint numPlanes;
+  uint doYuvToRgbConversionOnly;
+  mat3x4 yuvToRgbConversionMatrix;
+  GammaTransferParams gammaDecodeParams;
+  GammaTransferParams gammaEncodeParams;
+  mat3 gamutConversionMatrix;
+} ext_tex_params;
+
+uniform highp sampler2D arg_0_1;
+void textureDimensions_cdc6c9() {
+  uvec2 res = uvec2(textureSize(arg_0_1, 0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_cdc6c9();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+struct GammaTransferParams {
+  float G;
+  float A;
+  float B;
+  float C;
+  float D;
+  float E;
+  float F;
+  uint padding;
+};
+
+layout(binding = 2, std140) uniform ExternalTextureParams_ubo {
+  uint numPlanes;
+  uint doYuvToRgbConversionOnly;
+  mat3x4 yuvToRgbConversionMatrix;
+  GammaTransferParams gammaDecodeParams;
+  GammaTransferParams gammaEncodeParams;
+  mat3 gamutConversionMatrix;
+} ext_tex_params;
+
+uniform highp sampler2D arg_0_1;
+void textureDimensions_cdc6c9() {
+  uvec2 res = uvec2(textureSize(arg_0_1, 0));
+}
+
+void fragment_main() {
+  textureDimensions_cdc6c9();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+struct GammaTransferParams {
+  float G;
+  float A;
+  float B;
+  float C;
+  float D;
+  float E;
+  float F;
+  uint padding;
+};
+
+layout(binding = 2, std140) uniform ExternalTextureParams_ubo {
+  uint numPlanes;
+  uint doYuvToRgbConversionOnly;
+  mat3x4 yuvToRgbConversionMatrix;
+  GammaTransferParams gammaDecodeParams;
+  GammaTransferParams gammaEncodeParams;
+  mat3 gamutConversionMatrix;
+} ext_tex_params;
+
+uniform highp sampler2D arg_0_1;
+void textureDimensions_cdc6c9() {
+  uvec2 res = uvec2(textureSize(arg_0_1, 0));
+}
+
+void compute_main() {
+  textureDimensions_cdc6c9();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/cdc6c9.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/cdc6c9.wgsl.expected.msl
new file mode 100644
index 0000000..3808793
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/cdc6c9.wgsl.expected.msl
@@ -0,0 +1,53 @@
+#include <metal_stdlib>
+
+using namespace metal;
+struct GammaTransferParams {
+  float G;
+  float A;
+  float B;
+  float C;
+  float D;
+  float E;
+  float F;
+  uint padding;
+};
+
+struct ExternalTextureParams {
+  uint numPlanes;
+  uint doYuvToRgbConversionOnly;
+  float3x4 yuvToRgbConversionMatrix;
+  GammaTransferParams gammaDecodeParams;
+  GammaTransferParams gammaEncodeParams;
+  float3x3 gamutConversionMatrix;
+};
+
+void textureDimensions_cdc6c9(texture2d<float, access::sample> tint_symbol_1) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::sample> tint_symbol_2) {
+  textureDimensions_cdc6c9(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_cdc6c9(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_cdc6c9(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/cdc6c9.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/cdc6c9.wgsl.expected.spvasm
new file mode 100644
index 0000000..a2f0f94
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/cdc6c9.wgsl.expected.spvasm
@@ -0,0 +1,127 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 47
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %ext_tex_plane_1 "ext_tex_plane_1"
+               OpName %ExternalTextureParams "ExternalTextureParams"
+               OpMemberName %ExternalTextureParams 0 "numPlanes"
+               OpMemberName %ExternalTextureParams 1 "doYuvToRgbConversionOnly"
+               OpMemberName %ExternalTextureParams 2 "yuvToRgbConversionMatrix"
+               OpMemberName %ExternalTextureParams 3 "gammaDecodeParams"
+               OpName %GammaTransferParams "GammaTransferParams"
+               OpMemberName %GammaTransferParams 0 "G"
+               OpMemberName %GammaTransferParams 1 "A"
+               OpMemberName %GammaTransferParams 2 "B"
+               OpMemberName %GammaTransferParams 3 "C"
+               OpMemberName %GammaTransferParams 4 "D"
+               OpMemberName %GammaTransferParams 5 "E"
+               OpMemberName %GammaTransferParams 6 "F"
+               OpMemberName %GammaTransferParams 7 "padding"
+               OpMemberName %ExternalTextureParams 4 "gammaEncodeParams"
+               OpMemberName %ExternalTextureParams 5 "gamutConversionMatrix"
+               OpName %ext_tex_params "ext_tex_params"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_cdc6c9 "textureDimensions_cdc6c9"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %ext_tex_plane_1 DescriptorSet 1
+               OpDecorate %ext_tex_plane_1 Binding 1
+               OpDecorate %ExternalTextureParams Block
+               OpMemberDecorate %ExternalTextureParams 0 Offset 0
+               OpMemberDecorate %ExternalTextureParams 1 Offset 4
+               OpMemberDecorate %ExternalTextureParams 2 Offset 16
+               OpMemberDecorate %ExternalTextureParams 2 ColMajor
+               OpMemberDecorate %ExternalTextureParams 2 MatrixStride 16
+               OpMemberDecorate %ExternalTextureParams 3 Offset 64
+               OpMemberDecorate %GammaTransferParams 0 Offset 0
+               OpMemberDecorate %GammaTransferParams 1 Offset 4
+               OpMemberDecorate %GammaTransferParams 2 Offset 8
+               OpMemberDecorate %GammaTransferParams 3 Offset 12
+               OpMemberDecorate %GammaTransferParams 4 Offset 16
+               OpMemberDecorate %GammaTransferParams 5 Offset 20
+               OpMemberDecorate %GammaTransferParams 6 Offset 24
+               OpMemberDecorate %GammaTransferParams 7 Offset 28
+               OpMemberDecorate %ExternalTextureParams 4 Offset 96
+               OpMemberDecorate %ExternalTextureParams 5 Offset 128
+               OpMemberDecorate %ExternalTextureParams 5 ColMajor
+               OpMemberDecorate %ExternalTextureParams 5 MatrixStride 16
+               OpDecorate %ext_tex_params NonWritable
+               OpDecorate %ext_tex_params DescriptorSet 1
+               OpDecorate %ext_tex_params Binding 2
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+%ext_tex_plane_1 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %uint = OpTypeInt 32 0
+%mat3v4float = OpTypeMatrix %v4float 3
+%GammaTransferParams = OpTypeStruct %float %float %float %float %float %float %float %uint
+    %v3float = OpTypeVector %float 3
+%mat3v3float = OpTypeMatrix %v3float 3
+%ExternalTextureParams = OpTypeStruct %uint %uint %mat3v4float %GammaTransferParams %GammaTransferParams %mat3v3float
+%_ptr_Uniform_ExternalTextureParams = OpTypePointer Uniform %ExternalTextureParams
+%ext_tex_params = OpVariable %_ptr_Uniform_ExternalTextureParams Uniform
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %21 = OpTypeFunction %void
+     %v2uint = OpTypeVector %uint 2
+        %int = OpTypeInt 32 1
+      %int_0 = OpConstant %int 0
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %32 = OpConstantNull %v2uint
+         %33 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_cdc6c9 = OpFunction %void None %21
+         %24 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %32
+         %27 = OpLoad %11 %arg_0
+         %25 = OpImageQuerySizeLod %v2uint %27 %int_0
+               OpStore %res %25
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %33
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureDimensions_cdc6c9
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %21
+         %38 = OpLabel
+         %39 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %39
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %21
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureDimensions_cdc6c9
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %21
+         %45 = OpLabel
+         %46 = OpFunctionCall %void %textureDimensions_cdc6c9
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/cdc6c9.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/cdc6c9.wgsl.expected.wgsl
new file mode 100644
index 0000000..f4ef228
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/cdc6c9.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_external;
+
+fn textureDimensions_cdc6c9() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_cdc6c9();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_cdc6c9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_cdc6c9();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/cdf473.wgsl b/test/tint/builtins/gen/var/textureDimensions/cdf473.wgsl
deleted file mode 100644
index f434881..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/cdf473.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16sint, write>;
-
-// fn textureDimensions(texture: texture_storage_2d_array<rgba16sint, write>) -> vec2<i32>
-fn textureDimensions_cdf473() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_cdf473();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_cdf473();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_cdf473();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/cdf473.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/cdf473.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 895f7d0..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/cdf473.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2DArray<int4> arg_0 : register(u0, space1);
-
-void textureDimensions_cdf473() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_cdf473();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_cdf473();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_cdf473();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/cdf473.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/cdf473.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 895f7d0..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/cdf473.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2DArray<int4> arg_0 : register(u0, space1);
-
-void textureDimensions_cdf473() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_cdf473();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_cdf473();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_cdf473();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/cdf473.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/cdf473.wgsl.expected.glsl
deleted file mode 100644
index ea5fe7d..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/cdf473.wgsl.expected.glsl
+++ /dev/null
@@ -1,52 +0,0 @@
-#version 310 es
-
-layout(rgba16i) uniform highp writeonly iimage2DArray arg_0;
-void textureDimensions_cdf473() {
-  ivec2 res = imageSize(arg_0).xy;
-}
-
-vec4 vertex_main() {
-  textureDimensions_cdf473();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-layout(rgba16i) uniform highp writeonly iimage2DArray arg_0;
-void textureDimensions_cdf473() {
-  ivec2 res = imageSize(arg_0).xy;
-}
-
-void fragment_main() {
-  textureDimensions_cdf473();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-layout(rgba16i) uniform highp writeonly iimage2DArray arg_0;
-void textureDimensions_cdf473() {
-  ivec2 res = imageSize(arg_0).xy;
-}
-
-void compute_main() {
-  textureDimensions_cdf473();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/cdf473.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/cdf473.wgsl.expected.msl
deleted file mode 100644
index fa50285..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/cdf473.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_cdf473(texture2d_array<int, access::write> tint_symbol_1) {
-  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture2d_array<int, access::write> tint_symbol_2) {
-  textureDimensions_cdf473(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture2d_array<int, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture2d_array<int, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_cdf473(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture2d_array<int, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_cdf473(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/cdf473.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/cdf473.wgsl.expected.spvasm
deleted file mode 100644
index 30caae8..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/cdf473.wgsl.expected.spvasm
+++ /dev/null
@@ -1,78 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 39
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_cdf473 "textureDimensions_cdf473"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-        %int = OpTypeInt 32 1
-         %11 = OpTypeImage %int 2D 0 1 0 2 Rgba16i
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-      %v2int = OpTypeVector %int 2
-      %v3int = OpTypeVector %int 3
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %24 = OpConstantNull %v2int
-         %25 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_cdf473 = OpFunction %void None %13
-         %16 = OpLabel
-        %res = OpVariable %_ptr_Function_v2int Function %24
-         %21 = OpLoad %11 %arg_0
-         %19 = OpImageQuerySize %v3int %21
-         %17 = OpVectorShuffle %v2int %19 %19 0 1
-               OpStore %res %17
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %25
-         %27 = OpLabel
-         %28 = OpFunctionCall %void %textureDimensions_cdf473
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %30 = OpLabel
-         %31 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %31
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %34 = OpLabel
-         %35 = OpFunctionCall %void %textureDimensions_cdf473
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %37 = OpLabel
-         %38 = OpFunctionCall %void %textureDimensions_cdf473
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/cdf473.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/cdf473.wgsl.expected.wgsl
deleted file mode 100644
index a675dad..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/cdf473.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16sint, write>;
-
-fn textureDimensions_cdf473() {
-  var res : vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_cdf473();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_cdf473();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_cdf473();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/cec841.wgsl b/test/tint/builtins/gen/var/textureDimensions/cec841.wgsl
deleted file mode 100644
index dfdf759..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/cec841.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_2d_array<f32>;
-
-// fn textureDimensions(texture: texture_2d_array<f32>) -> vec2<i32>
-fn textureDimensions_cec841() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_cec841();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_cec841();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_cec841();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/cec841.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/cec841.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 8b892fb..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/cec841.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-Texture2DArray<float4> arg_0 : register(t0, space1);
-
-void textureDimensions_cec841() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_cec841();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_cec841();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_cec841();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/cec841.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/cec841.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 8b892fb..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/cec841.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-Texture2DArray<float4> arg_0 : register(t0, space1);
-
-void textureDimensions_cec841() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_cec841();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_cec841();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_cec841();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/cec841.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/cec841.wgsl.expected.glsl
deleted file mode 100644
index 6c4ff13..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/cec841.wgsl.expected.glsl
+++ /dev/null
@@ -1,52 +0,0 @@
-#version 310 es
-
-uniform highp sampler2DArray arg_0_1;
-void textureDimensions_cec841() {
-  ivec2 res = textureSize(arg_0_1, 0).xy;
-}
-
-vec4 vertex_main() {
-  textureDimensions_cec841();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-uniform highp sampler2DArray arg_0_1;
-void textureDimensions_cec841() {
-  ivec2 res = textureSize(arg_0_1, 0).xy;
-}
-
-void fragment_main() {
-  textureDimensions_cec841();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-uniform highp sampler2DArray arg_0_1;
-void textureDimensions_cec841() {
-  ivec2 res = textureSize(arg_0_1, 0).xy;
-}
-
-void compute_main() {
-  textureDimensions_cec841();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/cec841.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/cec841.wgsl.expected.msl
deleted file mode 100644
index 7c0b4ee..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/cec841.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_cec841(texture2d_array<float, access::sample> tint_symbol_1) {
-  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture2d_array<float, access::sample> tint_symbol_2) {
-  textureDimensions_cec841(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture2d_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture2d_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_cec841(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture2d_array<float, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_cec841(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/cec841.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/cec841.wgsl.expected.spvasm
deleted file mode 100644
index 34eb8ec..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/cec841.wgsl.expected.spvasm
+++ /dev/null
@@ -1,78 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 40
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_cec841 "textureDimensions_cec841"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-         %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %12 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %v2int = OpTypeVector %int 2
-      %v3int = OpTypeVector %int 3
-      %int_0 = OpConstant %int 0
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %25 = OpConstantNull %v2int
-         %26 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_cec841 = OpFunction %void None %12
-         %15 = OpLabel
-        %res = OpVariable %_ptr_Function_v2int Function %25
-         %21 = OpLoad %11 %arg_0
-         %19 = OpImageQuerySizeLod %v3int %21 %int_0
-         %16 = OpVectorShuffle %v2int %19 %19 0 1
-               OpStore %res %16
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %26
-         %28 = OpLabel
-         %29 = OpFunctionCall %void %textureDimensions_cec841
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %12
-         %31 = OpLabel
-         %32 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %32
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %12
-         %35 = OpLabel
-         %36 = OpFunctionCall %void %textureDimensions_cec841
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %12
-         %38 = OpLabel
-         %39 = OpFunctionCall %void %textureDimensions_cec841
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/cec841.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/cec841.wgsl.expected.wgsl
deleted file mode 100644
index 7a92b37..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/cec841.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_2d_array<f32>;
-
-fn textureDimensions_cec841() {
-  var res : vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_cec841();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_cec841();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_cec841();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/cf2b50.wgsl b/test/tint/builtins/gen/var/textureDimensions/cf2b50.wgsl
new file mode 100644
index 0000000..38c0324
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/cf2b50.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube_array<f32>;
+
+// fn textureDimensions(texture: texture_cube_array<f32>, level: u32) -> vec2<u32>
+fn textureDimensions_cf2b50() {
+  var arg_1 = 1u;
+  var res: vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_cf2b50();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_cf2b50();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_cf2b50();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/cf2b50.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/cf2b50.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..97a8eaf
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/cf2b50.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+TextureCubeArray<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_cf2b50() {
+  uint arg_1 = 1u;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_cf2b50();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_cf2b50();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_cf2b50();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/cf2b50.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/cf2b50.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..97a8eaf
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/cf2b50.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+TextureCubeArray<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_cf2b50() {
+  uint arg_1 = 1u;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_cf2b50();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_cf2b50();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_cf2b50();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/cf2b50.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/cf2b50.wgsl.expected.glsl
new file mode 100644
index 0000000..f22135b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/cf2b50.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp samplerCubeArray arg_0_1;
+void textureDimensions_cf2b50() {
+  uint arg_1 = 1u;
+  uvec2 res = uvec2(textureSize(arg_0_1, int(arg_1)).xy);
+}
+
+vec4 vertex_main() {
+  textureDimensions_cf2b50();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCubeArray arg_0_1;
+void textureDimensions_cf2b50() {
+  uint arg_1 = 1u;
+  uvec2 res = uvec2(textureSize(arg_0_1, int(arg_1)).xy);
+}
+
+void fragment_main() {
+  textureDimensions_cf2b50();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'samplerCubeArray' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp samplerCubeArray arg_0_1;
+void textureDimensions_cf2b50() {
+  uint arg_1 = 1u;
+  uvec2 res = uvec2(textureSize(arg_0_1, int(arg_1)).xy);
+}
+
+void compute_main() {
+  textureDimensions_cf2b50();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'samplerCubeArray' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/cf2b50.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/cf2b50.wgsl.expected.msl
new file mode 100644
index 0000000..911daf0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/cf2b50.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_cf2b50(texturecube_array<float, access::sample> tint_symbol_1) {
+  uint arg_1 = 1u;
+  uint2 res = uint2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube_array<float, access::sample> tint_symbol_2) {
+  textureDimensions_cf2b50(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texturecube_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_cf2b50(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texturecube_array<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_cf2b50(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/cf2b50.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/cf2b50.wgsl.expected.spvasm
new file mode 100644
index 0000000..db623e9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/cf2b50.wgsl.expected.spvasm
@@ -0,0 +1,85 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+               OpCapability Shader
+               OpCapability SampledCubeArray
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_cf2b50 "textureDimensions_cf2b50"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float Cube 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %20 = OpConstantNull %uint
+     %v2uint = OpTypeVector %uint 2
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %29 = OpConstantNull %v2uint
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_cf2b50 = OpFunction %void None %12
+         %15 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %20
+        %res = OpVariable %_ptr_Function_v2uint Function %29
+               OpStore %arg_1 %uint_1
+         %25 = OpLoad %11 %arg_0
+         %26 = OpLoad %uint %arg_1
+         %23 = OpImageQuerySizeLod %v3uint %25 %26
+         %21 = OpVectorShuffle %v2uint %23 %23 0 1
+               OpStore %res %21
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_cf2b50
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureDimensions_cf2b50
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureDimensions_cf2b50
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/cf2b50.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/cf2b50.wgsl.expected.wgsl
new file mode 100644
index 0000000..c277772
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/cf2b50.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_cube_array<f32>;
+
+fn textureDimensions_cf2b50() {
+  var arg_1 = 1u;
+  var res : vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_cf2b50();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_cf2b50();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_cf2b50();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/cf7e43.wgsl b/test/tint/builtins/gen/var/textureDimensions/cf7e43.wgsl
deleted file mode 100644
index 0d4830e..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/cf7e43.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_3d<rgba8snorm, write>;
-
-// fn textureDimensions(texture: texture_storage_3d<rgba8snorm, write>) -> vec3<i32>
-fn textureDimensions_cf7e43() {
-  var res: vec3<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_cf7e43();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_cf7e43();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_cf7e43();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/cf7e43.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/cf7e43.wgsl.expected.dxc.hlsl
deleted file mode 100644
index f8b6211..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/cf7e43.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture3D<float4> arg_0 : register(u0, space1);
-
-void textureDimensions_cf7e43() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int3 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_cf7e43();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_cf7e43();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_cf7e43();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/cf7e43.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/cf7e43.wgsl.expected.fxc.hlsl
deleted file mode 100644
index f8b6211..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/cf7e43.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture3D<float4> arg_0 : register(u0, space1);
-
-void textureDimensions_cf7e43() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int3 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_cf7e43();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_cf7e43();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_cf7e43();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/cf7e43.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/cf7e43.wgsl.expected.glsl
deleted file mode 100644
index 8b491fb..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/cf7e43.wgsl.expected.glsl
+++ /dev/null
@@ -1,52 +0,0 @@
-#version 310 es
-
-layout(rgba8_snorm) uniform highp writeonly image3D arg_0;
-void textureDimensions_cf7e43() {
-  ivec3 res = imageSize(arg_0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_cf7e43();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-layout(rgba8_snorm) uniform highp writeonly image3D arg_0;
-void textureDimensions_cf7e43() {
-  ivec3 res = imageSize(arg_0);
-}
-
-void fragment_main() {
-  textureDimensions_cf7e43();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-layout(rgba8_snorm) uniform highp writeonly image3D arg_0;
-void textureDimensions_cf7e43() {
-  ivec3 res = imageSize(arg_0);
-}
-
-void compute_main() {
-  textureDimensions_cf7e43();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/cf7e43.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/cf7e43.wgsl.expected.msl
deleted file mode 100644
index 2103642..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/cf7e43.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_cf7e43(texture3d<float, access::write> tint_symbol_1) {
-  int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture3d<float, access::write> tint_symbol_2) {
-  textureDimensions_cf7e43(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture3d<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture3d<float, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_cf7e43(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture3d<float, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_cf7e43(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/cf7e43.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/cf7e43.wgsl.expected.spvasm
deleted file mode 100644
index 62a64df..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/cf7e43.wgsl.expected.spvasm
+++ /dev/null
@@ -1,76 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 37
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_cf7e43 "textureDimensions_cf7e43"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-         %11 = OpTypeImage %float 3D 0 0 0 2 Rgba8Snorm
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %12 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %v3int = OpTypeVector %int 3
-%_ptr_Function_v3int = OpTypePointer Function %v3int
-         %22 = OpConstantNull %v3int
-         %23 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_cf7e43 = OpFunction %void None %12
-         %15 = OpLabel
-        %res = OpVariable %_ptr_Function_v3int Function %22
-         %19 = OpLoad %11 %arg_0
-         %16 = OpImageQuerySize %v3int %19
-               OpStore %res %16
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %23
-         %25 = OpLabel
-         %26 = OpFunctionCall %void %textureDimensions_cf7e43
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %12
-         %28 = OpLabel
-         %29 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %29
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %12
-         %32 = OpLabel
-         %33 = OpFunctionCall %void %textureDimensions_cf7e43
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %12
-         %35 = OpLabel
-         %36 = OpFunctionCall %void %textureDimensions_cf7e43
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/cf7e43.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/cf7e43.wgsl.expected.wgsl
deleted file mode 100644
index 38c9845..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/cf7e43.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba8snorm, write>;
-
-fn textureDimensions_cf7e43() {
-  var res : vec3<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_cf7e43();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_cf7e43();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_cf7e43();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/d08a94.wgsl b/test/tint/builtins/gen/var/textureDimensions/d08a94.wgsl
new file mode 100644
index 0000000..70e0536
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/d08a94.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba16sint, write>;
+
+// fn textureDimensions(texture: texture_storage_1d<rgba16sint, write>) -> u32
+fn textureDimensions_d08a94() {
+  var res: u32 = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_d08a94();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_d08a94();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_d08a94();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/d08a94.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/d08a94.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..033da1ff
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/d08a94.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<int4> arg_0 : register(u0, space1);
+
+void textureDimensions_d08a94() {
+  int tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_d08a94();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_d08a94();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_d08a94();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/d08a94.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/d08a94.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..033da1ff
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/d08a94.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<int4> arg_0 : register(u0, space1);
+
+void textureDimensions_d08a94() {
+  int tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_d08a94();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_d08a94();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_d08a94();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/d08a94.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/d08a94.wgsl.expected.glsl
new file mode 100644
index 0000000..58a0a3b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/d08a94.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba16i) uniform highp writeonly iimage1D arg_0;
+void textureDimensions_d08a94() {
+  uint res = uint(imageSize(arg_0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_d08a94();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'iimage1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rgba16i) uniform highp writeonly iimage1D arg_0;
+void textureDimensions_d08a94() {
+  uint res = uint(imageSize(arg_0));
+}
+
+void fragment_main() {
+  textureDimensions_d08a94();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'iimage1D' : Reserved word. 
+WARNING: 0:4: 'layout' : useless application of layout qualifier 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba16i) uniform highp writeonly iimage1D arg_0;
+void textureDimensions_d08a94() {
+  uint res = uint(imageSize(arg_0));
+}
+
+void compute_main() {
+  textureDimensions_d08a94();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'iimage1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/d08a94.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/d08a94.wgsl.expected.msl
new file mode 100644
index 0000000..c416401
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/d08a94.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_d08a94(texture1d<int, access::write> tint_symbol_1) {
+  uint res = tint_symbol_1.get_width(0);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<int, access::write> tint_symbol_2) {
+  textureDimensions_d08a94(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_d08a94(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_d08a94(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/d08a94.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/d08a94.wgsl.expected.spvasm
new file mode 100644
index 0000000..cffbbe5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/d08a94.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_d08a94 "textureDimensions_d08a94"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 1D 0 0 0 2 Rgba16i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %22 = OpConstantNull %uint
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_d08a94 = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_uint Function %22
+         %19 = OpLoad %11 %arg_0
+         %17 = OpImageQuerySize %uint %19
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %textureDimensions_d08a94
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %28 = OpLabel
+         %29 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %29
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_d08a94
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureDimensions_d08a94
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/d08a94.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/d08a94.wgsl.expected.wgsl
new file mode 100644
index 0000000..8a49fb8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/d08a94.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba16sint, write>;
+
+fn textureDimensions_d08a94() {
+  var res : u32 = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_d08a94();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_d08a94();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_d08a94();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/d125bc.wgsl b/test/tint/builtins/gen/var/textureDimensions/d125bc.wgsl
deleted file mode 100644
index 1dbf074..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/d125bc.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_cube<f32>;
-
-// fn textureDimensions(texture: texture_cube<f32>) -> vec2<i32>
-fn textureDimensions_d125bc() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_d125bc();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_d125bc();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_d125bc();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/d125bc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/d125bc.wgsl.expected.dxc.hlsl
deleted file mode 100644
index bf2c107..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/d125bc.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-TextureCube<float4> arg_0 : register(t0, space1);
-
-void textureDimensions_d125bc() {
-  int2 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
-  int2 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_d125bc();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_d125bc();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_d125bc();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/d125bc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/d125bc.wgsl.expected.fxc.hlsl
deleted file mode 100644
index bf2c107..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/d125bc.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-TextureCube<float4> arg_0 : register(t0, space1);
-
-void textureDimensions_d125bc() {
-  int2 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
-  int2 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_d125bc();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_d125bc();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_d125bc();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/d125bc.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/d125bc.wgsl.expected.glsl
deleted file mode 100644
index 0debada..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/d125bc.wgsl.expected.glsl
+++ /dev/null
@@ -1,52 +0,0 @@
-#version 310 es
-
-uniform highp samplerCube arg_0_1;
-void textureDimensions_d125bc() {
-  ivec2 res = textureSize(arg_0_1, 0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_d125bc();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-uniform highp samplerCube arg_0_1;
-void textureDimensions_d125bc() {
-  ivec2 res = textureSize(arg_0_1, 0);
-}
-
-void fragment_main() {
-  textureDimensions_d125bc();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-uniform highp samplerCube arg_0_1;
-void textureDimensions_d125bc() {
-  ivec2 res = textureSize(arg_0_1, 0);
-}
-
-void compute_main() {
-  textureDimensions_d125bc();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/d125bc.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/d125bc.wgsl.expected.msl
deleted file mode 100644
index 67f0abc..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/d125bc.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_d125bc(texturecube<float, access::sample> tint_symbol_1) {
-  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texturecube<float, access::sample> tint_symbol_2) {
-  textureDimensions_d125bc(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texturecube<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texturecube<float, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_d125bc(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texturecube<float, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_d125bc(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/d125bc.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/d125bc.wgsl.expected.spvasm
deleted file mode 100644
index 3d3b32a..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/d125bc.wgsl.expected.spvasm
+++ /dev/null
@@ -1,76 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 38
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_d125bc "textureDimensions_d125bc"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-         %11 = OpTypeImage %float Cube 0 0 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %12 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %v2int = OpTypeVector %int 2
-      %int_0 = OpConstant %int 0
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %23 = OpConstantNull %v2int
-         %24 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_d125bc = OpFunction %void None %12
-         %15 = OpLabel
-        %res = OpVariable %_ptr_Function_v2int Function %23
-         %19 = OpLoad %11 %arg_0
-         %16 = OpImageQuerySizeLod %v2int %19 %int_0
-               OpStore %res %16
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %24
-         %26 = OpLabel
-         %27 = OpFunctionCall %void %textureDimensions_d125bc
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %12
-         %29 = OpLabel
-         %30 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %30
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %12
-         %33 = OpLabel
-         %34 = OpFunctionCall %void %textureDimensions_d125bc
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %12
-         %36 = OpLabel
-         %37 = OpFunctionCall %void %textureDimensions_d125bc
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/d125bc.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/d125bc.wgsl.expected.wgsl
deleted file mode 100644
index 21f8b05..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/d125bc.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_cube<f32>;
-
-fn textureDimensions_d125bc() {
-  var res : vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_d125bc();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_d125bc();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_d125bc();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl b/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl
deleted file mode 100644
index a82b951..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2022 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_depth_cube_array;
-
-// fn textureDimensions(texture: texture_depth_cube_array, level: u32) -> vec2<i32>
-fn textureDimensions_d1a23d() {
-  var arg_1 = 1u;
-  var res: vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_d1a23d();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_d1a23d();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_d1a23d();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 5d05a16..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-TextureCubeArray arg_0 : register(t0, space1);
-
-void textureDimensions_d1a23d() {
-  uint arg_1 = 1u;
-  int4 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_d1a23d();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_d1a23d();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_d1a23d();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 5d05a16..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-TextureCubeArray arg_0 : register(t0, space1);
-
-void textureDimensions_d1a23d() {
-  uint arg_1 = 1u;
-  int4 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_d1a23d();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_d1a23d();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_d1a23d();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl.expected.glsl
deleted file mode 100644
index acd0609..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl.expected.glsl
+++ /dev/null
@@ -1,78 +0,0 @@
-SKIP: FAILED
-
-#version 310 es
-
-uniform highp samplerCubeArray arg_0_1;
-void textureDimensions_d1a23d() {
-  uint arg_1 = 1u;
-  ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
-}
-
-vec4 vertex_main() {
-  textureDimensions_d1a23d();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'samplerCubeArray' : Reserved word. 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision mediump float;
-
-uniform highp samplerCubeArray arg_0_1;
-void textureDimensions_d1a23d() {
-  uint arg_1 = 1u;
-  ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
-}
-
-void fragment_main() {
-  textureDimensions_d1a23d();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:4: 'samplerCubeArray' : Reserved word. 
-ERROR: 0:4: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-
-uniform highp samplerCubeArray arg_0_1;
-void textureDimensions_d1a23d() {
-  uint arg_1 = 1u;
-  ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
-}
-
-void compute_main() {
-  textureDimensions_d1a23d();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'samplerCubeArray' : Reserved word. 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl.expected.msl
deleted file mode 100644
index d24c988..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl.expected.msl
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_d1a23d(depthcube_array<float, access::sample> tint_symbol_1) {
-  uint arg_1 = 1u;
-  int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(depthcube_array<float, access::sample> tint_symbol_2) {
-  textureDimensions_d1a23d(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(depthcube_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(depthcube_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_d1a23d(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(depthcube_array<float, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_d1a23d(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl.expected.spvasm
deleted file mode 100644
index ea98181..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl.expected.spvasm
+++ /dev/null
@@ -1,86 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 45
-; Schema: 0
-               OpCapability Shader
-               OpCapability SampledCubeArray
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_d1a23d "textureDimensions_d1a23d"
-               OpName %arg_1 "arg_1"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-         %11 = OpTypeImage %float Cube 0 1 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %12 = OpTypeFunction %void
-       %uint = OpTypeInt 32 0
-     %uint_1 = OpConstant %uint 1
-%_ptr_Function_uint = OpTypePointer Function %uint
-         %20 = OpConstantNull %uint
-        %int = OpTypeInt 32 1
-      %v2int = OpTypeVector %int 2
-      %v3int = OpTypeVector %int 3
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %30 = OpConstantNull %v2int
-         %31 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_d1a23d = OpFunction %void None %12
-         %15 = OpLabel
-      %arg_1 = OpVariable %_ptr_Function_uint Function %20
-        %res = OpVariable %_ptr_Function_v2int Function %30
-               OpStore %arg_1 %uint_1
-         %26 = OpLoad %11 %arg_0
-         %27 = OpLoad %uint %arg_1
-         %24 = OpImageQuerySizeLod %v3int %26 %27
-         %21 = OpVectorShuffle %v2int %24 %24 0 1
-               OpStore %res %21
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %31
-         %33 = OpLabel
-         %34 = OpFunctionCall %void %textureDimensions_d1a23d
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %12
-         %36 = OpLabel
-         %37 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %37
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %12
-         %40 = OpLabel
-         %41 = OpFunctionCall %void %textureDimensions_d1a23d
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %12
-         %43 = OpLabel
-         %44 = OpFunctionCall %void %textureDimensions_d1a23d
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl.expected.wgsl
deleted file mode 100644
index 291f42f..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/d1a23d.wgsl.expected.wgsl
+++ /dev/null
@@ -1,22 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_depth_cube_array;
-
-fn textureDimensions_d1a23d() {
-  var arg_1 = 1u;
-  var res : vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_d1a23d();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_d1a23d();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_d1a23d();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/d3accd.wgsl b/test/tint/builtins/gen/var/textureDimensions/d3accd.wgsl
new file mode 100644
index 0000000..d13e39d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/d3accd.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_cube;
+
+// fn textureDimensions(texture: texture_depth_cube, level: u32) -> vec2<u32>
+fn textureDimensions_d3accd() {
+  var arg_1 = 1u;
+  var res: vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_d3accd();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_d3accd();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_d3accd();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/d3accd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/d3accd.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..6151ec6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/d3accd.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+TextureCube arg_0 : register(t0, space1);
+
+void textureDimensions_d3accd() {
+  uint arg_1 = 1u;
+  int3 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_d3accd();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_d3accd();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_d3accd();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/d3accd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/d3accd.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..6151ec6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/d3accd.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+TextureCube arg_0 : register(t0, space1);
+
+void textureDimensions_d3accd() {
+  uint arg_1 = 1u;
+  int3 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_d3accd();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_d3accd();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_d3accd();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/d3accd.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/d3accd.wgsl.expected.glsl
new file mode 100644
index 0000000..4cff9f3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/d3accd.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp samplerCube arg_0_1;
+void textureDimensions_d3accd() {
+  uint arg_1 = 1u;
+  uvec2 res = uvec2(textureSize(arg_0_1, int(arg_1)));
+}
+
+vec4 vertex_main() {
+  textureDimensions_d3accd();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp samplerCube arg_0_1;
+void textureDimensions_d3accd() {
+  uint arg_1 = 1u;
+  uvec2 res = uvec2(textureSize(arg_0_1, int(arg_1)));
+}
+
+void fragment_main() {
+  textureDimensions_d3accd();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp samplerCube arg_0_1;
+void textureDimensions_d3accd() {
+  uint arg_1 = 1u;
+  uvec2 res = uvec2(textureSize(arg_0_1, int(arg_1)));
+}
+
+void compute_main() {
+  textureDimensions_d3accd();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/d3accd.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/d3accd.wgsl.expected.msl
new file mode 100644
index 0000000..8b3caa6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/d3accd.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_d3accd(depthcube<float, access::sample> tint_symbol_1) {
+  uint arg_1 = 1u;
+  uint2 res = uint2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(depthcube<float, access::sample> tint_symbol_2) {
+  textureDimensions_d3accd(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depthcube<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depthcube<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_d3accd(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(depthcube<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_d3accd(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/d3accd.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/d3accd.wgsl.expected.spvasm
new file mode 100644
index 0000000..b2c86ae
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/d3accd.wgsl.expected.spvasm
@@ -0,0 +1,82 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 42
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_d3accd "textureDimensions_d3accd"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float Cube 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %20 = OpConstantNull %uint
+     %v2uint = OpTypeVector %uint 2
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %27 = OpConstantNull %v2uint
+         %28 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_d3accd = OpFunction %void None %12
+         %15 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %20
+        %res = OpVariable %_ptr_Function_v2uint Function %27
+               OpStore %arg_1 %uint_1
+         %23 = OpLoad %11 %arg_0
+         %24 = OpLoad %uint %arg_1
+         %21 = OpImageQuerySizeLod %v2uint %23 %24
+               OpStore %res %21
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %28
+         %30 = OpLabel
+         %31 = OpFunctionCall %void %textureDimensions_d3accd
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %33 = OpLabel
+         %34 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %34
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureDimensions_d3accd
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureDimensions_d3accd
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/d3accd.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/d3accd.wgsl.expected.wgsl
new file mode 100644
index 0000000..e52708c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/d3accd.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_depth_cube;
+
+fn textureDimensions_d3accd() {
+  var arg_1 = 1u;
+  var res : vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_d3accd();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_d3accd();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_d3accd();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/d63c28.wgsl b/test/tint/builtins/gen/var/textureDimensions/d63c28.wgsl
new file mode 100644
index 0000000..0188d69
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/d63c28.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba32float, write>;
+
+// fn textureDimensions(texture: texture_storage_2d_array<rgba32float, write>) -> vec2<u32>
+fn textureDimensions_d63c28() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_d63c28();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_d63c28();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_d63c28();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/d63c28.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/d63c28.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..e004506
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/d63c28.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureDimensions_d63c28() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_d63c28();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_d63c28();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_d63c28();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/d63c28.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/d63c28.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..e004506
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/d63c28.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureDimensions_d63c28() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_d63c28();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_d63c28();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_d63c28();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/d63c28.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/d63c28.wgsl.expected.glsl
new file mode 100644
index 0000000..e4679a4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/d63c28.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba32f) uniform highp writeonly image2DArray arg_0;
+void textureDimensions_d63c28() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+}
+
+vec4 vertex_main() {
+  textureDimensions_d63c28();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba32f) uniform highp writeonly image2DArray arg_0;
+void textureDimensions_d63c28() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+}
+
+void fragment_main() {
+  textureDimensions_d63c28();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba32f) uniform highp writeonly image2DArray arg_0;
+void textureDimensions_d63c28() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+}
+
+void compute_main() {
+  textureDimensions_d63c28();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/d63c28.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/d63c28.wgsl.expected.msl
new file mode 100644
index 0000000..9afba4a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/d63c28.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_d63c28(texture2d_array<float, access::write> tint_symbol_1) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
+  textureDimensions_d63c28(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_d63c28(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_d63c28(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/d63c28.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/d63c28.wgsl.expected.spvasm
new file mode 100644
index 0000000..72b6139
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/d63c28.wgsl.expected.spvasm
@@ -0,0 +1,78 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_d63c28 "textureDimensions_d63c28"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %24 = OpConstantNull %v2uint
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_d63c28 = OpFunction %void None %12
+         %15 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %24
+         %21 = OpLoad %11 %arg_0
+         %19 = OpImageQuerySize %v3uint %21
+         %16 = OpVectorShuffle %v2uint %19 %19 0 1
+               OpStore %res %16
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %textureDimensions_d63c28
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureDimensions_d63c28
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureDimensions_d63c28
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/d63c28.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/d63c28.wgsl.expected.wgsl
new file mode 100644
index 0000000..5e08214
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/d63c28.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba32float, write>;
+
+fn textureDimensions_d63c28() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_d63c28();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_d63c28();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_d63c28();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/d83c45.wgsl b/test/tint/builtins/gen/var/textureDimensions/d83c45.wgsl
deleted file mode 100644
index d2b36ad..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/d83c45.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_cube_array<u32>;
-
-// fn textureDimensions(texture: texture_cube_array<u32>, level: i32) -> vec2<i32>
-fn textureDimensions_d83c45() {
-  var arg_1 = 1i;
-  var res: vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_d83c45();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_d83c45();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_d83c45();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/d83c45.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/d83c45.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 09ca7a3..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/d83c45.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-TextureCubeArray<uint4> arg_0 : register(t0, space1);
-
-void textureDimensions_d83c45() {
-  int arg_1 = 1;
-  int4 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_d83c45();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_d83c45();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_d83c45();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/d83c45.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/d83c45.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 09ca7a3..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/d83c45.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-TextureCubeArray<uint4> arg_0 : register(t0, space1);
-
-void textureDimensions_d83c45() {
-  int arg_1 = 1;
-  int4 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_d83c45();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_d83c45();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_d83c45();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/d83c45.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/d83c45.wgsl.expected.glsl
deleted file mode 100644
index 7264f8b..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/d83c45.wgsl.expected.glsl
+++ /dev/null
@@ -1,78 +0,0 @@
-SKIP: FAILED
-
-#version 310 es
-
-uniform highp usamplerCubeArray arg_0_1;
-void textureDimensions_d83c45() {
-  int arg_1 = 0;
-  ivec2 res = textureSize(arg_0_1, arg_1).xy;
-}
-
-vec4 vertex_main() {
-  textureDimensions_d83c45();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'usamplerCubeArray' : Reserved word. 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision mediump float;
-
-uniform highp usamplerCubeArray arg_0_1;
-void textureDimensions_d83c45() {
-  int arg_1 = 0;
-  ivec2 res = textureSize(arg_0_1, arg_1).xy;
-}
-
-void fragment_main() {
-  textureDimensions_d83c45();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:4: 'usamplerCubeArray' : Reserved word. 
-ERROR: 0:4: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-
-uniform highp usamplerCubeArray arg_0_1;
-void textureDimensions_d83c45() {
-  int arg_1 = 0;
-  ivec2 res = textureSize(arg_0_1, arg_1).xy;
-}
-
-void compute_main() {
-  textureDimensions_d83c45();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'usamplerCubeArray' : Reserved word. 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/d83c45.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/d83c45.wgsl.expected.msl
deleted file mode 100644
index 5cdeab6..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/d83c45.wgsl.expected.msl
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_d83c45(texturecube_array<uint, access::sample> tint_symbol_1) {
-  int arg_1 = 1;
-  int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texturecube_array<uint, access::sample> tint_symbol_2) {
-  textureDimensions_d83c45(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texturecube_array<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texturecube_array<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_d83c45(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texturecube_array<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_d83c45(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/d83c45.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/d83c45.wgsl.expected.spvasm
deleted file mode 100644
index a7ca43b..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/d83c45.wgsl.expected.spvasm
+++ /dev/null
@@ -1,86 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 45
-; Schema: 0
-               OpCapability Shader
-               OpCapability SampledCubeArray
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_d83c45 "textureDimensions_d83c45"
-               OpName %arg_1 "arg_1"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-       %uint = OpTypeInt 32 0
-         %11 = OpTypeImage %uint Cube 0 1 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %int_1 = OpConstant %int 1
-%_ptr_Function_int = OpTypePointer Function %int
-         %21 = OpConstantNull %int
-      %v2int = OpTypeVector %int 2
-      %v3int = OpTypeVector %int 3
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %30 = OpConstantNull %v2int
-         %31 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_d83c45 = OpFunction %void None %13
-         %16 = OpLabel
-      %arg_1 = OpVariable %_ptr_Function_int Function %21
-        %res = OpVariable %_ptr_Function_v2int Function %30
-               OpStore %arg_1 %int_1
-         %26 = OpLoad %11 %arg_0
-         %27 = OpLoad %int %arg_1
-         %24 = OpImageQuerySizeLod %v3int %26 %27
-         %22 = OpVectorShuffle %v2int %24 %24 0 1
-               OpStore %res %22
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %31
-         %33 = OpLabel
-         %34 = OpFunctionCall %void %textureDimensions_d83c45
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %36 = OpLabel
-         %37 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %37
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %40 = OpLabel
-         %41 = OpFunctionCall %void %textureDimensions_d83c45
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %43 = OpLabel
-         %44 = OpFunctionCall %void %textureDimensions_d83c45
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/d83c45.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/d83c45.wgsl.expected.wgsl
deleted file mode 100644
index 91ae4ac..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/d83c45.wgsl.expected.wgsl
+++ /dev/null
@@ -1,22 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_cube_array<u32>;
-
-fn textureDimensions_d83c45() {
-  var arg_1 = 1i;
-  var res : vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_d83c45();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_d83c45();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_d83c45();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/d8ba68.wgsl b/test/tint/builtins/gen/var/textureDimensions/d8ba68.wgsl
new file mode 100644
index 0000000..291f651
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/d8ba68.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba32uint, write>;
+
+// fn textureDimensions(texture: texture_storage_2d<rgba32uint, write>) -> vec2<u32>
+fn textureDimensions_d8ba68() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_d8ba68();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_d8ba68();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_d8ba68();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/d8ba68.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/d8ba68.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..81ffa6c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/d8ba68.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<uint4> arg_0 : register(u0, space1);
+
+void textureDimensions_d8ba68() {
+  int2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_d8ba68();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_d8ba68();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_d8ba68();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/d8ba68.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/d8ba68.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..81ffa6c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/d8ba68.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<uint4> arg_0 : register(u0, space1);
+
+void textureDimensions_d8ba68() {
+  int2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_d8ba68();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_d8ba68();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_d8ba68();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/d8ba68.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/d8ba68.wgsl.expected.glsl
new file mode 100644
index 0000000..fd4d413
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/d8ba68.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba32ui) uniform highp writeonly uimage2D arg_0;
+void textureDimensions_d8ba68() {
+  uvec2 res = uvec2(imageSize(arg_0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_d8ba68();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba32ui) uniform highp writeonly uimage2D arg_0;
+void textureDimensions_d8ba68() {
+  uvec2 res = uvec2(imageSize(arg_0));
+}
+
+void fragment_main() {
+  textureDimensions_d8ba68();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba32ui) uniform highp writeonly uimage2D arg_0;
+void textureDimensions_d8ba68() {
+  uvec2 res = uvec2(imageSize(arg_0));
+}
+
+void compute_main() {
+  textureDimensions_d8ba68();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/d8ba68.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/d8ba68.wgsl.expected.msl
new file mode 100644
index 0000000..933e158
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/d8ba68.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_d8ba68(texture2d<uint, access::write> tint_symbol_1) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::write> tint_symbol_2) {
+  textureDimensions_d8ba68(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_d8ba68(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_d8ba68(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/d8ba68.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/d8ba68.wgsl.expected.spvasm
new file mode 100644
index 0000000..9c846eb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/d8ba68.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_d8ba68 "textureDimensions_d8ba68"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 0 0 2 Rgba32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %v2uint = OpTypeVector %uint 2
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %22 = OpConstantNull %v2uint
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_d8ba68 = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %22
+         %19 = OpLoad %11 %arg_0
+         %17 = OpImageQuerySize %v2uint %19
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %textureDimensions_d8ba68
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %28 = OpLabel
+         %29 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %29
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_d8ba68
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureDimensions_d8ba68
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/d8ba68.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/d8ba68.wgsl.expected.wgsl
new file mode 100644
index 0000000..c0908ff
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/d8ba68.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba32uint, write>;
+
+fn textureDimensions_d8ba68() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_d8ba68();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_d8ba68();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_d8ba68();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/d8f887.wgsl b/test/tint/builtins/gen/var/textureDimensions/d8f887.wgsl
new file mode 100644
index 0000000..9c7bc22
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/d8f887.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba8uint, write>;
+
+// fn textureDimensions(texture: texture_storage_3d<rgba8uint, write>) -> vec3<u32>
+fn textureDimensions_d8f887() {
+  var res: vec3<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_d8f887();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_d8f887();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_d8f887();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/d8f887.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/d8f887.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..917113f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/d8f887.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<uint4> arg_0 : register(u0, space1);
+
+void textureDimensions_d8f887() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_d8f887();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_d8f887();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_d8f887();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/d8f887.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/d8f887.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..917113f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/d8f887.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<uint4> arg_0 : register(u0, space1);
+
+void textureDimensions_d8f887() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_d8f887();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_d8f887();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_d8f887();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/d8f887.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/d8f887.wgsl.expected.glsl
new file mode 100644
index 0000000..c175bda
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/d8f887.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba8ui) uniform highp writeonly uimage3D arg_0;
+void textureDimensions_d8f887() {
+  uvec3 res = uvec3(imageSize(arg_0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_d8f887();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba8ui) uniform highp writeonly uimage3D arg_0;
+void textureDimensions_d8f887() {
+  uvec3 res = uvec3(imageSize(arg_0));
+}
+
+void fragment_main() {
+  textureDimensions_d8f887();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba8ui) uniform highp writeonly uimage3D arg_0;
+void textureDimensions_d8f887() {
+  uvec3 res = uvec3(imageSize(arg_0));
+}
+
+void compute_main() {
+  textureDimensions_d8f887();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/d8f887.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/d8f887.wgsl.expected.msl
new file mode 100644
index 0000000..8210fd2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/d8f887.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_d8f887(texture3d<uint, access::write> tint_symbol_1) {
+  uint3 res = uint3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<uint, access::write> tint_symbol_2) {
+  textureDimensions_d8f887(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_d8f887(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture3d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_d8f887(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/d8f887.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/d8f887.wgsl.expected.spvasm
new file mode 100644
index 0000000..a7f40d6
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/d8f887.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_d8f887 "textureDimensions_d8f887"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 3D 0 0 0 2 Rgba8ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+         %22 = OpConstantNull %v3uint
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_d8f887 = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_v3uint Function %22
+         %19 = OpLoad %11 %arg_0
+         %17 = OpImageQuerySize %v3uint %19
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %textureDimensions_d8f887
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %28 = OpLabel
+         %29 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %29
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_d8f887
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureDimensions_d8f887
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/d8f887.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/d8f887.wgsl.expected.wgsl
new file mode 100644
index 0000000..3b0a6fd
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/d8f887.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba8uint, write>;
+
+fn textureDimensions_d8f887() {
+  var res : vec3<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_d8f887();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_d8f887();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_d8f887();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/da30d2.wgsl b/test/tint/builtins/gen/var/textureDimensions/da30d2.wgsl
new file mode 100644
index 0000000..72b05e2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/da30d2.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba32float, write>;
+
+// fn textureDimensions(texture: texture_storage_1d<rgba32float, write>) -> u32
+fn textureDimensions_da30d2() {
+  var res: u32 = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_da30d2();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_da30d2();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_da30d2();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/da30d2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/da30d2.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..db53401
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/da30d2.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<float4> arg_0 : register(u0, space1);
+
+void textureDimensions_da30d2() {
+  int tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_da30d2();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_da30d2();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_da30d2();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/da30d2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/da30d2.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..db53401
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/da30d2.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<float4> arg_0 : register(u0, space1);
+
+void textureDimensions_da30d2() {
+  int tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_da30d2();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_da30d2();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_da30d2();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/da30d2.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/da30d2.wgsl.expected.glsl
new file mode 100644
index 0000000..15c9df4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/da30d2.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba32f) uniform highp writeonly image1D arg_0;
+void textureDimensions_da30d2() {
+  uint res = uint(imageSize(arg_0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_da30d2();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rgba32f) uniform highp writeonly image1D arg_0;
+void textureDimensions_da30d2() {
+  uint res = uint(imageSize(arg_0));
+}
+
+void fragment_main() {
+  textureDimensions_da30d2();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image1D' : Reserved word. 
+WARNING: 0:4: 'layout' : useless application of layout qualifier 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba32f) uniform highp writeonly image1D arg_0;
+void textureDimensions_da30d2() {
+  uint res = uint(imageSize(arg_0));
+}
+
+void compute_main() {
+  textureDimensions_da30d2();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/da30d2.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/da30d2.wgsl.expected.msl
new file mode 100644
index 0000000..46c48ac
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/da30d2.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_da30d2(texture1d<float, access::write> tint_symbol_1) {
+  uint res = tint_symbol_1.get_width(0);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::write> tint_symbol_2) {
+  textureDimensions_da30d2(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_da30d2(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_da30d2(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/da30d2.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/da30d2.wgsl.expected.spvasm
new file mode 100644
index 0000000..e7b2b01
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/da30d2.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_da30d2 "textureDimensions_da30d2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 1D 0 0 0 2 Rgba32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %21 = OpConstantNull %uint
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_da30d2 = OpFunction %void None %12
+         %15 = OpLabel
+        %res = OpVariable %_ptr_Function_uint Function %21
+         %18 = OpLoad %11 %arg_0
+         %16 = OpImageQuerySize %uint %18
+               OpStore %res %16
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %textureDimensions_da30d2
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %27 = OpLabel
+         %28 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %28
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureDimensions_da30d2
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureDimensions_da30d2
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/da30d2.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/da30d2.wgsl.expected.wgsl
new file mode 100644
index 0000000..fb066ac
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/da30d2.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba32float, write>;
+
+fn textureDimensions_da30d2() {
+  var res : u32 = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_da30d2();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_da30d2();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_da30d2();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/daf7c0.wgsl b/test/tint/builtins/gen/var/textureDimensions/daf7c0.wgsl
deleted file mode 100644
index 5eb5422..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/daf7c0.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_multisampled_2d<i32>;
-
-// fn textureDimensions(texture: texture_multisampled_2d<i32>) -> vec2<i32>
-fn textureDimensions_daf7c0() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_daf7c0();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_daf7c0();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_daf7c0();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/daf7c0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/daf7c0.wgsl.expected.dxc.hlsl
deleted file mode 100644
index b44a6b8..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/daf7c0.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-Texture2DMS<int4> arg_0 : register(t0, space1);
-
-void textureDimensions_daf7c0() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_daf7c0();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_daf7c0();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_daf7c0();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/daf7c0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/daf7c0.wgsl.expected.fxc.hlsl
deleted file mode 100644
index b44a6b8..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/daf7c0.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-Texture2DMS<int4> arg_0 : register(t0, space1);
-
-void textureDimensions_daf7c0() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_daf7c0();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_daf7c0();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_daf7c0();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/daf7c0.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/daf7c0.wgsl.expected.glsl
deleted file mode 100644
index 5cfbb47..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/daf7c0.wgsl.expected.glsl
+++ /dev/null
@@ -1,52 +0,0 @@
-#version 310 es
-
-uniform highp isampler2DMS arg_0_1;
-void textureDimensions_daf7c0() {
-  ivec2 res = textureSize(arg_0_1);
-}
-
-vec4 vertex_main() {
-  textureDimensions_daf7c0();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-uniform highp isampler2DMS arg_0_1;
-void textureDimensions_daf7c0() {
-  ivec2 res = textureSize(arg_0_1);
-}
-
-void fragment_main() {
-  textureDimensions_daf7c0();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-uniform highp isampler2DMS arg_0_1;
-void textureDimensions_daf7c0() {
-  ivec2 res = textureSize(arg_0_1);
-}
-
-void compute_main() {
-  textureDimensions_daf7c0();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/daf7c0.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/daf7c0.wgsl.expected.msl
deleted file mode 100644
index 9f811af..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/daf7c0.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_daf7c0(texture2d_ms<int, access::read> tint_symbol_1) {
-  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture2d_ms<int, access::read> tint_symbol_2) {
-  textureDimensions_daf7c0(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture2d_ms<int, access::read> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture2d_ms<int, access::read> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_daf7c0(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture2d_ms<int, access::read> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_daf7c0(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/daf7c0.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/daf7c0.wgsl.expected.spvasm
deleted file mode 100644
index 05b6fe7..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/daf7c0.wgsl.expected.spvasm
+++ /dev/null
@@ -1,75 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 37
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_daf7c0 "textureDimensions_daf7c0"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-        %int = OpTypeInt 32 1
-         %11 = OpTypeImage %int 2D 0 0 1 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-      %v2int = OpTypeVector %int 2
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %22 = OpConstantNull %v2int
-         %23 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_daf7c0 = OpFunction %void None %13
-         %16 = OpLabel
-        %res = OpVariable %_ptr_Function_v2int Function %22
-         %19 = OpLoad %11 %arg_0
-         %17 = OpImageQuerySize %v2int %19
-               OpStore %res %17
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %23
-         %25 = OpLabel
-         %26 = OpFunctionCall %void %textureDimensions_daf7c0
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %28 = OpLabel
-         %29 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %29
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %32 = OpLabel
-         %33 = OpFunctionCall %void %textureDimensions_daf7c0
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %35 = OpLabel
-         %36 = OpFunctionCall %void %textureDimensions_daf7c0
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/daf7c0.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/daf7c0.wgsl.expected.wgsl
deleted file mode 100644
index cf81583..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/daf7c0.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_multisampled_2d<i32>;
-
-fn textureDimensions_daf7c0() {
-  var res : vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_daf7c0();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_daf7c0();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_daf7c0();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/dc2dd0.wgsl b/test/tint/builtins/gen/var/textureDimensions/dc2dd0.wgsl
deleted file mode 100644
index ff016eb..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/dc2dd0.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_1d<rgba8uint, write>;
-
-// fn textureDimensions(texture: texture_storage_1d<rgba8uint, write>) -> i32
-fn textureDimensions_dc2dd0() {
-  var res: i32 = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_dc2dd0();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_dc2dd0();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_dc2dd0();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/dc2dd0.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/dc2dd0.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 20e9146..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/dc2dd0.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture1D<uint4> arg_0 : register(u0, space1);
-
-void textureDimensions_dc2dd0() {
-  int tint_tmp;
-  arg_0.GetDimensions(tint_tmp);
-  int res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_dc2dd0();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_dc2dd0();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_dc2dd0();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/dc2dd0.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/dc2dd0.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 20e9146..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/dc2dd0.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture1D<uint4> arg_0 : register(u0, space1);
-
-void textureDimensions_dc2dd0() {
-  int tint_tmp;
-  arg_0.GetDimensions(tint_tmp);
-  int res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_dc2dd0();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_dc2dd0();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_dc2dd0();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/dc2dd0.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/dc2dd0.wgsl.expected.glsl
deleted file mode 100644
index 3d7ac14..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/dc2dd0.wgsl.expected.glsl
+++ /dev/null
@@ -1,78 +0,0 @@
-SKIP: FAILED
-
-#version 310 es
-
-layout(rgba8ui) uniform highp writeonly uimage1D arg_0;
-void textureDimensions_dc2dd0() {
-  int res = imageSize(arg_0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_dc2dd0();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'uimage1D' : Reserved word. 
-WARNING: 0:3: 'layout' : useless application of layout qualifier 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision mediump float;
-
-layout(rgba8ui) uniform highp writeonly uimage1D arg_0;
-void textureDimensions_dc2dd0() {
-  int res = imageSize(arg_0);
-}
-
-void fragment_main() {
-  textureDimensions_dc2dd0();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:4: 'uimage1D' : Reserved word. 
-WARNING: 0:4: 'layout' : useless application of layout qualifier 
-ERROR: 0:4: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-
-layout(rgba8ui) uniform highp writeonly uimage1D arg_0;
-void textureDimensions_dc2dd0() {
-  int res = imageSize(arg_0);
-}
-
-void compute_main() {
-  textureDimensions_dc2dd0();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'uimage1D' : Reserved word. 
-WARNING: 0:3: 'layout' : useless application of layout qualifier 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/dc2dd0.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/dc2dd0.wgsl.expected.msl
deleted file mode 100644
index 9e5082a..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/dc2dd0.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_dc2dd0(texture1d<uint, access::write> tint_symbol_1) {
-  int res = int(tint_symbol_1.get_width(0));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture1d<uint, access::write> tint_symbol_2) {
-  textureDimensions_dc2dd0(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture1d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture1d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_dc2dd0(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture1d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_dc2dd0(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/dc2dd0.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/dc2dd0.wgsl.expected.spvasm
deleted file mode 100644
index 074de23..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/dc2dd0.wgsl.expected.spvasm
+++ /dev/null
@@ -1,77 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 37
-; Schema: 0
-               OpCapability Shader
-               OpCapability Image1D
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_dc2dd0 "textureDimensions_dc2dd0"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-       %uint = OpTypeInt 32 0
-         %11 = OpTypeImage %uint 1D 0 0 0 2 Rgba8ui
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-%_ptr_Function_int = OpTypePointer Function %int
-         %22 = OpConstantNull %int
-         %23 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_dc2dd0 = OpFunction %void None %13
-         %16 = OpLabel
-        %res = OpVariable %_ptr_Function_int Function %22
-         %19 = OpLoad %11 %arg_0
-         %17 = OpImageQuerySize %int %19
-               OpStore %res %17
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %23
-         %25 = OpLabel
-         %26 = OpFunctionCall %void %textureDimensions_dc2dd0
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %28 = OpLabel
-         %29 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %29
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %32 = OpLabel
-         %33 = OpFunctionCall %void %textureDimensions_dc2dd0
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %35 = OpLabel
-         %36 = OpFunctionCall %void %textureDimensions_dc2dd0
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/dc2dd0.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/dc2dd0.wgsl.expected.wgsl
deleted file mode 100644
index 53eaf8f..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/dc2dd0.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba8uint, write>;
-
-fn textureDimensions_dc2dd0() {
-  var res : i32 = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_dc2dd0();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_dc2dd0();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_dc2dd0();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl b/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl
deleted file mode 100644
index c027716..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2022 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_2d_array<u32>;
-
-// fn textureDimensions(texture: texture_2d_array<u32>, level: u32) -> vec2<i32>
-fn textureDimensions_dc7798() {
-  var arg_1 = 1u;
-  var res: vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_dc7798();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_dc7798();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_dc7798();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl.expected.dxc.hlsl
deleted file mode 100644
index b1b5d48..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-Texture2DArray<uint4> arg_0 : register(t0, space1);
-
-void textureDimensions_dc7798() {
-  uint arg_1 = 1u;
-  int4 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_dc7798();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_dc7798();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_dc7798();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl.expected.fxc.hlsl
deleted file mode 100644
index b1b5d48..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-Texture2DArray<uint4> arg_0 : register(t0, space1);
-
-void textureDimensions_dc7798() {
-  uint arg_1 = 1u;
-  int4 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_dc7798();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_dc7798();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_dc7798();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl.expected.glsl
deleted file mode 100644
index 030e852..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl.expected.glsl
+++ /dev/null
@@ -1,55 +0,0 @@
-#version 310 es
-
-uniform highp usampler2DArray arg_0_1;
-void textureDimensions_dc7798() {
-  uint arg_1 = 1u;
-  ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
-}
-
-vec4 vertex_main() {
-  textureDimensions_dc7798();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-uniform highp usampler2DArray arg_0_1;
-void textureDimensions_dc7798() {
-  uint arg_1 = 1u;
-  ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
-}
-
-void fragment_main() {
-  textureDimensions_dc7798();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-uniform highp usampler2DArray arg_0_1;
-void textureDimensions_dc7798() {
-  uint arg_1 = 1u;
-  ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
-}
-
-void compute_main() {
-  textureDimensions_dc7798();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl.expected.msl
deleted file mode 100644
index 7b30672..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl.expected.msl
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_dc7798(texture2d_array<uint, access::sample> tint_symbol_1) {
-  uint arg_1 = 1u;
-  int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture2d_array<uint, access::sample> tint_symbol_2) {
-  textureDimensions_dc7798(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture2d_array<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture2d_array<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_dc7798(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture2d_array<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_dc7798(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl.expected.spvasm
deleted file mode 100644
index 433c03e..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl.expected.spvasm
+++ /dev/null
@@ -1,85 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 45
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_dc7798 "textureDimensions_dc7798"
-               OpName %arg_1 "arg_1"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-       %uint = OpTypeInt 32 0
-         %11 = OpTypeImage %uint 2D 0 1 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-     %uint_1 = OpConstant %uint 1
-%_ptr_Function_uint = OpTypePointer Function %uint
-         %20 = OpConstantNull %uint
-        %int = OpTypeInt 32 1
-      %v2int = OpTypeVector %int 2
-      %v3int = OpTypeVector %int 3
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %30 = OpConstantNull %v2int
-         %31 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_dc7798 = OpFunction %void None %13
-         %16 = OpLabel
-      %arg_1 = OpVariable %_ptr_Function_uint Function %20
-        %res = OpVariable %_ptr_Function_v2int Function %30
-               OpStore %arg_1 %uint_1
-         %26 = OpLoad %11 %arg_0
-         %27 = OpLoad %uint %arg_1
-         %24 = OpImageQuerySizeLod %v3int %26 %27
-         %21 = OpVectorShuffle %v2int %24 %24 0 1
-               OpStore %res %21
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %31
-         %33 = OpLabel
-         %34 = OpFunctionCall %void %textureDimensions_dc7798
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %36 = OpLabel
-         %37 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %37
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %40 = OpLabel
-         %41 = OpFunctionCall %void %textureDimensions_dc7798
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %43 = OpLabel
-         %44 = OpFunctionCall %void %textureDimensions_dc7798
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl.expected.wgsl
deleted file mode 100644
index f584475..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/dc7798.wgsl.expected.wgsl
+++ /dev/null
@@ -1,22 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_2d_array<u32>;
-
-fn textureDimensions_dc7798() {
-  var arg_1 = 1u;
-  var res : vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_dc7798();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_dc7798();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_dc7798();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/dc83ce.wgsl b/test/tint/builtins/gen/var/textureDimensions/dc83ce.wgsl
new file mode 100644
index 0000000..9f76364
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/dc83ce.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<r32uint, write>;
+
+// fn textureDimensions(texture: texture_storage_2d<r32uint, write>) -> vec2<u32>
+fn textureDimensions_dc83ce() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_dc83ce();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_dc83ce();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_dc83ce();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/dc83ce.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/dc83ce.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..8f9d770
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/dc83ce.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<uint4> arg_0 : register(u0, space1);
+
+void textureDimensions_dc83ce() {
+  int2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_dc83ce();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_dc83ce();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_dc83ce();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/dc83ce.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/dc83ce.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..8f9d770
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/dc83ce.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<uint4> arg_0 : register(u0, space1);
+
+void textureDimensions_dc83ce() {
+  int2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_dc83ce();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_dc83ce();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_dc83ce();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/dc83ce.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/dc83ce.wgsl.expected.glsl
new file mode 100644
index 0000000..81558b4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/dc83ce.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(r32ui) uniform highp writeonly uimage2D arg_0;
+void textureDimensions_dc83ce() {
+  uvec2 res = uvec2(imageSize(arg_0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_dc83ce();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(r32ui) uniform highp writeonly uimage2D arg_0;
+void textureDimensions_dc83ce() {
+  uvec2 res = uvec2(imageSize(arg_0));
+}
+
+void fragment_main() {
+  textureDimensions_dc83ce();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(r32ui) uniform highp writeonly uimage2D arg_0;
+void textureDimensions_dc83ce() {
+  uvec2 res = uvec2(imageSize(arg_0));
+}
+
+void compute_main() {
+  textureDimensions_dc83ce();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/dc83ce.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/dc83ce.wgsl.expected.msl
new file mode 100644
index 0000000..f65454f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/dc83ce.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_dc83ce(texture2d<uint, access::write> tint_symbol_1) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::write> tint_symbol_2) {
+  textureDimensions_dc83ce(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_dc83ce(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_dc83ce(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/dc83ce.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/dc83ce.wgsl.expected.spvasm
new file mode 100644
index 0000000..77a8eae
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/dc83ce.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_dc83ce "textureDimensions_dc83ce"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 0 0 2 R32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %v2uint = OpTypeVector %uint 2
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %22 = OpConstantNull %v2uint
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_dc83ce = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %22
+         %19 = OpLoad %11 %arg_0
+         %17 = OpImageQuerySize %v2uint %19
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %textureDimensions_dc83ce
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %28 = OpLabel
+         %29 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %29
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_dc83ce
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureDimensions_dc83ce
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/dc83ce.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/dc83ce.wgsl.expected.wgsl
new file mode 100644
index 0000000..696ed4f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/dc83ce.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<r32uint, write>;
+
+fn textureDimensions_dc83ce() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_dc83ce();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_dc83ce();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_dc83ce();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/dee461.wgsl b/test/tint/builtins/gen/var/textureDimensions/dee461.wgsl
new file mode 100644
index 0000000..bdb1c2b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/dee461.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba8snorm, write>;
+
+// fn textureDimensions(texture: texture_storage_2d<rgba8snorm, write>) -> vec2<u32>
+fn textureDimensions_dee461() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_dee461();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_dee461();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_dee461();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/dee461.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/dee461.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..a745fb1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/dee461.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<float4> arg_0 : register(u0, space1);
+
+void textureDimensions_dee461() {
+  int2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_dee461();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_dee461();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_dee461();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/dee461.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/dee461.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..a745fb1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/dee461.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<float4> arg_0 : register(u0, space1);
+
+void textureDimensions_dee461() {
+  int2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_dee461();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_dee461();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_dee461();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/dee461.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/dee461.wgsl.expected.glsl
new file mode 100644
index 0000000..d608c49
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/dee461.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba8_snorm) uniform highp writeonly image2D arg_0;
+void textureDimensions_dee461() {
+  uvec2 res = uvec2(imageSize(arg_0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_dee461();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba8_snorm) uniform highp writeonly image2D arg_0;
+void textureDimensions_dee461() {
+  uvec2 res = uvec2(imageSize(arg_0));
+}
+
+void fragment_main() {
+  textureDimensions_dee461();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba8_snorm) uniform highp writeonly image2D arg_0;
+void textureDimensions_dee461() {
+  uvec2 res = uvec2(imageSize(arg_0));
+}
+
+void compute_main() {
+  textureDimensions_dee461();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/dee461.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/dee461.wgsl.expected.msl
new file mode 100644
index 0000000..ed5309b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/dee461.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_dee461(texture2d<float, access::write> tint_symbol_1) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::write> tint_symbol_2) {
+  textureDimensions_dee461(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_dee461(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_dee461(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/dee461.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/dee461.wgsl.expected.spvasm
new file mode 100644
index 0000000..5a31cb4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/dee461.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_dee461 "textureDimensions_dee461"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 2 Rgba8Snorm
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %22 = OpConstantNull %v2uint
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_dee461 = OpFunction %void None %12
+         %15 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %22
+         %19 = OpLoad %11 %arg_0
+         %16 = OpImageQuerySize %v2uint %19
+               OpStore %res %16
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %textureDimensions_dee461
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %28 = OpLabel
+         %29 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %29
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_dee461
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureDimensions_dee461
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/dee461.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/dee461.wgsl.expected.wgsl
new file mode 100644
index 0000000..52b68e4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/dee461.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba8snorm, write>;
+
+fn textureDimensions_dee461() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_dee461();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_dee461();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_dee461();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/dfdc32.wgsl b/test/tint/builtins/gen/var/textureDimensions/dfdc32.wgsl
new file mode 100644
index 0000000..af5ce97
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/dfdc32.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d_array;
+
+// fn textureDimensions(texture: texture_depth_2d_array, level: i32) -> vec2<u32>
+fn textureDimensions_dfdc32() {
+  var arg_1 = 1i;
+  var res: vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_dfdc32();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_dfdc32();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_dfdc32();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/dfdc32.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/dfdc32.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..c46a201
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/dfdc32.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray arg_0 : register(t0, space1);
+
+void textureDimensions_dfdc32() {
+  int arg_1 = 1;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_dfdc32();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_dfdc32();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_dfdc32();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/dfdc32.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/dfdc32.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c46a201
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/dfdc32.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray arg_0 : register(t0, space1);
+
+void textureDimensions_dfdc32() {
+  int arg_1 = 1;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_dfdc32();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_dfdc32();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_dfdc32();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/dfdc32.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/dfdc32.wgsl.expected.glsl
new file mode 100644
index 0000000..b28c401
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/dfdc32.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp sampler2DArray arg_0_1;
+void textureDimensions_dfdc32() {
+  int arg_1 = 1;
+  uvec2 res = uvec2(textureSize(arg_0_1, arg_1).xy);
+}
+
+vec4 vertex_main() {
+  textureDimensions_dfdc32();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_0_1;
+void textureDimensions_dfdc32() {
+  int arg_1 = 1;
+  uvec2 res = uvec2(textureSize(arg_0_1, arg_1).xy);
+}
+
+void fragment_main() {
+  textureDimensions_dfdc32();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2DArray arg_0_1;
+void textureDimensions_dfdc32() {
+  int arg_1 = 1;
+  uvec2 res = uvec2(textureSize(arg_0_1, arg_1).xy);
+}
+
+void compute_main() {
+  textureDimensions_dfdc32();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/dfdc32.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/dfdc32.wgsl.expected.msl
new file mode 100644
index 0000000..68f883a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/dfdc32.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_dfdc32(depth2d_array<float, access::sample> tint_symbol_1) {
+  int arg_1 = 1;
+  uint2 res = uint2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d_array<float, access::sample> tint_symbol_2) {
+  textureDimensions_dfdc32(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_dfdc32(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(depth2d_array<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_dfdc32(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/dfdc32.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/dfdc32.wgsl.expected.spvasm
new file mode 100644
index 0000000..21e5752
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/dfdc32.wgsl.expected.spvasm
@@ -0,0 +1,85 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_dfdc32 "textureDimensions_dfdc32"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_int = OpTypePointer Function %int
+         %20 = OpConstantNull %int
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %30 = OpConstantNull %v2uint
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_dfdc32 = OpFunction %void None %12
+         %15 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_int Function %20
+        %res = OpVariable %_ptr_Function_v2uint Function %30
+               OpStore %arg_1 %int_1
+         %26 = OpLoad %11 %arg_0
+         %27 = OpLoad %int %arg_1
+         %24 = OpImageQuerySizeLod %v3uint %26 %27
+         %21 = OpVectorShuffle %v2uint %24 %24 0 1
+               OpStore %res %21
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureDimensions_dfdc32
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureDimensions_dfdc32
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureDimensions_dfdc32
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/dfdc32.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/dfdc32.wgsl.expected.wgsl
new file mode 100644
index 0000000..002671d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/dfdc32.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
+
+fn textureDimensions_dfdc32() {
+  var arg_1 = 1i;
+  var res : vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_dfdc32();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_dfdc32();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_dfdc32();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e122fe.wgsl b/test/tint/builtins/gen/var/textureDimensions/e122fe.wgsl
new file mode 100644
index 0000000..e09efc0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e122fe.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rgba8snorm, write>;
+
+// fn textureDimensions(texture: texture_storage_1d<rgba8snorm, write>) -> u32
+fn textureDimensions_e122fe() {
+  var res: u32 = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_e122fe();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_e122fe();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_e122fe();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e122fe.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/e122fe.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..051139d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e122fe.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<float4> arg_0 : register(u0, space1);
+
+void textureDimensions_e122fe() {
+  int tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_e122fe();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_e122fe();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_e122fe();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e122fe.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/e122fe.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..051139d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e122fe.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<float4> arg_0 : register(u0, space1);
+
+void textureDimensions_e122fe() {
+  int tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_e122fe();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_e122fe();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_e122fe();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e122fe.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/e122fe.wgsl.expected.glsl
new file mode 100644
index 0000000..5c766e8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e122fe.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rgba8_snorm) uniform highp writeonly image1D arg_0;
+void textureDimensions_e122fe() {
+  uint res = uint(imageSize(arg_0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_e122fe();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rgba8_snorm) uniform highp writeonly image1D arg_0;
+void textureDimensions_e122fe() {
+  uint res = uint(imageSize(arg_0));
+}
+
+void fragment_main() {
+  textureDimensions_e122fe();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image1D' : Reserved word. 
+WARNING: 0:4: 'layout' : useless application of layout qualifier 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rgba8_snorm) uniform highp writeonly image1D arg_0;
+void textureDimensions_e122fe() {
+  uint res = uint(imageSize(arg_0));
+}
+
+void compute_main() {
+  textureDimensions_e122fe();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/e122fe.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/e122fe.wgsl.expected.msl
new file mode 100644
index 0000000..a069344
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e122fe.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_e122fe(texture1d<float, access::write> tint_symbol_1) {
+  uint res = tint_symbol_1.get_width(0);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::write> tint_symbol_2) {
+  textureDimensions_e122fe(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_e122fe(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_e122fe(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/e122fe.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/e122fe.wgsl.expected.spvasm
new file mode 100644
index 0000000..a2f8217
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e122fe.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_e122fe "textureDimensions_e122fe"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 1D 0 0 0 2 Rgba8Snorm
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %21 = OpConstantNull %uint
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_e122fe = OpFunction %void None %12
+         %15 = OpLabel
+        %res = OpVariable %_ptr_Function_uint Function %21
+         %18 = OpLoad %11 %arg_0
+         %16 = OpImageQuerySize %uint %18
+               OpStore %res %16
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %textureDimensions_e122fe
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %27 = OpLabel
+         %28 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %28
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureDimensions_e122fe
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureDimensions_e122fe
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/e122fe.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/e122fe.wgsl.expected.wgsl
new file mode 100644
index 0000000..7c63426
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e122fe.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rgba8snorm, write>;
+
+fn textureDimensions_e122fe() {
+  var res : u32 = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_e122fe();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_e122fe();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_e122fe();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl b/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl
deleted file mode 100644
index 6f4b6a7..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2022 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_cube_array<u32>;
-
-// fn textureDimensions(texture: texture_cube_array<u32>, level: u32) -> vec2<i32>
-fn textureDimensions_e17db8() {
-  var arg_1 = 1u;
-  var res: vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_e17db8();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_e17db8();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_e17db8();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl.expected.dxc.hlsl
deleted file mode 100644
index dbcc16e..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-TextureCubeArray<uint4> arg_0 : register(t0, space1);
-
-void textureDimensions_e17db8() {
-  uint arg_1 = 1u;
-  int4 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_e17db8();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_e17db8();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_e17db8();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl.expected.fxc.hlsl
deleted file mode 100644
index dbcc16e..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-TextureCubeArray<uint4> arg_0 : register(t0, space1);
-
-void textureDimensions_e17db8() {
-  uint arg_1 = 1u;
-  int4 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_e17db8();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_e17db8();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_e17db8();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl.expected.glsl
deleted file mode 100644
index bf89199..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl.expected.glsl
+++ /dev/null
@@ -1,78 +0,0 @@
-SKIP: FAILED
-
-#version 310 es
-
-uniform highp usamplerCubeArray arg_0_1;
-void textureDimensions_e17db8() {
-  uint arg_1 = 1u;
-  ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
-}
-
-vec4 vertex_main() {
-  textureDimensions_e17db8();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'usamplerCubeArray' : Reserved word. 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision mediump float;
-
-uniform highp usamplerCubeArray arg_0_1;
-void textureDimensions_e17db8() {
-  uint arg_1 = 1u;
-  ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
-}
-
-void fragment_main() {
-  textureDimensions_e17db8();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:4: 'usamplerCubeArray' : Reserved word. 
-ERROR: 0:4: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-
-uniform highp usamplerCubeArray arg_0_1;
-void textureDimensions_e17db8() {
-  uint arg_1 = 1u;
-  ivec2 res = textureSize(arg_0_1, int(arg_1)).xy;
-}
-
-void compute_main() {
-  textureDimensions_e17db8();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'usamplerCubeArray' : Reserved word. 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl.expected.msl
deleted file mode 100644
index e6437ed..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl.expected.msl
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_e17db8(texturecube_array<uint, access::sample> tint_symbol_1) {
-  uint arg_1 = 1u;
-  int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texturecube_array<uint, access::sample> tint_symbol_2) {
-  textureDimensions_e17db8(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texturecube_array<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texturecube_array<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_e17db8(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texturecube_array<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_e17db8(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl.expected.spvasm
deleted file mode 100644
index a04c591..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl.expected.spvasm
+++ /dev/null
@@ -1,86 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 45
-; Schema: 0
-               OpCapability Shader
-               OpCapability SampledCubeArray
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_e17db8 "textureDimensions_e17db8"
-               OpName %arg_1 "arg_1"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-       %uint = OpTypeInt 32 0
-         %11 = OpTypeImage %uint Cube 0 1 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-     %uint_1 = OpConstant %uint 1
-%_ptr_Function_uint = OpTypePointer Function %uint
-         %20 = OpConstantNull %uint
-        %int = OpTypeInt 32 1
-      %v2int = OpTypeVector %int 2
-      %v3int = OpTypeVector %int 3
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %30 = OpConstantNull %v2int
-         %31 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_e17db8 = OpFunction %void None %13
-         %16 = OpLabel
-      %arg_1 = OpVariable %_ptr_Function_uint Function %20
-        %res = OpVariable %_ptr_Function_v2int Function %30
-               OpStore %arg_1 %uint_1
-         %26 = OpLoad %11 %arg_0
-         %27 = OpLoad %uint %arg_1
-         %24 = OpImageQuerySizeLod %v3int %26 %27
-         %21 = OpVectorShuffle %v2int %24 %24 0 1
-               OpStore %res %21
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %31
-         %33 = OpLabel
-         %34 = OpFunctionCall %void %textureDimensions_e17db8
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %36 = OpLabel
-         %37 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %37
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %40 = OpLabel
-         %41 = OpFunctionCall %void %textureDimensions_e17db8
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %43 = OpLabel
-         %44 = OpFunctionCall %void %textureDimensions_e17db8
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl.expected.wgsl
deleted file mode 100644
index b1a7a1b..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/e17db8.wgsl.expected.wgsl
+++ /dev/null
@@ -1,22 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_cube_array<u32>;
-
-fn textureDimensions_e17db8() {
-  var arg_1 = 1u;
-  var res : vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_e17db8();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_e17db8();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_e17db8();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e18a8b.wgsl b/test/tint/builtins/gen/var/textureDimensions/e18a8b.wgsl
new file mode 100644
index 0000000..73de72d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e18a8b.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d<u32>;
+
+// fn textureDimensions(texture: texture_2d<u32>, level: u32) -> vec2<u32>
+fn textureDimensions_e18a8b() {
+  var arg_1 = 1u;
+  var res: vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_e18a8b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_e18a8b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_e18a8b();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e18a8b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/e18a8b.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..1b76416
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e18a8b.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_e18a8b() {
+  uint arg_1 = 1u;
+  int3 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_e18a8b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_e18a8b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_e18a8b();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e18a8b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/e18a8b.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..1b76416
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e18a8b.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2D<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_e18a8b() {
+  uint arg_1 = 1u;
+  int3 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_e18a8b();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_e18a8b();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_e18a8b();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e18a8b.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/e18a8b.wgsl.expected.glsl
new file mode 100644
index 0000000..df802d0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e18a8b.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp usampler2D arg_0_1;
+void textureDimensions_e18a8b() {
+  uint arg_1 = 1u;
+  uvec2 res = uvec2(textureSize(arg_0_1, int(arg_1)));
+}
+
+vec4 vertex_main() {
+  textureDimensions_e18a8b();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usampler2D arg_0_1;
+void textureDimensions_e18a8b() {
+  uint arg_1 = 1u;
+  uvec2 res = uvec2(textureSize(arg_0_1, int(arg_1)));
+}
+
+void fragment_main() {
+  textureDimensions_e18a8b();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp usampler2D arg_0_1;
+void textureDimensions_e18a8b() {
+  uint arg_1 = 1u;
+  uvec2 res = uvec2(textureSize(arg_0_1, int(arg_1)));
+}
+
+void compute_main() {
+  textureDimensions_e18a8b();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e18a8b.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/e18a8b.wgsl.expected.msl
new file mode 100644
index 0000000..cdc85a9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e18a8b.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_e18a8b(texture2d<uint, access::sample> tint_symbol_1) {
+  uint arg_1 = 1u;
+  uint2 res = uint2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::sample> tint_symbol_2) {
+  textureDimensions_e18a8b(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_e18a8b(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_e18a8b(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/e18a8b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/e18a8b.wgsl.expected.spvasm
new file mode 100644
index 0000000..3ec4b43
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e18a8b.wgsl.expected.spvasm
@@ -0,0 +1,82 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 42
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_e18a8b "textureDimensions_e18a8b"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %20 = OpConstantNull %uint
+     %v2uint = OpTypeVector %uint 2
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %27 = OpConstantNull %v2uint
+         %28 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_e18a8b = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %20
+        %res = OpVariable %_ptr_Function_v2uint Function %27
+               OpStore %arg_1 %uint_1
+         %23 = OpLoad %11 %arg_0
+         %24 = OpLoad %uint %arg_1
+         %21 = OpImageQuerySizeLod %v2uint %23 %24
+               OpStore %res %21
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %28
+         %30 = OpLabel
+         %31 = OpFunctionCall %void %textureDimensions_e18a8b
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %33 = OpLabel
+         %34 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %34
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureDimensions_e18a8b
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureDimensions_e18a8b
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/e18a8b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/e18a8b.wgsl.expected.wgsl
new file mode 100644
index 0000000..8b28152
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e18a8b.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_2d<u32>;
+
+fn textureDimensions_e18a8b() {
+  var arg_1 = 1u;
+  var res : vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_e18a8b();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_e18a8b();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_e18a8b();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e4bfd2.wgsl b/test/tint/builtins/gen/var/textureDimensions/e4bfd2.wgsl
new file mode 100644
index 0000000..551b92b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e4bfd2.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_multisampled_2d<u32>;
+
+// fn textureDimensions(texture: texture_multisampled_2d<u32>) -> vec2<u32>
+fn textureDimensions_e4bfd2() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_e4bfd2();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_e4bfd2();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_e4bfd2();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e4bfd2.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/e4bfd2.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..a3ba5e9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e4bfd2.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DMS<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_e4bfd2() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_e4bfd2();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_e4bfd2();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_e4bfd2();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e4bfd2.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/e4bfd2.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..a3ba5e9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e4bfd2.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2DMS<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_e4bfd2() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_e4bfd2();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_e4bfd2();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_e4bfd2();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e4bfd2.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/e4bfd2.wgsl.expected.glsl
new file mode 100644
index 0000000..7e8bd57
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e4bfd2.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp usampler2DMS arg_0_1;
+void textureDimensions_e4bfd2() {
+  uvec2 res = uvec2(textureSize(arg_0_1));
+}
+
+vec4 vertex_main() {
+  textureDimensions_e4bfd2();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usampler2DMS arg_0_1;
+void textureDimensions_e4bfd2() {
+  uvec2 res = uvec2(textureSize(arg_0_1));
+}
+
+void fragment_main() {
+  textureDimensions_e4bfd2();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp usampler2DMS arg_0_1;
+void textureDimensions_e4bfd2() {
+  uvec2 res = uvec2(textureSize(arg_0_1));
+}
+
+void compute_main() {
+  textureDimensions_e4bfd2();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e4bfd2.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/e4bfd2.wgsl.expected.msl
new file mode 100644
index 0000000..a80135e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e4bfd2.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_e4bfd2(texture2d_ms<uint, access::read> tint_symbol_1) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_ms<uint, access::read> tint_symbol_2) {
+  textureDimensions_e4bfd2(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_ms<uint, access::read> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_ms<uint, access::read> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_e4bfd2(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_ms<uint, access::read> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_e4bfd2(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/e4bfd2.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/e4bfd2.wgsl.expected.spvasm
new file mode 100644
index 0000000..8f34ad1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e4bfd2.wgsl.expected.spvasm
@@ -0,0 +1,75 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_e4bfd2 "textureDimensions_e4bfd2"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 0 1 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %v2uint = OpTypeVector %uint 2
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %22 = OpConstantNull %v2uint
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_e4bfd2 = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %22
+         %19 = OpLoad %11 %arg_0
+         %17 = OpImageQuerySize %v2uint %19
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %textureDimensions_e4bfd2
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %28 = OpLabel
+         %29 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %29
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_e4bfd2
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureDimensions_e4bfd2
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/e4bfd2.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/e4bfd2.wgsl.expected.wgsl
new file mode 100644
index 0000000..5d5b8bc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e4bfd2.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_multisampled_2d<u32>;
+
+fn textureDimensions_e4bfd2() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_e4bfd2();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_e4bfd2();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_e4bfd2();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e4e310.wgsl b/test/tint/builtins/gen/var/textureDimensions/e4e310.wgsl
new file mode 100644
index 0000000..03dceb1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e4e310.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<i32>;
+
+// fn textureDimensions(texture: texture_2d_array<i32>, level: u32) -> vec2<u32>
+fn textureDimensions_e4e310() {
+  var arg_1 = 1u;
+  var res: vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_e4e310();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_e4e310();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_e4e310();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e4e310.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/e4e310.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..f694447
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e4e310.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_e4e310() {
+  uint arg_1 = 1u;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_e4e310();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_e4e310();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_e4e310();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e4e310.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/e4e310.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..f694447
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e4e310.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_e4e310() {
+  uint arg_1 = 1u;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_e4e310();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_e4e310();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_e4e310();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e4e310.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/e4e310.wgsl.expected.glsl
new file mode 100644
index 0000000..e2cfab4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e4e310.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp isampler2DArray arg_0_1;
+void textureDimensions_e4e310() {
+  uint arg_1 = 1u;
+  uvec2 res = uvec2(textureSize(arg_0_1, int(arg_1)).xy);
+}
+
+vec4 vertex_main() {
+  textureDimensions_e4e310();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isampler2DArray arg_0_1;
+void textureDimensions_e4e310() {
+  uint arg_1 = 1u;
+  uvec2 res = uvec2(textureSize(arg_0_1, int(arg_1)).xy);
+}
+
+void fragment_main() {
+  textureDimensions_e4e310();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp isampler2DArray arg_0_1;
+void textureDimensions_e4e310() {
+  uint arg_1 = 1u;
+  uvec2 res = uvec2(textureSize(arg_0_1, int(arg_1)).xy);
+}
+
+void compute_main() {
+  textureDimensions_e4e310();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e4e310.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/e4e310.wgsl.expected.msl
new file mode 100644
index 0000000..18ffda4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e4e310.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_e4e310(texture2d_array<int, access::sample> tint_symbol_1) {
+  uint arg_1 = 1u;
+  uint2 res = uint2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::sample> tint_symbol_2) {
+  textureDimensions_e4e310(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_e4e310(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_e4e310(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/e4e310.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/e4e310.wgsl.expected.spvasm
new file mode 100644
index 0000000..e4aa06a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e4e310.wgsl.expected.spvasm
@@ -0,0 +1,85 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_e4e310 "textureDimensions_e4e310"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %21 = OpConstantNull %uint
+     %v2uint = OpTypeVector %uint 2
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %30 = OpConstantNull %v2uint
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_e4e310 = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %21
+        %res = OpVariable %_ptr_Function_v2uint Function %30
+               OpStore %arg_1 %uint_1
+         %26 = OpLoad %11 %arg_0
+         %27 = OpLoad %uint %arg_1
+         %24 = OpImageQuerySizeLod %v3uint %26 %27
+         %22 = OpVectorShuffle %v2uint %24 %24 0 1
+               OpStore %res %22
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureDimensions_e4e310
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureDimensions_e4e310
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureDimensions_e4e310
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/e4e310.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/e4e310.wgsl.expected.wgsl
new file mode 100644
index 0000000..7c23846
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e4e310.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<i32>;
+
+fn textureDimensions_e4e310() {
+  var arg_1 = 1u;
+  var res : vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_e4e310();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_e4e310();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_e4e310();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e5a203.wgsl b/test/tint/builtins/gen/var/textureDimensions/e5a203.wgsl
new file mode 100644
index 0000000..eaae710
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e5a203.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_3d<u32>;
+
+// fn textureDimensions(texture: texture_3d<u32>, level: i32) -> vec3<u32>
+fn textureDimensions_e5a203() {
+  var arg_1 = 1i;
+  var res: vec3<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_e5a203();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_e5a203();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_e5a203();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e5a203.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/e5a203.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..4609b60
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e5a203.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_e5a203() {
+  int arg_1 = 1;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  uint3 res = tint_tmp.xyz;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_e5a203();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_e5a203();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_e5a203();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e5a203.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/e5a203.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..4609b60
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e5a203.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture3D<uint4> arg_0 : register(t0, space1);
+
+void textureDimensions_e5a203() {
+  int arg_1 = 1;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  uint3 res = tint_tmp.xyz;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_e5a203();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_e5a203();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_e5a203();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e5a203.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/e5a203.wgsl.expected.glsl
new file mode 100644
index 0000000..237a6c8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e5a203.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp usampler3D arg_0_1;
+void textureDimensions_e5a203() {
+  int arg_1 = 1;
+  uvec3 res = uvec3(textureSize(arg_0_1, arg_1));
+}
+
+vec4 vertex_main() {
+  textureDimensions_e5a203();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp usampler3D arg_0_1;
+void textureDimensions_e5a203() {
+  int arg_1 = 1;
+  uvec3 res = uvec3(textureSize(arg_0_1, arg_1));
+}
+
+void fragment_main() {
+  textureDimensions_e5a203();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp usampler3D arg_0_1;
+void textureDimensions_e5a203() {
+  int arg_1 = 1;
+  uvec3 res = uvec3(textureSize(arg_0_1, arg_1));
+}
+
+void compute_main() {
+  textureDimensions_e5a203();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e5a203.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/e5a203.wgsl.expected.msl
new file mode 100644
index 0000000..22cfb73
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e5a203.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_e5a203(texture3d<uint, access::sample> tint_symbol_1) {
+  int arg_1 = 1;
+  uint3 res = uint3(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1), tint_symbol_1.get_depth(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<uint, access::sample> tint_symbol_2) {
+  textureDimensions_e5a203(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_e5a203(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture3d<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_e5a203(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/e5a203.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/e5a203.wgsl.expected.spvasm
new file mode 100644
index 0000000..382c8e0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e5a203.wgsl.expected.spvasm
@@ -0,0 +1,83 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 43
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_e5a203 "textureDimensions_e5a203"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 3D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_int = OpTypePointer Function %int
+         %21 = OpConstantNull %int
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+         %28 = OpConstantNull %v3uint
+         %29 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_e5a203 = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_int Function %21
+        %res = OpVariable %_ptr_Function_v3uint Function %28
+               OpStore %arg_1 %int_1
+         %24 = OpLoad %11 %arg_0
+         %25 = OpLoad %int %arg_1
+         %22 = OpImageQuerySizeLod %v3uint %24 %25
+               OpStore %res %22
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %29
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureDimensions_e5a203
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %34 = OpLabel
+         %35 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %35
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %38 = OpLabel
+         %39 = OpFunctionCall %void %textureDimensions_e5a203
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %41 = OpLabel
+         %42 = OpFunctionCall %void %textureDimensions_e5a203
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/e5a203.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/e5a203.wgsl.expected.wgsl
new file mode 100644
index 0000000..0343a14
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e5a203.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_3d<u32>;
+
+fn textureDimensions_e5a203() {
+  var arg_1 = 1i;
+  var res : vec3<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_e5a203();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_e5a203();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_e5a203();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e738f4.wgsl b/test/tint/builtins/gen/var/textureDimensions/e738f4.wgsl
new file mode 100644
index 0000000..e60e2db
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e738f4.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rg32sint, write>;
+
+// fn textureDimensions(texture: texture_storage_3d<rg32sint, write>) -> vec3<u32>
+fn textureDimensions_e738f4() {
+  var res: vec3<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_e738f4();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_e738f4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_e738f4();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e738f4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/e738f4.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..32c9a19
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e738f4.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<int4> arg_0 : register(u0, space1);
+
+void textureDimensions_e738f4() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_e738f4();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_e738f4();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_e738f4();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e738f4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/e738f4.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..32c9a19
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e738f4.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<int4> arg_0 : register(u0, space1);
+
+void textureDimensions_e738f4() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_e738f4();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_e738f4();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_e738f4();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e738f4.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/e738f4.wgsl.expected.glsl
new file mode 100644
index 0000000..4100c6f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e738f4.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32i) uniform highp writeonly iimage3D arg_0;
+void textureDimensions_e738f4() {
+  uvec3 res = uvec3(imageSize(arg_0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_e738f4();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rg32i) uniform highp writeonly iimage3D arg_0;
+void textureDimensions_e738f4() {
+  uvec3 res = uvec3(imageSize(arg_0));
+}
+
+void fragment_main() {
+  textureDimensions_e738f4();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32i) uniform highp writeonly iimage3D arg_0;
+void textureDimensions_e738f4() {
+  uvec3 res = uvec3(imageSize(arg_0));
+}
+
+void compute_main() {
+  textureDimensions_e738f4();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/e738f4.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/e738f4.wgsl.expected.msl
new file mode 100644
index 0000000..4f00a61
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e738f4.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_e738f4(texture3d<int, access::write> tint_symbol_1) {
+  uint3 res = uint3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<int, access::write> tint_symbol_2) {
+  textureDimensions_e738f4(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_e738f4(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture3d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_e738f4(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/e738f4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/e738f4.wgsl.expected.spvasm
new file mode 100644
index 0000000..f47fb82
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e738f4.wgsl.expected.spvasm
@@ -0,0 +1,78 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; Schema: 0
+               OpCapability Shader
+               OpCapability StorageImageExtendedFormats
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_e738f4 "textureDimensions_e738f4"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 3D 0 0 0 2 Rg32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+         %23 = OpConstantNull %v3uint
+         %24 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_e738f4 = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_v3uint Function %23
+         %20 = OpLoad %11 %arg_0
+         %17 = OpImageQuerySize %v3uint %20
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %textureDimensions_e738f4
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %29 = OpLabel
+         %30 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %30
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureDimensions_e738f4
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureDimensions_e738f4
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/e738f4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/e738f4.wgsl.expected.wgsl
new file mode 100644
index 0000000..d6b582c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e738f4.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rg32sint, write>;
+
+fn textureDimensions_e738f4() {
+  var res : vec3<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_e738f4();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_e738f4();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_e738f4();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e927be.wgsl b/test/tint/builtins/gen/var/textureDimensions/e927be.wgsl
deleted file mode 100644
index 5650d35..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/e927be.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_cube_array<i32>;
-
-// fn textureDimensions(texture: texture_cube_array<i32>) -> vec2<i32>
-fn textureDimensions_e927be() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_e927be();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_e927be();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_e927be();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e927be.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/e927be.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 3be868f..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/e927be.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-TextureCubeArray<int4> arg_0 : register(t0, space1);
-
-void textureDimensions_e927be() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_e927be();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_e927be();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_e927be();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e927be.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/e927be.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 3be868f..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/e927be.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-TextureCubeArray<int4> arg_0 : register(t0, space1);
-
-void textureDimensions_e927be() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_e927be();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_e927be();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_e927be();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e927be.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/e927be.wgsl.expected.glsl
deleted file mode 100644
index a476da2..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/e927be.wgsl.expected.glsl
+++ /dev/null
@@ -1,75 +0,0 @@
-SKIP: FAILED
-
-#version 310 es
-
-uniform highp isamplerCubeArray arg_0_1;
-void textureDimensions_e927be() {
-  ivec2 res = textureSize(arg_0_1, 0).xy;
-}
-
-vec4 vertex_main() {
-  textureDimensions_e927be();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'isamplerCubeArray' : Reserved word. 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision mediump float;
-
-uniform highp isamplerCubeArray arg_0_1;
-void textureDimensions_e927be() {
-  ivec2 res = textureSize(arg_0_1, 0).xy;
-}
-
-void fragment_main() {
-  textureDimensions_e927be();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:4: 'isamplerCubeArray' : Reserved word. 
-ERROR: 0:4: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-
-uniform highp isamplerCubeArray arg_0_1;
-void textureDimensions_e927be() {
-  ivec2 res = textureSize(arg_0_1, 0).xy;
-}
-
-void compute_main() {
-  textureDimensions_e927be();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'isamplerCubeArray' : Reserved word. 
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/e927be.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/e927be.wgsl.expected.msl
deleted file mode 100644
index 709257f..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/e927be.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_e927be(texturecube_array<int, access::sample> tint_symbol_1) {
-  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texturecube_array<int, access::sample> tint_symbol_2) {
-  textureDimensions_e927be(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texturecube_array<int, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texturecube_array<int, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_e927be(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texturecube_array<int, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_e927be(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/e927be.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/e927be.wgsl.expected.spvasm
deleted file mode 100644
index 021901e..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/e927be.wgsl.expected.spvasm
+++ /dev/null
@@ -1,79 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 40
-; Schema: 0
-               OpCapability Shader
-               OpCapability SampledCubeArray
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_e927be "textureDimensions_e927be"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-        %int = OpTypeInt 32 1
-         %11 = OpTypeImage %int Cube 0 1 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-      %v2int = OpTypeVector %int 2
-      %v3int = OpTypeVector %int 3
-      %int_0 = OpConstant %int 0
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %25 = OpConstantNull %v2int
-         %26 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_e927be = OpFunction %void None %13
-         %16 = OpLabel
-        %res = OpVariable %_ptr_Function_v2int Function %25
-         %21 = OpLoad %11 %arg_0
-         %19 = OpImageQuerySizeLod %v3int %21 %int_0
-         %17 = OpVectorShuffle %v2int %19 %19 0 1
-               OpStore %res %17
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %26
-         %28 = OpLabel
-         %29 = OpFunctionCall %void %textureDimensions_e927be
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %31 = OpLabel
-         %32 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %32
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %35 = OpLabel
-         %36 = OpFunctionCall %void %textureDimensions_e927be
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %38 = OpLabel
-         %39 = OpFunctionCall %void %textureDimensions_e927be
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/e927be.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/e927be.wgsl.expected.wgsl
deleted file mode 100644
index 1c420a1..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/e927be.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_cube_array<i32>;
-
-fn textureDimensions_e927be() {
-  var res : vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_e927be();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_e927be();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_e927be();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e99308.wgsl b/test/tint/builtins/gen/var/textureDimensions/e99308.wgsl
new file mode 100644
index 0000000..e5025f0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e99308.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba16uint, write>;
+
+// fn textureDimensions(texture: texture_storage_2d<rgba16uint, write>) -> vec2<u32>
+fn textureDimensions_e99308() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_e99308();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_e99308();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_e99308();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e99308.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/e99308.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..2085764
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e99308.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<uint4> arg_0 : register(u0, space1);
+
+void textureDimensions_e99308() {
+  int2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_e99308();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_e99308();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_e99308();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e99308.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/e99308.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..2085764
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e99308.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<uint4> arg_0 : register(u0, space1);
+
+void textureDimensions_e99308() {
+  int2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_e99308();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_e99308();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_e99308();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e99308.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/e99308.wgsl.expected.glsl
new file mode 100644
index 0000000..51d74f1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e99308.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba16ui) uniform highp writeonly uimage2D arg_0;
+void textureDimensions_e99308() {
+  uvec2 res = uvec2(imageSize(arg_0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_e99308();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba16ui) uniform highp writeonly uimage2D arg_0;
+void textureDimensions_e99308() {
+  uvec2 res = uvec2(imageSize(arg_0));
+}
+
+void fragment_main() {
+  textureDimensions_e99308();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba16ui) uniform highp writeonly uimage2D arg_0;
+void textureDimensions_e99308() {
+  uvec2 res = uvec2(imageSize(arg_0));
+}
+
+void compute_main() {
+  textureDimensions_e99308();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e99308.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/e99308.wgsl.expected.msl
new file mode 100644
index 0000000..e74a4e7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e99308.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_e99308(texture2d<uint, access::write> tint_symbol_1) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<uint, access::write> tint_symbol_2) {
+  textureDimensions_e99308(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_e99308(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_e99308(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/e99308.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/e99308.wgsl.expected.spvasm
new file mode 100644
index 0000000..212b7e2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e99308.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_e99308 "textureDimensions_e99308"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 2D 0 0 0 2 Rgba16ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+     %v2uint = OpTypeVector %uint 2
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %22 = OpConstantNull %v2uint
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_e99308 = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %22
+         %19 = OpLoad %11 %arg_0
+         %17 = OpImageQuerySize %v2uint %19
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %textureDimensions_e99308
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %28 = OpLabel
+         %29 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %29
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_e99308
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureDimensions_e99308
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/e99308.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/e99308.wgsl.expected.wgsl
new file mode 100644
index 0000000..b3346dc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/e99308.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba16uint, write>;
+
+fn textureDimensions_e99308() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_e99308();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_e99308();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_e99308();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e9e96c.wgsl b/test/tint/builtins/gen/var/textureDimensions/e9e96c.wgsl
deleted file mode 100644
index 4399a36..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/e9e96c.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<r32float, write>;
-
-// fn textureDimensions(texture: texture_storage_2d_array<r32float, write>) -> vec2<i32>
-fn textureDimensions_e9e96c() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_e9e96c();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_e9e96c();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_e9e96c();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e9e96c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/e9e96c.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 510eef8..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/e9e96c.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2DArray<float4> arg_0 : register(u0, space1);
-
-void textureDimensions_e9e96c() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_e9e96c();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_e9e96c();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_e9e96c();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e9e96c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/e9e96c.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 510eef8..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/e9e96c.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2DArray<float4> arg_0 : register(u0, space1);
-
-void textureDimensions_e9e96c() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_e9e96c();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_e9e96c();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_e9e96c();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e9e96c.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/e9e96c.wgsl.expected.glsl
deleted file mode 100644
index c167c24..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/e9e96c.wgsl.expected.glsl
+++ /dev/null
@@ -1,52 +0,0 @@
-#version 310 es
-
-layout(r32f) uniform highp writeonly image2DArray arg_0;
-void textureDimensions_e9e96c() {
-  ivec2 res = imageSize(arg_0).xy;
-}
-
-vec4 vertex_main() {
-  textureDimensions_e9e96c();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-layout(r32f) uniform highp writeonly image2DArray arg_0;
-void textureDimensions_e9e96c() {
-  ivec2 res = imageSize(arg_0).xy;
-}
-
-void fragment_main() {
-  textureDimensions_e9e96c();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-layout(r32f) uniform highp writeonly image2DArray arg_0;
-void textureDimensions_e9e96c() {
-  ivec2 res = imageSize(arg_0).xy;
-}
-
-void compute_main() {
-  textureDimensions_e9e96c();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/e9e96c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/e9e96c.wgsl.expected.msl
deleted file mode 100644
index d512809..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/e9e96c.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_e9e96c(texture2d_array<float, access::write> tint_symbol_1) {
-  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
-  textureDimensions_e9e96c(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture2d_array<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture2d_array<float, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_e9e96c(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture2d_array<float, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_e9e96c(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/e9e96c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/e9e96c.wgsl.expected.spvasm
deleted file mode 100644
index 3bc1dd4..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/e9e96c.wgsl.expected.spvasm
+++ /dev/null
@@ -1,78 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 39
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_e9e96c "textureDimensions_e9e96c"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-         %11 = OpTypeImage %float 2D 0 1 0 2 R32f
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %12 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %v2int = OpTypeVector %int 2
-      %v3int = OpTypeVector %int 3
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %24 = OpConstantNull %v2int
-         %25 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_e9e96c = OpFunction %void None %12
-         %15 = OpLabel
-        %res = OpVariable %_ptr_Function_v2int Function %24
-         %21 = OpLoad %11 %arg_0
-         %19 = OpImageQuerySize %v3int %21
-         %16 = OpVectorShuffle %v2int %19 %19 0 1
-               OpStore %res %16
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %25
-         %27 = OpLabel
-         %28 = OpFunctionCall %void %textureDimensions_e9e96c
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %12
-         %30 = OpLabel
-         %31 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %31
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %12
-         %34 = OpLabel
-         %35 = OpFunctionCall %void %textureDimensions_e9e96c
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %12
-         %37 = OpLabel
-         %38 = OpFunctionCall %void %textureDimensions_e9e96c
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/e9e96c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/e9e96c.wgsl.expected.wgsl
deleted file mode 100644
index 4c37479..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/e9e96c.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_2d_array<r32float, write>;
-
-fn textureDimensions_e9e96c() {
-  var res : vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_e9e96c();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_e9e96c();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_e9e96c();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/ea066c.wgsl b/test/tint/builtins/gen/var/textureDimensions/ea066c.wgsl
new file mode 100644
index 0000000..ec3f376
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/ea066c.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<r32float, write>;
+
+// fn textureDimensions(texture: texture_storage_1d<r32float, write>) -> u32
+fn textureDimensions_ea066c() {
+  var res: u32 = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_ea066c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_ea066c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_ea066c();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/ea066c.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/ea066c.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..5e0b777
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/ea066c.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<float4> arg_0 : register(u0, space1);
+
+void textureDimensions_ea066c() {
+  int tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_ea066c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_ea066c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_ea066c();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/ea066c.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/ea066c.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..5e0b777
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/ea066c.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<float4> arg_0 : register(u0, space1);
+
+void textureDimensions_ea066c() {
+  int tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_ea066c();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_ea066c();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_ea066c();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/ea066c.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/ea066c.wgsl.expected.glsl
new file mode 100644
index 0000000..70bc37d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/ea066c.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(r32f) uniform highp writeonly image1D arg_0;
+void textureDimensions_ea066c() {
+  uint res = uint(imageSize(arg_0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_ea066c();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(r32f) uniform highp writeonly image1D arg_0;
+void textureDimensions_ea066c() {
+  uint res = uint(imageSize(arg_0));
+}
+
+void fragment_main() {
+  textureDimensions_ea066c();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image1D' : Reserved word. 
+WARNING: 0:4: 'layout' : useless application of layout qualifier 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(r32f) uniform highp writeonly image1D arg_0;
+void textureDimensions_ea066c() {
+  uint res = uint(imageSize(arg_0));
+}
+
+void compute_main() {
+  textureDimensions_ea066c();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image1D' : Reserved word. 
+WARNING: 0:3: 'layout' : useless application of layout qualifier 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/ea066c.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/ea066c.wgsl.expected.msl
new file mode 100644
index 0000000..9da6c0d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/ea066c.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_ea066c(texture1d<float, access::write> tint_symbol_1) {
+  uint res = tint_symbol_1.get_width(0);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::write> tint_symbol_2) {
+  textureDimensions_ea066c(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_ea066c(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_ea066c(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/ea066c.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/ea066c.wgsl.expected.spvasm
new file mode 100644
index 0000000..7644858
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/ea066c.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_ea066c "textureDimensions_ea066c"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 1D 0 0 0 2 R32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %21 = OpConstantNull %uint
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_ea066c = OpFunction %void None %12
+         %15 = OpLabel
+        %res = OpVariable %_ptr_Function_uint Function %21
+         %18 = OpLoad %11 %arg_0
+         %16 = OpImageQuerySize %uint %18
+               OpStore %res %16
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %textureDimensions_ea066c
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %27 = OpLabel
+         %28 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %28
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureDimensions_ea066c
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureDimensions_ea066c
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/ea066c.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/ea066c.wgsl.expected.wgsl
new file mode 100644
index 0000000..dd5fb14
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/ea066c.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<r32float, write>;
+
+fn textureDimensions_ea066c() {
+  var res : u32 = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_ea066c();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_ea066c();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_ea066c();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/ea25bc.wgsl b/test/tint/builtins/gen/var/textureDimensions/ea25bc.wgsl
new file mode 100644
index 0000000..ffb3521
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/ea25bc.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rg32uint, write>;
+
+// fn textureDimensions(texture: texture_storage_1d<rg32uint, write>) -> u32
+fn textureDimensions_ea25bc() {
+  var res: u32 = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_ea25bc();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_ea25bc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_ea25bc();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/ea25bc.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/ea25bc.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..11fbba9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/ea25bc.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<uint4> arg_0 : register(u0, space1);
+
+void textureDimensions_ea25bc() {
+  int tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_ea25bc();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_ea25bc();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_ea25bc();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/ea25bc.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/ea25bc.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..11fbba9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/ea25bc.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<uint4> arg_0 : register(u0, space1);
+
+void textureDimensions_ea25bc() {
+  int tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_ea25bc();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_ea25bc();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_ea25bc();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/ea25bc.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/ea25bc.wgsl.expected.glsl
new file mode 100644
index 0000000..46e8cb3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/ea25bc.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32ui) uniform highp writeonly uimage1D arg_0;
+void textureDimensions_ea25bc() {
+  uint res = uint(imageSize(arg_0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_ea25bc();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rg32ui) uniform highp writeonly uimage1D arg_0;
+void textureDimensions_ea25bc() {
+  uint res = uint(imageSize(arg_0));
+}
+
+void fragment_main() {
+  textureDimensions_ea25bc();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32ui) uniform highp writeonly uimage1D arg_0;
+void textureDimensions_ea25bc() {
+  uint res = uint(imageSize(arg_0));
+}
+
+void compute_main() {
+  textureDimensions_ea25bc();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/ea25bc.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/ea25bc.wgsl.expected.msl
new file mode 100644
index 0000000..884b655
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/ea25bc.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_ea25bc(texture1d<uint, access::write> tint_symbol_1) {
+  uint res = tint_symbol_1.get_width(0);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<uint, access::write> tint_symbol_2) {
+  textureDimensions_ea25bc(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_ea25bc(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_ea25bc(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/ea25bc.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/ea25bc.wgsl.expected.spvasm
new file mode 100644
index 0000000..04dabbf
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/ea25bc.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 36
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpCapability StorageImageExtendedFormats
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_ea25bc "textureDimensions_ea25bc"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+       %uint = OpTypeInt 32 0
+         %11 = OpTypeImage %uint 1D 0 0 0 2 Rg32ui
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %21 = OpConstantNull %uint
+         %22 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_ea25bc = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_uint Function %21
+         %18 = OpLoad %11 %arg_0
+         %17 = OpImageQuerySize %uint %18
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %22
+         %24 = OpLabel
+         %25 = OpFunctionCall %void %textureDimensions_ea25bc
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %27 = OpLabel
+         %28 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %28
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %31 = OpLabel
+         %32 = OpFunctionCall %void %textureDimensions_ea25bc
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureDimensions_ea25bc
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/ea25bc.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/ea25bc.wgsl.expected.wgsl
new file mode 100644
index 0000000..0c96ea0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/ea25bc.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rg32uint, write>;
+
+fn textureDimensions_ea25bc() {
+  var res : u32 = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_ea25bc();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_ea25bc();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_ea25bc();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/eafe19.wgsl b/test/tint/builtins/gen/var/textureDimensions/eafe19.wgsl
new file mode 100644
index 0000000..b8c7fbc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/eafe19.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_depth_2d_array;
+
+// fn textureDimensions(texture: texture_depth_2d_array, level: u32) -> vec2<u32>
+fn textureDimensions_eafe19() {
+  var arg_1 = 1u;
+  var res: vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_eafe19();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_eafe19();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_eafe19();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/eafe19.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/eafe19.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..16f8cae
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/eafe19.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray arg_0 : register(t0, space1);
+
+void textureDimensions_eafe19() {
+  uint arg_1 = 1u;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_eafe19();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_eafe19();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_eafe19();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/eafe19.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/eafe19.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..16f8cae
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/eafe19.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray arg_0 : register(t0, space1);
+
+void textureDimensions_eafe19() {
+  uint arg_1 = 1u;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_eafe19();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_eafe19();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_eafe19();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/eafe19.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/eafe19.wgsl.expected.glsl
new file mode 100644
index 0000000..986faec
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/eafe19.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp sampler2DArray arg_0_1;
+void textureDimensions_eafe19() {
+  uint arg_1 = 1u;
+  uvec2 res = uvec2(textureSize(arg_0_1, int(arg_1)).xy);
+}
+
+vec4 vertex_main() {
+  textureDimensions_eafe19();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp sampler2DArray arg_0_1;
+void textureDimensions_eafe19() {
+  uint arg_1 = 1u;
+  uvec2 res = uvec2(textureSize(arg_0_1, int(arg_1)).xy);
+}
+
+void fragment_main() {
+  textureDimensions_eafe19();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp sampler2DArray arg_0_1;
+void textureDimensions_eafe19() {
+  uint arg_1 = 1u;
+  uvec2 res = uvec2(textureSize(arg_0_1, int(arg_1)).xy);
+}
+
+void compute_main() {
+  textureDimensions_eafe19();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/eafe19.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/eafe19.wgsl.expected.msl
new file mode 100644
index 0000000..3d8648c
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/eafe19.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_eafe19(depth2d_array<float, access::sample> tint_symbol_1) {
+  uint arg_1 = 1u;
+  uint2 res = uint2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(depth2d_array<float, access::sample> tint_symbol_2) {
+  textureDimensions_eafe19(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(depth2d_array<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(depth2d_array<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_eafe19(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(depth2d_array<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_eafe19(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/eafe19.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/eafe19.wgsl.expected.spvasm
new file mode 100644
index 0000000..8bb393e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/eafe19.wgsl.expected.spvasm
@@ -0,0 +1,84 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 44
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_eafe19 "textureDimensions_eafe19"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %uint_1 = OpConstant %uint 1
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %20 = OpConstantNull %uint
+     %v2uint = OpTypeVector %uint 2
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %29 = OpConstantNull %v2uint
+         %30 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_eafe19 = OpFunction %void None %12
+         %15 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_uint Function %20
+        %res = OpVariable %_ptr_Function_v2uint Function %29
+               OpStore %arg_1 %uint_1
+         %25 = OpLoad %11 %arg_0
+         %26 = OpLoad %uint %arg_1
+         %23 = OpImageQuerySizeLod %v3uint %25 %26
+         %21 = OpVectorShuffle %v2uint %23 %23 0 1
+               OpStore %res %21
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %30
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_eafe19
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %35 = OpLabel
+         %36 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %36
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %39 = OpLabel
+         %40 = OpFunctionCall %void %textureDimensions_eafe19
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %42 = OpLabel
+         %43 = OpFunctionCall %void %textureDimensions_eafe19
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/eafe19.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/eafe19.wgsl.expected.wgsl
new file mode 100644
index 0000000..bbf6cfe
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/eafe19.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_depth_2d_array;
+
+fn textureDimensions_eafe19() {
+  var arg_1 = 1u;
+  var res : vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_eafe19();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_eafe19();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_eafe19();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/eb03b1.wgsl b/test/tint/builtins/gen/var/textureDimensions/eb03b1.wgsl
new file mode 100644
index 0000000..05adc5b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/eb03b1.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d_array<rgba16float, write>;
+
+// fn textureDimensions(texture: texture_storage_2d_array<rgba16float, write>) -> vec2<u32>
+fn textureDimensions_eb03b1() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_eb03b1();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_eb03b1();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_eb03b1();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/eb03b1.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/eb03b1.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..cbab187
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/eb03b1.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureDimensions_eb03b1() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_eb03b1();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_eb03b1();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_eb03b1();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/eb03b1.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/eb03b1.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..cbab187
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/eb03b1.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2DArray<float4> arg_0 : register(u0, space1);
+
+void textureDimensions_eb03b1() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_eb03b1();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_eb03b1();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_eb03b1();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/eb03b1.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/eb03b1.wgsl.expected.glsl
new file mode 100644
index 0000000..dfc6512
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/eb03b1.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba16f) uniform highp writeonly image2DArray arg_0;
+void textureDimensions_eb03b1() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+}
+
+vec4 vertex_main() {
+  textureDimensions_eb03b1();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba16f) uniform highp writeonly image2DArray arg_0;
+void textureDimensions_eb03b1() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+}
+
+void fragment_main() {
+  textureDimensions_eb03b1();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba16f) uniform highp writeonly image2DArray arg_0;
+void textureDimensions_eb03b1() {
+  uvec2 res = uvec2(imageSize(arg_0).xy);
+}
+
+void compute_main() {
+  textureDimensions_eb03b1();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/eb03b1.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/eb03b1.wgsl.expected.msl
new file mode 100644
index 0000000..4cfae71
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/eb03b1.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_eb03b1(texture2d_array<float, access::write> tint_symbol_1) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
+  textureDimensions_eb03b1(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_eb03b1(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_eb03b1(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/eb03b1.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/eb03b1.wgsl.expected.spvasm
new file mode 100644
index 0000000..1685567
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/eb03b1.wgsl.expected.spvasm
@@ -0,0 +1,78 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_eb03b1 "textureDimensions_eb03b1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 1 0 2 Rgba16f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %24 = OpConstantNull %v2uint
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_eb03b1 = OpFunction %void None %12
+         %15 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %24
+         %21 = OpLoad %11 %arg_0
+         %19 = OpImageQuerySize %v3uint %21
+         %16 = OpVectorShuffle %v2uint %19 %19 0 1
+               OpStore %res %16
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %textureDimensions_eb03b1
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureDimensions_eb03b1
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureDimensions_eb03b1
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/eb03b1.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/eb03b1.wgsl.expected.wgsl
new file mode 100644
index 0000000..3eefe24
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/eb03b1.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rgba16float, write>;
+
+fn textureDimensions_eb03b1() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_eb03b1();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_eb03b1();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_eb03b1();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/ef2e58.wgsl b/test/tint/builtins/gen/var/textureDimensions/ef2e58.wgsl
new file mode 100644
index 0000000..8dec9e5
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/ef2e58.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<r32sint, write>;
+
+// fn textureDimensions(texture: texture_storage_3d<r32sint, write>) -> vec3<u32>
+fn textureDimensions_ef2e58() {
+  var res: vec3<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_ef2e58();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_ef2e58();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_ef2e58();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/ef2e58.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/ef2e58.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..574ab12
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/ef2e58.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<int4> arg_0 : register(u0, space1);
+
+void textureDimensions_ef2e58() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_ef2e58();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_ef2e58();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_ef2e58();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/ef2e58.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/ef2e58.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..574ab12
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/ef2e58.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<int4> arg_0 : register(u0, space1);
+
+void textureDimensions_ef2e58() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_ef2e58();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_ef2e58();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_ef2e58();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/ef2e58.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/ef2e58.wgsl.expected.glsl
new file mode 100644
index 0000000..15d4aaf
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/ef2e58.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(r32i) uniform highp writeonly iimage3D arg_0;
+void textureDimensions_ef2e58() {
+  uvec3 res = uvec3(imageSize(arg_0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_ef2e58();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(r32i) uniform highp writeonly iimage3D arg_0;
+void textureDimensions_ef2e58() {
+  uvec3 res = uvec3(imageSize(arg_0));
+}
+
+void fragment_main() {
+  textureDimensions_ef2e58();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(r32i) uniform highp writeonly iimage3D arg_0;
+void textureDimensions_ef2e58() {
+  uvec3 res = uvec3(imageSize(arg_0));
+}
+
+void compute_main() {
+  textureDimensions_ef2e58();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/ef2e58.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/ef2e58.wgsl.expected.msl
new file mode 100644
index 0000000..d52234e
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/ef2e58.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_ef2e58(texture3d<int, access::write> tint_symbol_1) {
+  uint3 res = uint3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<int, access::write> tint_symbol_2) {
+  textureDimensions_ef2e58(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_ef2e58(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture3d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_ef2e58(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/ef2e58.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/ef2e58.wgsl.expected.spvasm
new file mode 100644
index 0000000..70ed829
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/ef2e58.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 38
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_ef2e58 "textureDimensions_ef2e58"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 3D 0 0 0 2 R32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+         %23 = OpConstantNull %v3uint
+         %24 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_ef2e58 = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_v3uint Function %23
+         %20 = OpLoad %11 %arg_0
+         %17 = OpImageQuerySize %v3uint %20
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %24
+         %26 = OpLabel
+         %27 = OpFunctionCall %void %textureDimensions_ef2e58
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %29 = OpLabel
+         %30 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %30
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureDimensions_ef2e58
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %void %textureDimensions_ef2e58
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/ef2e58.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/ef2e58.wgsl.expected.wgsl
new file mode 100644
index 0000000..0a1bbc4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/ef2e58.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_3d<r32sint, write>;
+
+fn textureDimensions_ef2e58() {
+  var res : vec3<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_ef2e58();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_ef2e58();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_ef2e58();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/ef5b89.wgsl b/test/tint/builtins/gen/var/textureDimensions/ef5b89.wgsl
deleted file mode 100644
index 40048ce..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/ef5b89.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_multisampled_2d<f32>;
-
-// fn textureDimensions(texture: texture_multisampled_2d<f32>) -> vec2<i32>
-fn textureDimensions_ef5b89() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_ef5b89();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_ef5b89();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_ef5b89();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/ef5b89.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/ef5b89.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 4bc53da..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/ef5b89.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-Texture2DMS<float4> arg_0 : register(t0, space1);
-
-void textureDimensions_ef5b89() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_ef5b89();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_ef5b89();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_ef5b89();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/ef5b89.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/ef5b89.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 4bc53da..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/ef5b89.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-Texture2DMS<float4> arg_0 : register(t0, space1);
-
-void textureDimensions_ef5b89() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_ef5b89();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_ef5b89();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_ef5b89();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/ef5b89.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/ef5b89.wgsl.expected.glsl
deleted file mode 100644
index c0c1d74..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/ef5b89.wgsl.expected.glsl
+++ /dev/null
@@ -1,52 +0,0 @@
-#version 310 es
-
-uniform highp sampler2DMS arg_0_1;
-void textureDimensions_ef5b89() {
-  ivec2 res = textureSize(arg_0_1);
-}
-
-vec4 vertex_main() {
-  textureDimensions_ef5b89();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-uniform highp sampler2DMS arg_0_1;
-void textureDimensions_ef5b89() {
-  ivec2 res = textureSize(arg_0_1);
-}
-
-void fragment_main() {
-  textureDimensions_ef5b89();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-uniform highp sampler2DMS arg_0_1;
-void textureDimensions_ef5b89() {
-  ivec2 res = textureSize(arg_0_1);
-}
-
-void compute_main() {
-  textureDimensions_ef5b89();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/ef5b89.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/ef5b89.wgsl.expected.msl
deleted file mode 100644
index a0d18a7..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/ef5b89.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_ef5b89(texture2d_ms<float, access::read> tint_symbol_1) {
-  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture2d_ms<float, access::read> tint_symbol_2) {
-  textureDimensions_ef5b89(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture2d_ms<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture2d_ms<float, access::read> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_ef5b89(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture2d_ms<float, access::read> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_ef5b89(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/ef5b89.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/ef5b89.wgsl.expected.spvasm
deleted file mode 100644
index 2cb1a7f..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/ef5b89.wgsl.expected.spvasm
+++ /dev/null
@@ -1,75 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 37
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_ef5b89 "textureDimensions_ef5b89"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-         %11 = OpTypeImage %float 2D 0 0 1 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %12 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %v2int = OpTypeVector %int 2
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %22 = OpConstantNull %v2int
-         %23 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_ef5b89 = OpFunction %void None %12
-         %15 = OpLabel
-        %res = OpVariable %_ptr_Function_v2int Function %22
-         %19 = OpLoad %11 %arg_0
-         %16 = OpImageQuerySize %v2int %19
-               OpStore %res %16
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %23
-         %25 = OpLabel
-         %26 = OpFunctionCall %void %textureDimensions_ef5b89
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %12
-         %28 = OpLabel
-         %29 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %29
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %12
-         %32 = OpLabel
-         %33 = OpFunctionCall %void %textureDimensions_ef5b89
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %12
-         %35 = OpLabel
-         %36 = OpFunctionCall %void %textureDimensions_ef5b89
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/ef5b89.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/ef5b89.wgsl.expected.wgsl
deleted file mode 100644
index 32a0325..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/ef5b89.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_multisampled_2d<f32>;
-
-fn textureDimensions_ef5b89() {
-  var res : vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_ef5b89();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_ef5b89();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_ef5b89();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/efc8a4.wgsl b/test/tint/builtins/gen/var/textureDimensions/efc8a4.wgsl
deleted file mode 100644
index 502cd20..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/efc8a4.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_3d<i32>;
-
-// fn textureDimensions(texture: texture_3d<i32>, level: i32) -> vec3<i32>
-fn textureDimensions_efc8a4() {
-  var arg_1 = 1i;
-  var res: vec3<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_efc8a4();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_efc8a4();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_efc8a4();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/efc8a4.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/efc8a4.wgsl.expected.dxc.hlsl
deleted file mode 100644
index e23fd25..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/efc8a4.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-Texture3D<int4> arg_0 : register(t0, space1);
-
-void textureDimensions_efc8a4() {
-  int arg_1 = 1;
-  int4 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
-  int3 res = tint_tmp.xyz;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_efc8a4();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_efc8a4();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_efc8a4();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/efc8a4.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/efc8a4.wgsl.expected.fxc.hlsl
deleted file mode 100644
index e23fd25..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/efc8a4.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-Texture3D<int4> arg_0 : register(t0, space1);
-
-void textureDimensions_efc8a4() {
-  int arg_1 = 1;
-  int4 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
-  int3 res = tint_tmp.xyz;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_efc8a4();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_efc8a4();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_efc8a4();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/efc8a4.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/efc8a4.wgsl.expected.glsl
deleted file mode 100644
index 8f4f048..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/efc8a4.wgsl.expected.glsl
+++ /dev/null
@@ -1,55 +0,0 @@
-#version 310 es
-
-uniform highp isampler3D arg_0_1;
-void textureDimensions_efc8a4() {
-  int arg_1 = 1;
-  ivec3 res = textureSize(arg_0_1, arg_1);
-}
-
-vec4 vertex_main() {
-  textureDimensions_efc8a4();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-uniform highp isampler3D arg_0_1;
-void textureDimensions_efc8a4() {
-  int arg_1 = 1;
-  ivec3 res = textureSize(arg_0_1, arg_1);
-}
-
-void fragment_main() {
-  textureDimensions_efc8a4();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-uniform highp isampler3D arg_0_1;
-void textureDimensions_efc8a4() {
-  int arg_1 = 1;
-  ivec3 res = textureSize(arg_0_1, arg_1);
-}
-
-void compute_main() {
-  textureDimensions_efc8a4();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/efc8a4.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/efc8a4.wgsl.expected.msl
deleted file mode 100644
index 12415fb..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/efc8a4.wgsl.expected.msl
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_efc8a4(texture3d<int, access::sample> tint_symbol_1) {
-  int arg_1 = 1;
-  int3 res = int3(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1), tint_symbol_1.get_depth(arg_1));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture3d<int, access::sample> tint_symbol_2) {
-  textureDimensions_efc8a4(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture3d<int, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture3d<int, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_efc8a4(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture3d<int, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_efc8a4(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/efc8a4.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/efc8a4.wgsl.expected.spvasm
deleted file mode 100644
index dcb7549..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/efc8a4.wgsl.expected.spvasm
+++ /dev/null
@@ -1,82 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 42
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_efc8a4 "textureDimensions_efc8a4"
-               OpName %arg_1 "arg_1"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-        %int = OpTypeInt 32 1
-         %11 = OpTypeImage %int 3D 0 0 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-      %int_1 = OpConstant %int 1
-%_ptr_Function_int = OpTypePointer Function %int
-         %20 = OpConstantNull %int
-      %v3int = OpTypeVector %int 3
-%_ptr_Function_v3int = OpTypePointer Function %v3int
-         %27 = OpConstantNull %v3int
-         %28 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_efc8a4 = OpFunction %void None %13
-         %16 = OpLabel
-      %arg_1 = OpVariable %_ptr_Function_int Function %20
-        %res = OpVariable %_ptr_Function_v3int Function %27
-               OpStore %arg_1 %int_1
-         %23 = OpLoad %11 %arg_0
-         %24 = OpLoad %int %arg_1
-         %21 = OpImageQuerySizeLod %v3int %23 %24
-               OpStore %res %21
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %28
-         %30 = OpLabel
-         %31 = OpFunctionCall %void %textureDimensions_efc8a4
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %33 = OpLabel
-         %34 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %34
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %37 = OpLabel
-         %38 = OpFunctionCall %void %textureDimensions_efc8a4
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %40 = OpLabel
-         %41 = OpFunctionCall %void %textureDimensions_efc8a4
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/efc8a4.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/efc8a4.wgsl.expected.wgsl
deleted file mode 100644
index c6b604d..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/efc8a4.wgsl.expected.wgsl
+++ /dev/null
@@ -1,22 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_3d<i32>;
-
-fn textureDimensions_efc8a4() {
-  var arg_1 = 1i;
-  var res : vec3<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_efc8a4();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_efc8a4();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_efc8a4();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f17acd.wgsl b/test/tint/builtins/gen/var/textureDimensions/f17acd.wgsl
new file mode 100644
index 0000000..bb7fd53
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/f17acd.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_1d<f32>;
+
+// fn textureDimensions(texture: texture_1d<f32>, level: i32) -> u32
+fn textureDimensions_f17acd() {
+  var arg_1 = 1i;
+  var res: u32 = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_f17acd();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_f17acd();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_f17acd();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f17acd.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/f17acd.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..8c9b4c2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/f17acd.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_f17acd() {
+  int arg_1 = 1;
+  int2 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y);
+  uint res = tint_tmp.x;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_f17acd();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_f17acd();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_f17acd();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f17acd.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/f17acd.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..8c9b4c2
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/f17acd.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture1D<float4> arg_0 : register(t0, space1);
+
+void textureDimensions_f17acd() {
+  int arg_1 = 1;
+  int2 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y);
+  uint res = tint_tmp.x;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_f17acd();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_f17acd();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_f17acd();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f17acd.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/f17acd.wgsl.expected.glsl
new file mode 100644
index 0000000..b9c93dd
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/f17acd.wgsl.expected.glsl
@@ -0,0 +1,78 @@
+SKIP: FAILED
+
+#version 310 es
+
+uniform highp sampler1D arg_0_1;
+void textureDimensions_f17acd() {
+  int arg_1 = 1;
+  uint res = uint(textureSize(arg_0_1, arg_1));
+}
+
+vec4 vertex_main() {
+  textureDimensions_f17acd();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'sampler1D' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+uniform highp sampler1D arg_0_1;
+void textureDimensions_f17acd() {
+  int arg_1 = 1;
+  uint res = uint(textureSize(arg_0_1, arg_1));
+}
+
+void fragment_main() {
+  textureDimensions_f17acd();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'sampler1D' : Reserved word. 
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+uniform highp sampler1D arg_0_1;
+void textureDimensions_f17acd() {
+  int arg_1 = 1;
+  uint res = uint(textureSize(arg_0_1, arg_1));
+}
+
+void compute_main() {
+  textureDimensions_f17acd();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'sampler1D' : Reserved word. 
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/f17acd.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/f17acd.wgsl.expected.msl
new file mode 100644
index 0000000..f0c2ec8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/f17acd.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_f17acd(texture1d<float, access::sample> tint_symbol_1) {
+  int arg_1 = 1;
+  uint res = tint_symbol_1.get_width(0);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<float, access::sample> tint_symbol_2) {
+  textureDimensions_f17acd(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_f17acd(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<float, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_f17acd(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/f17acd.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/f17acd.wgsl.expected.spvasm
new file mode 100644
index 0000000..f8f5b8b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/f17acd.wgsl.expected.spvasm
@@ -0,0 +1,83 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 42
+; Schema: 0
+               OpCapability Shader
+               OpCapability Sampled1D
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_f17acd "textureDimensions_f17acd"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 1D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+        %int = OpTypeInt 32 1
+      %int_1 = OpConstant %int 1
+%_ptr_Function_int = OpTypePointer Function %int
+         %20 = OpConstantNull %int
+       %uint = OpTypeInt 32 0
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %27 = OpConstantNull %uint
+         %28 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_f17acd = OpFunction %void None %12
+         %15 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_int Function %20
+        %res = OpVariable %_ptr_Function_uint Function %27
+               OpStore %arg_1 %int_1
+         %23 = OpLoad %11 %arg_0
+         %24 = OpLoad %int %arg_1
+         %21 = OpImageQuerySizeLod %uint %23 %24
+               OpStore %res %21
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %28
+         %30 = OpLabel
+         %31 = OpFunctionCall %void %textureDimensions_f17acd
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %33 = OpLabel
+         %34 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %34
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureDimensions_f17acd
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureDimensions_f17acd
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/f17acd.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/f17acd.wgsl.expected.wgsl
new file mode 100644
index 0000000..45a3b74
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/f17acd.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_1d<f32>;
+
+fn textureDimensions_f17acd() {
+  var arg_1 = 1i;
+  var res : u32 = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_f17acd();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_f17acd();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_f17acd();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f264a3.wgsl b/test/tint/builtins/gen/var/textureDimensions/f264a3.wgsl
new file mode 100644
index 0000000..25f67e4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/f264a3.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_1d<rg32sint, write>;
+
+// fn textureDimensions(texture: texture_storage_1d<rg32sint, write>) -> u32
+fn textureDimensions_f264a3() {
+  var res: u32 = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_f264a3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_f264a3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_f264a3();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f264a3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/f264a3.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..bed8fd8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/f264a3.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<int4> arg_0 : register(u0, space1);
+
+void textureDimensions_f264a3() {
+  int tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_f264a3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_f264a3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_f264a3();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f264a3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/f264a3.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..bed8fd8
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/f264a3.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture1D<int4> arg_0 : register(u0, space1);
+
+void textureDimensions_f264a3() {
+  int tint_tmp;
+  arg_0.GetDimensions(tint_tmp);
+  uint res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_f264a3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_f264a3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_f264a3();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f264a3.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/f264a3.wgsl.expected.glsl
new file mode 100644
index 0000000..93568a0
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/f264a3.wgsl.expected.glsl
@@ -0,0 +1,75 @@
+SKIP: FAILED
+
+#version 310 es
+
+layout(rg32i) uniform highp writeonly iimage1D arg_0;
+void textureDimensions_f264a3() {
+  uint res = uint(imageSize(arg_0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_f264a3();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+precision mediump float;
+
+layout(rg32i) uniform highp writeonly iimage1D arg_0;
+void textureDimensions_f264a3() {
+  uint res = uint(imageSize(arg_0));
+}
+
+void fragment_main() {
+  textureDimensions_f264a3();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:4: 'image load-store format' : not supported with this profile: es
+ERROR: 0:4: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
+#version 310 es
+
+layout(rg32i) uniform highp writeonly iimage1D arg_0;
+void textureDimensions_f264a3() {
+  uint res = uint(imageSize(arg_0));
+}
+
+void compute_main() {
+  textureDimensions_f264a3();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
+Error parsing GLSL shader:
+ERROR: 0:3: 'image load-store format' : not supported with this profile: es
+ERROR: 0:3: '' : compilation terminated 
+ERROR: 2 compilation errors.  No code generated.
+
+
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/f264a3.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/f264a3.wgsl.expected.msl
new file mode 100644
index 0000000..5feaa3c7
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/f264a3.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_f264a3(texture1d<int, access::write> tint_symbol_1) {
+  uint res = tint_symbol_1.get_width(0);
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture1d<int, access::write> tint_symbol_2) {
+  textureDimensions_f264a3(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture1d<int, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture1d<int, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_f264a3(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture1d<int, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_f264a3(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/f264a3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/f264a3.wgsl.expected.spvasm
new file mode 100644
index 0000000..b148981
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/f264a3.wgsl.expected.spvasm
@@ -0,0 +1,78 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+               OpCapability Shader
+               OpCapability Image1D
+               OpCapability StorageImageExtendedFormats
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_f264a3 "textureDimensions_f264a3"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 1D 0 0 0 2 Rg32i
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+%_ptr_Function_uint = OpTypePointer Function %uint
+         %22 = OpConstantNull %uint
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_f264a3 = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_uint Function %22
+         %19 = OpLoad %11 %arg_0
+         %17 = OpImageQuerySize %uint %19
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %textureDimensions_f264a3
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %28 = OpLabel
+         %29 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %29
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_f264a3
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureDimensions_f264a3
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/f264a3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/f264a3.wgsl.expected.wgsl
new file mode 100644
index 0000000..06c76194
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/f264a3.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_1d<rg32sint, write>;
+
+fn textureDimensions_f264a3() {
+  var res : u32 = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_f264a3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_f264a3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_f264a3();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl b/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl
deleted file mode 100644
index 08e0d0c..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2022 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_3d<u32>;
-
-// fn textureDimensions(texture: texture_3d<u32>, level: u32) -> vec3<i32>
-fn textureDimensions_f32242() {
-  var arg_1 = 1u;
-  var res: vec3<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_f32242();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_f32242();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_f32242();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl.expected.dxc.hlsl
deleted file mode 100644
index bf7de13..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-Texture3D<uint4> arg_0 : register(t0, space1);
-
-void textureDimensions_f32242() {
-  uint arg_1 = 1u;
-  int4 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
-  int3 res = tint_tmp.xyz;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_f32242();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_f32242();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_f32242();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl.expected.fxc.hlsl
deleted file mode 100644
index bf7de13..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-Texture3D<uint4> arg_0 : register(t0, space1);
-
-void textureDimensions_f32242() {
-  uint arg_1 = 1u;
-  int4 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
-  int3 res = tint_tmp.xyz;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_f32242();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_f32242();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_f32242();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl.expected.glsl
deleted file mode 100644
index 85cceb2..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl.expected.glsl
+++ /dev/null
@@ -1,55 +0,0 @@
-#version 310 es
-
-uniform highp usampler3D arg_0_1;
-void textureDimensions_f32242() {
-  uint arg_1 = 1u;
-  ivec3 res = textureSize(arg_0_1, int(arg_1));
-}
-
-vec4 vertex_main() {
-  textureDimensions_f32242();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-uniform highp usampler3D arg_0_1;
-void textureDimensions_f32242() {
-  uint arg_1 = 1u;
-  ivec3 res = textureSize(arg_0_1, int(arg_1));
-}
-
-void fragment_main() {
-  textureDimensions_f32242();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-uniform highp usampler3D arg_0_1;
-void textureDimensions_f32242() {
-  uint arg_1 = 1u;
-  ivec3 res = textureSize(arg_0_1, int(arg_1));
-}
-
-void compute_main() {
-  textureDimensions_f32242();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl.expected.msl
deleted file mode 100644
index 77b6336..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl.expected.msl
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_f32242(texture3d<uint, access::sample> tint_symbol_1) {
-  uint arg_1 = 1u;
-  int3 res = int3(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1), tint_symbol_1.get_depth(arg_1));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture3d<uint, access::sample> tint_symbol_2) {
-  textureDimensions_f32242(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture3d<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture3d<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_f32242(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture3d<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_f32242(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl.expected.spvasm
deleted file mode 100644
index 614e908..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl.expected.spvasm
+++ /dev/null
@@ -1,83 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 43
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_f32242 "textureDimensions_f32242"
-               OpName %arg_1 "arg_1"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-       %uint = OpTypeInt 32 0
-         %11 = OpTypeImage %uint 3D 0 0 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-     %uint_1 = OpConstant %uint 1
-%_ptr_Function_uint = OpTypePointer Function %uint
-         %20 = OpConstantNull %uint
-        %int = OpTypeInt 32 1
-      %v3int = OpTypeVector %int 3
-%_ptr_Function_v3int = OpTypePointer Function %v3int
-         %28 = OpConstantNull %v3int
-         %29 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_f32242 = OpFunction %void None %13
-         %16 = OpLabel
-      %arg_1 = OpVariable %_ptr_Function_uint Function %20
-        %res = OpVariable %_ptr_Function_v3int Function %28
-               OpStore %arg_1 %uint_1
-         %24 = OpLoad %11 %arg_0
-         %25 = OpLoad %uint %arg_1
-         %21 = OpImageQuerySizeLod %v3int %24 %25
-               OpStore %res %21
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %29
-         %31 = OpLabel
-         %32 = OpFunctionCall %void %textureDimensions_f32242
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %34 = OpLabel
-         %35 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %35
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %38 = OpLabel
-         %39 = OpFunctionCall %void %textureDimensions_f32242
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %41 = OpLabel
-         %42 = OpFunctionCall %void %textureDimensions_f32242
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl.expected.wgsl
deleted file mode 100644
index a9d3ca1..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/f32242.wgsl.expected.wgsl
+++ /dev/null
@@ -1,22 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_3d<u32>;
-
-fn textureDimensions_f32242() {
-  var arg_1 = 1u;
-  var res : vec3<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_f32242();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_f32242();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_f32242();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f3a2ac.wgsl b/test/tint/builtins/gen/var/textureDimensions/f3a2ac.wgsl
new file mode 100644
index 0000000..8c973e9
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/f3a2ac.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_3d<rgba16float, write>;
+
+// fn textureDimensions(texture: texture_storage_3d<rgba16float, write>) -> vec3<u32>
+fn textureDimensions_f3a2ac() {
+  var res: vec3<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_f3a2ac();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_f3a2ac();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_f3a2ac();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f3a2ac.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/f3a2ac.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..13201fc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/f3a2ac.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<float4> arg_0 : register(u0, space1);
+
+void textureDimensions_f3a2ac() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_f3a2ac();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_f3a2ac();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_f3a2ac();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f3a2ac.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/f3a2ac.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..13201fc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/f3a2ac.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture3D<float4> arg_0 : register(u0, space1);
+
+void textureDimensions_f3a2ac() {
+  int3 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
+  uint3 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_f3a2ac();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_f3a2ac();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_f3a2ac();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f3a2ac.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/f3a2ac.wgsl.expected.glsl
new file mode 100644
index 0000000..3d3366f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/f3a2ac.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba16f) uniform highp writeonly image3D arg_0;
+void textureDimensions_f3a2ac() {
+  uvec3 res = uvec3(imageSize(arg_0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_f3a2ac();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba16f) uniform highp writeonly image3D arg_0;
+void textureDimensions_f3a2ac() {
+  uvec3 res = uvec3(imageSize(arg_0));
+}
+
+void fragment_main() {
+  textureDimensions_f3a2ac();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba16f) uniform highp writeonly image3D arg_0;
+void textureDimensions_f3a2ac() {
+  uvec3 res = uvec3(imageSize(arg_0));
+}
+
+void compute_main() {
+  textureDimensions_f3a2ac();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f3a2ac.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/f3a2ac.wgsl.expected.msl
new file mode 100644
index 0000000..1550808
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/f3a2ac.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_f3a2ac(texture3d<float, access::write> tint_symbol_1) {
+  uint3 res = uint3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture3d<float, access::write> tint_symbol_2) {
+  textureDimensions_f3a2ac(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture3d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture3d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_f3a2ac(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture3d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_f3a2ac(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/f3a2ac.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/f3a2ac.wgsl.expected.spvasm
new file mode 100644
index 0000000..17304eb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/f3a2ac.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_f3a2ac "textureDimensions_f3a2ac"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 3D 0 0 0 2 Rgba16f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v3uint = OpTypePointer Function %v3uint
+         %22 = OpConstantNull %v3uint
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_f3a2ac = OpFunction %void None %12
+         %15 = OpLabel
+        %res = OpVariable %_ptr_Function_v3uint Function %22
+         %19 = OpLoad %11 %arg_0
+         %16 = OpImageQuerySize %v3uint %19
+               OpStore %res %16
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %textureDimensions_f3a2ac
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %28 = OpLabel
+         %29 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %29
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_f3a2ac
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureDimensions_f3a2ac
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/f3a2ac.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/f3a2ac.wgsl.expected.wgsl
new file mode 100644
index 0000000..4173903
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/f3a2ac.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba16float, write>;
+
+fn textureDimensions_f3a2ac() {
+  var res : vec3<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_f3a2ac();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_f3a2ac();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_f3a2ac();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f4e469.wgsl b/test/tint/builtins/gen/var/textureDimensions/f4e469.wgsl
new file mode 100644
index 0000000..7ea7cbb
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/f4e469.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_storage_2d<rgba32float, write>;
+
+// fn textureDimensions(texture: texture_storage_2d<rgba32float, write>) -> vec2<u32>
+fn textureDimensions_f4e469() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_f4e469();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_f4e469();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_f4e469();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f4e469.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/f4e469.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..ae5bd7a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/f4e469.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<float4> arg_0 : register(u0, space1);
+
+void textureDimensions_f4e469() {
+  int2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_f4e469();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_f4e469();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_f4e469();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f4e469.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/f4e469.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..ae5bd7a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/f4e469.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+RWTexture2D<float4> arg_0 : register(u0, space1);
+
+void textureDimensions_f4e469() {
+  int2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_f4e469();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_f4e469();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_f4e469();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f4e469.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/f4e469.wgsl.expected.glsl
new file mode 100644
index 0000000..07ed54b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/f4e469.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+layout(rgba32f) uniform highp writeonly image2D arg_0;
+void textureDimensions_f4e469() {
+  uvec2 res = uvec2(imageSize(arg_0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_f4e469();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+layout(rgba32f) uniform highp writeonly image2D arg_0;
+void textureDimensions_f4e469() {
+  uvec2 res = uvec2(imageSize(arg_0));
+}
+
+void fragment_main() {
+  textureDimensions_f4e469();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+layout(rgba32f) uniform highp writeonly image2D arg_0;
+void textureDimensions_f4e469() {
+  uvec2 res = uvec2(imageSize(arg_0));
+}
+
+void compute_main() {
+  textureDimensions_f4e469();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f4e469.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/f4e469.wgsl.expected.msl
new file mode 100644
index 0000000..9fba981
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/f4e469.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_f4e469(texture2d<float, access::write> tint_symbol_1) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<float, access::write> tint_symbol_2) {
+  textureDimensions_f4e469(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<float, access::write> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<float, access::write> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_f4e469(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<float, access::write> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_f4e469(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/f4e469.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/f4e469.wgsl.expected.spvasm
new file mode 100644
index 0000000..dbf3eb3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/f4e469.wgsl.expected.spvasm
@@ -0,0 +1,76 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 37
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_f4e469 "textureDimensions_f4e469"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 NonReadable
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+         %11 = OpTypeImage %float 2D 0 0 0 2 Rgba32f
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %12 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %22 = OpConstantNull %v2uint
+         %23 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_f4e469 = OpFunction %void None %12
+         %15 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %22
+         %19 = OpLoad %11 %arg_0
+         %16 = OpImageQuerySize %v2uint %19
+               OpStore %res %16
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %23
+         %25 = OpLabel
+         %26 = OpFunctionCall %void %textureDimensions_f4e469
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %12
+         %28 = OpLabel
+         %29 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %29
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %12
+         %32 = OpLabel
+         %33 = OpFunctionCall %void %textureDimensions_f4e469
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %12
+         %35 = OpLabel
+         %36 = OpFunctionCall %void %textureDimensions_f4e469
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/f4e469.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/f4e469.wgsl.expected.wgsl
new file mode 100644
index 0000000..fb9261d
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/f4e469.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_storage_2d<rgba32float, write>;
+
+fn textureDimensions_f4e469() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_f4e469();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_f4e469();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_f4e469();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f60bdb.wgsl b/test/tint/builtins/gen/var/textureDimensions/f60bdb.wgsl
deleted file mode 100644
index 836def2..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/f60bdb.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_depth_multisampled_2d;
-
-// fn textureDimensions(texture: texture_depth_multisampled_2d) -> vec2<i32>
-fn textureDimensions_f60bdb() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_f60bdb();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_f60bdb();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_f60bdb();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f60bdb.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/f60bdb.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 1609032..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/f60bdb.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-Texture2DMS<float4> arg_0 : register(t0, space1);
-
-void textureDimensions_f60bdb() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_f60bdb();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_f60bdb();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_f60bdb();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f60bdb.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/f60bdb.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 1609032..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/f60bdb.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-Texture2DMS<float4> arg_0 : register(t0, space1);
-
-void textureDimensions_f60bdb() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_f60bdb();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_f60bdb();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_f60bdb();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f60bdb.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/f60bdb.wgsl.expected.glsl
deleted file mode 100644
index 9431956..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/f60bdb.wgsl.expected.glsl
+++ /dev/null
@@ -1,52 +0,0 @@
-#version 310 es
-
-uniform highp sampler2DMS arg_0_1;
-void textureDimensions_f60bdb() {
-  ivec2 res = textureSize(arg_0_1);
-}
-
-vec4 vertex_main() {
-  textureDimensions_f60bdb();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-uniform highp sampler2DMS arg_0_1;
-void textureDimensions_f60bdb() {
-  ivec2 res = textureSize(arg_0_1);
-}
-
-void fragment_main() {
-  textureDimensions_f60bdb();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-uniform highp sampler2DMS arg_0_1;
-void textureDimensions_f60bdb() {
-  ivec2 res = textureSize(arg_0_1);
-}
-
-void compute_main() {
-  textureDimensions_f60bdb();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f60bdb.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/f60bdb.wgsl.expected.msl
deleted file mode 100644
index 1ec0626..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/f60bdb.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_f60bdb(depth2d_ms<float, access::read> tint_symbol_1) {
-  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(depth2d_ms<float, access::read> tint_symbol_2) {
-  textureDimensions_f60bdb(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(depth2d_ms<float, access::read> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(depth2d_ms<float, access::read> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_f60bdb(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(depth2d_ms<float, access::read> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_f60bdb(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/f60bdb.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/f60bdb.wgsl.expected.spvasm
deleted file mode 100644
index e43fe0b..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/f60bdb.wgsl.expected.spvasm
+++ /dev/null
@@ -1,75 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 37
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_f60bdb "textureDimensions_f60bdb"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-         %11 = OpTypeImage %float 2D 0 0 1 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %12 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %v2int = OpTypeVector %int 2
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %22 = OpConstantNull %v2int
-         %23 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_f60bdb = OpFunction %void None %12
-         %15 = OpLabel
-        %res = OpVariable %_ptr_Function_v2int Function %22
-         %19 = OpLoad %11 %arg_0
-         %16 = OpImageQuerySize %v2int %19
-               OpStore %res %16
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %23
-         %25 = OpLabel
-         %26 = OpFunctionCall %void %textureDimensions_f60bdb
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %12
-         %28 = OpLabel
-         %29 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %29
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %12
-         %32 = OpLabel
-         %33 = OpFunctionCall %void %textureDimensions_f60bdb
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %12
-         %35 = OpLabel
-         %36 = OpFunctionCall %void %textureDimensions_f60bdb
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/f60bdb.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/f60bdb.wgsl.expected.wgsl
deleted file mode 100644
index f22008d..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/f60bdb.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_depth_multisampled_2d;
-
-fn textureDimensions_f60bdb() {
-  var res : vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_f60bdb();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_f60bdb();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_f60bdb();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f626b3.wgsl b/test/tint/builtins/gen/var/textureDimensions/f626b3.wgsl
new file mode 100644
index 0000000..8c49681
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/f626b3.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_cube<i32>;
+
+// fn textureDimensions(texture: texture_cube<i32>) -> vec2<u32>
+fn textureDimensions_f626b3() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_f626b3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_f626b3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_f626b3();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f626b3.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/f626b3.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..9c15fdd
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/f626b3.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+TextureCube<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_f626b3() {
+  int2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_f626b3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_f626b3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_f626b3();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f626b3.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/f626b3.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..9c15fdd
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/f626b3.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+TextureCube<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_f626b3() {
+  int2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_f626b3();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_f626b3();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_f626b3();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f626b3.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/f626b3.wgsl.expected.glsl
new file mode 100644
index 0000000..9e55087
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/f626b3.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp isamplerCube arg_0_1;
+void textureDimensions_f626b3() {
+  uvec2 res = uvec2(textureSize(arg_0_1, 0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_f626b3();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isamplerCube arg_0_1;
+void textureDimensions_f626b3() {
+  uvec2 res = uvec2(textureSize(arg_0_1, 0));
+}
+
+void fragment_main() {
+  textureDimensions_f626b3();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp isamplerCube arg_0_1;
+void textureDimensions_f626b3() {
+  uvec2 res = uvec2(textureSize(arg_0_1, 0));
+}
+
+void compute_main() {
+  textureDimensions_f626b3();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f626b3.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/f626b3.wgsl.expected.msl
new file mode 100644
index 0000000..3c7807b
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/f626b3.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_f626b3(texturecube<int, access::sample> tint_symbol_1) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texturecube<int, access::sample> tint_symbol_2) {
+  textureDimensions_f626b3(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texturecube<int, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texturecube<int, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_f626b3(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texturecube<int, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_f626b3(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/f626b3.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/f626b3.wgsl.expected.spvasm
new file mode 100644
index 0000000..cb0bca3
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/f626b3.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_f626b3 "textureDimensions_f626b3"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int Cube 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+      %int_0 = OpConstant %int 0
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %24 = OpConstantNull %v2uint
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_f626b3 = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %24
+         %20 = OpLoad %11 %arg_0
+         %17 = OpImageQuerySizeLod %v2uint %20 %int_0
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %textureDimensions_f626b3
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureDimensions_f626b3
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureDimensions_f626b3
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/f626b3.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/f626b3.wgsl.expected.wgsl
new file mode 100644
index 0000000..25acd3f
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/f626b3.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_cube<i32>;
+
+fn textureDimensions_f626b3() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_f626b3();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_f626b3();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_f626b3();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f7145b.wgsl b/test/tint/builtins/gen/var/textureDimensions/f7145b.wgsl
deleted file mode 100644
index e7d1787..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/f7145b.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_2d<u32>;
-
-// fn textureDimensions(texture: texture_2d<u32>, level: i32) -> vec2<i32>
-fn textureDimensions_f7145b() {
-  var arg_1 = 1i;
-  var res: vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_f7145b();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_f7145b();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_f7145b();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f7145b.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/f7145b.wgsl.expected.dxc.hlsl
deleted file mode 100644
index ef35010..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/f7145b.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-Texture2D<uint4> arg_0 : register(t0, space1);
-
-void textureDimensions_f7145b() {
-  int arg_1 = 1;
-  int3 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_f7145b();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_f7145b();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_f7145b();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f7145b.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/f7145b.wgsl.expected.fxc.hlsl
deleted file mode 100644
index ef35010..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/f7145b.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-Texture2D<uint4> arg_0 : register(t0, space1);
-
-void textureDimensions_f7145b() {
-  int arg_1 = 1;
-  int3 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_f7145b();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_f7145b();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_f7145b();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f7145b.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/f7145b.wgsl.expected.glsl
deleted file mode 100644
index fad3c50..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/f7145b.wgsl.expected.glsl
+++ /dev/null
@@ -1,55 +0,0 @@
-#version 310 es
-
-uniform highp usampler2D arg_0_1;
-void textureDimensions_f7145b() {
-  int arg_1 = 1;
-  ivec2 res = textureSize(arg_0_1, arg_1);
-}
-
-vec4 vertex_main() {
-  textureDimensions_f7145b();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-uniform highp usampler2D arg_0_1;
-void textureDimensions_f7145b() {
-  int arg_1 = 1;
-  ivec2 res = textureSize(arg_0_1, arg_1);
-}
-
-void fragment_main() {
-  textureDimensions_f7145b();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-uniform highp usampler2D arg_0_1;
-void textureDimensions_f7145b() {
-  int arg_1 = 1;
-  ivec2 res = textureSize(arg_0_1, arg_1);
-}
-
-void compute_main() {
-  textureDimensions_f7145b();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f7145b.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/f7145b.wgsl.expected.msl
deleted file mode 100644
index 140f62b..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/f7145b.wgsl.expected.msl
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_f7145b(texture2d<uint, access::sample> tint_symbol_1) {
-  int arg_1 = 1;
-  int2 res = int2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture2d<uint, access::sample> tint_symbol_2) {
-  textureDimensions_f7145b(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture2d<uint, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture2d<uint, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_f7145b(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture2d<uint, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_f7145b(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/f7145b.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/f7145b.wgsl.expected.spvasm
deleted file mode 100644
index 9a315eb..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/f7145b.wgsl.expected.spvasm
+++ /dev/null
@@ -1,83 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 43
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_f7145b "textureDimensions_f7145b"
-               OpName %arg_1 "arg_1"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-       %uint = OpTypeInt 32 0
-         %11 = OpTypeImage %uint 2D 0 0 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %int_1 = OpConstant %int 1
-%_ptr_Function_int = OpTypePointer Function %int
-         %21 = OpConstantNull %int
-      %v2int = OpTypeVector %int 2
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %28 = OpConstantNull %v2int
-         %29 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_f7145b = OpFunction %void None %13
-         %16 = OpLabel
-      %arg_1 = OpVariable %_ptr_Function_int Function %21
-        %res = OpVariable %_ptr_Function_v2int Function %28
-               OpStore %arg_1 %int_1
-         %24 = OpLoad %11 %arg_0
-         %25 = OpLoad %int %arg_1
-         %22 = OpImageQuerySizeLod %v2int %24 %25
-               OpStore %res %22
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %29
-         %31 = OpLabel
-         %32 = OpFunctionCall %void %textureDimensions_f7145b
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %34 = OpLabel
-         %35 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %35
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %38 = OpLabel
-         %39 = OpFunctionCall %void %textureDimensions_f7145b
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %41 = OpLabel
-         %42 = OpFunctionCall %void %textureDimensions_f7145b
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/f7145b.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/f7145b.wgsl.expected.wgsl
deleted file mode 100644
index 6597dc0..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/f7145b.wgsl.expected.wgsl
+++ /dev/null
@@ -1,22 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_2d<u32>;
-
-fn textureDimensions_f7145b() {
-  var arg_1 = 1i;
-  var res : vec2<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_f7145b();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_f7145b();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_f7145b();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f8522e.wgsl b/test/tint/builtins/gen/var/textureDimensions/f8522e.wgsl
new file mode 100644
index 0000000..a80d3ec
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/f8522e.wgsl
@@ -0,0 +1,44 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d<i32>;
+
+// fn textureDimensions(texture: texture_2d<i32>) -> vec2<u32>
+fn textureDimensions_f8522e() {
+  var res: vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_f8522e();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_f8522e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_f8522e();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f8522e.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/f8522e.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..c6710be
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/f8522e.wgsl.expected.dxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_f8522e() {
+  int2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_f8522e();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_f8522e();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_f8522e();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f8522e.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/f8522e.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..c6710be
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/f8522e.wgsl.expected.fxc.hlsl
@@ -0,0 +1,34 @@
+Texture2D<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_f8522e() {
+  int2 tint_tmp;
+  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
+  uint2 res = tint_tmp;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_f8522e();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_f8522e();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_f8522e();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f8522e.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/f8522e.wgsl.expected.glsl
new file mode 100644
index 0000000..ae80518
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/f8522e.wgsl.expected.glsl
@@ -0,0 +1,52 @@
+#version 310 es
+
+uniform highp isampler2D arg_0_1;
+void textureDimensions_f8522e() {
+  uvec2 res = uvec2(textureSize(arg_0_1, 0));
+}
+
+vec4 vertex_main() {
+  textureDimensions_f8522e();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isampler2D arg_0_1;
+void textureDimensions_f8522e() {
+  uvec2 res = uvec2(textureSize(arg_0_1, 0));
+}
+
+void fragment_main() {
+  textureDimensions_f8522e();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp isampler2D arg_0_1;
+void textureDimensions_f8522e() {
+  uvec2 res = uvec2(textureSize(arg_0_1, 0));
+}
+
+void compute_main() {
+  textureDimensions_f8522e();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f8522e.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/f8522e.wgsl.expected.msl
new file mode 100644
index 0000000..8a65be1
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/f8522e.wgsl.expected.msl
@@ -0,0 +1,33 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_f8522e(texture2d<int, access::sample> tint_symbol_1) {
+  uint2 res = uint2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d<int, access::sample> tint_symbol_2) {
+  textureDimensions_f8522e(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d<int, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d<int, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_f8522e(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d<int, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_f8522e(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/f8522e.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/f8522e.wgsl.expected.spvasm
new file mode 100644
index 0000000..f912b4a
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/f8522e.wgsl.expected.spvasm
@@ -0,0 +1,77 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 39
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_f8522e "textureDimensions_f8522e"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 0 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+      %int_0 = OpConstant %int 0
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %24 = OpConstantNull %v2uint
+         %25 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_f8522e = OpFunction %void None %13
+         %16 = OpLabel
+        %res = OpVariable %_ptr_Function_v2uint Function %24
+         %20 = OpLoad %11 %arg_0
+         %17 = OpImageQuerySizeLod %v2uint %20 %int_0
+               OpStore %res %17
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %25
+         %27 = OpLabel
+         %28 = OpFunctionCall %void %textureDimensions_f8522e
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %30 = OpLabel
+         %31 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %31
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %34 = OpLabel
+         %35 = OpFunctionCall %void %textureDimensions_f8522e
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %37 = OpLabel
+         %38 = OpFunctionCall %void %textureDimensions_f8522e
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/f8522e.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/f8522e.wgsl.expected.wgsl
new file mode 100644
index 0000000..a9491d4
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/f8522e.wgsl.expected.wgsl
@@ -0,0 +1,21 @@
+@group(1) @binding(0) var arg_0 : texture_2d<i32>;
+
+fn textureDimensions_f8522e() {
+  var res : vec2<u32> = textureDimensions(arg_0);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_f8522e();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_f8522e();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_f8522e();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f931c7.wgsl b/test/tint/builtins/gen/var/textureDimensions/f931c7.wgsl
deleted file mode 100644
index e7304f5..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/f931c7.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d<r32float, write>;
-
-// fn textureDimensions(texture: texture_storage_2d<r32float, write>) -> vec2<i32>
-fn textureDimensions_f931c7() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_f931c7();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_f931c7();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_f931c7();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f931c7.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/f931c7.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 9e231e6..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/f931c7.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2D<float4> arg_0 : register(u0, space1);
-
-void textureDimensions_f931c7() {
-  int2 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
-  int2 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_f931c7();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_f931c7();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_f931c7();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f931c7.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/f931c7.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 9e231e6..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/f931c7.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2D<float4> arg_0 : register(u0, space1);
-
-void textureDimensions_f931c7() {
-  int2 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
-  int2 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_f931c7();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_f931c7();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_f931c7();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f931c7.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/f931c7.wgsl.expected.glsl
deleted file mode 100644
index 016f679..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/f931c7.wgsl.expected.glsl
+++ /dev/null
@@ -1,52 +0,0 @@
-#version 310 es
-
-layout(r32f) uniform highp writeonly image2D arg_0;
-void textureDimensions_f931c7() {
-  ivec2 res = imageSize(arg_0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_f931c7();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-layout(r32f) uniform highp writeonly image2D arg_0;
-void textureDimensions_f931c7() {
-  ivec2 res = imageSize(arg_0);
-}
-
-void fragment_main() {
-  textureDimensions_f931c7();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-layout(r32f) uniform highp writeonly image2D arg_0;
-void textureDimensions_f931c7() {
-  ivec2 res = imageSize(arg_0);
-}
-
-void compute_main() {
-  textureDimensions_f931c7();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/f931c7.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/f931c7.wgsl.expected.msl
deleted file mode 100644
index 7b39e0f..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/f931c7.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_f931c7(texture2d<float, access::write> tint_symbol_1) {
-  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture2d<float, access::write> tint_symbol_2) {
-  textureDimensions_f931c7(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture2d<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture2d<float, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_f931c7(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture2d<float, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_f931c7(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/f931c7.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/f931c7.wgsl.expected.spvasm
deleted file mode 100644
index 2375b4d..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/f931c7.wgsl.expected.spvasm
+++ /dev/null
@@ -1,76 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 37
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_f931c7 "textureDimensions_f931c7"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-         %11 = OpTypeImage %float 2D 0 0 0 2 R32f
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %12 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %v2int = OpTypeVector %int 2
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %22 = OpConstantNull %v2int
-         %23 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_f931c7 = OpFunction %void None %12
-         %15 = OpLabel
-        %res = OpVariable %_ptr_Function_v2int Function %22
-         %19 = OpLoad %11 %arg_0
-         %16 = OpImageQuerySize %v2int %19
-               OpStore %res %16
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %23
-         %25 = OpLabel
-         %26 = OpFunctionCall %void %textureDimensions_f931c7
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %12
-         %28 = OpLabel
-         %29 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %29
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %12
-         %32 = OpLabel
-         %33 = OpFunctionCall %void %textureDimensions_f931c7
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %12
-         %35 = OpLabel
-         %36 = OpFunctionCall %void %textureDimensions_f931c7
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/f931c7.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/f931c7.wgsl.expected.wgsl
deleted file mode 100644
index 041ed4c..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/f931c7.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_2d<r32float, write>;
-
-fn textureDimensions_f931c7() {
-  var res : vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_f931c7();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_f931c7();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_f931c7();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/fa9859.wgsl b/test/tint/builtins/gen/var/textureDimensions/fa9859.wgsl
deleted file mode 100644
index 0f438d3..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/fa9859.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_2d<i32>;
-
-// fn textureDimensions(texture: texture_2d<i32>) -> vec2<i32>
-fn textureDimensions_fa9859() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_fa9859();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_fa9859();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_fa9859();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/fa9859.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/fa9859.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 4bfdddf..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/fa9859.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-Texture2D<int4> arg_0 : register(t0, space1);
-
-void textureDimensions_fa9859() {
-  int2 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
-  int2 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_fa9859();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_fa9859();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_fa9859();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/fa9859.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/fa9859.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 4bfdddf..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/fa9859.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-Texture2D<int4> arg_0 : register(t0, space1);
-
-void textureDimensions_fa9859() {
-  int2 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y);
-  int2 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_fa9859();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_fa9859();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_fa9859();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/fa9859.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/fa9859.wgsl.expected.glsl
deleted file mode 100644
index d8e8370..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/fa9859.wgsl.expected.glsl
+++ /dev/null
@@ -1,52 +0,0 @@
-#version 310 es
-
-uniform highp isampler2D arg_0_1;
-void textureDimensions_fa9859() {
-  ivec2 res = textureSize(arg_0_1, 0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_fa9859();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-uniform highp isampler2D arg_0_1;
-void textureDimensions_fa9859() {
-  ivec2 res = textureSize(arg_0_1, 0);
-}
-
-void fragment_main() {
-  textureDimensions_fa9859();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-uniform highp isampler2D arg_0_1;
-void textureDimensions_fa9859() {
-  ivec2 res = textureSize(arg_0_1, 0);
-}
-
-void compute_main() {
-  textureDimensions_fa9859();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/fa9859.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/fa9859.wgsl.expected.msl
deleted file mode 100644
index 5fca056..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/fa9859.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_fa9859(texture2d<int, access::sample> tint_symbol_1) {
-  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture2d<int, access::sample> tint_symbol_2) {
-  textureDimensions_fa9859(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture2d<int, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture2d<int, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_fa9859(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture2d<int, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_fa9859(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/fa9859.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/fa9859.wgsl.expected.spvasm
deleted file mode 100644
index 769c44e..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/fa9859.wgsl.expected.spvasm
+++ /dev/null
@@ -1,76 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 38
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_fa9859 "textureDimensions_fa9859"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-        %int = OpTypeInt 32 1
-         %11 = OpTypeImage %int 2D 0 0 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-      %v2int = OpTypeVector %int 2
-      %int_0 = OpConstant %int 0
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %23 = OpConstantNull %v2int
-         %24 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_fa9859 = OpFunction %void None %13
-         %16 = OpLabel
-        %res = OpVariable %_ptr_Function_v2int Function %23
-         %19 = OpLoad %11 %arg_0
-         %17 = OpImageQuerySizeLod %v2int %19 %int_0
-               OpStore %res %17
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %24
-         %26 = OpLabel
-         %27 = OpFunctionCall %void %textureDimensions_fa9859
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %29 = OpLabel
-         %30 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %30
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %33 = OpLabel
-         %34 = OpFunctionCall %void %textureDimensions_fa9859
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %36 = OpLabel
-         %37 = OpFunctionCall %void %textureDimensions_fa9859
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/fa9859.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/fa9859.wgsl.expected.wgsl
deleted file mode 100644
index 3acbf7d..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/fa9859.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_2d<i32>;
-
-fn textureDimensions_fa9859() {
-  var res : vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_fa9859();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_fa9859();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_fa9859();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/fb5670.wgsl b/test/tint/builtins/gen/var/textureDimensions/fb5670.wgsl
deleted file mode 100644
index da81f0d..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/fb5670.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_2d_array<rg32float, write>;
-
-// fn textureDimensions(texture: texture_storage_2d_array<rg32float, write>) -> vec2<i32>
-fn textureDimensions_fb5670() {
-  var res: vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_fb5670();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_fb5670();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_fb5670();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/fb5670.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/fb5670.wgsl.expected.dxc.hlsl
deleted file mode 100644
index 3f6c71f..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/fb5670.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2DArray<float4> arg_0 : register(u0, space1);
-
-void textureDimensions_fb5670() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_fb5670();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_fb5670();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_fb5670();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/fb5670.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/fb5670.wgsl.expected.fxc.hlsl
deleted file mode 100644
index 3f6c71f..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/fb5670.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture2DArray<float4> arg_0 : register(u0, space1);
-
-void textureDimensions_fb5670() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int2 res = tint_tmp.xy;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_fb5670();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_fb5670();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_fb5670();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/fb5670.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/fb5670.wgsl.expected.glsl
deleted file mode 100644
index 5c3bd40..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/fb5670.wgsl.expected.glsl
+++ /dev/null
@@ -1,75 +0,0 @@
-SKIP: FAILED
-
-#version 310 es
-
-layout(rg32f) uniform highp writeonly image2DArray arg_0;
-void textureDimensions_fb5670() {
-  ivec2 res = imageSize(arg_0).xy;
-}
-
-vec4 vertex_main() {
-  textureDimensions_fb5670();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'image load-store format' : not supported with this profile: es
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-precision mediump float;
-
-layout(rg32f) uniform highp writeonly image2DArray arg_0;
-void textureDimensions_fb5670() {
-  ivec2 res = imageSize(arg_0).xy;
-}
-
-void fragment_main() {
-  textureDimensions_fb5670();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:4: 'image load-store format' : not supported with this profile: es
-ERROR: 0:4: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
-#version 310 es
-
-layout(rg32f) uniform highp writeonly image2DArray arg_0;
-void textureDimensions_fb5670() {
-  ivec2 res = imageSize(arg_0).xy;
-}
-
-void compute_main() {
-  textureDimensions_fb5670();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
-Error parsing GLSL shader:
-ERROR: 0:3: 'image load-store format' : not supported with this profile: es
-ERROR: 0:3: '' : compilation terminated 
-ERROR: 2 compilation errors.  No code generated.
-
-
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/fb5670.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/fb5670.wgsl.expected.msl
deleted file mode 100644
index fed740f..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/fb5670.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_fb5670(texture2d_array<float, access::write> tint_symbol_1) {
-  int2 res = int2(tint_symbol_1.get_width(), tint_symbol_1.get_height());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture2d_array<float, access::write> tint_symbol_2) {
-  textureDimensions_fb5670(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture2d_array<float, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture2d_array<float, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_fb5670(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture2d_array<float, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_fb5670(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/fb5670.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/fb5670.wgsl.expected.spvasm
deleted file mode 100644
index c870194..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/fb5670.wgsl.expected.spvasm
+++ /dev/null
@@ -1,79 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 39
-; Schema: 0
-               OpCapability Shader
-               OpCapability StorageImageExtendedFormats
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_fb5670 "textureDimensions_fb5670"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-         %11 = OpTypeImage %float 2D 0 1 0 2 Rg32f
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %12 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %v2int = OpTypeVector %int 2
-      %v3int = OpTypeVector %int 3
-%_ptr_Function_v2int = OpTypePointer Function %v2int
-         %24 = OpConstantNull %v2int
-         %25 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_fb5670 = OpFunction %void None %12
-         %15 = OpLabel
-        %res = OpVariable %_ptr_Function_v2int Function %24
-         %21 = OpLoad %11 %arg_0
-         %19 = OpImageQuerySize %v3int %21
-         %16 = OpVectorShuffle %v2int %19 %19 0 1
-               OpStore %res %16
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %25
-         %27 = OpLabel
-         %28 = OpFunctionCall %void %textureDimensions_fb5670
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %12
-         %30 = OpLabel
-         %31 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %31
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %12
-         %34 = OpLabel
-         %35 = OpFunctionCall %void %textureDimensions_fb5670
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %12
-         %37 = OpLabel
-         %38 = OpFunctionCall %void %textureDimensions_fb5670
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/fb5670.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/fb5670.wgsl.expected.wgsl
deleted file mode 100644
index 199f355..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/fb5670.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_2d_array<rg32float, write>;
-
-fn textureDimensions_fb5670() {
-  var res : vec2<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_fb5670();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_fb5670();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_fb5670();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl b/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl
deleted file mode 100644
index 31013b6..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright 2022 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_3d<f32>;
-
-// fn textureDimensions(texture: texture_3d<f32>, level: u32) -> vec3<i32>
-fn textureDimensions_fbdfb6() {
-  var arg_1 = 1u;
-  var res: vec3<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_fbdfb6();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_fbdfb6();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_fbdfb6();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl.expected.dxc.hlsl
deleted file mode 100644
index d6b9fe2..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-Texture3D<float4> arg_0 : register(t0, space1);
-
-void textureDimensions_fbdfb6() {
-  uint arg_1 = 1u;
-  int4 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
-  int3 res = tint_tmp.xyz;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_fbdfb6();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_fbdfb6();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_fbdfb6();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl.expected.fxc.hlsl
deleted file mode 100644
index d6b9fe2..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,35 +0,0 @@
-Texture3D<float4> arg_0 : register(t0, space1);
-
-void textureDimensions_fbdfb6() {
-  uint arg_1 = 1u;
-  int4 tint_tmp;
-  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
-  int3 res = tint_tmp.xyz;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_fbdfb6();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_fbdfb6();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_fbdfb6();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl.expected.glsl
deleted file mode 100644
index 62b4cbb..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl.expected.glsl
+++ /dev/null
@@ -1,55 +0,0 @@
-#version 310 es
-
-uniform highp sampler3D arg_0_1;
-void textureDimensions_fbdfb6() {
-  uint arg_1 = 1u;
-  ivec3 res = textureSize(arg_0_1, int(arg_1));
-}
-
-vec4 vertex_main() {
-  textureDimensions_fbdfb6();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-uniform highp sampler3D arg_0_1;
-void textureDimensions_fbdfb6() {
-  uint arg_1 = 1u;
-  ivec3 res = textureSize(arg_0_1, int(arg_1));
-}
-
-void fragment_main() {
-  textureDimensions_fbdfb6();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-uniform highp sampler3D arg_0_1;
-void textureDimensions_fbdfb6() {
-  uint arg_1 = 1u;
-  ivec3 res = textureSize(arg_0_1, int(arg_1));
-}
-
-void compute_main() {
-  textureDimensions_fbdfb6();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl.expected.msl
deleted file mode 100644
index a9b385d..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl.expected.msl
+++ /dev/null
@@ -1,34 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_fbdfb6(texture3d<float, access::sample> tint_symbol_1) {
-  uint arg_1 = 1u;
-  int3 res = int3(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1), tint_symbol_1.get_depth(arg_1));
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture3d<float, access::sample> tint_symbol_2) {
-  textureDimensions_fbdfb6(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture3d<float, access::sample> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture3d<float, access::sample> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_fbdfb6(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture3d<float, access::sample> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_fbdfb6(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl.expected.spvasm
deleted file mode 100644
index cb182db..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl.expected.spvasm
+++ /dev/null
@@ -1,83 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 43
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_fbdfb6 "textureDimensions_fbdfb6"
-               OpName %arg_1 "arg_1"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-         %11 = OpTypeImage %float 3D 0 0 0 1 Unknown
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %12 = OpTypeFunction %void
-       %uint = OpTypeInt 32 0
-     %uint_1 = OpConstant %uint 1
-%_ptr_Function_uint = OpTypePointer Function %uint
-         %20 = OpConstantNull %uint
-        %int = OpTypeInt 32 1
-      %v3int = OpTypeVector %int 3
-%_ptr_Function_v3int = OpTypePointer Function %v3int
-         %28 = OpConstantNull %v3int
-         %29 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_fbdfb6 = OpFunction %void None %12
-         %15 = OpLabel
-      %arg_1 = OpVariable %_ptr_Function_uint Function %20
-        %res = OpVariable %_ptr_Function_v3int Function %28
-               OpStore %arg_1 %uint_1
-         %24 = OpLoad %11 %arg_0
-         %25 = OpLoad %uint %arg_1
-         %21 = OpImageQuerySizeLod %v3int %24 %25
-               OpStore %res %21
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %29
-         %31 = OpLabel
-         %32 = OpFunctionCall %void %textureDimensions_fbdfb6
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %12
-         %34 = OpLabel
-         %35 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %35
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %12
-         %38 = OpLabel
-         %39 = OpFunctionCall %void %textureDimensions_fbdfb6
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %12
-         %41 = OpLabel
-         %42 = OpFunctionCall %void %textureDimensions_fbdfb6
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl.expected.wgsl
deleted file mode 100644
index 2b1a31e..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/fbdfb6.wgsl.expected.wgsl
+++ /dev/null
@@ -1,22 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_3d<f32>;
-
-fn textureDimensions_fbdfb6() {
-  var arg_1 = 1u;
-  var res : vec3<i32> = textureDimensions(arg_0, arg_1);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_fbdfb6();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_fbdfb6();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_fbdfb6();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/fcac78.wgsl b/test/tint/builtins/gen/var/textureDimensions/fcac78.wgsl
deleted file mode 100644
index f99ff3f..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/fcac78.wgsl
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright 2021 The Tint Authors.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-////////////////////////////////////////////////////////////////////////////////
-// File generated by tools/src/cmd/gen
-// using the template:
-//   test/tint/builtins/gen/gen.wgsl.tmpl
-//
-// Do not modify this file directly
-////////////////////////////////////////////////////////////////////////////////
-
-@group(1) @binding(0) var arg_0: texture_storage_3d<rgba8uint, write>;
-
-// fn textureDimensions(texture: texture_storage_3d<rgba8uint, write>) -> vec3<i32>
-fn textureDimensions_fcac78() {
-  var res: vec3<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_fcac78();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_fcac78();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_fcac78();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/fcac78.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/fcac78.wgsl.expected.dxc.hlsl
deleted file mode 100644
index f02946b..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/fcac78.wgsl.expected.dxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture3D<uint4> arg_0 : register(u0, space1);
-
-void textureDimensions_fcac78() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int3 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_fcac78();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_fcac78();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_fcac78();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/fcac78.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/fcac78.wgsl.expected.fxc.hlsl
deleted file mode 100644
index f02946b..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/fcac78.wgsl.expected.fxc.hlsl
+++ /dev/null
@@ -1,34 +0,0 @@
-RWTexture3D<uint4> arg_0 : register(u0, space1);
-
-void textureDimensions_fcac78() {
-  int3 tint_tmp;
-  arg_0.GetDimensions(tint_tmp.x, tint_tmp.y, tint_tmp.z);
-  int3 res = tint_tmp;
-}
-
-struct tint_symbol {
-  float4 value : SV_Position;
-};
-
-float4 vertex_main_inner() {
-  textureDimensions_fcac78();
-  return (0.0f).xxxx;
-}
-
-tint_symbol vertex_main() {
-  const float4 inner_result = vertex_main_inner();
-  tint_symbol wrapper_result = (tint_symbol)0;
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-void fragment_main() {
-  textureDimensions_fcac78();
-  return;
-}
-
-[numthreads(1, 1, 1)]
-void compute_main() {
-  textureDimensions_fcac78();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/fcac78.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/fcac78.wgsl.expected.glsl
deleted file mode 100644
index 9226dcd..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/fcac78.wgsl.expected.glsl
+++ /dev/null
@@ -1,52 +0,0 @@
-#version 310 es
-
-layout(rgba8ui) uniform highp writeonly uimage3D arg_0;
-void textureDimensions_fcac78() {
-  ivec3 res = imageSize(arg_0);
-}
-
-vec4 vertex_main() {
-  textureDimensions_fcac78();
-  return vec4(0.0f);
-}
-
-void main() {
-  gl_PointSize = 1.0;
-  vec4 inner_result = vertex_main();
-  gl_Position = inner_result;
-  gl_Position.y = -(gl_Position.y);
-  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
-  return;
-}
-#version 310 es
-precision mediump float;
-
-layout(rgba8ui) uniform highp writeonly uimage3D arg_0;
-void textureDimensions_fcac78() {
-  ivec3 res = imageSize(arg_0);
-}
-
-void fragment_main() {
-  textureDimensions_fcac78();
-}
-
-void main() {
-  fragment_main();
-  return;
-}
-#version 310 es
-
-layout(rgba8ui) uniform highp writeonly uimage3D arg_0;
-void textureDimensions_fcac78() {
-  ivec3 res = imageSize(arg_0);
-}
-
-void compute_main() {
-  textureDimensions_fcac78();
-}
-
-layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
-void main() {
-  compute_main();
-  return;
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/fcac78.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/fcac78.wgsl.expected.msl
deleted file mode 100644
index 3c6340c..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/fcac78.wgsl.expected.msl
+++ /dev/null
@@ -1,33 +0,0 @@
-#include <metal_stdlib>
-
-using namespace metal;
-void textureDimensions_fcac78(texture3d<uint, access::write> tint_symbol_1) {
-  int3 res = int3(tint_symbol_1.get_width(), tint_symbol_1.get_height(), tint_symbol_1.get_depth());
-}
-
-struct tint_symbol {
-  float4 value [[position]];
-};
-
-float4 vertex_main_inner(texture3d<uint, access::write> tint_symbol_2) {
-  textureDimensions_fcac78(tint_symbol_2);
-  return float4(0.0f);
-}
-
-vertex tint_symbol vertex_main(texture3d<uint, access::write> tint_symbol_3 [[texture(0)]]) {
-  float4 const inner_result = vertex_main_inner(tint_symbol_3);
-  tint_symbol wrapper_result = {};
-  wrapper_result.value = inner_result;
-  return wrapper_result;
-}
-
-fragment void fragment_main(texture3d<uint, access::write> tint_symbol_4 [[texture(0)]]) {
-  textureDimensions_fcac78(tint_symbol_4);
-  return;
-}
-
-kernel void compute_main(texture3d<uint, access::write> tint_symbol_5 [[texture(0)]]) {
-  textureDimensions_fcac78(tint_symbol_5);
-  return;
-}
-
diff --git a/test/tint/builtins/gen/var/textureDimensions/fcac78.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/fcac78.wgsl.expected.spvasm
deleted file mode 100644
index 2b1c5c3..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/fcac78.wgsl.expected.spvasm
+++ /dev/null
@@ -1,77 +0,0 @@
-; SPIR-V
-; Version: 1.3
-; Generator: Google Tint Compiler; 0
-; Bound: 38
-; Schema: 0
-               OpCapability Shader
-               OpCapability ImageQuery
-               OpMemoryModel Logical GLSL450
-               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
-               OpEntryPoint Fragment %fragment_main "fragment_main"
-               OpEntryPoint GLCompute %compute_main "compute_main"
-               OpExecutionMode %fragment_main OriginUpperLeft
-               OpExecutionMode %compute_main LocalSize 1 1 1
-               OpName %value "value"
-               OpName %vertex_point_size "vertex_point_size"
-               OpName %arg_0 "arg_0"
-               OpName %textureDimensions_fcac78 "textureDimensions_fcac78"
-               OpName %res "res"
-               OpName %vertex_main_inner "vertex_main_inner"
-               OpName %vertex_main "vertex_main"
-               OpName %fragment_main "fragment_main"
-               OpName %compute_main "compute_main"
-               OpDecorate %value BuiltIn Position
-               OpDecorate %vertex_point_size BuiltIn PointSize
-               OpDecorate %arg_0 NonReadable
-               OpDecorate %arg_0 DescriptorSet 1
-               OpDecorate %arg_0 Binding 0
-      %float = OpTypeFloat 32
-    %v4float = OpTypeVector %float 4
-%_ptr_Output_v4float = OpTypePointer Output %v4float
-          %5 = OpConstantNull %v4float
-      %value = OpVariable %_ptr_Output_v4float Output %5
-%_ptr_Output_float = OpTypePointer Output %float
-          %8 = OpConstantNull %float
-%vertex_point_size = OpVariable %_ptr_Output_float Output %8
-       %uint = OpTypeInt 32 0
-         %11 = OpTypeImage %uint 3D 0 0 0 2 Rgba8ui
-%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
-      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
-       %void = OpTypeVoid
-         %13 = OpTypeFunction %void
-        %int = OpTypeInt 32 1
-      %v3int = OpTypeVector %int 3
-%_ptr_Function_v3int = OpTypePointer Function %v3int
-         %23 = OpConstantNull %v3int
-         %24 = OpTypeFunction %v4float
-    %float_1 = OpConstant %float 1
-%textureDimensions_fcac78 = OpFunction %void None %13
-         %16 = OpLabel
-        %res = OpVariable %_ptr_Function_v3int Function %23
-         %20 = OpLoad %11 %arg_0
-         %17 = OpImageQuerySize %v3int %20
-               OpStore %res %17
-               OpReturn
-               OpFunctionEnd
-%vertex_main_inner = OpFunction %v4float None %24
-         %26 = OpLabel
-         %27 = OpFunctionCall %void %textureDimensions_fcac78
-               OpReturnValue %5
-               OpFunctionEnd
-%vertex_main = OpFunction %void None %13
-         %29 = OpLabel
-         %30 = OpFunctionCall %v4float %vertex_main_inner
-               OpStore %value %30
-               OpStore %vertex_point_size %float_1
-               OpReturn
-               OpFunctionEnd
-%fragment_main = OpFunction %void None %13
-         %33 = OpLabel
-         %34 = OpFunctionCall %void %textureDimensions_fcac78
-               OpReturn
-               OpFunctionEnd
-%compute_main = OpFunction %void None %13
-         %36 = OpLabel
-         %37 = OpFunctionCall %void %textureDimensions_fcac78
-               OpReturn
-               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/fcac78.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/fcac78.wgsl.expected.wgsl
deleted file mode 100644
index 3e13671..0000000
--- a/test/tint/builtins/gen/var/textureDimensions/fcac78.wgsl.expected.wgsl
+++ /dev/null
@@ -1,21 +0,0 @@
-@group(1) @binding(0) var arg_0 : texture_storage_3d<rgba8uint, write>;
-
-fn textureDimensions_fcac78() {
-  var res : vec3<i32> = textureDimensions(arg_0);
-}
-
-@vertex
-fn vertex_main() -> @builtin(position) vec4<f32> {
-  textureDimensions_fcac78();
-  return vec4<f32>();
-}
-
-@fragment
-fn fragment_main() {
-  textureDimensions_fcac78();
-}
-
-@compute @workgroup_size(1)
-fn compute_main() {
-  textureDimensions_fcac78();
-}
diff --git a/test/tint/builtins/gen/var/textureDimensions/fdf6e9.wgsl b/test/tint/builtins/gen/var/textureDimensions/fdf6e9.wgsl
new file mode 100644
index 0000000..2359d78
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/fdf6e9.wgsl
@@ -0,0 +1,45 @@
+// Copyright 2022 The Tint Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+////////////////////////////////////////////////////////////////////////////////
+// File generated by tools/src/cmd/gen
+// using the template:
+//   test/tint/builtins/gen/gen.wgsl.tmpl
+//
+// Do not modify this file directly
+////////////////////////////////////////////////////////////////////////////////
+
+@group(1) @binding(0) var arg_0: texture_2d_array<i32>;
+
+// fn textureDimensions(texture: texture_2d_array<i32>, level: i32) -> vec2<u32>
+fn textureDimensions_fdf6e9() {
+  var arg_1 = 1i;
+  var res: vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_fdf6e9();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_fdf6e9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_fdf6e9();
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/fdf6e9.wgsl.expected.dxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/fdf6e9.wgsl.expected.dxc.hlsl
new file mode 100644
index 0000000..aa96c91
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/fdf6e9.wgsl.expected.dxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_fdf6e9() {
+  int arg_1 = 1;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_fdf6e9();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_fdf6e9();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_fdf6e9();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/fdf6e9.wgsl.expected.fxc.hlsl b/test/tint/builtins/gen/var/textureDimensions/fdf6e9.wgsl.expected.fxc.hlsl
new file mode 100644
index 0000000..aa96c91
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/fdf6e9.wgsl.expected.fxc.hlsl
@@ -0,0 +1,35 @@
+Texture2DArray<int4> arg_0 : register(t0, space1);
+
+void textureDimensions_fdf6e9() {
+  int arg_1 = 1;
+  int4 tint_tmp;
+  arg_0.GetDimensions(arg_1, tint_tmp.x, tint_tmp.y, tint_tmp.z, tint_tmp.w);
+  uint2 res = tint_tmp.xy;
+}
+
+struct tint_symbol {
+  float4 value : SV_Position;
+};
+
+float4 vertex_main_inner() {
+  textureDimensions_fdf6e9();
+  return (0.0f).xxxx;
+}
+
+tint_symbol vertex_main() {
+  const float4 inner_result = vertex_main_inner();
+  tint_symbol wrapper_result = (tint_symbol)0;
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+void fragment_main() {
+  textureDimensions_fdf6e9();
+  return;
+}
+
+[numthreads(1, 1, 1)]
+void compute_main() {
+  textureDimensions_fdf6e9();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/fdf6e9.wgsl.expected.glsl b/test/tint/builtins/gen/var/textureDimensions/fdf6e9.wgsl.expected.glsl
new file mode 100644
index 0000000..c2c98fc
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/fdf6e9.wgsl.expected.glsl
@@ -0,0 +1,55 @@
+#version 310 es
+
+uniform highp isampler2DArray arg_0_1;
+void textureDimensions_fdf6e9() {
+  int arg_1 = 1;
+  uvec2 res = uvec2(textureSize(arg_0_1, arg_1).xy);
+}
+
+vec4 vertex_main() {
+  textureDimensions_fdf6e9();
+  return vec4(0.0f);
+}
+
+void main() {
+  gl_PointSize = 1.0;
+  vec4 inner_result = vertex_main();
+  gl_Position = inner_result;
+  gl_Position.y = -(gl_Position.y);
+  gl_Position.z = ((2.0f * gl_Position.z) - gl_Position.w);
+  return;
+}
+#version 310 es
+precision mediump float;
+
+uniform highp isampler2DArray arg_0_1;
+void textureDimensions_fdf6e9() {
+  int arg_1 = 1;
+  uvec2 res = uvec2(textureSize(arg_0_1, arg_1).xy);
+}
+
+void fragment_main() {
+  textureDimensions_fdf6e9();
+}
+
+void main() {
+  fragment_main();
+  return;
+}
+#version 310 es
+
+uniform highp isampler2DArray arg_0_1;
+void textureDimensions_fdf6e9() {
+  int arg_1 = 1;
+  uvec2 res = uvec2(textureSize(arg_0_1, arg_1).xy);
+}
+
+void compute_main() {
+  textureDimensions_fdf6e9();
+}
+
+layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in;
+void main() {
+  compute_main();
+  return;
+}
diff --git a/test/tint/builtins/gen/var/textureDimensions/fdf6e9.wgsl.expected.msl b/test/tint/builtins/gen/var/textureDimensions/fdf6e9.wgsl.expected.msl
new file mode 100644
index 0000000..849b694
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/fdf6e9.wgsl.expected.msl
@@ -0,0 +1,34 @@
+#include <metal_stdlib>
+
+using namespace metal;
+void textureDimensions_fdf6e9(texture2d_array<int, access::sample> tint_symbol_1) {
+  int arg_1 = 1;
+  uint2 res = uint2(tint_symbol_1.get_width(arg_1), tint_symbol_1.get_height(arg_1));
+}
+
+struct tint_symbol {
+  float4 value [[position]];
+};
+
+float4 vertex_main_inner(texture2d_array<int, access::sample> tint_symbol_2) {
+  textureDimensions_fdf6e9(tint_symbol_2);
+  return float4(0.0f);
+}
+
+vertex tint_symbol vertex_main(texture2d_array<int, access::sample> tint_symbol_3 [[texture(0)]]) {
+  float4 const inner_result = vertex_main_inner(tint_symbol_3);
+  tint_symbol wrapper_result = {};
+  wrapper_result.value = inner_result;
+  return wrapper_result;
+}
+
+fragment void fragment_main(texture2d_array<int, access::sample> tint_symbol_4 [[texture(0)]]) {
+  textureDimensions_fdf6e9(tint_symbol_4);
+  return;
+}
+
+kernel void compute_main(texture2d_array<int, access::sample> tint_symbol_5 [[texture(0)]]) {
+  textureDimensions_fdf6e9(tint_symbol_5);
+  return;
+}
+
diff --git a/test/tint/builtins/gen/var/textureDimensions/fdf6e9.wgsl.expected.spvasm b/test/tint/builtins/gen/var/textureDimensions/fdf6e9.wgsl.expected.spvasm
new file mode 100644
index 0000000..de44015
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/fdf6e9.wgsl.expected.spvasm
@@ -0,0 +1,85 @@
+; SPIR-V
+; Version: 1.3
+; Generator: Google Tint Compiler; 0
+; Bound: 45
+; Schema: 0
+               OpCapability Shader
+               OpCapability ImageQuery
+               OpMemoryModel Logical GLSL450
+               OpEntryPoint Vertex %vertex_main "vertex_main" %value %vertex_point_size
+               OpEntryPoint Fragment %fragment_main "fragment_main"
+               OpEntryPoint GLCompute %compute_main "compute_main"
+               OpExecutionMode %fragment_main OriginUpperLeft
+               OpExecutionMode %compute_main LocalSize 1 1 1
+               OpName %value "value"
+               OpName %vertex_point_size "vertex_point_size"
+               OpName %arg_0 "arg_0"
+               OpName %textureDimensions_fdf6e9 "textureDimensions_fdf6e9"
+               OpName %arg_1 "arg_1"
+               OpName %res "res"
+               OpName %vertex_main_inner "vertex_main_inner"
+               OpName %vertex_main "vertex_main"
+               OpName %fragment_main "fragment_main"
+               OpName %compute_main "compute_main"
+               OpDecorate %value BuiltIn Position
+               OpDecorate %vertex_point_size BuiltIn PointSize
+               OpDecorate %arg_0 DescriptorSet 1
+               OpDecorate %arg_0 Binding 0
+      %float = OpTypeFloat 32
+    %v4float = OpTypeVector %float 4
+%_ptr_Output_v4float = OpTypePointer Output %v4float
+          %5 = OpConstantNull %v4float
+      %value = OpVariable %_ptr_Output_v4float Output %5
+%_ptr_Output_float = OpTypePointer Output %float
+          %8 = OpConstantNull %float
+%vertex_point_size = OpVariable %_ptr_Output_float Output %8
+        %int = OpTypeInt 32 1
+         %11 = OpTypeImage %int 2D 0 1 0 1 Unknown
+%_ptr_UniformConstant_11 = OpTypePointer UniformConstant %11
+      %arg_0 = OpVariable %_ptr_UniformConstant_11 UniformConstant
+       %void = OpTypeVoid
+         %13 = OpTypeFunction %void
+      %int_1 = OpConstant %int 1
+%_ptr_Function_int = OpTypePointer Function %int
+         %20 = OpConstantNull %int
+       %uint = OpTypeInt 32 0
+     %v2uint = OpTypeVector %uint 2
+     %v3uint = OpTypeVector %uint 3
+%_ptr_Function_v2uint = OpTypePointer Function %v2uint
+         %30 = OpConstantNull %v2uint
+         %31 = OpTypeFunction %v4float
+    %float_1 = OpConstant %float 1
+%textureDimensions_fdf6e9 = OpFunction %void None %13
+         %16 = OpLabel
+      %arg_1 = OpVariable %_ptr_Function_int Function %20
+        %res = OpVariable %_ptr_Function_v2uint Function %30
+               OpStore %arg_1 %int_1
+         %26 = OpLoad %11 %arg_0
+         %27 = OpLoad %int %arg_1
+         %24 = OpImageQuerySizeLod %v3uint %26 %27
+         %21 = OpVectorShuffle %v2uint %24 %24 0 1
+               OpStore %res %21
+               OpReturn
+               OpFunctionEnd
+%vertex_main_inner = OpFunction %v4float None %31
+         %33 = OpLabel
+         %34 = OpFunctionCall %void %textureDimensions_fdf6e9
+               OpReturnValue %5
+               OpFunctionEnd
+%vertex_main = OpFunction %void None %13
+         %36 = OpLabel
+         %37 = OpFunctionCall %v4float %vertex_main_inner
+               OpStore %value %37
+               OpStore %vertex_point_size %float_1
+               OpReturn
+               OpFunctionEnd
+%fragment_main = OpFunction %void None %13
+         %40 = OpLabel
+         %41 = OpFunctionCall %void %textureDimensions_fdf6e9
+               OpReturn
+               OpFunctionEnd
+%compute_main = OpFunction %void None %13
+         %43 = OpLabel
+         %44 = OpFunctionCall %void %textureDimensions_fdf6e9
+               OpReturn
+               OpFunctionEnd
diff --git a/test/tint/builtins/gen/var/textureDimensions/fdf6e9.wgsl.expected.wgsl b/test/tint/builtins/gen/var/textureDimensions/fdf6e9.wgsl.expected.wgsl
new file mode 100644
index 0000000..9138c00
--- /dev/null
+++ b/test/tint/builtins/gen/var/textureDimensions/fdf6e9.wgsl.expected.wgsl
@@ -0,0 +1,22 @@
+@group(1) @binding(0) var arg_0 : texture_2d_array<i32>;
+
+fn textureDimensions_fdf6e9() {
+  var arg_1 = 1i;
+  var res : vec2<u32> = textureDimensions(arg_0, arg_1);
+}
+
+@vertex
+fn vertex_main() -> @builtin(position) vec4<f32> {
+  textureDimensions_fdf6e9();
+  return vec4<f32>();
+}
+
+@fragment
+fn fragment_main() {
+  textureDimensions_fdf6e9();
+}
+
+@compute @workgroup_size(1)
+fn compute_main() {
+  textureDimensions_fdf6e9();
+}